@zaide6137/m3-components-web 0.1.24 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -0
- package/package.json +5 -1
- package/dist/index.css +0 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime'),m3ComponentsWeb=require('@zaide6137/m3-components-web'),framerMotion=require('framer-motion'),reactBigCalendar=require('react-big-calendar');require('react-big-calendar/lib/css/react-big-calendar.css');var ol=Object.create;var zn=Object.defineProperty;var sl=Object.getOwnPropertyDescriptor;var il=Object.getOwnPropertyNames;var ll=Object.getPrototypeOf,cl=Object.prototype.hasOwnProperty;var Gn=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var ul=(s,t)=>()=>(t||s((t={exports:{}}).exports,t),t.exports);var hl=(s,t,r,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of il(t))!cl.call(s,c)&&c!==r&&zn(s,c,{get:()=>t[c],enumerable:!(l=sl(t,c))||l.enumerable});return s};var jn=(s,t,r)=>(r=s!=null?ol(ll(s)):{},hl(!s||!s.__esModule?zn(r,"default",{value:s,enumerable:true}):r,s));var Zr=ul((Xr,Dt)=>{(function(s,t){typeof Xr=="object"&&typeof Dt<"u"?Dt.exports=t():typeof define=="function"&&define.amd?define(t):s.moment=t();})(Xr,(function(){var s;function t(){return s.apply(null,arguments)}function r(e){s=e;}function l(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function c(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function h(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function d(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var n;for(n in e)if(h(e,n))return false;return true}function p(e){return e===void 0}function P(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function k(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function b(e,n){var a=[],o,i=e.length;for(o=0;o<i;++o)a.push(n(e[o],o));return a}function w(e,n){for(var a in n)h(n,a)&&(e[a]=n[a]);return h(n,"toString")&&(e.toString=n.toString),h(n,"valueOf")&&(e.valueOf=n.valueOf),e}function v(e,n,a,o){return Dn(e,n,a,o,true).utc()}function T(){return {empty:false,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:false,invalidEra:null,invalidMonth:null,invalidFormat:false,userInvalidated:false,iso:false,parsedDateParts:[],era:null,meridiem:null,rfc2822:false,weekdayMismatch:false}}function m(e){return e._pf==null&&(e._pf=T()),e._pf}var D;Array.prototype.some?D=Array.prototype.some:D=function(e){var n=Object(this),a=n.length>>>0,o;for(o=0;o<a;o++)if(o in n&&e.call(this,n[o],o,n))return true;return false};function x(e){var n=null,a=false,o=e._d&&!isNaN(e._d.getTime());if(o&&(n=m(e),a=D.call(n.parsedDateParts,function(i){return i!=null}),o=n.overflow<0&&!n.empty&&!n.invalidEra&&!n.invalidMonth&&!n.invalidWeekday&&!n.weekdayMismatch&&!n.nullInput&&!n.invalidFormat&&!n.userInvalidated&&(!n.meridiem||n.meridiem&&a),e._strict&&(o=o&&n.charsLeftOver===0&&n.unusedTokens.length===0&&n.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=o;else return o;return e._isValid}function Y(e){var n=v(NaN);return e!=null?w(m(n),e):m(n).userInvalidated=true,n}var H=t.momentProperties=[],X=false;function Z(e,n){var a,o,i,u=H.length;if(p(n._isAMomentObject)||(e._isAMomentObject=n._isAMomentObject),p(n._i)||(e._i=n._i),p(n._f)||(e._f=n._f),p(n._l)||(e._l=n._l),p(n._strict)||(e._strict=n._strict),p(n._tzm)||(e._tzm=n._tzm),p(n._isUTC)||(e._isUTC=n._isUTC),p(n._offset)||(e._offset=n._offset),p(n._pf)||(e._pf=m(n)),p(n._locale)||(e._locale=n._locale),u>0)for(a=0;a<u;a++)o=H[a],i=n[o],p(i)||(e[o]=i);return e}function $(e){Z(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),X===false&&(X=true,t.updateOffset(this),X=false);}function V(e){return e instanceof $||e!=null&&e._isAMomentObject!=null}function z(e){t.suppressDeprecationWarnings===false&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e);}function U(e,n){var a=true;return w(function(){if(t.deprecationHandler!=null&&t.deprecationHandler(null,e),a){var o=[],i,u,y,M=arguments.length;for(u=0;u<M;u++){if(i="",typeof arguments[u]=="object"){i+=`
|
|
2
2
|
[`+u+"] ";for(y in arguments[0])h(arguments[0],y)&&(i+=y+": "+arguments[0][y]+", ");i=i.slice(0,-2);}else i=arguments[u];o.push(i);}z(e+`
|
|
3
3
|
Arguments: `+Array.prototype.slice.call(o).join("")+`
|
|
4
|
-
`+new Error().stack),a=false;}return n.apply(this,arguments)},n)}var ne={};function ee(e,n){t.deprecationHandler!=null&&t.deprecationHandler(e,n),ne[e]||(z(n),ne[e]=true);}t.suppressDeprecationWarnings=false,t.deprecationHandler=null;function oe(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function Se(e){var n,a;for(a in e)h(e,a)&&(n=e[a],oe(n)?this[a]=n:this["_"+a]=n);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source);}function ke(e,n){var a=w({},e),o;for(o in n)h(n,o)&&(c(e[o])&&c(n[o])?(a[o]={},w(a[o],e[o]),w(a[o],n[o])):n[o]!=null?a[o]=n[o]:delete a[o]);for(o in e)h(e,o)&&!h(n,o)&&c(e[o])&&(a[o]=w({},a[o]));return a}function L(e){e!=null&&this.set(e);}var fe;Object.keys?fe=Object.keys:fe=function(e){var n,a=[];for(n in e)h(e,n)&&a.push(n);return a};var Oe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function be(e,n,a){var o=this._calendar[e]||this._calendar.sameElse;return oe(o)?o.call(n,a):o}function de(e,n,a){var o=""+Math.abs(e),i=n-o.length,u=e>=0;return (u?a?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+o}var et=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ke=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,tt={},Fe={};function O(e,n,a,o){var i=o;typeof o=="string"&&(i=function(){return this[o]()}),e&&(Fe[e]=i),n&&(Fe[n[0]]=function(){return de(i.apply(this,arguments),n[1],n[2])}),a&&(Fe[a]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)});}function Bt(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Ht(e){var n=e.match(et),a,o;for(a=0,o=n.length;a<o;a++)Fe[n[a]]?n[a]=Fe[n[a]]:n[a]=Bt(n[a]);return function(i){var u="",y;for(y=0;y<o;y++)u+=oe(n[y])?n[y].call(i,e):n[y];return u}}function lt(e,n){return e.isValid()?(n=Ut(n,e.localeData()),tt[n]=tt[n]||Ht(n),tt[n](e)):e.localeData().invalidDate()}function Ut(e,n){var a=5;function o(i){return n.longDateFormat(i)||i}for(Ke.lastIndex=0;a>=0&&Ke.test(e);)e=e.replace(Ke,o),Ke.lastIndex=0,a-=1;return e}var Wt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function gr(e){var n=this._longDateFormat[e],a=this._longDateFormat[e.toUpperCase()];return n||!a?n:(this._longDateFormat[e]=a.match(et).map(function(o){return o==="MMMM"||o==="MM"||o==="DD"||o==="dddd"?o.slice(1):o}).join(""),this._longDateFormat[e])}var Sr="Invalid date";function ma(){return this._invalidDate}var pa="%d",ya=/\d{1,2}/;function ga(e){return this._ordinal.replace("%d",e)}var Sa={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ka(e,n,a,o){var i=this._relativeTime[a];return oe(i)?i(e,n,a,o):i.replace(/%d/i,e)}function Pa(e,n){var a=this._relativeTime[e>0?"future":"past"];return oe(a)?a(n):a.replace(/%s/i,n)}var Qr={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function we(e){return typeof e=="string"?Qr[e]||Qr[e.toLowerCase()]:void 0}function kr(e){var n={},a,o;for(o in e)h(e,o)&&(a=we(o),a&&(n[a]=e[o]));return n}var Da={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ba(e){var n=[],a;for(a in e)h(e,a)&&n.push({unit:a,priority:Da[a]});return n.sort(function(o,i){return o.priority-i.priority}),n}var en=/\d/,Pe=/\d\d/,tn=/\d{3}/,Pr=/\d{4}/,zt=/[+-]?\d{6}/,te=/\d\d?/,rn=/\d\d\d\d?/,nn=/\d\d\d\d\d\d?/,Gt=/\d{1,3}/,Dr=/\d{1,4}/,jt=/[+-]?\d{1,6}/,ct=/\d+/,$t=/[+-]?\d+/,wa=/Z|[+-]\d\d:?\d\d/gi,qt=/Z|[+-]\d\d(?::?\d\d)?/gi,Ca=/[+-]?\d+(\.\d{1,3})?/,bt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut=/^[1-9]\d?/,br=/^([1-9]\d|\d)/,Kt;Kt={};function A(e,n,a){Kt[e]=oe(n)?n:function(o,i){return o&&a?a:n};}function va(e,n){return h(Kt,e)?Kt[e](n._strict,n._locale):new RegExp(Ta(e))}function Ta(e){return Ne(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,a,o,i,u){return a||o||i||u}))}function Ne(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function W(e){var n=+e,a=0;return n!==0&&isFinite(n)&&(a=Ce(n)),a}var wr={};function Q(e,n){var a,o=n,i;for(typeof e=="string"&&(e=[e]),P(n)&&(o=function(u,y){y[n]=W(u);}),i=e.length,a=0;a<i;a++)wr[e[a]]=o;}function wt(e,n){Q(e,function(a,o,i,u){i._w=i._w||{},n(a,i._w,i,u);});}function xa(e,n,a){n!=null&&h(wr,e)&&wr[e](n,a._a,a,e);}function Xt(e){return e%4===0&&e%100!==0||e%400===0}var me=0,Le=1,Re=2,ue=3,Te=4,Ye=5,rt=6,_a=7,Ma=8;O("Y",0,0,function(){var e=this.year();return e<=9999?de(e,4):"+"+e}),O(0,["YY",2],0,function(){return this.year()%100}),O(0,["YYYY",4],0,"year"),O(0,["YYYYY",5],0,"year"),O(0,["YYYYYY",6,true],0,"year"),A("Y",$t),A("YY",te,Pe),A("YYYY",Dr,Pr),A("YYYYY",jt,zt),A("YYYYYY",jt,zt),Q(["YYYYY","YYYYYY"],me),Q("YYYY",function(e,n){n[me]=e.length===2?t.parseTwoDigitYear(e):W(e);}),Q("YY",function(e,n){n[me]=t.parseTwoDigitYear(e);}),Q("Y",function(e,n){n[me]=parseInt(e,10);});function Ct(e){return Xt(e)?366:365}t.parseTwoDigitYear=function(e){return W(e)+(W(e)>68?1900:2e3)};var an=ht("FullYear",true);function Aa(){return Xt(this.year())}function ht(e,n){return function(a){return a!=null?(on(this,e,a),t.updateOffset(this,n),this):vt(this,e)}}function vt(e,n){if(!e.isValid())return NaN;var a=e._d,o=e._isUTC;switch(n){case "Milliseconds":return o?a.getUTCMilliseconds():a.getMilliseconds();case "Seconds":return o?a.getUTCSeconds():a.getSeconds();case "Minutes":return o?a.getUTCMinutes():a.getMinutes();case "Hours":return o?a.getUTCHours():a.getHours();case "Date":return o?a.getUTCDate():a.getDate();case "Day":return o?a.getUTCDay():a.getDay();case "Month":return o?a.getUTCMonth():a.getMonth();case "FullYear":return o?a.getUTCFullYear():a.getFullYear();default:return NaN}}function on(e,n,a){var o,i,u,y,M;if(!(!e.isValid()||isNaN(a))){switch(o=e._d,i=e._isUTC,n){case "Milliseconds":return void(i?o.setUTCMilliseconds(a):o.setMilliseconds(a));case "Seconds":return void(i?o.setUTCSeconds(a):o.setSeconds(a));case "Minutes":return void(i?o.setUTCMinutes(a):o.setMinutes(a));case "Hours":return void(i?o.setUTCHours(a):o.setHours(a));case "Date":return void(i?o.setUTCDate(a):o.setDate(a));case "FullYear":break;default:return}u=a,y=e.month(),M=e.date(),M=M===29&&y===1&&!Xt(u)?28:M,i?o.setUTCFullYear(u,y,M):o.setFullYear(u,y,M);}}function Oa(e){return e=we(e),oe(this[e])?this[e]():this}function Fa(e,n){if(typeof e=="object"){e=kr(e);var a=ba(e),o,i=a.length;for(o=0;o<i;o++)this[a[o].unit](e[a[o].unit]);}else if(e=we(e),oe(this[e]))return this[e](n);return this}function Ra(e,n){return (e%n+n)%n}var ie;Array.prototype.indexOf?ie=Array.prototype.indexOf:ie=function(e){var n;for(n=0;n<this.length;++n)if(this[n]===e)return n;return -1};function Cr(e,n){if(isNaN(e)||isNaN(n))return NaN;var a=Ra(n,12);return e+=(n-a)/12,a===1?Xt(e)?29:28:31-a%7%2}O("M",["MM",2],"Mo",function(){return this.month()+1}),O("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),O("MMMM",0,0,function(e){return this.localeData().months(this,e)}),A("M",te,ut),A("MM",te,Pe),A("MMM",function(e,n){return n.monthsShortRegex(e)}),A("MMMM",function(e,n){return n.monthsRegex(e)}),Q(["M","MM"],function(e,n){n[Le]=W(e)-1;}),Q(["MMM","MMMM"],function(e,n,a,o){var i=a._locale.monthsParse(e,o,a._strict);i!=null?n[Le]=i:m(a).invalidMonth=e;});var Ia="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),sn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ln=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ea=bt,Na=bt;function La(e,n){return e?l(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ln).test(n)?"format":"standalone"][e.month()]:l(this._months)?this._months:this._months.standalone}function Ya(e,n){return e?l(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ln.test(n)?"format":"standalone"][e.month()]:l(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Va(e,n,a){var o,i,u,y=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)u=v([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(u,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(u,"").toLocaleLowerCase();return a?n==="MMM"?(i=ie.call(this._shortMonthsParse,y),i!==-1?i:null):(i=ie.call(this._longMonthsParse,y),i!==-1?i:null):n==="MMM"?(i=ie.call(this._shortMonthsParse,y),i!==-1?i:(i=ie.call(this._longMonthsParse,y),i!==-1?i:null)):(i=ie.call(this._longMonthsParse,y),i!==-1?i:(i=ie.call(this._shortMonthsParse,y),i!==-1?i:null))}function Ba(e,n,a){var o,i,u;if(this._monthsParseExact)return Va.call(this,e,n,a);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;o<12;o++){if(i=v([2e3,o]),a&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!a&&!this._monthsParse[o]&&(u="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[o]=new RegExp(u.replace(".",""),"i")),a&&n==="MMMM"&&this._longMonthsParse[o].test(e))return o;if(a&&n==="MMM"&&this._shortMonthsParse[o].test(e))return o;if(!a&&this._monthsParse[o].test(e))return o}}function cn(e,n){if(!e.isValid())return e;if(typeof n=="string"){if(/^\d+$/.test(n))n=W(n);else if(n=e.localeData().monthsParse(n),!P(n))return e}var a=n,o=e.date();return o=o<29?o:Math.min(o,Cr(e.year(),a)),e._isUTC?e._d.setUTCMonth(a,o):e._d.setMonth(a,o),e}function un(e){return e!=null?(cn(this,e),t.updateOffset(this,true),this):vt(this,"Month")}function Ha(){return Cr(this.year(),this.month())}function Ua(e){return this._monthsParseExact?(h(this,"_monthsRegex")||hn.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Ea),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Wa(e){return this._monthsParseExact?(h(this,"_monthsRegex")||hn.call(this),e?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Na),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function hn(){function e(N,G){return G.length-N.length}var n=[],a=[],o=[],i,u,y,M;for(i=0;i<12;i++)u=v([2e3,i]),y=Ne(this.monthsShort(u,"")),M=Ne(this.months(u,"")),n.push(y),a.push(M),o.push(M),o.push(y);n.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i");}function za(e,n,a,o,i,u,y){var M;return e<100&&e>=0?(M=new Date(e+400,n,a,o,i,u,y),isFinite(M.getFullYear())&&M.setFullYear(e)):M=new Date(e,n,a,o,i,u,y),M}function Tt(e){var n,a;return e<100&&e>=0?(a=Array.prototype.slice.call(arguments),a[0]=e+400,n=new Date(Date.UTC.apply(null,a)),isFinite(n.getUTCFullYear())&&n.setUTCFullYear(e)):n=new Date(Date.UTC.apply(null,arguments)),n}function Zt(e,n,a){var o=7+n-a,i=(7+Tt(e,0,o).getUTCDay()-n)%7;return -i+o-1}function dn(e,n,a,o,i){var u=(7+a-o)%7,y=Zt(e,o,i),M=1+7*(n-1)+u+y,N,G;return M<=0?(N=e-1,G=Ct(N)+M):M>Ct(e)?(N=e+1,G=M-Ct(e)):(N=e,G=M),{year:N,dayOfYear:G}}function xt(e,n,a){var o=Zt(e.year(),n,a),i=Math.floor((e.dayOfYear()-o-1)/7)+1,u,y;return i<1?(y=e.year()-1,u=i+Ve(y,n,a)):i>Ve(e.year(),n,a)?(u=i-Ve(e.year(),n,a),y=e.year()+1):(y=e.year(),u=i),{week:u,year:y}}function Ve(e,n,a){var o=Zt(e,n,a),i=Zt(e+1,n,a);return (Ct(e)-o+i)/7}O("w",["ww",2],"wo","week"),O("W",["WW",2],"Wo","isoWeek"),A("w",te,ut),A("ww",te,Pe),A("W",te,ut),A("WW",te,Pe),wt(["w","ww","W","WW"],function(e,n,a,o){n[o.substr(0,1)]=W(e);});function Ga(e){return xt(e,this._week.dow,this._week.doy).week}var ja={dow:0,doy:6};function $a(){return this._week.dow}function qa(){return this._week.doy}function Ka(e){var n=this.localeData().week(this);return e==null?n:this.add((e-n)*7,"d")}function Xa(e){var n=xt(this,1,4).week;return e==null?n:this.add((e-n)*7,"d")}O("d",0,"do","day"),O("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),O("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),O("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),O("e",0,0,"weekday"),O("E",0,0,"isoWeekday"),A("d",te),A("e",te),A("E",te),A("dd",function(e,n){return n.weekdaysMinRegex(e)}),A("ddd",function(e,n){return n.weekdaysShortRegex(e)}),A("dddd",function(e,n){return n.weekdaysRegex(e)}),wt(["dd","ddd","dddd"],function(e,n,a,o){var i=a._locale.weekdaysParse(e,o,a._strict);i!=null?n.d=i:m(a).invalidWeekday=e;}),wt(["d","e","E"],function(e,n,a,o){n[o]=W(e);});function Za(e,n){return typeof e!="string"?e:isNaN(e)?(e=n.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Ja(e,n){return typeof e=="string"?n.weekdaysParse(e)%7||7:isNaN(e)?null:e}function vr(e,n){return e.slice(n,7).concat(e.slice(0,n))}var Qa="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),fn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),eo="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),to=bt,ro=bt,no=bt;function ao(e,n){var a=l(this._weekdays)?this._weekdays:this._weekdays[e&&e!==true&&this._weekdays.isFormat.test(n)?"format":"standalone"];return e===true?vr(a,this._week.dow):e?a[e.day()]:a}function oo(e){return e===true?vr(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function so(e){return e===true?vr(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function io(e,n,a){var o,i,u,y=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)u=v([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(u,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(u,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(u,"").toLocaleLowerCase();return a?n==="dddd"?(i=ie.call(this._weekdaysParse,y),i!==-1?i:null):n==="ddd"?(i=ie.call(this._shortWeekdaysParse,y),i!==-1?i:null):(i=ie.call(this._minWeekdaysParse,y),i!==-1?i:null):n==="dddd"?(i=ie.call(this._weekdaysParse,y),i!==-1||(i=ie.call(this._shortWeekdaysParse,y),i!==-1)?i:(i=ie.call(this._minWeekdaysParse,y),i!==-1?i:null)):n==="ddd"?(i=ie.call(this._shortWeekdaysParse,y),i!==-1||(i=ie.call(this._weekdaysParse,y),i!==-1)?i:(i=ie.call(this._minWeekdaysParse,y),i!==-1?i:null)):(i=ie.call(this._minWeekdaysParse,y),i!==-1||(i=ie.call(this._weekdaysParse,y),i!==-1)?i:(i=ie.call(this._shortWeekdaysParse,y),i!==-1?i:null))}function lo(e,n,a){var o,i,u;if(this._weekdaysParseExact)return io.call(this,e,n,a);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(i=v([2e3,1]).day(o),a&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[o]||(u="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[o]=new RegExp(u.replace(".",""),"i")),a&&n==="dddd"&&this._fullWeekdaysParse[o].test(e))return o;if(a&&n==="ddd"&&this._shortWeekdaysParse[o].test(e))return o;if(a&&n==="dd"&&this._minWeekdaysParse[o].test(e))return o;if(!a&&this._weekdaysParse[o].test(e))return o}}function co(e){if(!this.isValid())return e!=null?this:NaN;var n=vt(this,"Day");return e!=null?(e=Za(e,this.localeData()),this.add(e-n,"d")):n}function uo(e){if(!this.isValid())return e!=null?this:NaN;var n=(this.day()+7-this.localeData()._week.dow)%7;return e==null?n:this.add(e-n,"d")}function ho(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var n=Ja(e,this.localeData());return this.day(this.day()%7?n:n-7)}else return this.day()||7}function fo(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Tr.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=to),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function mo(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Tr.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ro),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function po(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Tr.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=no),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Tr(){function e(ye,ze){return ze.length-ye.length}var n=[],a=[],o=[],i=[],u,y,M,N,G;for(u=0;u<7;u++)y=v([2e3,1]).day(u),M=Ne(this.weekdaysMin(y,"")),N=Ne(this.weekdaysShort(y,"")),G=Ne(this.weekdays(y,"")),n.push(M),a.push(N),o.push(G),i.push(M),i.push(N),i.push(G);n.sort(e),a.sort(e),o.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+n.join("|")+")","i");}function xr(){return this.hours()%12||12}function yo(){return this.hours()||24}O("H",["HH",2],0,"hour"),O("h",["hh",2],0,xr),O("k",["kk",2],0,yo),O("hmm",0,0,function(){return ""+xr.apply(this)+de(this.minutes(),2)}),O("hmmss",0,0,function(){return ""+xr.apply(this)+de(this.minutes(),2)+de(this.seconds(),2)}),O("Hmm",0,0,function(){return ""+this.hours()+de(this.minutes(),2)}),O("Hmmss",0,0,function(){return ""+this.hours()+de(this.minutes(),2)+de(this.seconds(),2)});function mn(e,n){O(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),n)});}mn("a",true),mn("A",false);function pn(e,n){return n._meridiemParse}A("a",pn),A("A",pn),A("H",te,br),A("h",te,ut),A("k",te,ut),A("HH",te,Pe),A("hh",te,Pe),A("kk",te,Pe),A("hmm",rn),A("hmmss",nn),A("Hmm",rn),A("Hmmss",nn),Q(["H","HH"],ue),Q(["k","kk"],function(e,n,a){var o=W(e);n[ue]=o===24?0:o;}),Q(["a","A"],function(e,n,a){a._isPm=a._locale.isPM(e),a._meridiem=e;}),Q(["h","hh"],function(e,n,a){n[ue]=W(e),m(a).bigHour=true;}),Q("hmm",function(e,n,a){var o=e.length-2;n[ue]=W(e.substr(0,o)),n[Te]=W(e.substr(o)),m(a).bigHour=true;}),Q("hmmss",function(e,n,a){var o=e.length-4,i=e.length-2;n[ue]=W(e.substr(0,o)),n[Te]=W(e.substr(o,2)),n[Ye]=W(e.substr(i)),m(a).bigHour=true;}),Q("Hmm",function(e,n,a){var o=e.length-2;n[ue]=W(e.substr(0,o)),n[Te]=W(e.substr(o));}),Q("Hmmss",function(e,n,a){var o=e.length-4,i=e.length-2;n[ue]=W(e.substr(0,o)),n[Te]=W(e.substr(o,2)),n[Ye]=W(e.substr(i));});function go(e){return (e+"").toLowerCase().charAt(0)==="p"}var So=/[ap]\.?m?\.?/i,ko=ht("Hours",true);function Po(e,n,a){return e>11?a?"pm":"PM":a?"am":"AM"}var yn={calendar:Oe,longDateFormat:Wt,invalidDate:Sr,ordinal:pa,dayOfMonthOrdinalParse:ya,relativeTime:Sa,months:Ia,monthsShort:sn,week:ja,weekdays:Qa,weekdaysMin:eo,weekdaysShort:fn,meridiemParse:So},ae={},_t={},Mt;function Do(e,n){var a,o=Math.min(e.length,n.length);for(a=0;a<o;a+=1)if(e[a]!==n[a])return a;return o}function gn(e){return e&&e.toLowerCase().replace("_","-")}function bo(e){for(var n=0,a,o,i,u;n<e.length;){for(u=gn(e[n]).split("-"),a=u.length,o=gn(e[n+1]),o=o?o.split("-"):null;a>0;){if(i=Jt(u.slice(0,a).join("-")),i)return i;if(o&&o.length>=a&&Do(u,o)>=a-1)break;a--;}n++;}return Mt}function wo(e){return !!(e&&e.match("^[^/\\\\]*$"))}function Jt(e){var n=null,a;if(ae[e]===void 0&&typeof Dt<"u"&&Dt&&Dt.exports&&wo(e))try{n=Mt._abbr,a=Gn,a("./locale/"+e),Xe(n);}catch{ae[e]=null;}return ae[e]}function Xe(e,n){var a;return e&&(p(n)?a=Be(e):a=_r(e,n),a?Mt=a:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Mt._abbr}function _r(e,n){if(n!==null){var a,o=yn;if(n.abbr=e,ae[e]!=null)ee("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=ae[e]._config;else if(n.parentLocale!=null)if(ae[n.parentLocale]!=null)o=ae[n.parentLocale]._config;else if(a=Jt(n.parentLocale),a!=null)o=a._config;else return _t[n.parentLocale]||(_t[n.parentLocale]=[]),_t[n.parentLocale].push({name:e,config:n}),null;return ae[e]=new L(ke(o,n)),_t[e]&&_t[e].forEach(function(i){_r(i.name,i.config);}),Xe(e),ae[e]}else return delete ae[e],null}function Co(e,n){if(n!=null){var a,o,i=yn;ae[e]!=null&&ae[e].parentLocale!=null?ae[e].set(ke(ae[e]._config,n)):(o=Jt(e),o!=null&&(i=o._config),n=ke(i,n),o==null&&(n.abbr=e),a=new L(n),a.parentLocale=ae[e],ae[e]=a),Xe(e);}else ae[e]!=null&&(ae[e].parentLocale!=null?(ae[e]=ae[e].parentLocale,e===Xe()&&Xe(e)):ae[e]!=null&&delete ae[e]);return ae[e]}function Be(e){var n;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Mt;if(!l(e)){if(n=Jt(e),n)return n;e=[e];}return bo(e)}function vo(){return fe(ae)}function Mr(e){var n,a=e._a;return a&&m(e).overflow===-2&&(n=a[Le]<0||a[Le]>11?Le:a[Re]<1||a[Re]>Cr(a[me],a[Le])?Re:a[ue]<0||a[ue]>24||a[ue]===24&&(a[Te]!==0||a[Ye]!==0||a[rt]!==0)?ue:a[Te]<0||a[Te]>59?Te:a[Ye]<0||a[Ye]>59?Ye:a[rt]<0||a[rt]>999?rt:-1,m(e)._overflowDayOfYear&&(n<me||n>Re)&&(n=Re),m(e)._overflowWeeks&&n===-1&&(n=_a),m(e)._overflowWeekday&&n===-1&&(n=Ma),m(e).overflow=n),e}var To=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xo=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_o=/Z|[+-]\d\d(?::?\d\d)?/,Qt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,false],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,false],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,false],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,false],["YYYY",/\d{4}/,false]],Ar=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mo=/^\/?Date\((-?\d+)/i,Ao=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Oo={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Sn(e){var n,a,o=e._i,i=To.exec(o)||xo.exec(o),u,y,M,N,G=Qt.length,ye=Ar.length;if(i){for(m(e).iso=true,n=0,a=G;n<a;n++)if(Qt[n][1].exec(i[1])){y=Qt[n][0],u=Qt[n][2]!==false;break}if(y==null){e._isValid=false;return}if(i[3]){for(n=0,a=ye;n<a;n++)if(Ar[n][1].exec(i[3])){M=(i[2]||" ")+Ar[n][0];break}if(M==null){e._isValid=false;return}}if(!u&&M!=null){e._isValid=false;return}if(i[4])if(_o.exec(i[4]))N="Z";else {e._isValid=false;return}e._f=y+(M||"")+(N||""),Fr(e);}else e._isValid=false;}function Fo(e,n,a,o,i,u){var y=[Ro(e),sn.indexOf(n),parseInt(a,10),parseInt(o,10),parseInt(i,10)];return u&&y.push(parseInt(u,10)),y}function Ro(e){var n=parseInt(e,10);return n<=49?2e3+n:n<=999?1900+n:n}function Io(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Eo(e,n,a){if(e){var o=fn.indexOf(e),i=new Date(n[0],n[1],n[2]).getDay();if(o!==i)return m(a).weekdayMismatch=true,a._isValid=false,false}return true}function No(e,n,a){if(e)return Oo[e];if(n)return 0;var o=parseInt(a,10),i=o%100,u=(o-i)/100;return u*60+i}function kn(e){var n=Ao.exec(Io(e._i)),a;if(n){if(a=Fo(n[4],n[3],n[2],n[5],n[6],n[7]),!Eo(n[1],a,e))return;e._a=a,e._tzm=No(n[8],n[9],n[10]),e._d=Tt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=true;}else e._isValid=false;}function Lo(e){var n=Mo.exec(e._i);if(n!==null){e._d=new Date(+n[1]);return}if(Sn(e),e._isValid===false)delete e._isValid;else return;if(kn(e),e._isValid===false)delete e._isValid;else return;e._strict?e._isValid=false:t.createFromInputFallback(e);}t.createFromInputFallback=U("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""));});function dt(e,n,a){return e??n??a}function Yo(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function Or(e){var n,a,o=[],i,u,y;if(!e._d){for(i=Yo(e),e._w&&e._a[Re]==null&&e._a[Le]==null&&Vo(e),e._dayOfYear!=null&&(y=dt(e._a[me],i[me]),(e._dayOfYear>Ct(y)||e._dayOfYear===0)&&(m(e)._overflowDayOfYear=true),a=Tt(y,0,e._dayOfYear),e._a[Le]=a.getUTCMonth(),e._a[Re]=a.getUTCDate()),n=0;n<3&&e._a[n]==null;++n)e._a[n]=o[n]=i[n];for(;n<7;n++)e._a[n]=o[n]=e._a[n]==null?n===2?1:0:e._a[n];e._a[ue]===24&&e._a[Te]===0&&e._a[Ye]===0&&e._a[rt]===0&&(e._nextDay=true,e._a[ue]=0),e._d=(e._useUTC?Tt:za).apply(null,o),u=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ue]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==u&&(m(e).weekdayMismatch=true);}}function Vo(e){var n,a,o,i,u,y,M,N,G;n=e._w,n.GG!=null||n.W!=null||n.E!=null?(u=1,y=4,a=dt(n.GG,e._a[me],xt(re(),1,4).year),o=dt(n.W,1),i=dt(n.E,1),(i<1||i>7)&&(N=true)):(u=e._locale._week.dow,y=e._locale._week.doy,G=xt(re(),u,y),a=dt(n.gg,e._a[me],G.year),o=dt(n.w,G.week),n.d!=null?(i=n.d,(i<0||i>6)&&(N=true)):n.e!=null?(i=n.e+u,(n.e<0||n.e>6)&&(N=true)):i=u),o<1||o>Ve(a,u,y)?m(e)._overflowWeeks=true:N!=null?m(e)._overflowWeekday=true:(M=dn(a,o,i,u,y),e._a[me]=M.year,e._dayOfYear=M.dayOfYear);}t.ISO_8601=function(){},t.RFC_2822=function(){};function Fr(e){if(e._f===t.ISO_8601){Sn(e);return}if(e._f===t.RFC_2822){kn(e);return}e._a=[],m(e).empty=true;var n=""+e._i,a,o,i,u,y,M=n.length,N=0,G,ye;for(i=Ut(e._f,e._locale).match(et)||[],ye=i.length,a=0;a<ye;a++)u=i[a],o=(n.match(va(u,e))||[])[0],o&&(y=n.substr(0,n.indexOf(o)),y.length>0&&m(e).unusedInput.push(y),n=n.slice(n.indexOf(o)+o.length),N+=o.length),Fe[u]?(o?m(e).empty=false:m(e).unusedTokens.push(u),xa(u,o,e)):e._strict&&!o&&m(e).unusedTokens.push(u);m(e).charsLeftOver=M-N,n.length>0&&m(e).unusedInput.push(n),e._a[ue]<=12&&m(e).bigHour===true&&e._a[ue]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[ue]=Bo(e._locale,e._a[ue],e._meridiem),G=m(e).era,G!==null&&(e._a[me]=e._locale.erasConvertYear(G,e._a[me])),Or(e),Mr(e);}function Bo(e,n,a){var o;return a==null?n:e.meridiemHour!=null?e.meridiemHour(n,a):(e.isPM!=null&&(o=e.isPM(a),o&&n<12&&(n+=12),!o&&n===12&&(n=0)),n)}function Ho(e){var n,a,o,i,u,y,M=false,N=e._f.length;if(N===0){m(e).invalidFormat=true,e._d=new Date(NaN);return}for(i=0;i<N;i++)u=0,y=false,n=Z({},e),e._useUTC!=null&&(n._useUTC=e._useUTC),n._f=e._f[i],Fr(n),x(n)&&(y=true),u+=m(n).charsLeftOver,u+=m(n).unusedTokens.length*10,m(n).score=u,M?u<o&&(o=u,a=n):(o==null||u<o||y)&&(o=u,a=n,y&&(M=true));w(e,a||n);}function Uo(e){if(!e._d){var n=kr(e._i),a=n.day===void 0?n.date:n.day;e._a=b([n.year,n.month,a,n.hour,n.minute,n.second,n.millisecond],function(o){return o&&parseInt(o,10)}),Or(e);}}function Wo(e){var n=new $(Mr(Pn(e)));return n._nextDay&&(n.add(1,"d"),n._nextDay=void 0),n}function Pn(e){var n=e._i,a=e._f;return e._locale=e._locale||Be(e._l),n===null||a===void 0&&n===""?Y({nullInput:true}):(typeof n=="string"&&(e._i=n=e._locale.preparse(n)),V(n)?new $(Mr(n)):(k(n)?e._d=n:l(a)?Ho(e):a?Fr(e):zo(e),x(e)||(e._d=null),e))}function zo(e){var n=e._i;p(n)?e._d=new Date(t.now()):k(n)?e._d=new Date(n.valueOf()):typeof n=="string"?Lo(e):l(n)?(e._a=b(n.slice(0),function(a){return parseInt(a,10)}),Or(e)):c(n)?Uo(e):P(n)?e._d=new Date(n):t.createFromInputFallback(e);}function Dn(e,n,a,o,i){var u={};return (n===true||n===false)&&(o=n,n=void 0),(a===true||a===false)&&(o=a,a=void 0),(c(e)&&d(e)||l(e)&&e.length===0)&&(e=void 0),u._isAMomentObject=true,u._useUTC=u._isUTC=i,u._l=a,u._i=e,u._f=n,u._strict=o,Wo(u)}function re(e,n,a,o){return Dn(e,n,a,o,false)}var Go=U("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=re.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Y()}),jo=U("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=re.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Y()});function bn(e,n){var a,o;if(n.length===1&&l(n[0])&&(n=n[0]),!n.length)return re();for(a=n[0],o=1;o<n.length;++o)(!n[o].isValid()||n[o][e](a))&&(a=n[o]);return a}function $o(){var e=[].slice.call(arguments,0);return bn("isBefore",e)}function qo(){var e=[].slice.call(arguments,0);return bn("isAfter",e)}var Ko=function(){return Date.now?Date.now():+new Date},At=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Xo(e){var n,a=false,o,i=At.length;for(n in e)if(h(e,n)&&!(ie.call(At,n)!==-1&&(e[n]==null||!isNaN(e[n]))))return false;for(o=0;o<i;++o)if(e[At[o]]){if(a)return false;parseFloat(e[At[o]])!==W(e[At[o]])&&(a=true);}return true}function Zo(){return this._isValid}function Jo(){return xe(NaN)}function er(e){var n=kr(e),a=n.year||0,o=n.quarter||0,i=n.month||0,u=n.week||n.isoWeek||0,y=n.day||0,M=n.hour||0,N=n.minute||0,G=n.second||0,ye=n.millisecond||0;this._isValid=Xo(n),this._milliseconds=+ye+G*1e3+N*6e4+M*1e3*60*60,this._days=+y+u*7,this._months=+i+o*3+a*12,this._data={},this._locale=Be(),this._bubble();}function tr(e){return e instanceof er}function Rr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Qo(e,n,a){var o=Math.min(e.length,n.length),i=Math.abs(e.length-n.length),u=0,y;for(y=0;y<o;y++)(W(e[y])!==W(n[y]))&&u++;return u+i}function wn(e,n){O(e,0,0,function(){var a=this.utcOffset(),o="+";return a<0&&(a=-a,o="-"),o+de(~~(a/60),2)+n+de(~~a%60,2)});}wn("Z",":"),wn("ZZ",""),A("Z",qt),A("ZZ",qt),Q(["Z","ZZ"],function(e,n,a){a._useUTC=true,a._tzm=Ir(qt,e);});var es=/([\+\-]|\d\d)/gi;function Ir(e,n){var a=(n||"").match(e),o,i,u;return a===null?null:(o=a[a.length-1]||[],i=(o+"").match(es)||["-",0,0],u=+(i[1]*60)+W(i[2]),u===0?0:i[0]==="+"?u:-u)}function Er(e,n){var a,o;return n._isUTC?(a=n.clone(),o=(V(e)||k(e)?e.valueOf():re(e).valueOf())-a.valueOf(),a._d.setTime(a._d.valueOf()+o),t.updateOffset(a,false),a):re(e).local()}function Nr(e){return -Math.round(e._d.getTimezoneOffset())}t.updateOffset=function(){};function ts(e,n,a){var o=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Ir(qt,e),e===null)return this}else Math.abs(e)<16&&!a&&(e=e*60);return !this._isUTC&&n&&(i=Nr(this)),this._offset=e,this._isUTC=true,i!=null&&this.add(i,"m"),o!==e&&(!n||this._changeInProgress?xn(this,xe(e-o,"m"),1,false):this._changeInProgress||(this._changeInProgress=true,t.updateOffset(this,true),this._changeInProgress=null)),this}else return this._isUTC?o:Nr(this)}function rs(e,n){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,n),this):-this.utcOffset()}function ns(e){return this.utcOffset(0,e)}function as(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=false,e&&this.subtract(Nr(this),"m")),this}function os(){if(this._tzm!=null)this.utcOffset(this._tzm,false,true);else if(typeof this._i=="string"){var e=Ir(wa,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,true);}return this}function ss(e){return this.isValid()?(e=e?re(e).utcOffset():0,(this.utcOffset()-e)%60===0):false}function is(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ls(){if(!p(this._isDSTShifted))return this._isDSTShifted;var e={},n;return Z(e,this),e=Pn(e),e._a?(n=e._isUTC?v(e._a):re(e._a),this._isDSTShifted=this.isValid()&&Qo(e._a,n.toArray())>0):this._isDSTShifted=false,this._isDSTShifted}function cs(){return this.isValid()?!this._isUTC:false}function us(){return this.isValid()?this._isUTC:false}function Cn(){return this.isValid()?this._isUTC&&this._offset===0:false}var hs=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ds=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function xe(e,n){var a=e,o=null,i,u,y;return tr(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:P(e)||!isNaN(+e)?(a={},n?a[n]=+e:a.milliseconds=+e):(o=hs.exec(e))?(i=o[1]==="-"?-1:1,a={y:0,d:W(o[Re])*i,h:W(o[ue])*i,m:W(o[Te])*i,s:W(o[Ye])*i,ms:W(Rr(o[rt]*1e3))*i}):(o=ds.exec(e))?(i=o[1]==="-"?-1:1,a={y:nt(o[2],i),M:nt(o[3],i),w:nt(o[4],i),d:nt(o[5],i),h:nt(o[6],i),m:nt(o[7],i),s:nt(o[8],i)}):a==null?a={}:typeof a=="object"&&("from"in a||"to"in a)&&(y=fs(re(a.from),re(a.to)),a={},a.ms=y.milliseconds,a.M=y.months),u=new er(a),tr(e)&&h(e,"_locale")&&(u._locale=e._locale),tr(e)&&h(e,"_isValid")&&(u._isValid=e._isValid),u}xe.fn=er.prototype,xe.invalid=Jo;function nt(e,n){var a=e&&parseFloat(e.replace(",","."));return (isNaN(a)?0:a)*n}function vn(e,n){var a={};return a.months=n.month()-e.month()+(n.year()-e.year())*12,e.clone().add(a.months,"M").isAfter(n)&&--a.months,a.milliseconds=+n-+e.clone().add(a.months,"M"),a}function fs(e,n){var a;return e.isValid()&&n.isValid()?(n=Er(n,e),e.isBefore(n)?a=vn(e,n):(a=vn(n,e),a.milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0}}function Tn(e,n){return function(a,o){var i,u;return o!==null&&!isNaN(+o)&&(ee(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),u=a,a=o,o=u),i=xe(a,o),xn(this,i,e),this}}function xn(e,n,a,o){var i=n._milliseconds,u=Rr(n._days),y=Rr(n._months);e.isValid()&&(o=o??true,y&&cn(e,vt(e,"Month")+y*a),u&&on(e,"Date",vt(e,"Date")+u*a),i&&e._d.setTime(e._d.valueOf()+i*a),o&&t.updateOffset(e,u||y));}var ms=Tn(1,"add"),ps=Tn(-1,"subtract");function _n(e){return typeof e=="string"||e instanceof String}function ys(e){return V(e)||k(e)||_n(e)||P(e)||Ss(e)||gs(e)||e===null||e===void 0}function gs(e){var n=c(e)&&!d(e),a=false,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,u,y=o.length;for(i=0;i<y;i+=1)u=o[i],a=a||h(e,u);return n&&a}function Ss(e){var n=l(e),a=false;return n&&(a=e.filter(function(o){return !P(o)&&_n(e)}).length===0),n&&a}function ks(e){var n=c(e)&&!d(e),a=false,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,u;for(i=0;i<o.length;i+=1)u=o[i],a=a||h(e,u);return n&&a}function Ps(e,n){var a=e.diff(n,"days",true);return a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse"}function Ds(e,n){arguments.length===1&&(arguments[0]?ys(arguments[0])?(e=arguments[0],n=void 0):ks(arguments[0])&&(n=arguments[0],e=void 0):(e=void 0,n=void 0));var a=e||re(),o=Er(a,this).startOf("day"),i=t.calendarFormat(this,o)||"sameElse",u=n&&(oe(n[i])?n[i].call(this,a):n[i]);return this.format(u||this.localeData().calendar(i,this,re(a)))}function bs(){return new $(this)}function ws(e,n){var a=V(e)?e:re(e);return this.isValid()&&a.isValid()?(n=we(n)||"millisecond",n==="millisecond"?this.valueOf()>a.valueOf():a.valueOf()<this.clone().startOf(n).valueOf()):false}function Cs(e,n){var a=V(e)?e:re(e);return this.isValid()&&a.isValid()?(n=we(n)||"millisecond",n==="millisecond"?this.valueOf()<a.valueOf():this.clone().endOf(n).valueOf()<a.valueOf()):false}function vs(e,n,a,o){var i=V(e)?e:re(e),u=V(n)?n:re(n);return this.isValid()&&i.isValid()&&u.isValid()?(o=o||"()",(o[0]==="("?this.isAfter(i,a):!this.isBefore(i,a))&&(o[1]===")"?this.isBefore(u,a):!this.isAfter(u,a))):false}function Ts(e,n){var a=V(e)?e:re(e),o;return this.isValid()&&a.isValid()?(n=we(n)||"millisecond",n==="millisecond"?this.valueOf()===a.valueOf():(o=a.valueOf(),this.clone().startOf(n).valueOf()<=o&&o<=this.clone().endOf(n).valueOf())):false}function xs(e,n){return this.isSame(e,n)||this.isAfter(e,n)}function _s(e,n){return this.isSame(e,n)||this.isBefore(e,n)}function Ms(e,n,a){var o,i,u;if(!this.isValid())return NaN;if(o=Er(e,this),!o.isValid())return NaN;switch(i=(o.utcOffset()-this.utcOffset())*6e4,n=we(n),n){case "year":u=rr(this,o)/12;break;case "month":u=rr(this,o);break;case "quarter":u=rr(this,o)/3;break;case "second":u=(this-o)/1e3;break;case "minute":u=(this-o)/6e4;break;case "hour":u=(this-o)/36e5;break;case "day":u=(this-o-i)/864e5;break;case "week":u=(this-o-i)/6048e5;break;default:u=this-o;}return a?u:Ce(u)}function rr(e,n){if(e.date()<n.date())return -rr(n,e);var a=(n.year()-e.year())*12+(n.month()-e.month()),o=e.clone().add(a,"months"),i,u;return n-o<0?(i=e.clone().add(a-1,"months"),u=(n-o)/(o-i)):(i=e.clone().add(a+1,"months"),u=(n-o)/(i-o)),-(a+u)||0}t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function As(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Os(e){if(!this.isValid())return null;var n=e!==true,a=n?this.clone().utc():this;return a.year()<0||a.year()>9999?lt(a,n?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):oe(Date.prototype.toISOString)?n?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",lt(a,"Z")):lt(a,n?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Fs(){if(!this.isValid())return "moment.invalid(/* "+this._i+" */)";var e="moment",n="",a,o,i,u;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",n="Z"),a="["+e+'("]',o=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",u=n+'[")]',this.format(a+o+i+u)}function Rs(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=lt(this,e);return this.localeData().postformat(n)}function Is(e,n){return this.isValid()&&(V(e)&&e.isValid()||re(e).isValid())?xe({to:this,from:e}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function Es(e){return this.from(re(),e)}function Ns(e,n){return this.isValid()&&(V(e)&&e.isValid()||re(e).isValid())?xe({from:this,to:e}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function Ls(e){return this.to(re(),e)}function Mn(e){var n;return e===void 0?this._locale._abbr:(n=Be(e),n!=null&&(this._locale=n),this)}var An=U("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function On(){return this._locale}var nr=1e3,ft=60*nr,ar=60*ft,Fn=(365*400+97)*24*ar;function mt(e,n){return (e%n+n)%n}function Rn(e,n,a){return e<100&&e>=0?new Date(e+400,n,a)-Fn:new Date(e,n,a).valueOf()}function In(e,n,a){return e<100&&e>=0?Date.UTC(e+400,n,a)-Fn:Date.UTC(e,n,a)}function Ys(e){var n,a;if(e=we(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?In:Rn,e){case "year":n=a(this.year(),0,1);break;case "quarter":n=a(this.year(),this.month()-this.month()%3,1);break;case "month":n=a(this.year(),this.month(),1);break;case "week":n=a(this.year(),this.month(),this.date()-this.weekday());break;case "isoWeek":n=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case "day":case "date":n=a(this.year(),this.month(),this.date());break;case "hour":n=this._d.valueOf(),n-=mt(n+(this._isUTC?0:this.utcOffset()*ft),ar);break;case "minute":n=this._d.valueOf(),n-=mt(n,ft);break;case "second":n=this._d.valueOf(),n-=mt(n,nr);break}return this._d.setTime(n),t.updateOffset(this,true),this}function Vs(e){var n,a;if(e=we(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?In:Rn,e){case "year":n=a(this.year()+1,0,1)-1;break;case "quarter":n=a(this.year(),this.month()-this.month()%3+3,1)-1;break;case "month":n=a(this.year(),this.month()+1,1)-1;break;case "week":n=a(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case "isoWeek":n=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case "day":case "date":n=a(this.year(),this.month(),this.date()+1)-1;break;case "hour":n=this._d.valueOf(),n+=ar-mt(n+(this._isUTC?0:this.utcOffset()*ft),ar)-1;break;case "minute":n=this._d.valueOf(),n+=ft-mt(n,ft)-1;break;case "second":n=this._d.valueOf(),n+=nr-mt(n,nr)-1;break}return this._d.setTime(n),t.updateOffset(this,true),this}function Bs(){return this._d.valueOf()-(this._offset||0)*6e4}function Hs(){return Math.floor(this.valueOf()/1e3)}function Us(){return new Date(this.valueOf())}function Ws(){var e=this;return [e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function zs(){var e=this;return {years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Gs(){return this.isValid()?this.toISOString():null}function js(){return x(this)}function $s(){return w({},m(this))}function qs(){return m(this).overflow}function Ks(){return {input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}O("N",0,0,"eraAbbr"),O("NN",0,0,"eraAbbr"),O("NNN",0,0,"eraAbbr"),O("NNNN",0,0,"eraName"),O("NNNNN",0,0,"eraNarrow"),O("y",["y",1],"yo","eraYear"),O("y",["yy",2],0,"eraYear"),O("y",["yyy",3],0,"eraYear"),O("y",["yyyy",4],0,"eraYear"),A("N",Lr),A("NN",Lr),A("NNN",Lr),A("NNNN",si),A("NNNNN",ii),Q(["N","NN","NNN","NNNN","NNNNN"],function(e,n,a,o){var i=a._locale.erasParse(e,o,a._strict);i?m(a).era=i:m(a).invalidEra=e;}),A("y",ct),A("yy",ct),A("yyy",ct),A("yyyy",ct),A("yo",li),Q(["y","yy","yyy","yyyy"],me),Q(["yo"],function(e,n,a,o){var i;a._locale._eraYearOrdinalRegex&&(i=e.match(a._locale._eraYearOrdinalRegex)),a._locale.eraYearOrdinalParse?n[me]=a._locale.eraYearOrdinalParse(e,i):n[me]=parseInt(e,10);});function Xs(e,n){var a,o,i,u=this._eras||Be("en")._eras;for(a=0,o=u.length;a<o;++a)switch(typeof u[a].since==="string"&&(i=t(u[a].since).startOf("day"),u[a].since=i.valueOf()),typeof u[a].until){case "undefined":u[a].until=1/0;break;case "string":i=t(u[a].until).startOf("day").valueOf(),u[a].until=i.valueOf();break}return u}function Zs(e,n,a){var o,i,u=this.eras(),y,M,N;for(e=e.toUpperCase(),o=0,i=u.length;o<i;++o)if(y=u[o].name.toUpperCase(),M=u[o].abbr.toUpperCase(),N=u[o].narrow.toUpperCase(),a)switch(n){case "N":case "NN":case "NNN":if(M===e)return u[o];break;case "NNNN":if(y===e)return u[o];break;case "NNNNN":if(N===e)return u[o];break}else if([y,M,N].indexOf(e)>=0)return u[o]}function Js(e,n){var a=e.since<=e.until?1:-1;return n===void 0?t(e.since).year():t(e.since).year()+(n-e.offset)*a}function Qs(){var e,n,a,o=this.localeData().eras();for(e=0,n=o.length;e<n;++e)if(a=this.clone().startOf("day").valueOf(),o[e].since<=a&&a<=o[e].until||o[e].until<=a&&a<=o[e].since)return o[e].name;return ""}function ei(){var e,n,a,o=this.localeData().eras();for(e=0,n=o.length;e<n;++e)if(a=this.clone().startOf("day").valueOf(),o[e].since<=a&&a<=o[e].until||o[e].until<=a&&a<=o[e].since)return o[e].narrow;return ""}function ti(){var e,n,a,o=this.localeData().eras();for(e=0,n=o.length;e<n;++e)if(a=this.clone().startOf("day").valueOf(),o[e].since<=a&&a<=o[e].until||o[e].until<=a&&a<=o[e].since)return o[e].abbr;return ""}function ri(){var e,n,a,o,i=this.localeData().eras();for(e=0,n=i.length;e<n;++e)if(a=i[e].since<=i[e].until?1:-1,o=this.clone().startOf("day").valueOf(),i[e].since<=o&&o<=i[e].until||i[e].until<=o&&o<=i[e].since)return (this.year()-t(i[e].since).year())*a+i[e].offset;return this.year()}function ni(e){return h(this,"_erasNameRegex")||Yr.call(this),e?this._erasNameRegex:this._erasRegex}function ai(e){return h(this,"_erasAbbrRegex")||Yr.call(this),e?this._erasAbbrRegex:this._erasRegex}function oi(e){return h(this,"_erasNarrowRegex")||Yr.call(this),e?this._erasNarrowRegex:this._erasRegex}function Lr(e,n){return n.erasAbbrRegex(e)}function si(e,n){return n.erasNameRegex(e)}function ii(e,n){return n.erasNarrowRegex(e)}function li(e,n){return n._eraYearOrdinalRegex||ct}function Yr(){var e=[],n=[],a=[],o=[],i,u,y,M,N,G=this.eras();for(i=0,u=G.length;i<u;++i)y=Ne(G[i].name),M=Ne(G[i].abbr),N=Ne(G[i].narrow),n.push(y),e.push(M),a.push(N),o.push(y),o.push(M),o.push(N);this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i");}O(0,["gg",2],0,function(){return this.weekYear()%100}),O(0,["GG",2],0,function(){return this.isoWeekYear()%100});function or(e,n){O(0,[e,e.length],0,n);}or("gggg","weekYear"),or("ggggg","weekYear"),or("GGGG","isoWeekYear"),or("GGGGG","isoWeekYear"),A("G",$t),A("g",$t),A("GG",te,Pe),A("gg",te,Pe),A("GGGG",Dr,Pr),A("gggg",Dr,Pr),A("GGGGG",jt,zt),A("ggggg",jt,zt),wt(["gggg","ggggg","GGGG","GGGGG"],function(e,n,a,o){n[o.substr(0,2)]=W(e);}),wt(["gg","GG"],function(e,n,a,o){n[o]=t.parseTwoDigitYear(e);});function ci(e){return En.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function ui(e){return En.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function hi(){return Ve(this.year(),1,4)}function di(){return Ve(this.isoWeekYear(),1,4)}function fi(){var e=this.localeData()._week;return Ve(this.year(),e.dow,e.doy)}function mi(){var e=this.localeData()._week;return Ve(this.weekYear(),e.dow,e.doy)}function En(e,n,a,o,i){var u;return e==null?xt(this,o,i).year:(u=Ve(e,o,i),n>u&&(n=u),pi.call(this,e,n,a,o,i))}function pi(e,n,a,o,i){var u=dn(e,n,a,o,i),y=Tt(u.year,0,u.dayOfYear);return this.year(y.getUTCFullYear()),this.month(y.getUTCMonth()),this.date(y.getUTCDate()),this}O("Q",0,"Qo","quarter"),A("Q",en),Q("Q",function(e,n){n[Le]=(W(e)-1)*3;});function yi(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}O("D",["DD",2],"Do","date"),A("D",te,ut),A("DD",te,Pe),A("Do",function(e,n){return e?n._dayOfMonthOrdinalParse||n._ordinalParse:n._dayOfMonthOrdinalParseLenient}),Q(["D","DD"],Re),Q("Do",function(e,n){n[Re]=W(e.match(te)[0]);});var Nn=ht("Date",true);O("DDD",["DDDD",3],"DDDo","dayOfYear"),A("DDD",Gt),A("DDDD",tn),Q(["DDD","DDDD"],function(e,n,a){a._dayOfYear=W(e);});function gi(e){var n=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?n:this.add(e-n,"d")}O("m",["mm",2],0,"minute"),A("m",te,br),A("mm",te,Pe),Q(["m","mm"],Te);var Si=ht("Minutes",false);O("s",["ss",2],0,"second"),A("s",te,br),A("ss",te,Pe),Q(["s","ss"],Ye);var ki=ht("Seconds",false);O("S",0,0,function(){return ~~(this.millisecond()/100)}),O(0,["SS",2],0,function(){return ~~(this.millisecond()/10)}),O(0,["SSS",3],0,"millisecond"),O(0,["SSSS",4],0,function(){return this.millisecond()*10}),O(0,["SSSSS",5],0,function(){return this.millisecond()*100}),O(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),O(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),O(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),O(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),A("S",Gt,en),A("SS",Gt,Pe),A("SSS",Gt,tn);var Ze,Ln;for(Ze="SSSS";Ze.length<=9;Ze+="S")A(Ze,ct);function Pi(e,n){n[rt]=W(("0."+e)*1e3);}for(Ze="S";Ze.length<=9;Ze+="S")Q(Ze,Pi);Ln=ht("Milliseconds",false),O("z",0,0,"zoneAbbr"),O("zz",0,0,"zoneName");function Di(){return this._isUTC?"UTC":""}function bi(){return this._isUTC?"Coordinated Universal Time":""}var C=$.prototype;C.add=ms,C.calendar=Ds,C.clone=bs,C.diff=Ms,C.endOf=Vs,C.format=Rs,C.from=Is,C.fromNow=Es,C.to=Ns,C.toNow=Ls,C.get=Oa,C.invalidAt=qs,C.isAfter=ws,C.isBefore=Cs,C.isBetween=vs,C.isSame=Ts,C.isSameOrAfter=xs,C.isSameOrBefore=_s,C.isValid=js,C.lang=An,C.locale=Mn,C.localeData=On,C.max=jo,C.min=Go,C.parsingFlags=$s,C.set=Fa,C.startOf=Ys,C.subtract=ps,C.toArray=Ws,C.toObject=zs,C.toDate=Us,C.toISOString=Os,C.inspect=Fs,typeof Symbol<"u"&&Symbol.for!=null&&(C[Symbol.for("nodejs.util.inspect.custom")]=function(){return "Moment<"+this.format()+">"}),C.toJSON=Gs,C.toString=As,C.unix=Hs,C.valueOf=Bs,C.creationData=Ks,C.eraName=Qs,C.eraNarrow=ei,C.eraAbbr=ti,C.eraYear=ri,C.year=an,C.isLeapYear=Aa,C.weekYear=ci,C.isoWeekYear=ui,C.quarter=C.quarters=yi,C.month=un,C.daysInMonth=Ha,C.week=C.weeks=Ka,C.isoWeek=C.isoWeeks=Xa,C.weeksInYear=fi,C.weeksInWeekYear=mi,C.isoWeeksInYear=hi,C.isoWeeksInISOWeekYear=di,C.date=Nn,C.day=C.days=co,C.weekday=uo,C.isoWeekday=ho,C.dayOfYear=gi,C.hour=C.hours=ko,C.minute=C.minutes=Si,C.second=C.seconds=ki,C.millisecond=C.milliseconds=Ln,C.utcOffset=ts,C.utc=ns,C.local=as,C.parseZone=os,C.hasAlignedHourOffset=ss,C.isDST=is,C.isLocal=cs,C.isUtcOffset=us,C.isUtc=Cn,C.isUTC=Cn,C.zoneAbbr=Di,C.zoneName=bi,C.dates=U("dates accessor is deprecated. Use date instead.",Nn),C.months=U("months accessor is deprecated. Use month instead",un),C.years=U("years accessor is deprecated. Use year instead",an),C.zone=U("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",rs),C.isDSTShifted=U("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ls);function wi(e){return re(e*1e3)}function Ci(){return re.apply(null,arguments).parseZone()}function Yn(e){return e}var K=L.prototype;K.calendar=be,K.longDateFormat=gr,K.invalidDate=ma,K.ordinal=ga,K.preparse=Yn,K.postformat=Yn,K.relativeTime=ka,K.pastFuture=Pa,K.set=Se,K.eras=Xs,K.erasParse=Zs,K.erasConvertYear=Js,K.erasAbbrRegex=ai,K.erasNameRegex=ni,K.erasNarrowRegex=oi,K.months=La,K.monthsShort=Ya,K.monthsParse=Ba,K.monthsRegex=Wa,K.monthsShortRegex=Ua,K.week=Ga,K.firstDayOfYear=qa,K.firstDayOfWeek=$a,K.weekdays=ao,K.weekdaysMin=so,K.weekdaysShort=oo,K.weekdaysParse=lo,K.weekdaysRegex=fo,K.weekdaysShortRegex=mo,K.weekdaysMinRegex=po,K.isPM=go,K.meridiem=Po;function sr(e,n,a,o){var i=Be(),u=v().set(o,n);return i[a](u,e)}function Vn(e,n,a){if(P(e)&&(n=e,e=void 0),e=e||"",n!=null)return sr(e,n,a,"month");var o,i=[];for(o=0;o<12;o++)i[o]=sr(e,o,a,"month");return i}function Vr(e,n,a,o){typeof e=="boolean"?(P(n)&&(a=n,n=void 0),n=n||""):(n=e,a=n,e=false,P(n)&&(a=n,n=void 0),n=n||"");var i=Be(),u=e?i._week.dow:0,y,M=[];if(a!=null)return sr(n,(a+u)%7,o,"day");for(y=0;y<7;y++)M[y]=sr(n,(y+u)%7,o,"day");return M}function vi(e,n){return Vn(e,n,"months")}function Ti(e,n){return Vn(e,n,"monthsShort")}function xi(e,n,a){return Vr(e,n,a,"weekdays")}function _i(e,n,a){return Vr(e,n,a,"weekdaysShort")}function Mi(e,n,a){return Vr(e,n,a,"weekdaysMin")}Xe("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var n=e%10,a=W(e%100/10)===1?"th":n===1?"st":n===2?"nd":n===3?"rd":"th";return e+a}}),t.lang=U("moment.lang is deprecated. Use moment.locale instead.",Xe),t.langData=U("moment.langData is deprecated. Use moment.localeData instead.",Be);var He=Math.abs;function Ai(){var e=this._data;return this._milliseconds=He(this._milliseconds),this._days=He(this._days),this._months=He(this._months),e.milliseconds=He(e.milliseconds),e.seconds=He(e.seconds),e.minutes=He(e.minutes),e.hours=He(e.hours),e.months=He(e.months),e.years=He(e.years),this}function Bn(e,n,a,o){var i=xe(n,a);return e._milliseconds+=o*i._milliseconds,e._days+=o*i._days,e._months+=o*i._months,e._bubble()}function Oi(e,n){return Bn(this,e,n,1)}function Fi(e,n){return Bn(this,e,n,-1)}function Hn(e){return e<0?Math.floor(e):Math.ceil(e)}function Ri(){var e=this._milliseconds,n=this._days,a=this._months,o=this._data,i,u,y,M,N;return e>=0&&n>=0&&a>=0||e<=0&&n<=0&&a<=0||(e+=Hn(Br(a)+n)*864e5,n=0,a=0),o.milliseconds=e%1e3,i=Ce(e/1e3),o.seconds=i%60,u=Ce(i/60),o.minutes=u%60,y=Ce(u/60),o.hours=y%24,n+=Ce(y/24),N=Ce(Un(n)),a+=N,n-=Hn(Br(N)),M=Ce(a/12),a%=12,o.days=n,o.months=a,o.years=M,this}function Un(e){return e*4800/146097}function Br(e){return e*146097/4800}function Ii(e){if(!this.isValid())return NaN;var n,a,o=this._milliseconds;if(e=we(e),e==="month"||e==="quarter"||e==="year")switch(n=this._days+o/864e5,a=this._months+Un(n),e){case "month":return a;case "quarter":return a/3;case "year":return a/12}else switch(n=this._days+Math.round(Br(this._months)),e){case "week":return n/7+o/6048e5;case "day":return n+o/864e5;case "hour":return n*24+o/36e5;case "minute":return n*1440+o/6e4;case "second":return n*86400+o/1e3;case "millisecond":return Math.floor(n*864e5)+o;default:throw new Error("Unknown unit "+e)}}function Ue(e){return function(){return this.as(e)}}var Wn=Ue("ms"),Ei=Ue("s"),Ni=Ue("m"),Li=Ue("h"),Yi=Ue("d"),Vi=Ue("w"),Bi=Ue("M"),Hi=Ue("Q"),Ui=Ue("y"),Wi=Wn;function zi(){return xe(this)}function Gi(e){return e=we(e),this.isValid()?this[e+"s"]():NaN}function at(e){return function(){return this.isValid()?this._data[e]:NaN}}var ji=at("milliseconds"),$i=at("seconds"),qi=at("minutes"),Ki=at("hours"),Xi=at("days"),Zi=at("months"),Ji=at("years");function Qi(){return Ce(this.days()/7)}var We=Math.round,pt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function el(e,n,a,o,i){return i.relativeTime(n||1,!!a,e,o)}function tl(e,n,a,o){var i=xe(e).abs(),u=We(i.as("s")),y=We(i.as("m")),M=We(i.as("h")),N=We(i.as("d")),G=We(i.as("M")),ye=We(i.as("w")),ze=We(i.as("y")),Je=u<=a.ss&&["s",u]||u<a.s&&["ss",u]||y<=1&&["m"]||y<a.m&&["mm",y]||M<=1&&["h"]||M<a.h&&["hh",M]||N<=1&&["d"]||N<a.d&&["dd",N];return a.w!=null&&(Je=Je||ye<=1&&["w"]||ye<a.w&&["ww",ye]),Je=Je||G<=1&&["M"]||G<a.M&&["MM",G]||ze<=1&&["y"]||["yy",ze],Je[2]=n,Je[3]=+e>0,Je[4]=o,el.apply(null,Je)}function rl(e){return e===void 0?We:typeof e=="function"?(We=e,true):false}function nl(e,n){return pt[e]===void 0?false:n===void 0?pt[e]:(pt[e]=n,e==="s"&&(pt.ss=n-1),true)}function al(e,n){if(!this.isValid())return this.localeData().invalidDate();var a=false,o=pt,i,u;return typeof e=="object"&&(n=e,e=false),typeof e=="boolean"&&(a=e),typeof n=="object"&&(o=Object.assign({},pt,n),n.s!=null&&n.ss==null&&(o.ss=n.s-1)),i=this.localeData(),u=tl(this,!a,o,i),a&&(u=i.pastFuture(+this,u)),i.postformat(u)}var Hr=Math.abs;function yt(e){return (e>0)-(e<0)||+e}function ir(){if(!this.isValid())return this.localeData().invalidDate();var e=Hr(this._milliseconds)/1e3,n=Hr(this._days),a=Hr(this._months),o,i,u,y,M=this.asSeconds(),N,G,ye,ze;return M?(o=Ce(e/60),i=Ce(o/60),e%=60,o%=60,u=Ce(a/12),a%=12,y=e?e.toFixed(3).replace(/\.?0+$/,""):"",N=M<0?"-":"",G=yt(this._months)!==yt(M)?"-":"",ye=yt(this._days)!==yt(M)?"-":"",ze=yt(this._milliseconds)!==yt(M)?"-":"",N+"P"+(u?G+u+"Y":"")+(a?G+a+"M":"")+(n?ye+n+"D":"")+(i||o||e?"T":"")+(i?ze+i+"H":"")+(o?ze+o+"M":"")+(e?ze+y+"S":"")):"P0D"}var j=er.prototype;j.isValid=Zo,j.abs=Ai,j.add=Oi,j.subtract=Fi,j.as=Ii,j.asMilliseconds=Wn,j.asSeconds=Ei,j.asMinutes=Ni,j.asHours=Li,j.asDays=Yi,j.asWeeks=Vi,j.asMonths=Bi,j.asQuarters=Hi,j.asYears=Ui,j.valueOf=Wi,j._bubble=Ri,j.clone=zi,j.get=Gi,j.milliseconds=ji,j.seconds=$i,j.minutes=qi,j.hours=Ki,j.days=Xi,j.weeks=Qi,j.months=Zi,j.years=Ji,j.humanize=al,j.toISOString=ir,j.toString=ir,j.toJSON=ir,j.locale=Mn,j.localeData=On,j.toIsoString=U("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ir),j.lang=An,O("X",0,0,"unix"),O("x",0,0,"valueOf"),A("x",$t),A("X",Ca),Q("X",function(e,n,a){a._d=new Date(parseFloat(e)*1e3);}),Q("x",function(e,n,a){a._d=new Date(W(e));});return t.version="2.30.1",r(re),t.fn=C,t.min=$o,t.max=qo,t.now=Ko,t.utc=v,t.unix=wi,t.months=vi,t.isDate=k,t.locale=Xe,t.invalid=Y,t.duration=xe,t.isMoment=V,t.weekdays=xi,t.parseZone=Ci,t.localeData=Be,t.isDuration=tr,t.monthsShort=Ti,t.weekdaysMin=Mi,t.defineLocale=_r,t.updateLocale=Co,t.locales=vo,t.weekdaysShort=_i,t.normalizeUnits=we,t.relativeTimeRounding=rl,t.relativeTimeThreshold=nl,t.calendarFormat=Ps,t.prototype=C,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t}));});function pe(s){return s<0?-1:s===0?0:1}function ot(s,t,r){return (1-r)*s+r*t}function $n(s,t,r){return r<s?s:r>t?t:r}function ce(s,t,r){return r<s?s:r>t?t:r}function gt(s){return s=s%360,s<0&&(s=s+360),s}function he(s){return s=s%360,s<0&&(s=s+360),s}function Ot(s,t){let r=s[0]*t[0][0]+s[1]*t[0][1]+s[2]*t[0][2],l=s[0]*t[1][0]+s[1]*t[1][1]+s[2]*t[1][2],c=s[0]*t[2][0]+s[1]*t[2][1]+s[2]*t[2][2];return [r,l,c]}var qn=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],dl=[[3.2413774792388685,-1.5376652402851851,-0.49885366846268053],[-0.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-0.20395524564742123,1.0571799111220335]],Kn=[95.047,100,108.883];function lr(s,t,r){return (255<<24|(s&255)<<16|(t&255)<<8|r&255)>>>0}function Wr(s){let t=st(s[0]),r=st(s[1]),l=st(s[2]);return lr(t,r,l)}function Rt(s){return s>>16&255}function It(s){return s>>8&255}function Et(s){return s&255}function Xn(s,t,r){let l=dl,c=l[0][0]*s+l[0][1]*t+l[0][2]*r,h=l[1][0]*s+l[1][1]*t+l[1][2]*r,d=l[2][0]*s+l[2][1]*t+l[2][2]*r,p=st(c),P=st(h),k=st(d);return lr(p,P,k)}function fl(s){let t=Ie(Rt(s)),r=Ie(It(s)),l=Ie(Et(s));return Ot([t,r,l],qn)}function zr(s){let t=Ie(Rt(s)),r=Ie(It(s)),l=Ie(Et(s)),c=qn,h=c[0][0]*t+c[0][1]*r+c[0][2]*l,d=c[1][0]*t+c[1][1]*r+c[1][2]*l,p=c[2][0]*t+c[2][1]*r+c[2][2]*l,P=Kn,k=h/P[0],b=d/P[1],w=p/P[2],v=Ft(k),T=Ft(b),m=Ft(w),D=116*T-16,x=500*(v-T),Y=200*(T-m);return [D,x,Y]}function Zn(s){let t=_e(s),r=st(t);return lr(r,r,r)}function cr(s){let t=fl(s)[1];return 116*Ft(t/100)-16}function _e(s){return 100*ml((s+16)/116)}function Nt(s){return Ft(s/100)*116-16}function Ie(s){let t=s/255;return t<=.040449936?t/12.92*100:Math.pow((t+.055)/1.055,2.4)*100}function st(s){let t=s/100,r=0;return t<=.0031308?r=t*12.92:r=1.055*Math.pow(t,1/2.4)-.055,$n(0,255,Math.round(r*255))}function Jn(){return Kn}function Ft(s){let t=.008856451679035631,r=24389/27;return s>t?Math.pow(s,1/3):(r*s+16)/116}function ml(s){let t=.008856451679035631,r=24389/27,l=s*s*s;return l>t?l:(116*s-16)/r}var De=class s{static make(t=Jn(),r=200/Math.PI*_e(50)/100,l=50,c=2,h=false){let d=t,p=d[0]*.401288+d[1]*.650173+d[2]*-0.051461,P=d[0]*-0.250268+d[1]*1.204414+d[2]*.045854,k=d[0]*-2079e-6+d[1]*.048952+d[2]*.953127,b=.8+c/10,w=b>=.9?ot(.59,.69,(b-.9)*10):ot(.525,.59,(b-.8)*10),v=h?1:b*(1-1/3.6*Math.exp((-r-42)/92));v=v>1?1:v<0?0:v;let T=b,m=[v*(100/p)+1-v,v*(100/P)+1-v,v*(100/k)+1-v],D=1/(5*r+1),x=D*D*D*D,Y=1-x,H=x*r+.1*Y*Y*Math.cbrt(5*r),X=_e(l)/t[1],Z=1.48+Math.sqrt(X),$=.725/Math.pow(X,.2),V=$,z=[Math.pow(H*m[0]*p/100,.42),Math.pow(H*m[1]*P/100,.42),Math.pow(H*m[2]*k/100,.42)],U=[400*z[0]/(z[0]+27.13),400*z[1]/(z[1]+27.13),400*z[2]/(z[2]+27.13)],ne=(2*U[0]+U[1]+.05*U[2])*$;return new s(X,ne,$,V,w,T,m,H,Math.pow(H,.25),Z)}constructor(t,r,l,c,h,d,p,P,k,b){this.n=t,this.aw=r,this.nbb=l,this.ncb=c,this.c=h,this.nc=d,this.rgbD=p,this.fl=P,this.fLRoot=k,this.z=b;}};De.DEFAULT=De.make();var Ee=class s{constructor(t,r,l,c,h,d,p,P,k){this.hue=t,this.chroma=r,this.j=l,this.q=c,this.m=h,this.s=d,this.jstar=p,this.astar=P,this.bstar=k;}distance(t){let r=this.jstar-t.jstar,l=this.astar-t.astar,c=this.bstar-t.bstar,h=Math.sqrt(r*r+l*l+c*c);return 1.41*Math.pow(h,.63)}static fromInt(t){return s.fromIntInViewingConditions(t,De.DEFAULT)}static fromIntInViewingConditions(t,r){let l=(t&16711680)>>16,c=(t&65280)>>8,h=t&255,d=Ie(l),p=Ie(c),P=Ie(h),k=.41233895*d+.35762064*p+.18051042*P,b=.2126*d+.7152*p+.0722*P,w=.01932141*d+.11916382*p+.95034478*P,v=.401288*k+.650173*b-.051461*w,T=-0.250268*k+1.204414*b+.045854*w,m=-2079e-6*k+.048952*b+.953127*w,D=r.rgbD[0]*v,x=r.rgbD[1]*T,Y=r.rgbD[2]*m,H=Math.pow(r.fl*Math.abs(D)/100,.42),X=Math.pow(r.fl*Math.abs(x)/100,.42),Z=Math.pow(r.fl*Math.abs(Y)/100,.42),$=pe(D)*400*H/(H+27.13),V=pe(x)*400*X/(X+27.13),z=pe(Y)*400*Z/(Z+27.13),U=(11*$+-12*V+z)/11,ne=($+V-2*z)/9,ee=(20*$+20*V+21*z)/20,oe=(40*$+20*V+z)/20,ke=Math.atan2(ne,U)*180/Math.PI,L=he(ke),fe=L*Math.PI/180,Oe=oe*r.nbb,be=100*Math.pow(Oe/r.aw,r.c*r.z),de=4/r.c*Math.sqrt(be/100)*(r.aw+4)*r.fLRoot,et=L<20.14?L+360:L,Ke=.25*(Math.cos(et*Math.PI/180+2)+3.8),Fe=5e4/13*Ke*r.nc*r.ncb*Math.sqrt(U*U+ne*ne)/(ee+.305),O=Math.pow(Fe,.9)*Math.pow(1.64-Math.pow(.29,r.n),.73),Bt=O*Math.sqrt(be/100),Ht=Bt*r.fLRoot,lt=50*Math.sqrt(O*r.c/(r.aw+4)),Ut=(1+100*.007)*be/(1+.007*be),Wt=1/.0228*Math.log(1+.0228*Ht),gr=Wt*Math.cos(fe),Sr=Wt*Math.sin(fe);return new s(L,Bt,be,de,Ht,lt,Ut,gr,Sr)}static fromJch(t,r,l){return s.fromJchInViewingConditions(t,r,l,De.DEFAULT)}static fromJchInViewingConditions(t,r,l,c){let h=4/c.c*Math.sqrt(t/100)*(c.aw+4)*c.fLRoot,d=r*c.fLRoot,p=r/Math.sqrt(t/100),P=50*Math.sqrt(p*c.c/(c.aw+4)),k=l*Math.PI/180,b=(1+100*.007)*t/(1+.007*t),w=1/.0228*Math.log(1+.0228*d),v=w*Math.cos(k),T=w*Math.sin(k);return new s(l,r,t,h,d,P,b,v,T)}static fromUcs(t,r,l){return s.fromUcsInViewingConditions(t,r,l,De.DEFAULT)}static fromUcsInViewingConditions(t,r,l,c){let h=r,d=l,p=Math.sqrt(h*h+d*d),k=(Math.exp(p*.0228)-1)/.0228/c.fLRoot,b=Math.atan2(d,h)*(180/Math.PI);b<0&&(b+=360);let w=t/(1-(t-100)*.007);return s.fromJchInViewingConditions(w,k,b,c)}toInt(){return this.viewed(De.DEFAULT)}viewed(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),l=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),c=this.hue*Math.PI/180,h=.25*(Math.cos(c+2)+3.8),d=t.aw*Math.pow(this.j/100,1/t.c/t.z),p=h*(5e4/13)*t.nc*t.ncb,P=d/t.nbb,k=Math.sin(c),b=Math.cos(c),w=23*(P+.305)*l/(23*p+11*l*b+108*l*k),v=w*b,T=w*k,m=(460*P+451*v+288*T)/1403,D=(460*P-891*v-261*T)/1403,x=(460*P-220*v-6300*T)/1403,Y=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),H=pe(m)*(100/t.fl)*Math.pow(Y,1/.42),X=Math.max(0,27.13*Math.abs(D)/(400-Math.abs(D))),Z=pe(D)*(100/t.fl)*Math.pow(X,1/.42),$=Math.max(0,27.13*Math.abs(x)/(400-Math.abs(x))),V=pe(x)*(100/t.fl)*Math.pow($,1/.42),z=H/t.rgbD[0],U=Z/t.rgbD[1],ne=V/t.rgbD[2],ee=1.86206786*z-1.01125463*U+.14918677*ne,oe=.38752654*z+.62144744*U-.00897398*ne,Se=-0.0158415*z-.03412294*U+1.04996444*ne;return Xn(ee,oe,Se)}static fromXyzInViewingConditions(t,r,l,c){let h=.401288*t+.650173*r-.051461*l,d=-0.250268*t+1.204414*r+.045854*l,p=-2079e-6*t+.048952*r+.953127*l,P=c.rgbD[0]*h,k=c.rgbD[1]*d,b=c.rgbD[2]*p,w=Math.pow(c.fl*Math.abs(P)/100,.42),v=Math.pow(c.fl*Math.abs(k)/100,.42),T=Math.pow(c.fl*Math.abs(b)/100,.42),m=pe(P)*400*w/(w+27.13),D=pe(k)*400*v/(v+27.13),x=pe(b)*400*T/(T+27.13),Y=(11*m+-12*D+x)/11,H=(m+D-2*x)/9,X=(20*m+20*D+21*x)/20,Z=(40*m+20*D+x)/20,V=Math.atan2(H,Y)*180/Math.PI,z=V<0?V+360:V>=360?V-360:V,U=z*Math.PI/180,ne=Z*c.nbb,ee=100*Math.pow(ne/c.aw,c.c*c.z),oe=4/c.c*Math.sqrt(ee/100)*(c.aw+4)*c.fLRoot,Se=z<20.14?z+360:z,ke=1/4*(Math.cos(Se*Math.PI/180+2)+3.8),fe=5e4/13*ke*c.nc*c.ncb*Math.sqrt(Y*Y+H*H)/(X+.305),Oe=Math.pow(fe,.9)*Math.pow(1.64-Math.pow(.29,c.n),.73),be=Oe*Math.sqrt(ee/100),de=be*c.fLRoot,et=50*Math.sqrt(Oe*c.c/(c.aw+4)),Ke=(1+100*.007)*ee/(1+.007*ee),tt=Math.log(1+.0228*de)/.0228,Fe=tt*Math.cos(U),O=tt*Math.sin(U);return new s(z,be,ee,oe,de,et,Ke,Fe,O)}xyzInViewingConditions(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),l=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),c=this.hue*Math.PI/180,h=.25*(Math.cos(c+2)+3.8),d=t.aw*Math.pow(this.j/100,1/t.c/t.z),p=h*(5e4/13)*t.nc*t.ncb,P=d/t.nbb,k=Math.sin(c),b=Math.cos(c),w=23*(P+.305)*l/(23*p+11*l*b+108*l*k),v=w*b,T=w*k,m=(460*P+451*v+288*T)/1403,D=(460*P-891*v-261*T)/1403,x=(460*P-220*v-6300*T)/1403,Y=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),H=pe(m)*(100/t.fl)*Math.pow(Y,1/.42),X=Math.max(0,27.13*Math.abs(D)/(400-Math.abs(D))),Z=pe(D)*(100/t.fl)*Math.pow(X,1/.42),$=Math.max(0,27.13*Math.abs(x)/(400-Math.abs(x))),V=pe(x)*(100/t.fl)*Math.pow($,1/.42),z=H/t.rgbD[0],U=Z/t.rgbD[1],ne=V/t.rgbD[2],ee=1.86206786*z-1.01125463*U+.14918677*ne,oe=.38752654*z+.62144744*U-.00897398*ne,Se=-0.0158415*z-.03412294*U+1.04996444*ne;return [ee,oe,Se]}};var Ae=class s{static sanitizeRadians(t){return (t+Math.PI*8)%(Math.PI*2)}static trueDelinearized(t){let r=t/100,l=0;return r<=.0031308?l=r*12.92:l=1.055*Math.pow(r,1/2.4)-.055,l*255}static chromaticAdaptation(t){let r=Math.pow(Math.abs(t),.42);return pe(t)*400*r/(r+27.13)}static hueOf(t){let r=Ot(t,s.SCALED_DISCOUNT_FROM_LINRGB),l=s.chromaticAdaptation(r[0]),c=s.chromaticAdaptation(r[1]),h=s.chromaticAdaptation(r[2]),d=(11*l+-12*c+h)/11,p=(l+c-2*h)/9;return Math.atan2(p,d)}static areInCyclicOrder(t,r,l){let c=s.sanitizeRadians(r-t),h=s.sanitizeRadians(l-t);return c<h}static intercept(t,r,l){return (r-t)/(l-t)}static lerpPoint(t,r,l){return [t[0]+(l[0]-t[0])*r,t[1]+(l[1]-t[1])*r,t[2]+(l[2]-t[2])*r]}static setCoordinate(t,r,l,c){let h=s.intercept(t[c],r,l[c]);return s.lerpPoint(t,h,l)}static isBounded(t){return 0<=t&&t<=100}static nthVertex(t,r){let l=s.Y_FROM_LINRGB[0],c=s.Y_FROM_LINRGB[1],h=s.Y_FROM_LINRGB[2],d=r%4<=1?0:100,p=r%2===0?0:100;if(r<4){let P=d,k=p,b=(t-P*c-k*h)/l;return s.isBounded(b)?[b,P,k]:[-1,-1,-1]}else if(r<8){let P=d,k=p,b=(t-k*l-P*h)/c;return s.isBounded(b)?[k,b,P]:[-1,-1,-1]}else {let P=d,k=p,b=(t-P*l-k*c)/h;return s.isBounded(b)?[P,k,b]:[-1,-1,-1]}}static bisectToSegment(t,r){let l=[-1,-1,-1],c=l,h=0,d=0,p=false,P=true;for(let k=0;k<12;k++){let b=s.nthVertex(t,k);if(b[0]<0)continue;let w=s.hueOf(b);if(!p){l=b,c=b,h=w,d=w,p=true;continue}(P||s.areInCyclicOrder(h,w,d))&&(P=false,s.areInCyclicOrder(h,r,w)?(c=b,d=w):(l=b,h=w));}return [l,c]}static midpoint(t,r){return [(t[0]+r[0])/2,(t[1]+r[1])/2,(t[2]+r[2])/2]}static criticalPlaneBelow(t){return Math.floor(t-.5)}static criticalPlaneAbove(t){return Math.ceil(t-.5)}static bisectToLimit(t,r){let l=s.bisectToSegment(t,r),c=l[0],h=s.hueOf(c),d=l[1];for(let p=0;p<3;p++)if(c[p]!==d[p]){let P=-1,k=255;c[p]<d[p]?(P=s.criticalPlaneBelow(s.trueDelinearized(c[p])),k=s.criticalPlaneAbove(s.trueDelinearized(d[p]))):(P=s.criticalPlaneAbove(s.trueDelinearized(c[p])),k=s.criticalPlaneBelow(s.trueDelinearized(d[p])));for(let b=0;b<8&&!(Math.abs(k-P)<=1);b++){let w=Math.floor((P+k)/2),v=s.CRITICAL_PLANES[w],T=s.setCoordinate(c,v,d,p),m=s.hueOf(T);s.areInCyclicOrder(h,r,m)?(d=T,k=w):(c=T,h=m,P=w);}}return s.midpoint(c,d)}static inverseChromaticAdaptation(t){let r=Math.abs(t),l=Math.max(0,27.13*r/(400-r));return pe(t)*Math.pow(l,1/.42)}static findResultByJ(t,r,l){let c=Math.sqrt(l)*11,h=De.DEFAULT,d=1/Math.pow(1.64-Math.pow(.29,h.n),.73),P=.25*(Math.cos(t+2)+3.8)*(5e4/13)*h.nc*h.ncb,k=Math.sin(t),b=Math.cos(t);for(let w=0;w<5;w++){let v=c/100,T=r===0||c===0?0:r/Math.sqrt(v),m=Math.pow(T*d,1/.9),x=h.aw*Math.pow(v,1/h.c/h.z)/h.nbb,Y=23*(x+.305)*m/(23*P+11*m*b+108*m*k),H=Y*b,X=Y*k,Z=(460*x+451*H+288*X)/1403,$=(460*x-891*H-261*X)/1403,V=(460*x-220*H-6300*X)/1403,z=s.inverseChromaticAdaptation(Z),U=s.inverseChromaticAdaptation($),ne=s.inverseChromaticAdaptation(V),ee=Ot([z,U,ne],s.LINRGB_FROM_SCALED_DISCOUNT);if(ee[0]<0||ee[1]<0||ee[2]<0)return 0;let oe=s.Y_FROM_LINRGB[0],Se=s.Y_FROM_LINRGB[1],ke=s.Y_FROM_LINRGB[2],L=oe*ee[0]+Se*ee[1]+ke*ee[2];if(L<=0)return 0;if(w===4||Math.abs(L-l)<.002)return ee[0]>100.01||ee[1]>100.01||ee[2]>100.01?0:Wr(ee);c=c-(L-l)*c/(2*L);}return 0}static solveToInt(t,r,l){if(r<1e-4||l<1e-4||l>99.9999)return Zn(l);t=he(t);let c=t/180*Math.PI,h=_e(l),d=s.findResultByJ(c,r,h);if(d!==0)return d;let p=s.bisectToLimit(h,c);return Wr(p)}static solveToCam(t,r,l){return Ee.fromInt(s.solveToInt(t,r,l))}};Ae.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];Ae.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];Ae.Y_FROM_LINRGB=[.2126,.7152,.0722];Ae.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var F=class s{static from(t,r,l){return new s(Ae.solveToInt(t,r,l))}static fromInt(t){return new s(t)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(t){this.setInternalState(Ae.solveToInt(t,this.internalChroma,this.internalTone));}get chroma(){return this.internalChroma}set chroma(t){this.setInternalState(Ae.solveToInt(this.internalHue,t,this.internalTone));}get tone(){return this.internalTone}set tone(t){this.setInternalState(Ae.solveToInt(this.internalHue,this.internalChroma,t));}setValue(t,r){this[t]=r;}toString(){return `HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`}static isBlue(t){return t>=250&&t<270}static isYellow(t){return t>=105&&t<125}static isCyan(t){return t>=170&&t<207}constructor(t){this.argb=t;let r=Ee.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=cr(t),this.argb=t;}setInternalState(t){let r=Ee.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=cr(t),this.argb=t;}inViewingConditions(t){let l=Ee.fromInt(this.toInt()).xyzInViewingConditions(t),c=Ee.fromXyzInViewingConditions(l[0],l[1],l[2],De.make());return s.from(c.hue,c.chroma,Nt(l[1]))}};var le=class s{static ratioOfTones(t,r){return t=ce(0,100,t),r=ce(0,100,r),s.ratioOfYs(_e(t),_e(r))}static ratioOfYs(t,r){let l=t>r?t:r,c=l===r?t:r;return (l+5)/(c+5)}static lighter(t,r){if(t<0||t>100)return -1;let l=_e(t),c=r*(l+5)-5,h=s.ratioOfYs(c,l),d=Math.abs(h-r);if(h<r&&d>.04)return -1;let p=Nt(c)+.4;return p<0||p>100?-1:p}static darker(t,r){if(t<0||t>100)return -1;let l=_e(t),c=(l+5)/r-5,h=s.ratioOfYs(l,c),d=Math.abs(h-r);if(h<r&&d>.04)return -1;let p=Nt(c)-.4;return p<0||p>100?-1:p}static lighterUnsafe(t,r){let l=s.lighter(t,r);return l<0?100:l}static darkerUnsafe(t,r){let l=s.darker(t,r);return l<0?0:l}};var it=class s{static isDisliked(t){let r=Math.round(t.hue)>=90&&Math.round(t.hue)<=111,l=Math.round(t.chroma)>16,c=Math.round(t.tone)<65;return r&&l&&c}static fixIfDisliked(t){return s.isDisliked(t)?F.from(t.hue,t.chroma,70):t}};function pl(s,t,r){if(s.name!==r.name)throw new Error(`Attempting to extend color ${s.name} with color ${r.name} of different name for spec version ${t}.`);if(s.isBackground!==r.isBackground)throw new Error(`Attempting to extend color ${s.name} as a ${s.isBackground?"background":"foreground"} with color ${r.name} as a ${r.isBackground?"background":"foreground"} for spec version ${t}.`)}function E(s,t,r){return pl(s,t,r),g.fromPalette({name:s.name,palette:l=>l.specVersion===t?r.palette(l):s.palette(l),tone:l=>l.specVersion===t?r.tone(l):s.tone(l),isBackground:s.isBackground,chromaMultiplier:l=>{let c=l.specVersion===t?r.chromaMultiplier:s.chromaMultiplier;return c!==void 0?c(l):1},background:l=>{let c=l.specVersion===t?r.background:s.background;return c!==void 0?c(l):void 0},secondBackground:l=>{let c=l.specVersion===t?r.secondBackground:s.secondBackground;return c!==void 0?c(l):void 0},contrastCurve:l=>{let c=l.specVersion===t?r.contrastCurve:s.contrastCurve;return c!==void 0?c(l):void 0},toneDeltaPair:l=>{let c=l.specVersion===t?r.toneDeltaPair:s.toneDeltaPair;return c!==void 0?c(l):void 0}})}var g=class s{static fromPalette(t){return new s(t.name??"",t.palette,t.tone??s.getInitialToneFromBackground(t.background),t.isBackground??false,t.chromaMultiplier,t.background,t.secondBackground,t.contrastCurve,t.toneDeltaPair)}static getInitialToneFromBackground(t){return t===void 0?r=>50:r=>t(r)?t(r).getTone(r):50}constructor(t,r,l,c,h,d,p,P,k){if(this.name=t,this.palette=r,this.tone=l,this.isBackground=c,this.chromaMultiplier=h,this.background=d,this.secondBackground=p,this.contrastCurve=P,this.toneDeltaPair=k,this.hctCache=new Map,!d&&p)throw new Error(`Color ${t} has secondBackgrounddefined, but background is not defined.`);if(!d&&P)throw new Error(`Color ${t} has contrastCurvedefined, but background is not defined.`);if(d&&!P)throw new Error(`Color ${t} has backgrounddefined, but contrastCurve is not defined.`)}clone(){return s.fromPalette({name:this.name,palette:this.palette,tone:this.tone,isBackground:this.isBackground,chromaMultiplier:this.chromaMultiplier,background:this.background,secondBackground:this.secondBackground,contrastCurve:this.contrastCurve,toneDeltaPair:this.toneDeltaPair})}clearCache(){this.hctCache.clear();}getArgb(t){return this.getHct(t).toInt()}getHct(t){let r=this.hctCache.get(t);if(r!=null)return r;let l=Qn(t.specVersion).getHct(t,this);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,l),l}getTone(t){return Qn(t.specVersion).getTone(t,this)}static foregroundTone(t,r){let l=le.lighterUnsafe(t,r),c=le.darkerUnsafe(t,r),h=le.ratioOfTones(l,t),d=le.ratioOfTones(c,t);if(s.tonePrefersLightForeground(t)){let P=Math.abs(h-d)<.1&&h<r&&d<r;return h>=r||h>=d||P?l:c}else return d>=r||d>=h?c:l}static tonePrefersLightForeground(t){return Math.round(t)<60}static toneAllowsLightForeground(t){return Math.round(t)<=49}static enableLightForeground(t){return s.tonePrefersLightForeground(t)&&!s.toneAllowsLightForeground(t)?49:t}},Gr=class{getHct(t,r){let l=r.getTone(t);return r.palette(t).getHct(l)}getTone(t,r){let l=t.contrastLevel<0,c=r.toneDeltaPair?r.toneDeltaPair(t):void 0;if(c){let h=c.roleA,d=c.roleB,p=c.delta,P=c.polarity,k=c.stayTogether,b=P==="nearer"||P==="lighter"&&!t.isDark||P==="darker"&&t.isDark,w=b?h:d,v=b?d:h,T=r.name===w.name,m=t.isDark?1:-1,D=w.tone(t),x=v.tone(t);if(r.background&&w.contrastCurve&&v.contrastCurve){let Y=r.background(t),H=w.contrastCurve(t),X=v.contrastCurve(t);if(Y&&H&&X){let Z=Y.getTone(t),$=H.get(t.contrastLevel),V=X.get(t.contrastLevel);le.ratioOfTones(Z,D)<$&&(D=g.foregroundTone(Z,$)),le.ratioOfTones(Z,x)<V&&(x=g.foregroundTone(Z,V)),l&&(D=g.foregroundTone(Z,$),x=g.foregroundTone(Z,V));}}return (x-D)*m<p&&(x=ce(0,100,D+p*m),(x-D)*m>=p||(D=ce(0,100,x-p*m))),50<=D&&D<60?m>0?(D=60,x=Math.max(x,D+p*m)):(D=49,x=Math.min(x,D+p*m)):50<=x&&x<60&&(k?m>0?(D=60,x=Math.max(x,D+p*m)):(D=49,x=Math.min(x,D+p*m)):m>0?x=60:x=49),T?D:x}else {let h=r.tone(t);if(r.background==null||r.background(t)===void 0||r.contrastCurve==null||r.contrastCurve(t)===void 0)return h;let d=r.background(t).getTone(t),p=r.contrastCurve(t).get(t.contrastLevel);if(le.ratioOfTones(d,h)>=p||(h=g.foregroundTone(d,p)),l&&(h=g.foregroundTone(d,p)),r.isBackground&&50<=h&&h<60&&(le.ratioOfTones(49,d)>=p?h=49:h=60),r.secondBackground==null||r.secondBackground(t)===void 0)return h;let[P,k]=[r.background,r.secondBackground],[b,w]=[P(t).getTone(t),k(t).getTone(t)],[v,T]=[Math.max(b,w),Math.min(b,w)];if(le.ratioOfTones(v,h)>=p&&le.ratioOfTones(T,h)>=p)return h;let m=le.lighter(v,p),D=le.darker(T,p),x=[];return m!==-1&&x.push(m),D!==-1&&x.push(D),g.tonePrefersLightForeground(b)||g.tonePrefersLightForeground(w)?m<0?100:m:x.length===1?x[0]:D<0?0:D}}},jr=class{getHct(t,r){let l=r.palette(t),c=r.getTone(t),h=l.hue,d=l.chroma*(r.chromaMultiplier?r.chromaMultiplier(t):1);return F.from(h,d,c)}getTone(t,r){let l=r.toneDeltaPair?r.toneDeltaPair(t):void 0;if(l){let c=l.roleA,h=l.roleB,d=l.polarity,p=l.constraint,P=d==="darker"||d==="relative_lighter"&&t.isDark||d==="relative_darker"&&!t.isDark?-l.delta:l.delta,k=r.name===c.name,b=k?c:h,w=k?h:c,v=b.tone(t),T=w.getTone(t),m=P*(k?1:-1);if(p==="exact"?v=ce(0,100,T+m):p==="nearer"?m>0?v=ce(0,100,ce(T,T+m,v)):v=ce(0,100,ce(T+m,T,v)):p==="farther"&&(m>0?v=ce(T+m,100,v):v=ce(0,T+m,v)),r.background&&r.contrastCurve){let D=r.background(t),x=r.contrastCurve(t);if(D&&x){let Y=D.getTone(t),H=x.get(t.contrastLevel);v=le.ratioOfTones(Y,v)>=H&&t.contrastLevel>=0?v:g.foregroundTone(Y,H);}}return r.isBackground&&!r.name.endsWith("_fixed_dim")&&(v>=57?v=ce(65,100,v):v=ce(0,49,v)),v}else {let c=r.tone(t);if(r.background==null||r.background(t)===void 0||r.contrastCurve==null||r.contrastCurve(t)===void 0)return c;let h=r.background(t).getTone(t),d=r.contrastCurve(t).get(t.contrastLevel);if(c=le.ratioOfTones(h,c)>=d&&t.contrastLevel>=0?c:g.foregroundTone(h,d),r.isBackground&&!r.name.endsWith("_fixed_dim")&&(c>=57?c=ce(65,100,c):c=ce(0,49,c)),r.secondBackground==null||r.secondBackground(t)===void 0)return c;let[p,P]=[r.background,r.secondBackground],[k,b]=[p(t).getTone(t),P(t).getTone(t)],[w,v]=[Math.max(k,b),Math.min(k,b)];if(le.ratioOfTones(w,c)>=d&&le.ratioOfTones(v,c)>=d)return c;let T=le.lighter(w,d),m=le.darker(v,d),D=[];return T!==-1&&D.push(T),m!==-1&&D.push(m),g.tonePrefersLightForeground(k)||g.tonePrefersLightForeground(b)?T<0?100:T:D.length===1?D[0]:m<0?0:m}}},yl=new Gr,gl=new jr;function Qn(s){return s==="2025"?gl:yl}var _=class s{static fromInt(t){let r=F.fromInt(t);return s.fromHct(r)}static fromHct(t){return new s(t.hue,t.chroma,t)}static fromHueAndChroma(t,r){let l=new $r(t,r).create();return new s(t,r,l)}constructor(t,r,l){this.hue=t,this.chroma=r,this.keyColor=l,this.cache=new Map;}tone(t){let r=this.cache.get(t);return r===void 0&&(t==99&&F.isYellow(this.hue)?r=this.averageArgb(this.tone(98),this.tone(100)):r=F.from(this.hue,this.chroma,t).toInt(),this.cache.set(t,r)),r}getHct(t){return F.fromInt(this.tone(t))}averageArgb(t,r){let l=t>>>16&255,c=t>>>8&255,h=t&255,d=r>>>16&255,p=r>>>8&255,P=r&255,k=Math.round((l+d)/2),b=Math.round((c+p)/2),w=Math.round((h+P)/2);return (255<<24|(k&255)<<16|(b&255)<<8|w&255)>>>0}},$r=class{constructor(t,r){this.hue=t,this.requestedChroma=r,this.chromaCache=new Map,this.maxChromaValue=200;}create(){let c=0,h=100;for(;c<h;){let d=Math.floor((c+h)/2),p=this.maxChroma(d)<this.maxChroma(d+1);if(this.maxChroma(d)>=this.requestedChroma-.01)if(Math.abs(c-50)<Math.abs(h-50))h=d;else {if(c===d)return F.from(this.hue,this.requestedChroma,c);c=d;}else p?c=d+1:h=d;}return F.from(this.hue,this.requestedChroma,c)}maxChroma(t){if(this.chromaCache.has(t))return this.chromaCache.get(t);let r=F.from(this.hue,this.maxChromaValue,t).chroma;return this.chromaCache.set(t,r),r}};var Lt=class s{constructor(t){this.input=t,this.hctsByTempCache=[],this.hctsByHueCache=[],this.tempsByHctCache=new Map,this.inputRelativeTemperatureCache=-1,this.complementCache=null;}get hctsByTemp(){if(this.hctsByTempCache.length>0)return this.hctsByTempCache;let t=this.hctsByHue.concat([this.input]),r=this.tempsByHct;return t.sort((l,c)=>r.get(l)-r.get(c)),this.hctsByTempCache=t,t}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(t=5,r=12){let l=Math.round(this.input.hue),c=this.hctsByHue[l],h=this.relativeTemperature(c),d=[c],p=0;for(let m=0;m<360;m++){let D=gt(l+m),x=this.hctsByHue[D],Y=this.relativeTemperature(x),H=Math.abs(Y-h);h=Y,p+=H;}let P=1,k=p/r,b=0;for(h=this.relativeTemperature(c);d.length<r;){let m=gt(l+P),D=this.hctsByHue[m],x=this.relativeTemperature(D),Y=Math.abs(x-h);b+=Y;let H=d.length*k,X=b>=H,Z=1;for(;X&&d.length<r;){d.push(D);let $=(d.length+Z)*k;X=b>=$,Z++;}if(h=x,P++,P>360){for(;d.length<r;)d.push(D);break}}let w=[this.input],v=Math.floor((t-1)/2);for(let m=1;m<v+1;m++){let D=0-m;for(;D<0;)D=d.length+D;D>=d.length&&(D=D%d.length),w.splice(0,0,d[D]);}let T=t-v-1;for(let m=1;m<T+1;m++){let D=m;for(;D<0;)D=d.length+D;D>=d.length&&(D=D%d.length),w.push(d[D]);}return w}get complement(){if(this.complementCache!=null)return this.complementCache;let t=this.coldest.hue,r=this.tempsByHct.get(this.coldest),l=this.warmest.hue,h=this.tempsByHct.get(this.warmest)-r,d=s.isBetween(this.input.hue,t,l),p=d?l:t,P=d?t:l,k=1,b=1e3,w=this.hctsByHue[Math.round(this.input.hue)],v=1-this.inputRelativeTemperature;for(let T=0;T<=360;T+=1){let m=he(p+k*T);if(!s.isBetween(m,p,P))continue;let D=this.hctsByHue[Math.round(m)],x=(this.tempsByHct.get(D)-r)/h,Y=Math.abs(v-x);Y<b&&(b=Y,w=D);}return this.complementCache=w,this.complementCache}relativeTemperature(t){let r=this.tempsByHct.get(this.warmest)-this.tempsByHct.get(this.coldest),l=this.tempsByHct.get(t)-this.tempsByHct.get(this.coldest);return r===0?.5:l/r}get inputRelativeTemperature(){return this.inputRelativeTemperatureCache>=0?this.inputRelativeTemperatureCache:(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input),this.inputRelativeTemperatureCache)}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;let t=this.hctsByHue.concat([this.input]),r=new Map;for(let l of t)r.set(l,s.rawTemperature(l));return this.tempsByHctCache=r,r}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;let t=[];for(let r=0;r<=360;r+=1){let l=F.from(r,this.input.chroma,this.input.tone);t.push(l);}return this.hctsByHueCache=t,this.hctsByHueCache}static isBetween(t,r,l){return r<l?r<=t&&t<=l:r<=t||t<=l}static rawTemperature(t){let r=zr(t.toInt()),l=he(Math.atan2(r[2],r[1])*180/Math.PI),c=Math.sqrt(r[1]*r[1]+r[2]*r[2]);return -0.5+.02*Math.pow(c,1.07)*Math.cos(he(l-50)*Math.PI/180)}};var R=class{constructor(t,r,l,c){this.low=t,this.normal=r,this.medium=l,this.high=c;}get(t){return t<=-1?this.low:t<0?ot(this.low,this.normal,(t- -1)/1):t<.5?ot(this.normal,this.medium,(t-0)/.5):t<1?ot(this.medium,this.high,(t-.5)/.5):this.high}};var q=class{constructor(t,r,l,c,h,d){this.roleA=t,this.roleB=r,this.delta=l,this.polarity=c,this.stayTogether=h,this.constraint=d,this.constraint=d??"exact";}};var f;(function(s){s[s.MONOCHROME=0]="MONOCHROME",s[s.NEUTRAL=1]="NEUTRAL",s[s.TONAL_SPOT=2]="TONAL_SPOT",s[s.VIBRANT=3]="VIBRANT",s[s.EXPRESSIVE=4]="EXPRESSIVE",s[s.FIDELITY=5]="FIDELITY",s[s.CONTENT=6]="CONTENT",s[s.RAINBOW=7]="RAINBOW",s[s.FRUIT_SALAD=8]="FRUIT_SALAD";})(f||(f={}));function St(s){return s.variant===f.FIDELITY||s.variant===f.CONTENT}function se(s){return s.variant===f.MONOCHROME}function Sl(s,t,r,l){let c=r,h=F.from(s,t,r);if(h.chroma<t){let d=h.chroma;for(;h.chroma<t;){c+=l?-1:1;let p=F.from(s,t,c);if(d>p.chroma||Math.abs(p.chroma-t)<.4)break;let P=Math.abs(p.chroma-t),k=Math.abs(h.chroma-t);P<k&&(h=p),d=Math.max(d,p.chroma);}}return c}var ur=class{primaryPaletteKeyColor(){return g.fromPalette({name:"primary_palette_key_color",palette:t=>t.primaryPalette,tone:t=>t.primaryPalette.keyColor.tone})}secondaryPaletteKeyColor(){return g.fromPalette({name:"secondary_palette_key_color",palette:t=>t.secondaryPalette,tone:t=>t.secondaryPalette.keyColor.tone})}tertiaryPaletteKeyColor(){return g.fromPalette({name:"tertiary_palette_key_color",palette:t=>t.tertiaryPalette,tone:t=>t.tertiaryPalette.keyColor.tone})}neutralPaletteKeyColor(){return g.fromPalette({name:"neutral_palette_key_color",palette:t=>t.neutralPalette,tone:t=>t.neutralPalette.keyColor.tone})}neutralVariantPaletteKeyColor(){return g.fromPalette({name:"neutral_variant_palette_key_color",palette:t=>t.neutralVariantPalette,tone:t=>t.neutralVariantPalette.keyColor.tone})}errorPaletteKeyColor(){return g.fromPalette({name:"error_palette_key_color",palette:t=>t.errorPalette,tone:t=>t.errorPalette.keyColor.tone})}background(){return g.fromPalette({name:"background",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}onBackground(){return g.fromPalette({name:"on_background",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.background(),contrastCurve:t=>new R(3,3,4.5,7)})}surface(){return g.fromPalette({name:"surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}surfaceDim(){return g.fromPalette({name:"surface_dim",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:new R(87,87,80,75).get(t.contrastLevel),isBackground:true})}surfaceBright(){return g.fromPalette({name:"surface_bright",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(24,24,29,34).get(t.contrastLevel):98,isBackground:true})}surfaceContainerLowest(){return g.fromPalette({name:"surface_container_lowest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(4,4,2,0).get(t.contrastLevel):100,isBackground:true})}surfaceContainerLow(){return g.fromPalette({name:"surface_container_low",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(10,10,11,12).get(t.contrastLevel):new R(96,96,96,95).get(t.contrastLevel),isBackground:true})}surfaceContainer(){return g.fromPalette({name:"surface_container",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(12,12,16,20).get(t.contrastLevel):new R(94,94,92,90).get(t.contrastLevel),isBackground:true})}surfaceContainerHigh(){return g.fromPalette({name:"surface_container_high",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(17,17,21,25).get(t.contrastLevel):new R(92,92,88,85).get(t.contrastLevel),isBackground:true})}surfaceContainerHighest(){return g.fromPalette({name:"surface_container_highest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(22,22,26,30).get(t.contrastLevel):new R(90,90,84,80).get(t.contrastLevel),isBackground:true})}onSurface(){return g.fromPalette({name:"on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.highestSurface(t),contrastCurve:t=>new R(4.5,7,11,21)})}surfaceVariant(){return g.fromPalette({name:"surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:90,isBackground:true})}onSurfaceVariant(){return g.fromPalette({name:"on_surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?80:30,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,11)})}inverseSurface(){return g.fromPalette({name:"inverse_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:20,isBackground:true})}inverseOnSurface(){return g.fromPalette({name:"inverse_on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?20:95,background:t=>this.inverseSurface(),contrastCurve:t=>new R(4.5,7,11,21)})}outline(){return g.fromPalette({name:"outline",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?60:50,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1.5,3,4.5,7)})}outlineVariant(){return g.fromPalette({name:"outline_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:80,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5)})}shadow(){return g.fromPalette({name:"shadow",palette:t=>t.neutralPalette,tone:t=>0})}scrim(){return g.fromPalette({name:"scrim",palette:t=>t.neutralPalette,tone:t=>0})}surfaceTint(){return g.fromPalette({name:"surface_tint",palette:t=>t.primaryPalette,tone:t=>t.isDark?80:40,isBackground:true})}primary(){return g.fromPalette({name:"primary",palette:t=>t.primaryPalette,tone:t=>se(t)?t.isDark?100:0:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new q(this.primaryContainer(),this.primary(),10,"nearer",false)})}primaryDim(){}onPrimary(){return g.fromPalette({name:"on_primary",palette:t=>t.primaryPalette,tone:t=>se(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.primary(),contrastCurve:t=>new R(4.5,7,11,21)})}primaryContainer(){return g.fromPalette({name:"primary_container",palette:t=>t.primaryPalette,tone:t=>St(t)?t.sourceColorHct.tone:se(t)?t.isDark?85:25:t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.primaryContainer(),this.primary(),10,"nearer",false)})}onPrimaryContainer(){return g.fromPalette({name:"on_primary_container",palette:t=>t.primaryPalette,tone:t=>St(t)?g.foregroundTone(this.primaryContainer().tone(t),4.5):se(t)?t.isDark?0:100:t.isDark?90:30,background:t=>this.primaryContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}inversePrimary(){return g.fromPalette({name:"inverse_primary",palette:t=>t.primaryPalette,tone:t=>t.isDark?40:80,background:t=>this.inverseSurface(),contrastCurve:t=>new R(3,4.5,7,7)})}secondary(){return g.fromPalette({name:"secondary",palette:t=>t.secondaryPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new q(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}secondaryDim(){}onSecondary(){return g.fromPalette({name:"on_secondary",palette:t=>t.secondaryPalette,tone:t=>se(t)?t.isDark?10:100:t.isDark?20:100,background:t=>this.secondary(),contrastCurve:t=>new R(4.5,7,11,21)})}secondaryContainer(){return g.fromPalette({name:"secondary_container",palette:t=>t.secondaryPalette,tone:t=>{let r=t.isDark?30:90;return se(t)?t.isDark?30:85:St(t)?Sl(t.secondaryPalette.hue,t.secondaryPalette.chroma,r,!t.isDark):r},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}onSecondaryContainer(){return g.fromPalette({name:"on_secondary_container",palette:t=>t.secondaryPalette,tone:t=>se(t)?t.isDark?90:10:St(t)?g.foregroundTone(this.secondaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.secondaryContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}tertiary(){return g.fromPalette({name:"tertiary",palette:t=>t.tertiaryPalette,tone:t=>se(t)?t.isDark?90:25:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new q(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}tertiaryDim(){}onTertiary(){return g.fromPalette({name:"on_tertiary",palette:t=>t.tertiaryPalette,tone:t=>se(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.tertiary(),contrastCurve:t=>new R(4.5,7,11,21)})}tertiaryContainer(){return g.fromPalette({name:"tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>{if(se(t))return t.isDark?60:49;if(!St(t))return t.isDark?30:90;let r=t.tertiaryPalette.getHct(t.sourceColorHct.tone);return it.fixIfDisliked(r).tone},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}onTertiaryContainer(){return g.fromPalette({name:"on_tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>se(t)?t.isDark?0:100:St(t)?g.foregroundTone(this.tertiaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.tertiaryContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}error(){return g.fromPalette({name:"error",palette:t=>t.errorPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new q(this.errorContainer(),this.error(),10,"nearer",false)})}errorDim(){}onError(){return g.fromPalette({name:"on_error",palette:t=>t.errorPalette,tone:t=>t.isDark?20:100,background:t=>this.error(),contrastCurve:t=>new R(4.5,7,11,21)})}errorContainer(){return g.fromPalette({name:"error_container",palette:t=>t.errorPalette,tone:t=>t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.errorContainer(),this.error(),10,"nearer",false)})}onErrorContainer(){return g.fromPalette({name:"on_error_container",palette:t=>t.errorPalette,tone:t=>se(t)?t.isDark?90:10:t.isDark?90:30,background:t=>this.errorContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}primaryFixed(){return g.fromPalette({name:"primary_fixed",palette:t=>t.primaryPalette,tone:t=>se(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}primaryFixedDim(){return g.fromPalette({name:"primary_fixed_dim",palette:t=>t.primaryPalette,tone:t=>se(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}onPrimaryFixed(){return g.fromPalette({name:"on_primary_fixed",palette:t=>t.primaryPalette,tone:t=>se(t)?100:10,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new R(4.5,7,11,21)})}onPrimaryFixedVariant(){return g.fromPalette({name:"on_primary_fixed_variant",palette:t=>t.primaryPalette,tone:t=>se(t)?90:30,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new R(3,4.5,7,11)})}secondaryFixed(){return g.fromPalette({name:"secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>se(t)?80:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}secondaryFixedDim(){return g.fromPalette({name:"secondary_fixed_dim",palette:t=>t.secondaryPalette,tone:t=>se(t)?70:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}onSecondaryFixed(){return g.fromPalette({name:"on_secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>10,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new R(4.5,7,11,21)})}onSecondaryFixedVariant(){return g.fromPalette({name:"on_secondary_fixed_variant",palette:t=>t.secondaryPalette,tone:t=>se(t)?25:30,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new R(3,4.5,7,11)})}tertiaryFixed(){return g.fromPalette({name:"tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>se(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}tertiaryFixedDim(){return g.fromPalette({name:"tertiary_fixed_dim",palette:t=>t.tertiaryPalette,tone:t=>se(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}onTertiaryFixed(){return g.fromPalette({name:"on_tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>se(t)?100:10,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new R(4.5,7,11,21)})}onTertiaryFixedVariant(){return g.fromPalette({name:"on_tertiary_fixed_variant",palette:t=>t.tertiaryPalette,tone:t=>se(t)?90:30,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new R(3,4.5,7,11)})}highestSurface(t){return t.isDark?this.surfaceBright():this.surfaceDim()}};function B(s,t=0,r=100,l=1){let c=ea(s.hue,s.chroma*l,100,true);return ce(t,r,c)}function Qe(s,t=0,r=100){let l=ea(s.hue,s.chroma,0,false);return ce(t,r,l)}function ea(s,t,r,l){let c=r,h=F.from(s,t,c);for(;h.chroma<t&&!(r<0||r>100);){r+=l?-1:1;let d=F.from(s,t,r);h.chroma<d.chroma&&(h=d,c=r);}return c}function I(s){return s===1.5?new R(1.5,1.5,3,5.5):s===3?new R(3,3,4.5,7):s===4.5?new R(4.5,4.5,7,11):s===6?new R(6,6,7,11):s===7?new R(7,7,11,21):s===9?new R(9,9,11,21):s===11?new R(11,11,21,21):s===21?new R(21,21,21,21):new R(s,s,7,21)}var hr=class extends ur{surface(){let t=g.fromPalette({name:"surface",palette:r=>r.neutralPalette,tone:r=>(super.surface().tone(r),r.platform==="phone"?r.isDark?4:F.isYellow(r.neutralPalette.hue)?99:r.variant===f.VIBRANT?97:98:0),isBackground:true});return E(super.surface(),"2025",t)}surfaceDim(){let t=g.fromPalette({name:"surface_dim",palette:r=>r.neutralPalette,tone:r=>r.isDark?4:F.isYellow(r.neutralPalette.hue)?90:r.variant===f.VIBRANT?85:87,isBackground:true,chromaMultiplier:r=>{if(!r.isDark){if(r.variant===f.NEUTRAL)return 2.5;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?2.7:1.75;if(r.variant===f.VIBRANT)return 1.36}return 1}});return E(super.surfaceDim(),"2025",t)}surfaceBright(){let t=g.fromPalette({name:"surface_bright",palette:r=>r.neutralPalette,tone:r=>r.isDark?18:F.isYellow(r.neutralPalette.hue)?99:r.variant===f.VIBRANT?97:98,isBackground:true,chromaMultiplier:r=>{if(r.isDark){if(r.variant===f.NEUTRAL)return 2.5;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?2.7:1.75;if(r.variant===f.VIBRANT)return 1.36}return 1}});return E(super.surfaceBright(),"2025",t)}surfaceContainerLowest(){let t=g.fromPalette({name:"surface_container_lowest",palette:r=>r.neutralPalette,tone:r=>r.isDark?0:100,isBackground:true});return E(super.surfaceContainerLowest(),"2025",t)}surfaceContainerLow(){let t=g.fromPalette({name:"surface_container_low",palette:r=>r.neutralPalette,tone:r=>r.platform==="phone"?r.isDark?6:F.isYellow(r.neutralPalette.hue)?98:r.variant===f.VIBRANT?95:96:15,isBackground:true,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 1.3;if(r.variant===f.TONAL_SPOT)return 1.25;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?1.3:1.15;if(r.variant===f.VIBRANT)return 1.08}return 1}});return E(super.surfaceContainerLow(),"2025",t)}surfaceContainer(){let t=g.fromPalette({name:"surface_container",palette:r=>r.neutralPalette,tone:r=>r.platform==="phone"?r.isDark?9:F.isYellow(r.neutralPalette.hue)?96:r.variant===f.VIBRANT?92:94:20,isBackground:true,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 1.6;if(r.variant===f.TONAL_SPOT)return 1.4;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?1.6:1.3;if(r.variant===f.VIBRANT)return 1.15}return 1}});return E(super.surfaceContainer(),"2025",t)}surfaceContainerHigh(){let t=g.fromPalette({name:"surface_container_high",palette:r=>r.neutralPalette,tone:r=>r.platform==="phone"?r.isDark?12:F.isYellow(r.neutralPalette.hue)?94:r.variant===f.VIBRANT?90:92:25,isBackground:true,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 1.9;if(r.variant===f.TONAL_SPOT)return 1.5;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?1.95:1.45;if(r.variant===f.VIBRANT)return 1.22}return 1}});return E(super.surfaceContainerHigh(),"2025",t)}surfaceContainerHighest(){let t=g.fromPalette({name:"surface_container_highest",palette:r=>r.neutralPalette,tone:r=>r.isDark?15:F.isYellow(r.neutralPalette.hue)?92:r.variant===f.VIBRANT?88:90,isBackground:true,chromaMultiplier:r=>r.variant===f.NEUTRAL?2.2:r.variant===f.TONAL_SPOT?1.7:r.variant===f.EXPRESSIVE?F.isYellow(r.neutralPalette.hue)?2.3:1.6:r.variant===f.VIBRANT?1.29:1});return E(super.surfaceContainerHighest(),"2025",t)}onSurface(){let t=g.fromPalette({name:"on_surface",palette:r=>r.neutralPalette,tone:r=>r.variant===f.VIBRANT?B(r.neutralPalette,0,100,1.1):g.getInitialToneFromBackground(l=>l.platform==="phone"?this.highestSurface(l):this.surfaceContainerHigh())(r),chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.isDark&&r.platform==="phone"?I(11):I(9)});return E(super.onSurface(),"2025",t)}onSurfaceVariant(){let t=g.fromPalette({name:"on_surface_variant",palette:r=>r.neutralPalette,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?r.isDark?I(6):I(4.5):I(7)});return E(super.onSurfaceVariant(),"2025",t)}outline(){let t=g.fromPalette({name:"outline",palette:r=>r.neutralPalette,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(3):I(4.5)});return E(super.outline(),"2025",t)}outlineVariant(){let t=g.fromPalette({name:"outline_variant",palette:r=>r.neutralPalette,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(1.5):I(3)});return E(super.outlineVariant(),"2025",t)}inverseSurface(){let t=g.fromPalette({name:"inverse_surface",palette:r=>r.neutralPalette,tone:r=>r.isDark?98:4,isBackground:true});return E(super.inverseSurface(),"2025",t)}inverseOnSurface(){let t=g.fromPalette({name:"inverse_on_surface",palette:r=>r.neutralPalette,background:r=>this.inverseSurface(),contrastCurve:r=>I(7)});return E(super.inverseOnSurface(),"2025",t)}primary(){let t=g.fromPalette({name:"primary",palette:r=>r.primaryPalette,tone:r=>r.variant===f.NEUTRAL?r.platform==="phone"?r.isDark?80:40:90:r.variant===f.TONAL_SPOT?r.platform==="phone"?r.isDark?80:B(r.primaryPalette):B(r.primaryPalette,0,90):r.variant===f.EXPRESSIVE?r.platform==="phone"?B(r.primaryPalette,0,F.isYellow(r.primaryPalette.hue)?25:F.isCyan(r.primaryPalette.hue)?88:98):B(r.primaryPalette):r.platform==="phone"?B(r.primaryPalette,0,F.isCyan(r.primaryPalette.hue)?88:98):B(r.primaryPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7),toneDeltaPair:r=>r.platform==="phone"?new q(this.primaryContainer(),this.primary(),5,"relative_lighter",true,"farther"):void 0});return E(super.primary(),"2025",t)}primaryDim(){return g.fromPalette({name:"primary_dim",palette:t=>t.primaryPalette,tone:t=>t.variant===f.NEUTRAL?85:t.variant===f.TONAL_SPOT?B(t.primaryPalette,0,90):B(t.primaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>I(4.5),toneDeltaPair:t=>new q(this.primaryDim(),this.primary(),5,"darker",true,"farther")})}onPrimary(){let t=g.fromPalette({name:"on_primary",palette:r=>r.primaryPalette,background:r=>r.platform==="phone"?this.primary():this.primaryDim(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onPrimary(),"2025",t)}primaryContainer(){let t=g.fromPalette({name:"primary_container",palette:r=>r.primaryPalette,tone:r=>r.platform==="watch"?30:r.variant===f.NEUTRAL?r.isDark?30:90:r.variant===f.TONAL_SPOT?r.isDark?Qe(r.primaryPalette,35,93):B(r.primaryPalette,0,90):r.variant===f.EXPRESSIVE?r.isDark?B(r.primaryPalette,30,93):B(r.primaryPalette,78,F.isCyan(r.primaryPalette.hue)?88:90):r.isDark?Qe(r.primaryPalette,66,93):B(r.primaryPalette,66,F.isCyan(r.primaryPalette.hue)?88:93),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="phone"?void 0:new q(this.primaryContainer(),this.primaryDim(),10,"darker",true,"farther"),contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.primaryContainer(),"2025",t)}onPrimaryContainer(){let t=g.fromPalette({name:"on_primary_container",palette:r=>r.primaryPalette,background:r=>this.primaryContainer(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onPrimaryContainer(),"2025",t)}primaryFixed(){let t=g.fromPalette({name:"primary_fixed",palette:r=>r.primaryPalette,tone:r=>{let l=Object.assign({},r,{isDark:false,contrastLevel:0});return this.primaryContainer().getTone(l)},isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.primaryFixed(),"2025",t)}primaryFixedDim(){let t=g.fromPalette({name:"primary_fixed_dim",palette:r=>r.primaryPalette,tone:r=>this.primaryFixed().getTone(r),isBackground:true,toneDeltaPair:r=>new q(this.primaryFixedDim(),this.primaryFixed(),5,"darker",true,"exact")});return E(super.primaryFixedDim(),"2025",t)}onPrimaryFixed(){let t=g.fromPalette({name:"on_primary_fixed",palette:r=>r.primaryPalette,background:r=>this.primaryFixedDim(),contrastCurve:r=>I(7)});return E(super.onPrimaryFixed(),"2025",t)}onPrimaryFixedVariant(){let t=g.fromPalette({name:"on_primary_fixed_variant",palette:r=>r.primaryPalette,background:r=>this.primaryFixedDim(),contrastCurve:r=>I(4.5)});return E(super.onPrimaryFixedVariant(),"2025",t)}inversePrimary(){let t=g.fromPalette({name:"inverse_primary",palette:r=>r.primaryPalette,tone:r=>B(r.primaryPalette),background:r=>this.inverseSurface(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.inversePrimary(),"2025",t)}secondary(){let t=g.fromPalette({name:"secondary",palette:r=>r.secondaryPalette,tone:r=>r.platform==="watch"?r.variant===f.NEUTRAL?90:B(r.secondaryPalette,0,90):r.variant===f.NEUTRAL?r.isDark?Qe(r.secondaryPalette,0,98):B(r.secondaryPalette):r.variant===f.VIBRANT?B(r.secondaryPalette,0,r.isDark?90:98):r.isDark?80:B(r.secondaryPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7),toneDeltaPair:r=>r.platform==="phone"?new q(this.secondaryContainer(),this.secondary(),5,"relative_lighter",true,"farther"):void 0});return E(super.secondary(),"2025",t)}secondaryDim(){return g.fromPalette({name:"secondary_dim",palette:t=>t.secondaryPalette,tone:t=>t.variant===f.NEUTRAL?85:B(t.secondaryPalette,0,90),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>I(4.5),toneDeltaPair:t=>new q(this.secondaryDim(),this.secondary(),5,"darker",true,"farther")})}onSecondary(){let t=g.fromPalette({name:"on_secondary",palette:r=>r.secondaryPalette,background:r=>r.platform==="phone"?this.secondary():this.secondaryDim(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onSecondary(),"2025",t)}secondaryContainer(){let t=g.fromPalette({name:"secondary_container",palette:r=>r.secondaryPalette,tone:r=>r.platform==="watch"?30:r.variant===f.VIBRANT?r.isDark?Qe(r.secondaryPalette,30,40):B(r.secondaryPalette,84,90):r.variant===f.EXPRESSIVE?r.isDark?15:B(r.secondaryPalette,90,95):r.isDark?25:90,isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="watch"?new q(this.secondaryContainer(),this.secondaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.secondaryContainer(),"2025",t)}onSecondaryContainer(){let t=g.fromPalette({name:"on_secondary_container",palette:r=>r.secondaryPalette,background:r=>this.secondaryContainer(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onSecondaryContainer(),"2025",t)}secondaryFixed(){let t=g.fromPalette({name:"secondary_fixed",palette:r=>r.secondaryPalette,tone:r=>{let l=Object.assign({},r,{isDark:false,contrastLevel:0});return this.secondaryContainer().getTone(l)},isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.secondaryFixed(),"2025",t)}secondaryFixedDim(){let t=g.fromPalette({name:"secondary_fixed_dim",palette:r=>r.secondaryPalette,tone:r=>this.secondaryFixed().getTone(r),isBackground:true,toneDeltaPair:r=>new q(this.secondaryFixedDim(),this.secondaryFixed(),5,"darker",true,"exact")});return E(super.secondaryFixedDim(),"2025",t)}onSecondaryFixed(){let t=g.fromPalette({name:"on_secondary_fixed",palette:r=>r.secondaryPalette,background:r=>this.secondaryFixedDim(),contrastCurve:r=>I(7)});return E(super.onSecondaryFixed(),"2025",t)}onSecondaryFixedVariant(){let t=g.fromPalette({name:"on_secondary_fixed_variant",palette:r=>r.secondaryPalette,background:r=>this.secondaryFixedDim(),contrastCurve:r=>I(4.5)});return E(super.onSecondaryFixedVariant(),"2025",t)}tertiary(){let t=g.fromPalette({name:"tertiary",palette:r=>r.tertiaryPalette,tone:r=>r.platform==="watch"?r.variant===f.TONAL_SPOT?B(r.tertiaryPalette,0,90):B(r.tertiaryPalette):r.variant===f.EXPRESSIVE||r.variant===f.VIBRANT?B(r.tertiaryPalette,0,F.isCyan(r.tertiaryPalette.hue)?88:r.isDark?98:100):r.isDark?B(r.tertiaryPalette,0,98):B(r.tertiaryPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7),toneDeltaPair:r=>r.platform==="phone"?new q(this.tertiaryContainer(),this.tertiary(),5,"relative_lighter",true,"farther"):void 0});return E(super.tertiary(),"2025",t)}tertiaryDim(){return g.fromPalette({name:"tertiary_dim",palette:t=>t.tertiaryPalette,tone:t=>t.variant===f.TONAL_SPOT?B(t.tertiaryPalette,0,90):B(t.tertiaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>I(4.5),toneDeltaPair:t=>new q(this.tertiaryDim(),this.tertiary(),5,"darker",true,"farther")})}onTertiary(){let t=g.fromPalette({name:"on_tertiary",palette:r=>r.tertiaryPalette,background:r=>r.platform==="phone"?this.tertiary():this.tertiaryDim(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onTertiary(),"2025",t)}tertiaryContainer(){let t=g.fromPalette({name:"tertiary_container",palette:r=>r.tertiaryPalette,tone:r=>r.platform==="watch"?r.variant===f.TONAL_SPOT?B(r.tertiaryPalette,0,90):B(r.tertiaryPalette):r.variant===f.NEUTRAL?r.isDark?B(r.tertiaryPalette,0,93):B(r.tertiaryPalette,0,96):r.variant===f.TONAL_SPOT?B(r.tertiaryPalette,0,r.isDark?93:100):r.variant===f.EXPRESSIVE?B(r.tertiaryPalette,75,F.isCyan(r.tertiaryPalette.hue)?88:r.isDark?93:100):r.isDark?B(r.tertiaryPalette,0,93):B(r.tertiaryPalette,72,100),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="watch"?new q(this.tertiaryContainer(),this.tertiaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.tertiaryContainer(),"2025",t)}onTertiaryContainer(){let t=g.fromPalette({name:"on_tertiary_container",palette:r=>r.tertiaryPalette,background:r=>this.tertiaryContainer(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onTertiaryContainer(),"2025",t)}tertiaryFixed(){let t=g.fromPalette({name:"tertiary_fixed",palette:r=>r.tertiaryPalette,tone:r=>{let l=Object.assign({},r,{isDark:false,contrastLevel:0});return this.tertiaryContainer().getTone(l)},isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.tertiaryFixed(),"2025",t)}tertiaryFixedDim(){let t=g.fromPalette({name:"tertiary_fixed_dim",palette:r=>r.tertiaryPalette,tone:r=>this.tertiaryFixed().getTone(r),isBackground:true,toneDeltaPair:r=>new q(this.tertiaryFixedDim(),this.tertiaryFixed(),5,"darker",true,"exact")});return E(super.tertiaryFixedDim(),"2025",t)}onTertiaryFixed(){let t=g.fromPalette({name:"on_tertiary_fixed",palette:r=>r.tertiaryPalette,background:r=>this.tertiaryFixedDim(),contrastCurve:r=>I(7)});return E(super.onTertiaryFixed(),"2025",t)}onTertiaryFixedVariant(){let t=g.fromPalette({name:"on_tertiary_fixed_variant",palette:r=>r.tertiaryPalette,background:r=>this.tertiaryFixedDim(),contrastCurve:r=>I(4.5)});return E(super.onTertiaryFixedVariant(),"2025",t)}error(){let t=g.fromPalette({name:"error",palette:r=>r.errorPalette,tone:r=>r.platform==="phone"?r.isDark?Qe(r.errorPalette,0,98):B(r.errorPalette):Qe(r.errorPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7),toneDeltaPair:r=>r.platform==="phone"?new q(this.errorContainer(),this.error(),5,"relative_lighter",true,"farther"):void 0});return E(super.error(),"2025",t)}errorDim(){return g.fromPalette({name:"error_dim",palette:t=>t.errorPalette,tone:t=>Qe(t.errorPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>I(4.5),toneDeltaPair:t=>new q(this.errorDim(),this.error(),5,"darker",true,"farther")})}onError(){let t=g.fromPalette({name:"on_error",palette:r=>r.errorPalette,background:r=>r.platform==="phone"?this.error():this.errorDim(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onError(),"2025",t)}errorContainer(){let t=g.fromPalette({name:"error_container",palette:r=>r.errorPalette,tone:r=>r.platform==="watch"?30:r.isDark?Qe(r.errorPalette,30,93):B(r.errorPalette,0,90),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="watch"?new q(this.errorContainer(),this.errorDim(),10,"darker",true,"farther"):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.errorContainer(),"2025",t)}onErrorContainer(){let t=g.fromPalette({name:"on_error_container",palette:r=>r.errorPalette,background:r=>this.errorContainer(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7)});return E(super.onErrorContainer(),"2025",t)}surfaceVariant(){let t=Object.assign(this.surfaceContainerHighest().clone(),{name:"surface_variant"});return E(super.surfaceVariant(),"2025",t)}surfaceTint(){let t=Object.assign(this.primary().clone(),{name:"surface_tint"});return E(super.surfaceTint(),"2025",t)}background(){let t=Object.assign(this.surface().clone(),{name:"background"});return E(super.background(),"2025",t)}onBackground(){let t=Object.assign(this.onSurface().clone(),{name:"on_background",tone:r=>r.platform==="watch"?100:this.onSurface().getTone(r)});return E(super.onBackground(),"2025",t)}};var S=class s{constructor(){this.allColors=[this.background(),this.onBackground(),this.surface(),this.surfaceDim(),this.surfaceBright(),this.surfaceContainerLowest(),this.surfaceContainerLow(),this.surfaceContainer(),this.surfaceContainerHigh(),this.surfaceContainerHighest(),this.onSurface(),this.onSurfaceVariant(),this.outline(),this.outlineVariant(),this.inverseSurface(),this.inverseOnSurface(),this.primary(),this.primaryDim(),this.onPrimary(),this.primaryContainer(),this.onPrimaryContainer(),this.primaryFixed(),this.primaryFixedDim(),this.onPrimaryFixed(),this.onPrimaryFixedVariant(),this.inversePrimary(),this.secondary(),this.secondaryDim(),this.onSecondary(),this.secondaryContainer(),this.onSecondaryContainer(),this.secondaryFixed(),this.secondaryFixedDim(),this.onSecondaryFixed(),this.onSecondaryFixedVariant(),this.tertiary(),this.tertiaryDim(),this.onTertiary(),this.tertiaryContainer(),this.onTertiaryContainer(),this.tertiaryFixed(),this.tertiaryFixedDim(),this.onTertiaryFixed(),this.onTertiaryFixedVariant(),this.error(),this.errorDim(),this.onError(),this.errorContainer(),this.onErrorContainer()].filter(t=>t!==void 0);}highestSurface(t){return s.colorSpec.highestSurface(t)}primaryPaletteKeyColor(){return s.colorSpec.primaryPaletteKeyColor()}secondaryPaletteKeyColor(){return s.colorSpec.secondaryPaletteKeyColor()}tertiaryPaletteKeyColor(){return s.colorSpec.tertiaryPaletteKeyColor()}neutralPaletteKeyColor(){return s.colorSpec.neutralPaletteKeyColor()}neutralVariantPaletteKeyColor(){return s.colorSpec.neutralVariantPaletteKeyColor()}errorPaletteKeyColor(){return s.colorSpec.errorPaletteKeyColor()}background(){return s.colorSpec.background()}onBackground(){return s.colorSpec.onBackground()}surface(){return s.colorSpec.surface()}surfaceDim(){return s.colorSpec.surfaceDim()}surfaceBright(){return s.colorSpec.surfaceBright()}surfaceContainerLowest(){return s.colorSpec.surfaceContainerLowest()}surfaceContainerLow(){return s.colorSpec.surfaceContainerLow()}surfaceContainer(){return s.colorSpec.surfaceContainer()}surfaceContainerHigh(){return s.colorSpec.surfaceContainerHigh()}surfaceContainerHighest(){return s.colorSpec.surfaceContainerHighest()}onSurface(){return s.colorSpec.onSurface()}surfaceVariant(){return s.colorSpec.surfaceVariant()}onSurfaceVariant(){return s.colorSpec.onSurfaceVariant()}outline(){return s.colorSpec.outline()}outlineVariant(){return s.colorSpec.outlineVariant()}inverseSurface(){return s.colorSpec.inverseSurface()}inverseOnSurface(){return s.colorSpec.inverseOnSurface()}shadow(){return s.colorSpec.shadow()}scrim(){return s.colorSpec.scrim()}surfaceTint(){return s.colorSpec.surfaceTint()}primary(){return s.colorSpec.primary()}primaryDim(){return s.colorSpec.primaryDim()}onPrimary(){return s.colorSpec.onPrimary()}primaryContainer(){return s.colorSpec.primaryContainer()}onPrimaryContainer(){return s.colorSpec.onPrimaryContainer()}inversePrimary(){return s.colorSpec.inversePrimary()}primaryFixed(){return s.colorSpec.primaryFixed()}primaryFixedDim(){return s.colorSpec.primaryFixedDim()}onPrimaryFixed(){return s.colorSpec.onPrimaryFixed()}onPrimaryFixedVariant(){return s.colorSpec.onPrimaryFixedVariant()}secondary(){return s.colorSpec.secondary()}secondaryDim(){return s.colorSpec.secondaryDim()}onSecondary(){return s.colorSpec.onSecondary()}secondaryContainer(){return s.colorSpec.secondaryContainer()}onSecondaryContainer(){return s.colorSpec.onSecondaryContainer()}secondaryFixed(){return s.colorSpec.secondaryFixed()}secondaryFixedDim(){return s.colorSpec.secondaryFixedDim()}onSecondaryFixed(){return s.colorSpec.onSecondaryFixed()}onSecondaryFixedVariant(){return s.colorSpec.onSecondaryFixedVariant()}tertiary(){return s.colorSpec.tertiary()}tertiaryDim(){return s.colorSpec.tertiaryDim()}onTertiary(){return s.colorSpec.onTertiary()}tertiaryContainer(){return s.colorSpec.tertiaryContainer()}onTertiaryContainer(){return s.colorSpec.onTertiaryContainer()}tertiaryFixed(){return s.colorSpec.tertiaryFixed()}tertiaryFixedDim(){return s.colorSpec.tertiaryFixedDim()}onTertiaryFixed(){return s.colorSpec.onTertiaryFixed()}onTertiaryFixedVariant(){return s.colorSpec.onTertiaryFixedVariant()}error(){return s.colorSpec.error()}errorDim(){return s.colorSpec.errorDim()}onError(){return s.colorSpec.onError()}errorContainer(){return s.colorSpec.errorContainer()}onErrorContainer(){return s.colorSpec.onErrorContainer()}static highestSurface(t){return s.colorSpec.highestSurface(t)}};S.contentAccentToneDelta=15;S.colorSpec=new hr;S.primaryPaletteKeyColor=S.colorSpec.primaryPaletteKeyColor();S.secondaryPaletteKeyColor=S.colorSpec.secondaryPaletteKeyColor();S.tertiaryPaletteKeyColor=S.colorSpec.tertiaryPaletteKeyColor();S.neutralPaletteKeyColor=S.colorSpec.neutralPaletteKeyColor();S.neutralVariantPaletteKeyColor=S.colorSpec.neutralVariantPaletteKeyColor();S.background=S.colorSpec.background();S.onBackground=S.colorSpec.onBackground();S.surface=S.colorSpec.surface();S.surfaceDim=S.colorSpec.surfaceDim();S.surfaceBright=S.colorSpec.surfaceBright();S.surfaceContainerLowest=S.colorSpec.surfaceContainerLowest();S.surfaceContainerLow=S.colorSpec.surfaceContainerLow();S.surfaceContainer=S.colorSpec.surfaceContainer();S.surfaceContainerHigh=S.colorSpec.surfaceContainerHigh();S.surfaceContainerHighest=S.colorSpec.surfaceContainerHighest();S.onSurface=S.colorSpec.onSurface();S.surfaceVariant=S.colorSpec.surfaceVariant();S.onSurfaceVariant=S.colorSpec.onSurfaceVariant();S.inverseSurface=S.colorSpec.inverseSurface();S.inverseOnSurface=S.colorSpec.inverseOnSurface();S.outline=S.colorSpec.outline();S.outlineVariant=S.colorSpec.outlineVariant();S.shadow=S.colorSpec.shadow();S.scrim=S.colorSpec.scrim();S.surfaceTint=S.colorSpec.surfaceTint();S.primary=S.colorSpec.primary();S.onPrimary=S.colorSpec.onPrimary();S.primaryContainer=S.colorSpec.primaryContainer();S.onPrimaryContainer=S.colorSpec.onPrimaryContainer();S.inversePrimary=S.colorSpec.inversePrimary();S.secondary=S.colorSpec.secondary();S.onSecondary=S.colorSpec.onSecondary();S.secondaryContainer=S.colorSpec.secondaryContainer();S.onSecondaryContainer=S.colorSpec.onSecondaryContainer();S.tertiary=S.colorSpec.tertiary();S.onTertiary=S.colorSpec.onTertiary();S.tertiaryContainer=S.colorSpec.tertiaryContainer();S.onTertiaryContainer=S.colorSpec.onTertiaryContainer();S.error=S.colorSpec.error();S.onError=S.colorSpec.onError();S.errorContainer=S.colorSpec.errorContainer();S.onErrorContainer=S.colorSpec.onErrorContainer();S.primaryFixed=S.colorSpec.primaryFixed();S.primaryFixedDim=S.colorSpec.primaryFixedDim();S.onPrimaryFixed=S.colorSpec.onPrimaryFixed();S.onPrimaryFixedVariant=S.colorSpec.onPrimaryFixedVariant();S.secondaryFixed=S.colorSpec.secondaryFixed();S.secondaryFixedDim=S.colorSpec.secondaryFixedDim();S.onSecondaryFixed=S.colorSpec.onSecondaryFixed();S.onSecondaryFixedVariant=S.colorSpec.onSecondaryFixedVariant();S.tertiaryFixed=S.colorSpec.tertiaryFixed();S.tertiaryFixedDim=S.colorSpec.tertiaryFixedDim();S.onTertiaryFixed=S.colorSpec.onTertiaryFixed();S.onTertiaryFixedVariant=S.colorSpec.onTertiaryFixedVariant();var J=class s{static maybeFallbackSpecVersion(t,r){switch(r){case f.EXPRESSIVE:case f.VIBRANT:case f.TONAL_SPOT:case f.NEUTRAL:return t;default:return "2021"}}constructor(t){this.sourceColorArgb=t.sourceColorHct.toInt(),this.variant=t.variant,this.contrastLevel=t.contrastLevel,this.isDark=t.isDark,this.platform=t.platform??"phone",this.specVersion=s.maybeFallbackSpecVersion(t.specVersion??"2021",this.variant),this.sourceColorHct=t.sourceColorHct,this.primaryPalette=t.primaryPalette??kt(this.specVersion).getPrimaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.secondaryPalette=t.secondaryPalette??kt(this.specVersion).getSecondaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.tertiaryPalette=t.tertiaryPalette??kt(this.specVersion).getTertiaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralPalette=t.neutralPalette??kt(this.specVersion).getNeutralPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralVariantPalette=t.neutralVariantPalette??kt(this.specVersion).getNeutralVariantPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.errorPalette=t.errorPalette??kt(this.specVersion).getErrorPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel)??_.fromHueAndChroma(25,84),this.colors=new S;}toString(){return `Scheme: variant=${f[this.variant]}, mode=${this.isDark?"dark":"light"}, platform=${this.platform}, contrastLevel=${this.contrastLevel.toFixed(1)}, seed=${this.sourceColorHct.toString()}, specVersion=${this.specVersion}`}static getPiecewiseHue(t,r,l){let c=Math.min(r.length-1,l.length),h=t.hue;for(let d=0;d<c;d++)if(h>=r[d]&&h<r[d+1])return he(l[d]);return h}static getRotatedHue(t,r,l){let c=s.getPiecewiseHue(t,r,l);return Math.min(r.length-1,l.length)<=0&&(c=0),he(t.hue+c)}getArgb(t){return t.getArgb(this)}getHct(t){return t.getHct(this)}get primaryPaletteKeyColor(){return this.getArgb(this.colors.primaryPaletteKeyColor())}get secondaryPaletteKeyColor(){return this.getArgb(this.colors.secondaryPaletteKeyColor())}get tertiaryPaletteKeyColor(){return this.getArgb(this.colors.tertiaryPaletteKeyColor())}get neutralPaletteKeyColor(){return this.getArgb(this.colors.neutralPaletteKeyColor())}get neutralVariantPaletteKeyColor(){return this.getArgb(this.colors.neutralVariantPaletteKeyColor())}get errorPaletteKeyColor(){return this.getArgb(this.colors.errorPaletteKeyColor())}get background(){return this.getArgb(this.colors.background())}get onBackground(){return this.getArgb(this.colors.onBackground())}get surface(){return this.getArgb(this.colors.surface())}get surfaceDim(){return this.getArgb(this.colors.surfaceDim())}get surfaceBright(){return this.getArgb(this.colors.surfaceBright())}get surfaceContainerLowest(){return this.getArgb(this.colors.surfaceContainerLowest())}get surfaceContainerLow(){return this.getArgb(this.colors.surfaceContainerLow())}get surfaceContainer(){return this.getArgb(this.colors.surfaceContainer())}get surfaceContainerHigh(){return this.getArgb(this.colors.surfaceContainerHigh())}get surfaceContainerHighest(){return this.getArgb(this.colors.surfaceContainerHighest())}get onSurface(){return this.getArgb(this.colors.onSurface())}get surfaceVariant(){return this.getArgb(this.colors.surfaceVariant())}get onSurfaceVariant(){return this.getArgb(this.colors.onSurfaceVariant())}get inverseSurface(){return this.getArgb(this.colors.inverseSurface())}get inverseOnSurface(){return this.getArgb(this.colors.inverseOnSurface())}get outline(){return this.getArgb(this.colors.outline())}get outlineVariant(){return this.getArgb(this.colors.outlineVariant())}get shadow(){return this.getArgb(this.colors.shadow())}get scrim(){return this.getArgb(this.colors.scrim())}get surfaceTint(){return this.getArgb(this.colors.surfaceTint())}get primary(){return this.getArgb(this.colors.primary())}get primaryDim(){let t=this.colors.primaryDim();if(t===void 0)throw new Error("`primaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onPrimary(){return this.getArgb(this.colors.onPrimary())}get primaryContainer(){return this.getArgb(this.colors.primaryContainer())}get onPrimaryContainer(){return this.getArgb(this.colors.onPrimaryContainer())}get primaryFixed(){return this.getArgb(this.colors.primaryFixed())}get primaryFixedDim(){return this.getArgb(this.colors.primaryFixedDim())}get onPrimaryFixed(){return this.getArgb(this.colors.onPrimaryFixed())}get onPrimaryFixedVariant(){return this.getArgb(this.colors.onPrimaryFixedVariant())}get inversePrimary(){return this.getArgb(this.colors.inversePrimary())}get secondary(){return this.getArgb(this.colors.secondary())}get secondaryDim(){let t=this.colors.secondaryDim();if(t===void 0)throw new Error("`secondaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onSecondary(){return this.getArgb(this.colors.onSecondary())}get secondaryContainer(){return this.getArgb(this.colors.secondaryContainer())}get onSecondaryContainer(){return this.getArgb(this.colors.onSecondaryContainer())}get secondaryFixed(){return this.getArgb(this.colors.secondaryFixed())}get secondaryFixedDim(){return this.getArgb(this.colors.secondaryFixedDim())}get onSecondaryFixed(){return this.getArgb(this.colors.onSecondaryFixed())}get onSecondaryFixedVariant(){return this.getArgb(this.colors.onSecondaryFixedVariant())}get tertiary(){return this.getArgb(this.colors.tertiary())}get tertiaryDim(){let t=this.colors.tertiaryDim();if(t===void 0)throw new Error("`tertiaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onTertiary(){return this.getArgb(this.colors.onTertiary())}get tertiaryContainer(){return this.getArgb(this.colors.tertiaryContainer())}get onTertiaryContainer(){return this.getArgb(this.colors.onTertiaryContainer())}get tertiaryFixed(){return this.getArgb(this.colors.tertiaryFixed())}get tertiaryFixedDim(){return this.getArgb(this.colors.tertiaryFixedDim())}get onTertiaryFixed(){return this.getArgb(this.colors.onTertiaryFixed())}get onTertiaryFixedVariant(){return this.getArgb(this.colors.onTertiaryFixedVariant())}get error(){return this.getArgb(this.colors.error())}get errorDim(){let t=this.colors.errorDim();if(t===void 0)throw new Error("`errorDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onError(){return this.getArgb(this.colors.onError())}get errorContainer(){return this.getArgb(this.colors.errorContainer())}get onErrorContainer(){return this.getArgb(this.colors.onErrorContainer())}};J.DEFAULT_SPEC_VERSION="2021";J.DEFAULT_PLATFORM="phone";var dr=class{getPrimaryPalette(t,r,l,c,h){switch(t){case f.CONTENT:case f.FIDELITY:return _.fromHueAndChroma(r.hue,r.chroma);case f.FRUIT_SALAD:return _.fromHueAndChroma(he(r.hue-50),48);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,12);case f.RAINBOW:return _.fromHueAndChroma(r.hue,48);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,36);case f.EXPRESSIVE:return _.fromHueAndChroma(he(r.hue+240),40);case f.VIBRANT:return _.fromHueAndChroma(r.hue,200);default:throw new Error(`Unsupported variant: ${t}`)}}getSecondaryPalette(t,r,l,c,h){switch(t){case f.CONTENT:case f.FIDELITY:return _.fromHueAndChroma(r.hue,Math.max(r.chroma-32,r.chroma*.5));case f.FRUIT_SALAD:return _.fromHueAndChroma(he(r.hue-50),36);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,8);case f.RAINBOW:return _.fromHueAndChroma(r.hue,16);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,16);case f.EXPRESSIVE:return _.fromHueAndChroma(J.getRotatedHue(r,[0,21,51,121,151,191,271,321,360],[45,95,45,20,45,90,45,45,45]),24);case f.VIBRANT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,41,61,101,131,181,251,301,360],[18,15,10,12,15,18,15,12,12]),24);default:throw new Error(`Unsupported variant: ${t}`)}}getTertiaryPalette(t,r,l,c,h){switch(t){case f.CONTENT:return _.fromHct(it.fixIfDisliked(new Lt(r).analogous(3,6)[2]));case f.FIDELITY:return _.fromHct(it.fixIfDisliked(new Lt(r).complement));case f.FRUIT_SALAD:return _.fromHueAndChroma(r.hue,36);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,16);case f.RAINBOW:case f.TONAL_SPOT:return _.fromHueAndChroma(he(r.hue+60),24);case f.EXPRESSIVE:return _.fromHueAndChroma(J.getRotatedHue(r,[0,21,51,121,151,191,271,321,360],[120,120,20,45,20,15,20,120,120]),32);case f.VIBRANT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,41,61,101,131,181,251,301,360],[35,30,20,25,30,35,30,25,25]),32);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralPalette(t,r,l,c,h){switch(t){case f.CONTENT:case f.FIDELITY:return _.fromHueAndChroma(r.hue,r.chroma/8);case f.FRUIT_SALAD:return _.fromHueAndChroma(r.hue,10);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,2);case f.RAINBOW:return _.fromHueAndChroma(r.hue,0);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,6);case f.EXPRESSIVE:return _.fromHueAndChroma(he(r.hue+15),8);case f.VIBRANT:return _.fromHueAndChroma(r.hue,10);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralVariantPalette(t,r,l,c,h){switch(t){case f.CONTENT:return _.fromHueAndChroma(r.hue,r.chroma/8+4);case f.FIDELITY:return _.fromHueAndChroma(r.hue,r.chroma/8+4);case f.FRUIT_SALAD:return _.fromHueAndChroma(r.hue,16);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,2);case f.RAINBOW:return _.fromHueAndChroma(r.hue,0);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,8);case f.EXPRESSIVE:return _.fromHueAndChroma(he(r.hue+15),12);case f.VIBRANT:return _.fromHueAndChroma(r.hue,12);default:throw new Error(`Unsupported variant: ${t}`)}}getErrorPalette(t,r,l,c,h){}},qr=class s extends dr{getPrimaryPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,c==="phone"?F.isBlue(r.hue)?12:8:F.isBlue(r.hue)?16:12);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,c==="phone"&&l?26:32);case f.EXPRESSIVE:return _.fromHueAndChroma(r.hue,c==="phone"?l?36:48:40);case f.VIBRANT:return _.fromHueAndChroma(r.hue,c==="phone"?74:56);default:return super.getPrimaryPalette(t,r,l,c,h)}}getSecondaryPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,c==="phone"?F.isBlue(r.hue)?6:4:F.isBlue(r.hue)?10:6);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,16);case f.EXPRESSIVE:return _.fromHueAndChroma(J.getRotatedHue(r,[0,105,140,204,253,278,300,333,360],[-160,155,-100,96,-96,-156,-165,-160]),c==="phone"&&l?16:24);case f.VIBRANT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,38,105,140,333,360],[-14,10,-14,10,-14]),c==="phone"?56:36);default:return super.getSecondaryPalette(t,r,l,c,h)}}getTertiaryPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(J.getRotatedHue(r,[0,38,105,161,204,278,333,360],[-32,26,10,-39,24,-15,-32]),c==="phone"?20:36);case f.TONAL_SPOT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,20,71,161,333,360],[-40,48,-32,40,-32]),c==="phone"?28:32);case f.EXPRESSIVE:return _.fromHueAndChroma(J.getRotatedHue(r,[0,105,140,204,253,278,300,333,360],[-165,160,-105,101,-101,-160,-170,-165]),48);case f.VIBRANT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,38,71,105,140,161,253,333,360],[-72,35,24,-24,62,50,62,-72]),56);default:return super.getTertiaryPalette(t,r,l,c,h)}}static getExpressiveNeutralHue(t){return J.getRotatedHue(t,[0,71,124,253,278,300,360],[10,0,10,0,10,0])}static getExpressiveNeutralChroma(t,r,l){let c=s.getExpressiveNeutralHue(t);return l==="phone"?r?F.isYellow(c)?6:14:18:12}static getVibrantNeutralHue(t){return J.getRotatedHue(t,[0,38,105,140,333,360],[-14,10,-14,10,-14])}static getVibrantNeutralChroma(t,r){let l=s.getVibrantNeutralHue(t);return r==="phone"||F.isBlue(l)?28:20}getNeutralPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,c==="phone"?1.4:6);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,c==="phone"?5:10);case f.EXPRESSIVE:return _.fromHueAndChroma(s.getExpressiveNeutralHue(r),s.getExpressiveNeutralChroma(r,l,c));case f.VIBRANT:return _.fromHueAndChroma(s.getVibrantNeutralHue(r),s.getVibrantNeutralChroma(r,c));default:return super.getNeutralPalette(t,r,l,c,h)}}getNeutralVariantPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,(c==="phone"?1.4:6)*2.2);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,(c==="phone"?5:10)*1.7);case f.EXPRESSIVE:let d=s.getExpressiveNeutralHue(r),p=s.getExpressiveNeutralChroma(r,l,c);return _.fromHueAndChroma(d,p*(d>=105&&d<125?1.6:2.3));case f.VIBRANT:let P=s.getVibrantNeutralHue(r),k=s.getVibrantNeutralChroma(r,c);return _.fromHueAndChroma(P,k*1.29);default:return super.getNeutralVariantPalette(t,r,l,c,h)}}getErrorPalette(t,r,l,c,h){let d=J.getPiecewiseHue(r,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);switch(t){case f.NEUTRAL:return _.fromHueAndChroma(d,c==="phone"?50:40);case f.TONAL_SPOT:return _.fromHueAndChroma(d,c==="phone"?60:48);case f.EXPRESSIVE:return _.fromHueAndChroma(d,c==="phone"?64:48);case f.VIBRANT:return _.fromHueAndChroma(d,c==="phone"?80:60);default:return super.getErrorPalette(t,r,l,c,h)}}},kl=new dr,Pl=new qr;function kt(s){return s==="2025"?Pl:kl}var fr=class extends J{constructor(t,r,l,c=J.DEFAULT_SPEC_VERSION,h=J.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:f.VIBRANT,contrastLevel:l,isDark:r,platform:h,specVersion:c});}};function Kr(s){let t=Rt(s),r=It(s),l=Et(s),c=[t.toString(16),r.toString(16),l.toString(16)];for(let[h,d]of c.entries())d.length===1&&(c[h]="0"+d);return "#"+c.join("")}function ra(s){s=s.replace("#","");let t=s.length===3,r=s.length===6,l=s.length===8;if(!t&&!r&&!l)throw new Error("unexpected hex "+s);let c=0,h=0,d=0;return t?(c=je(s.slice(0,1).repeat(2)),h=je(s.slice(1,2).repeat(2)),d=je(s.slice(2,3).repeat(2))):r?(c=je(s.slice(0,2)),h=je(s.slice(2,4)),d=je(s.slice(4,6))):l&&(c=je(s.slice(2,4)),h=je(s.slice(4,6)),d=je(s.slice(6,8))),(255<<24|(c&255)<<16|(h&255)<<8|d&255)>>>0}function je(s){return parseInt(s,16)}function Pt(s,t){let r=F.fromInt(ra(s)),l=new fr(r,t,0),c={},h=["primary","onPrimary","primaryContainer","onPrimaryContainer","secondary","onSecondary","secondaryContainer","onSecondaryContainer","tertiary","onTertiary","tertiaryContainer","onTertiaryContainer","error","onError","errorContainer","onErrorContainer","background","onBackground","surface","onSurface","surfaceVariant","onSurfaceVariant","outline","outlineVariant","shadow","scrim","inverseSurface","inverseOnSurface","inversePrimary","surfaceDim","surfaceBright","surfaceContainerLowest","surfaceContainerLow","surfaceContainer","surfaceContainerHigh","surfaceContainerHighest"];for(let d of h){let p=S[d];p&&(c[d]=Kr(p.getArgb(l)));}return c}function Bh(s,t){let r=s.replace("#",""),l=parseInt(r.substring(0,2),16),c=parseInt(r.substring(2,4),16),h=parseInt(r.substring(4,6),16);return `rgba(${l}, ${c}, ${h}, ${t})`}function na(s,t){let r=0,l=0,c=0;return s.length===4?(r=parseInt(s[1]+s[1],16),l=parseInt(s[2]+s[2],16),c=parseInt(s[3]+s[3],16)):s.length===7&&(r=parseInt(s.slice(1,3),16),l=parseInt(s.slice(3,5),16),c=parseInt(s.slice(5,7),16)),`rgba(${r}, ${l}, ${c}, ${t})`}function Hh(s){let t=s.replace("#",""),r=parseInt(t.substring(0,2),16),l=parseInt(t.substring(2,4),16),c=parseInt(t.substring(4,6),16);return .2126*r+.7152*l+.0722*c<128}var oa=react.createContext(null),_l=Pt("#6750A4",false),Gh=({children:s,seedColor:t="#6750A4",defaultColorScheme:r="auto"})=>{let l=react.useRef(t),[c,h]=react.useState(r),[d,p]=react.useState(()=>{let k=r==="dark";return r==="auto"&&typeof window<"u"&&(k=window.matchMedia("(prefers-color-scheme: dark)").matches),Pt(l.current,k)});react.useEffect(()=>{if(c==="auto"&&typeof window<"u"){let k=window.matchMedia("(prefers-color-scheme: dark)"),b=w=>{p(Pt(l.current,w.matches));};return k.addEventListener("change",b),()=>k.removeEventListener("change",b)}},[c]);let P=react.useMemo(()=>({themeColors:d,systemTheme:c,setThemeColors:k=>{l.current=k;let b=c==="dark";c==="auto"&&(b=typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:false),p(Pt(k,b));},setColorScheme:k=>{h(k);let b=k==="dark";k==="auto"&&(b=typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:false),p(Pt(l.current,b));}}),[d,c]);return jsxRuntime.jsx(oa.Provider,{value:P,children:s})},jh=()=>{let s=react.useContext(oa);return s||{themeColors:_l,systemTheme:"auto",setThemeColors:()=>{throw new Error("[@zaide6137/m3-components-web] Wrap your app in <ThemeProvider>.")},setColorScheme:()=>{throw new Error("[@zaide6137/m3-components-web] Wrap your app in <ThemeProvider>.")}}};var yr=jn(Zr());var Jr=jn(Zr());var sa=react.forwardRef((s,t)=>{let{className:r,shape:l,type:c,hoverEffect:h=true,text:d,icon:p,onClick:P,disabled:k,loading:b=false}=s,{themeColors:w}=m3ComponentsWeb.useGlobalTheme(),v=k?c==="filled"?{backgroundColor:m3ComponentsWeb.hexToArgba(w.onSurface,.12),color:m3ComponentsWeb.hexToArgba(w.onSurface,.38),border:"none"}:{backgroundColor:"transparent",color:m3ComponentsWeb.hexToArgba(w.onSurface,.38),border:`1px solid ${m3ComponentsWeb.hexToArgba(w.onSurface,.12)}`}:c==="filled"?{backgroundColor:w.primary,color:w.onPrimary,border:"none"}:{backgroundColor:"transparent",color:w.primary,border:`1px solid ${w.primary}`},T=40,m=l==="rounded-full"?32:l==="rounded-lg"?12:l==="rounded-md"?8:4;return jsxRuntime.jsx(framerMotion.motion.button,{disabled:k||b,onClick:!k&&!b?P:void 0,className:`${r||""}`,style:{backgroundColor:v.backgroundColor,color:v.color,border:v.border,borderRadius:"40px",paddingInline:"24px",paddingBlock:"8px"},initial:{borderRadius:T},animate:{borderRadius:T},whileHover:!k&&!b&&h?{borderRadius:m,backgroundColor:c==="outlined"?m3ComponentsWeb.hexToArgba(w.primary,.08):w.primary}:{},transition:{ease:["easeIn","easeOut"],duration:.2},children:jsxRuntime.jsxs("div",{className:"m3-components-button-content",children:[b&&jsxRuntime.jsx("span",{style:{marginRight:"4px"},children:"... "}),p&&jsxRuntime.jsx("span",{className:"m3-components-button-icon",children:p}),jsxRuntime.jsx("span",{className:"m3-components-button-text",children:d})]})})});var la=({date:s,onPrev:t,onNext:r,onToday:l,view:c,onViewChange:h})=>{let{themeColors:d}=m3ComponentsWeb.useGlobalTheme(),[p,P]=react.useState(false),k=(0, Jr.default)(),b=k.format("MMM").toUpperCase(),w=k.format("DD"),v=(0, Jr.default)(s).format("MMMM YYYY"),T=Math.ceil(k.date()/7),m=c.charAt(0).toUpperCase()+c.slice(1);return jsxRuntime.jsxs("div",{className:"m3-components-bigcalendar-toolbar-wrapper",children:[jsxRuntime.jsxs("div",{className:"m3-components-bigcalendar-toolbar-left-content",children:[jsxRuntime.jsxs("div",{className:"m3-components-bigcalendar-toolbar-date-badge",style:{backgroundColor:d.surfaceContainerLowest,borderColor:d.outlineVariant},children:[jsxRuntime.jsx("div",{className:"m3-components-bigcalendar-toolbar-badge-header",style:{backgroundColor:d.primary},children:jsxRuntime.jsx("span",{className:"m3-components-bigcalendar-toolbar-badge-month-text",style:{color:d.onPrimary},children:b})}),jsxRuntime.jsx("span",{className:"m3-components-bigcalendar-toolbar-badge-day-text",style:{color:d.onSurface},children:w})]}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("h1",{className:"text-xl font-bold",style:{color:d.onSurface},children:v}),jsxRuntime.jsxs("span",{className:"m3-components-bigcalendar-toolbar-week-chip",style:{color:d.onSurfaceVariant,borderColor:d.outlineVariant},children:["Week ",T]})]})]}),jsxRuntime.jsxs("div",{className:"m3-components-bigcalendar-toolbar-right-content",children:[jsxRuntime.jsxs("div",{className:"m3-components-bigcalendar-toolbar-nav-segmented",style:{borderColor:d.outlineVariant},children:[jsxRuntime.jsx("button",{onClick:t,className:"m3-components-bigcalendar-toolbar-nav-btn m3-components-bigcalendar-toolbar-border-separator-right",style:{borderColor:d.outlineVariant,color:d.onSurface},children:jsxRuntime.jsx(jsxRuntime.Fragment,{})}),jsxRuntime.jsx("button",{onClick:l,className:"m3-components-bigcalendar-toolbar-nav-btn m3-components-bigcalendar-toolbar-today-btn",style:{color:d.onSurface},children:"Today"}),jsxRuntime.jsx("button",{onClick:r,className:"m3-components-bigcalendar-toolbar-nav-btn m3-components-bigcalendar-toolbar-border-separator-left",style:{borderColor:d.outlineVariant,color:d.onSurface},children:jsxRuntime.jsx(jsxRuntime.Fragment,{})})]}),jsxRuntime.jsxs("div",{className:"m3-components-bigcalendar-toolbar-dropdown-host",children:[jsxRuntime.jsxs("button",{onClick:()=>P(!p),className:"m3-components-bigcalendar-toolbar-dropdown-toggle",style:{borderColor:d.outlineVariant,color:d.onSurface},children:[m,jsxRuntime.jsx("svg",{className:`m3-components-bigcalendar-toolbar-icon-rotate ${p?"m3-components-bigcalendar-toolbar-icon-rotate-active":""}`})]}),jsxRuntime.jsx(framerMotion.AnimatePresence,{children:p&&jsxRuntime.jsx(framerMotion.motion.div,{className:"m3-components-bigcalendar-toolbar-dropdown-panel",style:{backgroundColor:d.surfaceContainerHigh,borderColor:d.outlineVariant},children:["month","week","day"].map(D=>jsxRuntime.jsx("button",{onClick:()=>h(D),className:"m3-components-bigcalendar-toolbar-dropdown-option",style:{color:c===D?d.primary:d.onSurface},children:D.charAt(0).toUpperCase()+D.slice(1)},D))})})]}),jsxRuntime.jsx(sa,{type:"filled",shape:"rounded-md",text:"+ Create",onClick:()=>{},className:"m3-components-bigcalendar-toolbar-create-btn"})]})]})};var ua=({event:s,onMouseEnter:t,onMouseLeave:r})=>{let l=s.resource,c=l.eventStyleFilled??true,h=l.eventStyle||{backgroundColor:l.eventSeedColor||"#6750A4",contentColor:"#FFFFFF"},d=c?h.backgroundColor:m3ComponentsWeb.hexToArgba(h.backgroundColor,.15),p=c?"transparent":h.backgroundColor,P=c?h.contentColor:h.backgroundColor,k=react.useRef(null),[b,w]=react.useState(1e3);react.useEffect(()=>{if(!k.current)return;let T=new ResizeObserver(m=>{window.requestAnimationFrame(()=>{m[0]&&w(m[0].contentRect.width);});});return T.observe(k.current),()=>T.disconnect()},[]);let v=b<120;return jsxRuntime.jsx("div",{ref:k,className:"m3-components-bigcalendar-event-root",children:v?jsxRuntime.jsx(framerMotion.motion.div,{className:"m3-components-bigcalendar-event-dot",onMouseEnter:T=>t(T,l),onMouseLeave:r,style:{backgroundColor:d,borderColor:p==="transparent"?h.backgroundColor:p}}):jsxRuntime.jsx(framerMotion.motion.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},onMouseEnter:T=>t(T,l),onMouseLeave:r,className:"m3-components-bigcalendar-event-chip",style:{backgroundColor:d,color:P,border:c?"none":`1.5px solid ${p}`},children:jsxRuntime.jsxs("div",{className:"m3-components-bigcalendar-event-content",children:[jsxRuntime.jsx("span",{className:"m3-components-bigcalendar-event-title",children:l.eventTitle}),l.eventTrailingIcon&&jsxRuntime.jsx("div",{className:"m3-components-bigcalendar-event-trailing",style:{color:P},children:l.eventTrailingIcon})]})})})};var w0=react.forwardRef((s,t)=>{let{currentDate:r,filterOptions:l,events:c,toolBar:h,filterBar:d,filterBy:p,backgroundMode:P,defaultView:k="month",enableAnimations:b=true,slideVariants:w={enter:L=>({x:L>0?"10%":"-10%",opacity:0}),center:{zIndex:1,x:0,opacity:1},exit:L=>({zIndex:0,x:L<0?"10%":"-10%",opacity:0})},transition:v={type:"spring",stiffness:300,damping:30,opacity:{duration:.2}},onEventClicked:T}=s,{themeColors:m}=m3ComponentsWeb.useGlobalTheme(),D=r===null?new Date:new Date(r),x=reactBigCalendar.momentLocalizer(yr.default),Y=react.useMemo(()=>c?c.filter(L=>!p||p.length===0||p.includes("All")?true:p.every(fe=>L.eventCategory?.includes(fe))).map(L=>{let{eventTitle:fe,eventStart:Oe,eventEnd:be,...de}=L;return {title:fe,start:new Date(Oe),end:new Date(be),resource:de}}):[],[c,p]),H=react.useMemo(()=>({event:L=>jsxRuntime.jsx(ua,{...L,onMouseEnter:()=>{},onMouseLeave:()=>{}})}),[]),[X,Z]=react.useState(0),[$,V]=react.useState(D),[z,U]=react.useState(k),[ne,ee]=react.useState(l),oe=()=>{Z(-1),V((0, yr.default)($).subtract(1,z).toDate());},Se=()=>{Z(1),V((0, yr.default)($).add(1,z).toDate());},ke=()=>{Z(0),V(new Date);};return react.useImperativeHandle(t,()=>({previousMonth:oe,nextMonth:Se,jumpToNow:ke})),jsxRuntime.jsxs(framerMotion.motion.div,{layout:true,style:{backgroundColor:m.surfaceContainerHigh,borderColor:m.outlineVariant,flex:1,display:"flex",flexDirection:"column",minWidth:"0px",paddingTop:"16px",overflow:"hidden",position:"relative","--m3-primary":m.primary,"--m3-on-primary":m.onPrimary,"--m3-outline-variant":m.outlineVariant,"--m3-on-surface":m.onSurface,"--m3-on-surface-variant":m.onSurfaceVariant,"--m3-today-bg":na(m.primary,.03)},children:[jsxRuntime.jsxs("div",{style:{paddingInline:"16px"},children:[jsxRuntime.jsx(la,{date:$,view:z,onViewChange:U,onPrev:oe,onNext:Se,onToday:ke}),d?d(l):jsxRuntime.jsx("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px",flexShrink:0,overflowX:"auto",paddingBottom:"4px"},children:l.map(L=>jsxRuntime.jsx("button",{onClick:()=>{ee(fe=>fe.includes(L)?fe.filter(Oe=>Oe!==L):[...fe,L]);},className:"m3-components-bigcalendar-filter-chip",style:{backgroundColor:ne.includes(L)?m.onSurface:"transparent",color:ne.includes(L)?m.surface:m.onSurfaceVariant,borderColor:ne.includes(L)?m.onSurface:m.outlineVariant},children:L},L))})]}),jsxRuntime.jsx("div",{style:{backgroundColor:m.outlineVariant,width:"100%",height:"2px"}}),jsxRuntime.jsx("div",{className:"rbc-container-wrapper",style:{flex:1,position:"relative",overflow:"hidden"},children:jsxRuntime.jsx(framerMotion.AnimatePresence,{initial:false,custom:X,mode:"wait",children:jsxRuntime.jsx(framerMotion.motion.div,{custom:X,variants:w,initial:"enter",animate:"center",exit:"exit",transition:v,className:"m3-components-bigcalendar-viewport",children:jsxRuntime.jsx(reactBigCalendar.Calendar,{localizer:x,events:Y,date:$,view:z,onNavigate:L=>V(L),onView:L=>{(L==="month"||L==="week"||L==="day")&&U(L);},onSelectEvent:L=>T?.(L),toolbar:false,components:H,eventPropGetter:()=>({style:{backgroundColor:"transparent",border:"none",padding:"1px 2px"}})})},$.toISOString())})})]})});/*! Bundled license information:
|
|
4
|
+
`+new Error().stack),a=false;}return n.apply(this,arguments)},n)}var ne={};function ee(e,n){t.deprecationHandler!=null&&t.deprecationHandler(e,n),ne[e]||(z(n),ne[e]=true);}t.suppressDeprecationWarnings=false,t.deprecationHandler=null;function oe(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function Se(e){var n,a;for(a in e)h(e,a)&&(n=e[a],oe(n)?this[a]=n:this["_"+a]=n);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source);}function ke(e,n){var a=w({},e),o;for(o in n)h(n,o)&&(c(e[o])&&c(n[o])?(a[o]={},w(a[o],e[o]),w(a[o],n[o])):n[o]!=null?a[o]=n[o]:delete a[o]);for(o in e)h(e,o)&&!h(n,o)&&c(e[o])&&(a[o]=w({},a[o]));return a}function L(e){e!=null&&this.set(e);}var fe;Object.keys?fe=Object.keys:fe=function(e){var n,a=[];for(n in e)h(e,n)&&a.push(n);return a};var Oe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function be(e,n,a){var o=this._calendar[e]||this._calendar.sameElse;return oe(o)?o.call(n,a):o}function de(e,n,a){var o=""+Math.abs(e),i=n-o.length,u=e>=0;return (u?a?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+o}var et=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ke=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,tt={},Fe={};function O(e,n,a,o){var i=o;typeof o=="string"&&(i=function(){return this[o]()}),e&&(Fe[e]=i),n&&(Fe[n[0]]=function(){return de(i.apply(this,arguments),n[1],n[2])}),a&&(Fe[a]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)});}function Bt(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Ht(e){var n=e.match(et),a,o;for(a=0,o=n.length;a<o;a++)Fe[n[a]]?n[a]=Fe[n[a]]:n[a]=Bt(n[a]);return function(i){var u="",y;for(y=0;y<o;y++)u+=oe(n[y])?n[y].call(i,e):n[y];return u}}function lt(e,n){return e.isValid()?(n=Ut(n,e.localeData()),tt[n]=tt[n]||Ht(n),tt[n](e)):e.localeData().invalidDate()}function Ut(e,n){var a=5;function o(i){return n.longDateFormat(i)||i}for(Ke.lastIndex=0;a>=0&&Ke.test(e);)e=e.replace(Ke,o),Ke.lastIndex=0,a-=1;return e}var Wt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function gr(e){var n=this._longDateFormat[e],a=this._longDateFormat[e.toUpperCase()];return n||!a?n:(this._longDateFormat[e]=a.match(et).map(function(o){return o==="MMMM"||o==="MM"||o==="DD"||o==="dddd"?o.slice(1):o}).join(""),this._longDateFormat[e])}var Sr="Invalid date";function ma(){return this._invalidDate}var pa="%d",ya=/\d{1,2}/;function ga(e){return this._ordinal.replace("%d",e)}var Sa={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ka(e,n,a,o){var i=this._relativeTime[a];return oe(i)?i(e,n,a,o):i.replace(/%d/i,e)}function Pa(e,n){var a=this._relativeTime[e>0?"future":"past"];return oe(a)?a(n):a.replace(/%s/i,n)}var Qr={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function we(e){return typeof e=="string"?Qr[e]||Qr[e.toLowerCase()]:void 0}function kr(e){var n={},a,o;for(o in e)h(e,o)&&(a=we(o),a&&(n[a]=e[o]));return n}var Da={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ba(e){var n=[],a;for(a in e)h(e,a)&&n.push({unit:a,priority:Da[a]});return n.sort(function(o,i){return o.priority-i.priority}),n}var en=/\d/,Pe=/\d\d/,tn=/\d{3}/,Pr=/\d{4}/,zt=/[+-]?\d{6}/,te=/\d\d?/,rn=/\d\d\d\d?/,nn=/\d\d\d\d\d\d?/,Gt=/\d{1,3}/,Dr=/\d{1,4}/,jt=/[+-]?\d{1,6}/,ct=/\d+/,$t=/[+-]?\d+/,wa=/Z|[+-]\d\d:?\d\d/gi,qt=/Z|[+-]\d\d(?::?\d\d)?/gi,Ca=/[+-]?\d+(\.\d{1,3})?/,bt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut=/^[1-9]\d?/,br=/^([1-9]\d|\d)/,Kt;Kt={};function A(e,n,a){Kt[e]=oe(n)?n:function(o,i){return o&&a?a:n};}function va(e,n){return h(Kt,e)?Kt[e](n._strict,n._locale):new RegExp(Ta(e))}function Ta(e){return Ne(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,a,o,i,u){return a||o||i||u}))}function Ne(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function W(e){var n=+e,a=0;return n!==0&&isFinite(n)&&(a=Ce(n)),a}var wr={};function Q(e,n){var a,o=n,i;for(typeof e=="string"&&(e=[e]),P(n)&&(o=function(u,y){y[n]=W(u);}),i=e.length,a=0;a<i;a++)wr[e[a]]=o;}function wt(e,n){Q(e,function(a,o,i,u){i._w=i._w||{},n(a,i._w,i,u);});}function xa(e,n,a){n!=null&&h(wr,e)&&wr[e](n,a._a,a,e);}function Xt(e){return e%4===0&&e%100!==0||e%400===0}var me=0,Le=1,Re=2,ue=3,Te=4,Ye=5,rt=6,_a=7,Ma=8;O("Y",0,0,function(){var e=this.year();return e<=9999?de(e,4):"+"+e}),O(0,["YY",2],0,function(){return this.year()%100}),O(0,["YYYY",4],0,"year"),O(0,["YYYYY",5],0,"year"),O(0,["YYYYYY",6,true],0,"year"),A("Y",$t),A("YY",te,Pe),A("YYYY",Dr,Pr),A("YYYYY",jt,zt),A("YYYYYY",jt,zt),Q(["YYYYY","YYYYYY"],me),Q("YYYY",function(e,n){n[me]=e.length===2?t.parseTwoDigitYear(e):W(e);}),Q("YY",function(e,n){n[me]=t.parseTwoDigitYear(e);}),Q("Y",function(e,n){n[me]=parseInt(e,10);});function Ct(e){return Xt(e)?366:365}t.parseTwoDigitYear=function(e){return W(e)+(W(e)>68?1900:2e3)};var an=ht("FullYear",true);function Aa(){return Xt(this.year())}function ht(e,n){return function(a){return a!=null?(on(this,e,a),t.updateOffset(this,n),this):vt(this,e)}}function vt(e,n){if(!e.isValid())return NaN;var a=e._d,o=e._isUTC;switch(n){case "Milliseconds":return o?a.getUTCMilliseconds():a.getMilliseconds();case "Seconds":return o?a.getUTCSeconds():a.getSeconds();case "Minutes":return o?a.getUTCMinutes():a.getMinutes();case "Hours":return o?a.getUTCHours():a.getHours();case "Date":return o?a.getUTCDate():a.getDate();case "Day":return o?a.getUTCDay():a.getDay();case "Month":return o?a.getUTCMonth():a.getMonth();case "FullYear":return o?a.getUTCFullYear():a.getFullYear();default:return NaN}}function on(e,n,a){var o,i,u,y,M;if(!(!e.isValid()||isNaN(a))){switch(o=e._d,i=e._isUTC,n){case "Milliseconds":return void(i?o.setUTCMilliseconds(a):o.setMilliseconds(a));case "Seconds":return void(i?o.setUTCSeconds(a):o.setSeconds(a));case "Minutes":return void(i?o.setUTCMinutes(a):o.setMinutes(a));case "Hours":return void(i?o.setUTCHours(a):o.setHours(a));case "Date":return void(i?o.setUTCDate(a):o.setDate(a));case "FullYear":break;default:return}u=a,y=e.month(),M=e.date(),M=M===29&&y===1&&!Xt(u)?28:M,i?o.setUTCFullYear(u,y,M):o.setFullYear(u,y,M);}}function Oa(e){return e=we(e),oe(this[e])?this[e]():this}function Fa(e,n){if(typeof e=="object"){e=kr(e);var a=ba(e),o,i=a.length;for(o=0;o<i;o++)this[a[o].unit](e[a[o].unit]);}else if(e=we(e),oe(this[e]))return this[e](n);return this}function Ra(e,n){return (e%n+n)%n}var ie;Array.prototype.indexOf?ie=Array.prototype.indexOf:ie=function(e){var n;for(n=0;n<this.length;++n)if(this[n]===e)return n;return -1};function Cr(e,n){if(isNaN(e)||isNaN(n))return NaN;var a=Ra(n,12);return e+=(n-a)/12,a===1?Xt(e)?29:28:31-a%7%2}O("M",["MM",2],"Mo",function(){return this.month()+1}),O("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),O("MMMM",0,0,function(e){return this.localeData().months(this,e)}),A("M",te,ut),A("MM",te,Pe),A("MMM",function(e,n){return n.monthsShortRegex(e)}),A("MMMM",function(e,n){return n.monthsRegex(e)}),Q(["M","MM"],function(e,n){n[Le]=W(e)-1;}),Q(["MMM","MMMM"],function(e,n,a,o){var i=a._locale.monthsParse(e,o,a._strict);i!=null?n[Le]=i:m(a).invalidMonth=e;});var Ia="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),sn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ln=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ea=bt,Na=bt;function La(e,n){return e?l(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ln).test(n)?"format":"standalone"][e.month()]:l(this._months)?this._months:this._months.standalone}function Ya(e,n){return e?l(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ln.test(n)?"format":"standalone"][e.month()]:l(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Va(e,n,a){var o,i,u,y=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)u=v([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(u,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(u,"").toLocaleLowerCase();return a?n==="MMM"?(i=ie.call(this._shortMonthsParse,y),i!==-1?i:null):(i=ie.call(this._longMonthsParse,y),i!==-1?i:null):n==="MMM"?(i=ie.call(this._shortMonthsParse,y),i!==-1?i:(i=ie.call(this._longMonthsParse,y),i!==-1?i:null)):(i=ie.call(this._longMonthsParse,y),i!==-1?i:(i=ie.call(this._shortMonthsParse,y),i!==-1?i:null))}function Ba(e,n,a){var o,i,u;if(this._monthsParseExact)return Va.call(this,e,n,a);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;o<12;o++){if(i=v([2e3,o]),a&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!a&&!this._monthsParse[o]&&(u="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[o]=new RegExp(u.replace(".",""),"i")),a&&n==="MMMM"&&this._longMonthsParse[o].test(e))return o;if(a&&n==="MMM"&&this._shortMonthsParse[o].test(e))return o;if(!a&&this._monthsParse[o].test(e))return o}}function cn(e,n){if(!e.isValid())return e;if(typeof n=="string"){if(/^\d+$/.test(n))n=W(n);else if(n=e.localeData().monthsParse(n),!P(n))return e}var a=n,o=e.date();return o=o<29?o:Math.min(o,Cr(e.year(),a)),e._isUTC?e._d.setUTCMonth(a,o):e._d.setMonth(a,o),e}function un(e){return e!=null?(cn(this,e),t.updateOffset(this,true),this):vt(this,"Month")}function Ha(){return Cr(this.year(),this.month())}function Ua(e){return this._monthsParseExact?(h(this,"_monthsRegex")||hn.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Ea),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Wa(e){return this._monthsParseExact?(h(this,"_monthsRegex")||hn.call(this),e?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Na),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function hn(){function e(N,G){return G.length-N.length}var n=[],a=[],o=[],i,u,y,M;for(i=0;i<12;i++)u=v([2e3,i]),y=Ne(this.monthsShort(u,"")),M=Ne(this.months(u,"")),n.push(y),a.push(M),o.push(M),o.push(y);n.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i");}function za(e,n,a,o,i,u,y){var M;return e<100&&e>=0?(M=new Date(e+400,n,a,o,i,u,y),isFinite(M.getFullYear())&&M.setFullYear(e)):M=new Date(e,n,a,o,i,u,y),M}function Tt(e){var n,a;return e<100&&e>=0?(a=Array.prototype.slice.call(arguments),a[0]=e+400,n=new Date(Date.UTC.apply(null,a)),isFinite(n.getUTCFullYear())&&n.setUTCFullYear(e)):n=new Date(Date.UTC.apply(null,arguments)),n}function Zt(e,n,a){var o=7+n-a,i=(7+Tt(e,0,o).getUTCDay()-n)%7;return -i+o-1}function dn(e,n,a,o,i){var u=(7+a-o)%7,y=Zt(e,o,i),M=1+7*(n-1)+u+y,N,G;return M<=0?(N=e-1,G=Ct(N)+M):M>Ct(e)?(N=e+1,G=M-Ct(e)):(N=e,G=M),{year:N,dayOfYear:G}}function xt(e,n,a){var o=Zt(e.year(),n,a),i=Math.floor((e.dayOfYear()-o-1)/7)+1,u,y;return i<1?(y=e.year()-1,u=i+Ve(y,n,a)):i>Ve(e.year(),n,a)?(u=i-Ve(e.year(),n,a),y=e.year()+1):(y=e.year(),u=i),{week:u,year:y}}function Ve(e,n,a){var o=Zt(e,n,a),i=Zt(e+1,n,a);return (Ct(e)-o+i)/7}O("w",["ww",2],"wo","week"),O("W",["WW",2],"Wo","isoWeek"),A("w",te,ut),A("ww",te,Pe),A("W",te,ut),A("WW",te,Pe),wt(["w","ww","W","WW"],function(e,n,a,o){n[o.substr(0,1)]=W(e);});function Ga(e){return xt(e,this._week.dow,this._week.doy).week}var ja={dow:0,doy:6};function $a(){return this._week.dow}function qa(){return this._week.doy}function Ka(e){var n=this.localeData().week(this);return e==null?n:this.add((e-n)*7,"d")}function Xa(e){var n=xt(this,1,4).week;return e==null?n:this.add((e-n)*7,"d")}O("d",0,"do","day"),O("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),O("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),O("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),O("e",0,0,"weekday"),O("E",0,0,"isoWeekday"),A("d",te),A("e",te),A("E",te),A("dd",function(e,n){return n.weekdaysMinRegex(e)}),A("ddd",function(e,n){return n.weekdaysShortRegex(e)}),A("dddd",function(e,n){return n.weekdaysRegex(e)}),wt(["dd","ddd","dddd"],function(e,n,a,o){var i=a._locale.weekdaysParse(e,o,a._strict);i!=null?n.d=i:m(a).invalidWeekday=e;}),wt(["d","e","E"],function(e,n,a,o){n[o]=W(e);});function Za(e,n){return typeof e!="string"?e:isNaN(e)?(e=n.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Ja(e,n){return typeof e=="string"?n.weekdaysParse(e)%7||7:isNaN(e)?null:e}function vr(e,n){return e.slice(n,7).concat(e.slice(0,n))}var Qa="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),fn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),eo="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),to=bt,ro=bt,no=bt;function ao(e,n){var a=l(this._weekdays)?this._weekdays:this._weekdays[e&&e!==true&&this._weekdays.isFormat.test(n)?"format":"standalone"];return e===true?vr(a,this._week.dow):e?a[e.day()]:a}function oo(e){return e===true?vr(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function so(e){return e===true?vr(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function io(e,n,a){var o,i,u,y=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)u=v([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(u,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(u,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(u,"").toLocaleLowerCase();return a?n==="dddd"?(i=ie.call(this._weekdaysParse,y),i!==-1?i:null):n==="ddd"?(i=ie.call(this._shortWeekdaysParse,y),i!==-1?i:null):(i=ie.call(this._minWeekdaysParse,y),i!==-1?i:null):n==="dddd"?(i=ie.call(this._weekdaysParse,y),i!==-1||(i=ie.call(this._shortWeekdaysParse,y),i!==-1)?i:(i=ie.call(this._minWeekdaysParse,y),i!==-1?i:null)):n==="ddd"?(i=ie.call(this._shortWeekdaysParse,y),i!==-1||(i=ie.call(this._weekdaysParse,y),i!==-1)?i:(i=ie.call(this._minWeekdaysParse,y),i!==-1?i:null)):(i=ie.call(this._minWeekdaysParse,y),i!==-1||(i=ie.call(this._weekdaysParse,y),i!==-1)?i:(i=ie.call(this._shortWeekdaysParse,y),i!==-1?i:null))}function lo(e,n,a){var o,i,u;if(this._weekdaysParseExact)return io.call(this,e,n,a);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(i=v([2e3,1]).day(o),a&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[o]||(u="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[o]=new RegExp(u.replace(".",""),"i")),a&&n==="dddd"&&this._fullWeekdaysParse[o].test(e))return o;if(a&&n==="ddd"&&this._shortWeekdaysParse[o].test(e))return o;if(a&&n==="dd"&&this._minWeekdaysParse[o].test(e))return o;if(!a&&this._weekdaysParse[o].test(e))return o}}function co(e){if(!this.isValid())return e!=null?this:NaN;var n=vt(this,"Day");return e!=null?(e=Za(e,this.localeData()),this.add(e-n,"d")):n}function uo(e){if(!this.isValid())return e!=null?this:NaN;var n=(this.day()+7-this.localeData()._week.dow)%7;return e==null?n:this.add(e-n,"d")}function ho(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var n=Ja(e,this.localeData());return this.day(this.day()%7?n:n-7)}else return this.day()||7}function fo(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Tr.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=to),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function mo(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Tr.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ro),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function po(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Tr.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=no),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Tr(){function e(ye,ze){return ze.length-ye.length}var n=[],a=[],o=[],i=[],u,y,M,N,G;for(u=0;u<7;u++)y=v([2e3,1]).day(u),M=Ne(this.weekdaysMin(y,"")),N=Ne(this.weekdaysShort(y,"")),G=Ne(this.weekdays(y,"")),n.push(M),a.push(N),o.push(G),i.push(M),i.push(N),i.push(G);n.sort(e),a.sort(e),o.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+n.join("|")+")","i");}function xr(){return this.hours()%12||12}function yo(){return this.hours()||24}O("H",["HH",2],0,"hour"),O("h",["hh",2],0,xr),O("k",["kk",2],0,yo),O("hmm",0,0,function(){return ""+xr.apply(this)+de(this.minutes(),2)}),O("hmmss",0,0,function(){return ""+xr.apply(this)+de(this.minutes(),2)+de(this.seconds(),2)}),O("Hmm",0,0,function(){return ""+this.hours()+de(this.minutes(),2)}),O("Hmmss",0,0,function(){return ""+this.hours()+de(this.minutes(),2)+de(this.seconds(),2)});function mn(e,n){O(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),n)});}mn("a",true),mn("A",false);function pn(e,n){return n._meridiemParse}A("a",pn),A("A",pn),A("H",te,br),A("h",te,ut),A("k",te,ut),A("HH",te,Pe),A("hh",te,Pe),A("kk",te,Pe),A("hmm",rn),A("hmmss",nn),A("Hmm",rn),A("Hmmss",nn),Q(["H","HH"],ue),Q(["k","kk"],function(e,n,a){var o=W(e);n[ue]=o===24?0:o;}),Q(["a","A"],function(e,n,a){a._isPm=a._locale.isPM(e),a._meridiem=e;}),Q(["h","hh"],function(e,n,a){n[ue]=W(e),m(a).bigHour=true;}),Q("hmm",function(e,n,a){var o=e.length-2;n[ue]=W(e.substr(0,o)),n[Te]=W(e.substr(o)),m(a).bigHour=true;}),Q("hmmss",function(e,n,a){var o=e.length-4,i=e.length-2;n[ue]=W(e.substr(0,o)),n[Te]=W(e.substr(o,2)),n[Ye]=W(e.substr(i)),m(a).bigHour=true;}),Q("Hmm",function(e,n,a){var o=e.length-2;n[ue]=W(e.substr(0,o)),n[Te]=W(e.substr(o));}),Q("Hmmss",function(e,n,a){var o=e.length-4,i=e.length-2;n[ue]=W(e.substr(0,o)),n[Te]=W(e.substr(o,2)),n[Ye]=W(e.substr(i));});function go(e){return (e+"").toLowerCase().charAt(0)==="p"}var So=/[ap]\.?m?\.?/i,ko=ht("Hours",true);function Po(e,n,a){return e>11?a?"pm":"PM":a?"am":"AM"}var yn={calendar:Oe,longDateFormat:Wt,invalidDate:Sr,ordinal:pa,dayOfMonthOrdinalParse:ya,relativeTime:Sa,months:Ia,monthsShort:sn,week:ja,weekdays:Qa,weekdaysMin:eo,weekdaysShort:fn,meridiemParse:So},ae={},_t={},Mt;function Do(e,n){var a,o=Math.min(e.length,n.length);for(a=0;a<o;a+=1)if(e[a]!==n[a])return a;return o}function gn(e){return e&&e.toLowerCase().replace("_","-")}function bo(e){for(var n=0,a,o,i,u;n<e.length;){for(u=gn(e[n]).split("-"),a=u.length,o=gn(e[n+1]),o=o?o.split("-"):null;a>0;){if(i=Jt(u.slice(0,a).join("-")),i)return i;if(o&&o.length>=a&&Do(u,o)>=a-1)break;a--;}n++;}return Mt}function wo(e){return !!(e&&e.match("^[^/\\\\]*$"))}function Jt(e){var n=null,a;if(ae[e]===void 0&&typeof Dt<"u"&&Dt&&Dt.exports&&wo(e))try{n=Mt._abbr,a=Gn,a("./locale/"+e),Xe(n);}catch{ae[e]=null;}return ae[e]}function Xe(e,n){var a;return e&&(p(n)?a=Be(e):a=_r(e,n),a?Mt=a:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Mt._abbr}function _r(e,n){if(n!==null){var a,o=yn;if(n.abbr=e,ae[e]!=null)ee("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=ae[e]._config;else if(n.parentLocale!=null)if(ae[n.parentLocale]!=null)o=ae[n.parentLocale]._config;else if(a=Jt(n.parentLocale),a!=null)o=a._config;else return _t[n.parentLocale]||(_t[n.parentLocale]=[]),_t[n.parentLocale].push({name:e,config:n}),null;return ae[e]=new L(ke(o,n)),_t[e]&&_t[e].forEach(function(i){_r(i.name,i.config);}),Xe(e),ae[e]}else return delete ae[e],null}function Co(e,n){if(n!=null){var a,o,i=yn;ae[e]!=null&&ae[e].parentLocale!=null?ae[e].set(ke(ae[e]._config,n)):(o=Jt(e),o!=null&&(i=o._config),n=ke(i,n),o==null&&(n.abbr=e),a=new L(n),a.parentLocale=ae[e],ae[e]=a),Xe(e);}else ae[e]!=null&&(ae[e].parentLocale!=null?(ae[e]=ae[e].parentLocale,e===Xe()&&Xe(e)):ae[e]!=null&&delete ae[e]);return ae[e]}function Be(e){var n;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Mt;if(!l(e)){if(n=Jt(e),n)return n;e=[e];}return bo(e)}function vo(){return fe(ae)}function Mr(e){var n,a=e._a;return a&&m(e).overflow===-2&&(n=a[Le]<0||a[Le]>11?Le:a[Re]<1||a[Re]>Cr(a[me],a[Le])?Re:a[ue]<0||a[ue]>24||a[ue]===24&&(a[Te]!==0||a[Ye]!==0||a[rt]!==0)?ue:a[Te]<0||a[Te]>59?Te:a[Ye]<0||a[Ye]>59?Ye:a[rt]<0||a[rt]>999?rt:-1,m(e)._overflowDayOfYear&&(n<me||n>Re)&&(n=Re),m(e)._overflowWeeks&&n===-1&&(n=_a),m(e)._overflowWeekday&&n===-1&&(n=Ma),m(e).overflow=n),e}var To=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xo=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_o=/Z|[+-]\d\d(?::?\d\d)?/,Qt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,false],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,false],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,false],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,false],["YYYY",/\d{4}/,false]],Ar=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mo=/^\/?Date\((-?\d+)/i,Ao=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Oo={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Sn(e){var n,a,o=e._i,i=To.exec(o)||xo.exec(o),u,y,M,N,G=Qt.length,ye=Ar.length;if(i){for(m(e).iso=true,n=0,a=G;n<a;n++)if(Qt[n][1].exec(i[1])){y=Qt[n][0],u=Qt[n][2]!==false;break}if(y==null){e._isValid=false;return}if(i[3]){for(n=0,a=ye;n<a;n++)if(Ar[n][1].exec(i[3])){M=(i[2]||" ")+Ar[n][0];break}if(M==null){e._isValid=false;return}}if(!u&&M!=null){e._isValid=false;return}if(i[4])if(_o.exec(i[4]))N="Z";else {e._isValid=false;return}e._f=y+(M||"")+(N||""),Fr(e);}else e._isValid=false;}function Fo(e,n,a,o,i,u){var y=[Ro(e),sn.indexOf(n),parseInt(a,10),parseInt(o,10),parseInt(i,10)];return u&&y.push(parseInt(u,10)),y}function Ro(e){var n=parseInt(e,10);return n<=49?2e3+n:n<=999?1900+n:n}function Io(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Eo(e,n,a){if(e){var o=fn.indexOf(e),i=new Date(n[0],n[1],n[2]).getDay();if(o!==i)return m(a).weekdayMismatch=true,a._isValid=false,false}return true}function No(e,n,a){if(e)return Oo[e];if(n)return 0;var o=parseInt(a,10),i=o%100,u=(o-i)/100;return u*60+i}function kn(e){var n=Ao.exec(Io(e._i)),a;if(n){if(a=Fo(n[4],n[3],n[2],n[5],n[6],n[7]),!Eo(n[1],a,e))return;e._a=a,e._tzm=No(n[8],n[9],n[10]),e._d=Tt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=true;}else e._isValid=false;}function Lo(e){var n=Mo.exec(e._i);if(n!==null){e._d=new Date(+n[1]);return}if(Sn(e),e._isValid===false)delete e._isValid;else return;if(kn(e),e._isValid===false)delete e._isValid;else return;e._strict?e._isValid=false:t.createFromInputFallback(e);}t.createFromInputFallback=U("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""));});function dt(e,n,a){return e??n??a}function Yo(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function Or(e){var n,a,o=[],i,u,y;if(!e._d){for(i=Yo(e),e._w&&e._a[Re]==null&&e._a[Le]==null&&Vo(e),e._dayOfYear!=null&&(y=dt(e._a[me],i[me]),(e._dayOfYear>Ct(y)||e._dayOfYear===0)&&(m(e)._overflowDayOfYear=true),a=Tt(y,0,e._dayOfYear),e._a[Le]=a.getUTCMonth(),e._a[Re]=a.getUTCDate()),n=0;n<3&&e._a[n]==null;++n)e._a[n]=o[n]=i[n];for(;n<7;n++)e._a[n]=o[n]=e._a[n]==null?n===2?1:0:e._a[n];e._a[ue]===24&&e._a[Te]===0&&e._a[Ye]===0&&e._a[rt]===0&&(e._nextDay=true,e._a[ue]=0),e._d=(e._useUTC?Tt:za).apply(null,o),u=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ue]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==u&&(m(e).weekdayMismatch=true);}}function Vo(e){var n,a,o,i,u,y,M,N,G;n=e._w,n.GG!=null||n.W!=null||n.E!=null?(u=1,y=4,a=dt(n.GG,e._a[me],xt(re(),1,4).year),o=dt(n.W,1),i=dt(n.E,1),(i<1||i>7)&&(N=true)):(u=e._locale._week.dow,y=e._locale._week.doy,G=xt(re(),u,y),a=dt(n.gg,e._a[me],G.year),o=dt(n.w,G.week),n.d!=null?(i=n.d,(i<0||i>6)&&(N=true)):n.e!=null?(i=n.e+u,(n.e<0||n.e>6)&&(N=true)):i=u),o<1||o>Ve(a,u,y)?m(e)._overflowWeeks=true:N!=null?m(e)._overflowWeekday=true:(M=dn(a,o,i,u,y),e._a[me]=M.year,e._dayOfYear=M.dayOfYear);}t.ISO_8601=function(){},t.RFC_2822=function(){};function Fr(e){if(e._f===t.ISO_8601){Sn(e);return}if(e._f===t.RFC_2822){kn(e);return}e._a=[],m(e).empty=true;var n=""+e._i,a,o,i,u,y,M=n.length,N=0,G,ye;for(i=Ut(e._f,e._locale).match(et)||[],ye=i.length,a=0;a<ye;a++)u=i[a],o=(n.match(va(u,e))||[])[0],o&&(y=n.substr(0,n.indexOf(o)),y.length>0&&m(e).unusedInput.push(y),n=n.slice(n.indexOf(o)+o.length),N+=o.length),Fe[u]?(o?m(e).empty=false:m(e).unusedTokens.push(u),xa(u,o,e)):e._strict&&!o&&m(e).unusedTokens.push(u);m(e).charsLeftOver=M-N,n.length>0&&m(e).unusedInput.push(n),e._a[ue]<=12&&m(e).bigHour===true&&e._a[ue]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[ue]=Bo(e._locale,e._a[ue],e._meridiem),G=m(e).era,G!==null&&(e._a[me]=e._locale.erasConvertYear(G,e._a[me])),Or(e),Mr(e);}function Bo(e,n,a){var o;return a==null?n:e.meridiemHour!=null?e.meridiemHour(n,a):(e.isPM!=null&&(o=e.isPM(a),o&&n<12&&(n+=12),!o&&n===12&&(n=0)),n)}function Ho(e){var n,a,o,i,u,y,M=false,N=e._f.length;if(N===0){m(e).invalidFormat=true,e._d=new Date(NaN);return}for(i=0;i<N;i++)u=0,y=false,n=Z({},e),e._useUTC!=null&&(n._useUTC=e._useUTC),n._f=e._f[i],Fr(n),x(n)&&(y=true),u+=m(n).charsLeftOver,u+=m(n).unusedTokens.length*10,m(n).score=u,M?u<o&&(o=u,a=n):(o==null||u<o||y)&&(o=u,a=n,y&&(M=true));w(e,a||n);}function Uo(e){if(!e._d){var n=kr(e._i),a=n.day===void 0?n.date:n.day;e._a=b([n.year,n.month,a,n.hour,n.minute,n.second,n.millisecond],function(o){return o&&parseInt(o,10)}),Or(e);}}function Wo(e){var n=new $(Mr(Pn(e)));return n._nextDay&&(n.add(1,"d"),n._nextDay=void 0),n}function Pn(e){var n=e._i,a=e._f;return e._locale=e._locale||Be(e._l),n===null||a===void 0&&n===""?Y({nullInput:true}):(typeof n=="string"&&(e._i=n=e._locale.preparse(n)),V(n)?new $(Mr(n)):(k(n)?e._d=n:l(a)?Ho(e):a?Fr(e):zo(e),x(e)||(e._d=null),e))}function zo(e){var n=e._i;p(n)?e._d=new Date(t.now()):k(n)?e._d=new Date(n.valueOf()):typeof n=="string"?Lo(e):l(n)?(e._a=b(n.slice(0),function(a){return parseInt(a,10)}),Or(e)):c(n)?Uo(e):P(n)?e._d=new Date(n):t.createFromInputFallback(e);}function Dn(e,n,a,o,i){var u={};return (n===true||n===false)&&(o=n,n=void 0),(a===true||a===false)&&(o=a,a=void 0),(c(e)&&d(e)||l(e)&&e.length===0)&&(e=void 0),u._isAMomentObject=true,u._useUTC=u._isUTC=i,u._l=a,u._i=e,u._f=n,u._strict=o,Wo(u)}function re(e,n,a,o){return Dn(e,n,a,o,false)}var Go=U("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=re.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Y()}),jo=U("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=re.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Y()});function bn(e,n){var a,o;if(n.length===1&&l(n[0])&&(n=n[0]),!n.length)return re();for(a=n[0],o=1;o<n.length;++o)(!n[o].isValid()||n[o][e](a))&&(a=n[o]);return a}function $o(){var e=[].slice.call(arguments,0);return bn("isBefore",e)}function qo(){var e=[].slice.call(arguments,0);return bn("isAfter",e)}var Ko=function(){return Date.now?Date.now():+new Date},At=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Xo(e){var n,a=false,o,i=At.length;for(n in e)if(h(e,n)&&!(ie.call(At,n)!==-1&&(e[n]==null||!isNaN(e[n]))))return false;for(o=0;o<i;++o)if(e[At[o]]){if(a)return false;parseFloat(e[At[o]])!==W(e[At[o]])&&(a=true);}return true}function Zo(){return this._isValid}function Jo(){return xe(NaN)}function er(e){var n=kr(e),a=n.year||0,o=n.quarter||0,i=n.month||0,u=n.week||n.isoWeek||0,y=n.day||0,M=n.hour||0,N=n.minute||0,G=n.second||0,ye=n.millisecond||0;this._isValid=Xo(n),this._milliseconds=+ye+G*1e3+N*6e4+M*1e3*60*60,this._days=+y+u*7,this._months=+i+o*3+a*12,this._data={},this._locale=Be(),this._bubble();}function tr(e){return e instanceof er}function Rr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Qo(e,n,a){var o=Math.min(e.length,n.length),i=Math.abs(e.length-n.length),u=0,y;for(y=0;y<o;y++)(W(e[y])!==W(n[y]))&&u++;return u+i}function wn(e,n){O(e,0,0,function(){var a=this.utcOffset(),o="+";return a<0&&(a=-a,o="-"),o+de(~~(a/60),2)+n+de(~~a%60,2)});}wn("Z",":"),wn("ZZ",""),A("Z",qt),A("ZZ",qt),Q(["Z","ZZ"],function(e,n,a){a._useUTC=true,a._tzm=Ir(qt,e);});var es=/([\+\-]|\d\d)/gi;function Ir(e,n){var a=(n||"").match(e),o,i,u;return a===null?null:(o=a[a.length-1]||[],i=(o+"").match(es)||["-",0,0],u=+(i[1]*60)+W(i[2]),u===0?0:i[0]==="+"?u:-u)}function Er(e,n){var a,o;return n._isUTC?(a=n.clone(),o=(V(e)||k(e)?e.valueOf():re(e).valueOf())-a.valueOf(),a._d.setTime(a._d.valueOf()+o),t.updateOffset(a,false),a):re(e).local()}function Nr(e){return -Math.round(e._d.getTimezoneOffset())}t.updateOffset=function(){};function ts(e,n,a){var o=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Ir(qt,e),e===null)return this}else Math.abs(e)<16&&!a&&(e=e*60);return !this._isUTC&&n&&(i=Nr(this)),this._offset=e,this._isUTC=true,i!=null&&this.add(i,"m"),o!==e&&(!n||this._changeInProgress?xn(this,xe(e-o,"m"),1,false):this._changeInProgress||(this._changeInProgress=true,t.updateOffset(this,true),this._changeInProgress=null)),this}else return this._isUTC?o:Nr(this)}function rs(e,n){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,n),this):-this.utcOffset()}function ns(e){return this.utcOffset(0,e)}function as(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=false,e&&this.subtract(Nr(this),"m")),this}function os(){if(this._tzm!=null)this.utcOffset(this._tzm,false,true);else if(typeof this._i=="string"){var e=Ir(wa,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,true);}return this}function ss(e){return this.isValid()?(e=e?re(e).utcOffset():0,(this.utcOffset()-e)%60===0):false}function is(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ls(){if(!p(this._isDSTShifted))return this._isDSTShifted;var e={},n;return Z(e,this),e=Pn(e),e._a?(n=e._isUTC?v(e._a):re(e._a),this._isDSTShifted=this.isValid()&&Qo(e._a,n.toArray())>0):this._isDSTShifted=false,this._isDSTShifted}function cs(){return this.isValid()?!this._isUTC:false}function us(){return this.isValid()?this._isUTC:false}function Cn(){return this.isValid()?this._isUTC&&this._offset===0:false}var hs=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ds=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function xe(e,n){var a=e,o=null,i,u,y;return tr(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:P(e)||!isNaN(+e)?(a={},n?a[n]=+e:a.milliseconds=+e):(o=hs.exec(e))?(i=o[1]==="-"?-1:1,a={y:0,d:W(o[Re])*i,h:W(o[ue])*i,m:W(o[Te])*i,s:W(o[Ye])*i,ms:W(Rr(o[rt]*1e3))*i}):(o=ds.exec(e))?(i=o[1]==="-"?-1:1,a={y:nt(o[2],i),M:nt(o[3],i),w:nt(o[4],i),d:nt(o[5],i),h:nt(o[6],i),m:nt(o[7],i),s:nt(o[8],i)}):a==null?a={}:typeof a=="object"&&("from"in a||"to"in a)&&(y=fs(re(a.from),re(a.to)),a={},a.ms=y.milliseconds,a.M=y.months),u=new er(a),tr(e)&&h(e,"_locale")&&(u._locale=e._locale),tr(e)&&h(e,"_isValid")&&(u._isValid=e._isValid),u}xe.fn=er.prototype,xe.invalid=Jo;function nt(e,n){var a=e&&parseFloat(e.replace(",","."));return (isNaN(a)?0:a)*n}function vn(e,n){var a={};return a.months=n.month()-e.month()+(n.year()-e.year())*12,e.clone().add(a.months,"M").isAfter(n)&&--a.months,a.milliseconds=+n-+e.clone().add(a.months,"M"),a}function fs(e,n){var a;return e.isValid()&&n.isValid()?(n=Er(n,e),e.isBefore(n)?a=vn(e,n):(a=vn(n,e),a.milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0}}function Tn(e,n){return function(a,o){var i,u;return o!==null&&!isNaN(+o)&&(ee(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),u=a,a=o,o=u),i=xe(a,o),xn(this,i,e),this}}function xn(e,n,a,o){var i=n._milliseconds,u=Rr(n._days),y=Rr(n._months);e.isValid()&&(o=o??true,y&&cn(e,vt(e,"Month")+y*a),u&&on(e,"Date",vt(e,"Date")+u*a),i&&e._d.setTime(e._d.valueOf()+i*a),o&&t.updateOffset(e,u||y));}var ms=Tn(1,"add"),ps=Tn(-1,"subtract");function _n(e){return typeof e=="string"||e instanceof String}function ys(e){return V(e)||k(e)||_n(e)||P(e)||Ss(e)||gs(e)||e===null||e===void 0}function gs(e){var n=c(e)&&!d(e),a=false,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,u,y=o.length;for(i=0;i<y;i+=1)u=o[i],a=a||h(e,u);return n&&a}function Ss(e){var n=l(e),a=false;return n&&(a=e.filter(function(o){return !P(o)&&_n(e)}).length===0),n&&a}function ks(e){var n=c(e)&&!d(e),a=false,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,u;for(i=0;i<o.length;i+=1)u=o[i],a=a||h(e,u);return n&&a}function Ps(e,n){var a=e.diff(n,"days",true);return a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse"}function Ds(e,n){arguments.length===1&&(arguments[0]?ys(arguments[0])?(e=arguments[0],n=void 0):ks(arguments[0])&&(n=arguments[0],e=void 0):(e=void 0,n=void 0));var a=e||re(),o=Er(a,this).startOf("day"),i=t.calendarFormat(this,o)||"sameElse",u=n&&(oe(n[i])?n[i].call(this,a):n[i]);return this.format(u||this.localeData().calendar(i,this,re(a)))}function bs(){return new $(this)}function ws(e,n){var a=V(e)?e:re(e);return this.isValid()&&a.isValid()?(n=we(n)||"millisecond",n==="millisecond"?this.valueOf()>a.valueOf():a.valueOf()<this.clone().startOf(n).valueOf()):false}function Cs(e,n){var a=V(e)?e:re(e);return this.isValid()&&a.isValid()?(n=we(n)||"millisecond",n==="millisecond"?this.valueOf()<a.valueOf():this.clone().endOf(n).valueOf()<a.valueOf()):false}function vs(e,n,a,o){var i=V(e)?e:re(e),u=V(n)?n:re(n);return this.isValid()&&i.isValid()&&u.isValid()?(o=o||"()",(o[0]==="("?this.isAfter(i,a):!this.isBefore(i,a))&&(o[1]===")"?this.isBefore(u,a):!this.isAfter(u,a))):false}function Ts(e,n){var a=V(e)?e:re(e),o;return this.isValid()&&a.isValid()?(n=we(n)||"millisecond",n==="millisecond"?this.valueOf()===a.valueOf():(o=a.valueOf(),this.clone().startOf(n).valueOf()<=o&&o<=this.clone().endOf(n).valueOf())):false}function xs(e,n){return this.isSame(e,n)||this.isAfter(e,n)}function _s(e,n){return this.isSame(e,n)||this.isBefore(e,n)}function Ms(e,n,a){var o,i,u;if(!this.isValid())return NaN;if(o=Er(e,this),!o.isValid())return NaN;switch(i=(o.utcOffset()-this.utcOffset())*6e4,n=we(n),n){case "year":u=rr(this,o)/12;break;case "month":u=rr(this,o);break;case "quarter":u=rr(this,o)/3;break;case "second":u=(this-o)/1e3;break;case "minute":u=(this-o)/6e4;break;case "hour":u=(this-o)/36e5;break;case "day":u=(this-o-i)/864e5;break;case "week":u=(this-o-i)/6048e5;break;default:u=this-o;}return a?u:Ce(u)}function rr(e,n){if(e.date()<n.date())return -rr(n,e);var a=(n.year()-e.year())*12+(n.month()-e.month()),o=e.clone().add(a,"months"),i,u;return n-o<0?(i=e.clone().add(a-1,"months"),u=(n-o)/(o-i)):(i=e.clone().add(a+1,"months"),u=(n-o)/(i-o)),-(a+u)||0}t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function As(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Os(e){if(!this.isValid())return null;var n=e!==true,a=n?this.clone().utc():this;return a.year()<0||a.year()>9999?lt(a,n?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):oe(Date.prototype.toISOString)?n?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",lt(a,"Z")):lt(a,n?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Fs(){if(!this.isValid())return "moment.invalid(/* "+this._i+" */)";var e="moment",n="",a,o,i,u;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",n="Z"),a="["+e+'("]',o=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",u=n+'[")]',this.format(a+o+i+u)}function Rs(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=lt(this,e);return this.localeData().postformat(n)}function Is(e,n){return this.isValid()&&(V(e)&&e.isValid()||re(e).isValid())?xe({to:this,from:e}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function Es(e){return this.from(re(),e)}function Ns(e,n){return this.isValid()&&(V(e)&&e.isValid()||re(e).isValid())?xe({from:this,to:e}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function Ls(e){return this.to(re(),e)}function Mn(e){var n;return e===void 0?this._locale._abbr:(n=Be(e),n!=null&&(this._locale=n),this)}var An=U("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function On(){return this._locale}var nr=1e3,ft=60*nr,ar=60*ft,Fn=(365*400+97)*24*ar;function mt(e,n){return (e%n+n)%n}function Rn(e,n,a){return e<100&&e>=0?new Date(e+400,n,a)-Fn:new Date(e,n,a).valueOf()}function In(e,n,a){return e<100&&e>=0?Date.UTC(e+400,n,a)-Fn:Date.UTC(e,n,a)}function Ys(e){var n,a;if(e=we(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?In:Rn,e){case "year":n=a(this.year(),0,1);break;case "quarter":n=a(this.year(),this.month()-this.month()%3,1);break;case "month":n=a(this.year(),this.month(),1);break;case "week":n=a(this.year(),this.month(),this.date()-this.weekday());break;case "isoWeek":n=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case "day":case "date":n=a(this.year(),this.month(),this.date());break;case "hour":n=this._d.valueOf(),n-=mt(n+(this._isUTC?0:this.utcOffset()*ft),ar);break;case "minute":n=this._d.valueOf(),n-=mt(n,ft);break;case "second":n=this._d.valueOf(),n-=mt(n,nr);break}return this._d.setTime(n),t.updateOffset(this,true),this}function Vs(e){var n,a;if(e=we(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?In:Rn,e){case "year":n=a(this.year()+1,0,1)-1;break;case "quarter":n=a(this.year(),this.month()-this.month()%3+3,1)-1;break;case "month":n=a(this.year(),this.month()+1,1)-1;break;case "week":n=a(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case "isoWeek":n=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case "day":case "date":n=a(this.year(),this.month(),this.date()+1)-1;break;case "hour":n=this._d.valueOf(),n+=ar-mt(n+(this._isUTC?0:this.utcOffset()*ft),ar)-1;break;case "minute":n=this._d.valueOf(),n+=ft-mt(n,ft)-1;break;case "second":n=this._d.valueOf(),n+=nr-mt(n,nr)-1;break}return this._d.setTime(n),t.updateOffset(this,true),this}function Bs(){return this._d.valueOf()-(this._offset||0)*6e4}function Hs(){return Math.floor(this.valueOf()/1e3)}function Us(){return new Date(this.valueOf())}function Ws(){var e=this;return [e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function zs(){var e=this;return {years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Gs(){return this.isValid()?this.toISOString():null}function js(){return x(this)}function $s(){return w({},m(this))}function qs(){return m(this).overflow}function Ks(){return {input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}O("N",0,0,"eraAbbr"),O("NN",0,0,"eraAbbr"),O("NNN",0,0,"eraAbbr"),O("NNNN",0,0,"eraName"),O("NNNNN",0,0,"eraNarrow"),O("y",["y",1],"yo","eraYear"),O("y",["yy",2],0,"eraYear"),O("y",["yyy",3],0,"eraYear"),O("y",["yyyy",4],0,"eraYear"),A("N",Lr),A("NN",Lr),A("NNN",Lr),A("NNNN",si),A("NNNNN",ii),Q(["N","NN","NNN","NNNN","NNNNN"],function(e,n,a,o){var i=a._locale.erasParse(e,o,a._strict);i?m(a).era=i:m(a).invalidEra=e;}),A("y",ct),A("yy",ct),A("yyy",ct),A("yyyy",ct),A("yo",li),Q(["y","yy","yyy","yyyy"],me),Q(["yo"],function(e,n,a,o){var i;a._locale._eraYearOrdinalRegex&&(i=e.match(a._locale._eraYearOrdinalRegex)),a._locale.eraYearOrdinalParse?n[me]=a._locale.eraYearOrdinalParse(e,i):n[me]=parseInt(e,10);});function Xs(e,n){var a,o,i,u=this._eras||Be("en")._eras;for(a=0,o=u.length;a<o;++a)switch(typeof u[a].since==="string"&&(i=t(u[a].since).startOf("day"),u[a].since=i.valueOf()),typeof u[a].until){case "undefined":u[a].until=1/0;break;case "string":i=t(u[a].until).startOf("day").valueOf(),u[a].until=i.valueOf();break}return u}function Zs(e,n,a){var o,i,u=this.eras(),y,M,N;for(e=e.toUpperCase(),o=0,i=u.length;o<i;++o)if(y=u[o].name.toUpperCase(),M=u[o].abbr.toUpperCase(),N=u[o].narrow.toUpperCase(),a)switch(n){case "N":case "NN":case "NNN":if(M===e)return u[o];break;case "NNNN":if(y===e)return u[o];break;case "NNNNN":if(N===e)return u[o];break}else if([y,M,N].indexOf(e)>=0)return u[o]}function Js(e,n){var a=e.since<=e.until?1:-1;return n===void 0?t(e.since).year():t(e.since).year()+(n-e.offset)*a}function Qs(){var e,n,a,o=this.localeData().eras();for(e=0,n=o.length;e<n;++e)if(a=this.clone().startOf("day").valueOf(),o[e].since<=a&&a<=o[e].until||o[e].until<=a&&a<=o[e].since)return o[e].name;return ""}function ei(){var e,n,a,o=this.localeData().eras();for(e=0,n=o.length;e<n;++e)if(a=this.clone().startOf("day").valueOf(),o[e].since<=a&&a<=o[e].until||o[e].until<=a&&a<=o[e].since)return o[e].narrow;return ""}function ti(){var e,n,a,o=this.localeData().eras();for(e=0,n=o.length;e<n;++e)if(a=this.clone().startOf("day").valueOf(),o[e].since<=a&&a<=o[e].until||o[e].until<=a&&a<=o[e].since)return o[e].abbr;return ""}function ri(){var e,n,a,o,i=this.localeData().eras();for(e=0,n=i.length;e<n;++e)if(a=i[e].since<=i[e].until?1:-1,o=this.clone().startOf("day").valueOf(),i[e].since<=o&&o<=i[e].until||i[e].until<=o&&o<=i[e].since)return (this.year()-t(i[e].since).year())*a+i[e].offset;return this.year()}function ni(e){return h(this,"_erasNameRegex")||Yr.call(this),e?this._erasNameRegex:this._erasRegex}function ai(e){return h(this,"_erasAbbrRegex")||Yr.call(this),e?this._erasAbbrRegex:this._erasRegex}function oi(e){return h(this,"_erasNarrowRegex")||Yr.call(this),e?this._erasNarrowRegex:this._erasRegex}function Lr(e,n){return n.erasAbbrRegex(e)}function si(e,n){return n.erasNameRegex(e)}function ii(e,n){return n.erasNarrowRegex(e)}function li(e,n){return n._eraYearOrdinalRegex||ct}function Yr(){var e=[],n=[],a=[],o=[],i,u,y,M,N,G=this.eras();for(i=0,u=G.length;i<u;++i)y=Ne(G[i].name),M=Ne(G[i].abbr),N=Ne(G[i].narrow),n.push(y),e.push(M),a.push(N),o.push(y),o.push(M),o.push(N);this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i");}O(0,["gg",2],0,function(){return this.weekYear()%100}),O(0,["GG",2],0,function(){return this.isoWeekYear()%100});function or(e,n){O(0,[e,e.length],0,n);}or("gggg","weekYear"),or("ggggg","weekYear"),or("GGGG","isoWeekYear"),or("GGGGG","isoWeekYear"),A("G",$t),A("g",$t),A("GG",te,Pe),A("gg",te,Pe),A("GGGG",Dr,Pr),A("gggg",Dr,Pr),A("GGGGG",jt,zt),A("ggggg",jt,zt),wt(["gggg","ggggg","GGGG","GGGGG"],function(e,n,a,o){n[o.substr(0,2)]=W(e);}),wt(["gg","GG"],function(e,n,a,o){n[o]=t.parseTwoDigitYear(e);});function ci(e){return En.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function ui(e){return En.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function hi(){return Ve(this.year(),1,4)}function di(){return Ve(this.isoWeekYear(),1,4)}function fi(){var e=this.localeData()._week;return Ve(this.year(),e.dow,e.doy)}function mi(){var e=this.localeData()._week;return Ve(this.weekYear(),e.dow,e.doy)}function En(e,n,a,o,i){var u;return e==null?xt(this,o,i).year:(u=Ve(e,o,i),n>u&&(n=u),pi.call(this,e,n,a,o,i))}function pi(e,n,a,o,i){var u=dn(e,n,a,o,i),y=Tt(u.year,0,u.dayOfYear);return this.year(y.getUTCFullYear()),this.month(y.getUTCMonth()),this.date(y.getUTCDate()),this}O("Q",0,"Qo","quarter"),A("Q",en),Q("Q",function(e,n){n[Le]=(W(e)-1)*3;});function yi(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}O("D",["DD",2],"Do","date"),A("D",te,ut),A("DD",te,Pe),A("Do",function(e,n){return e?n._dayOfMonthOrdinalParse||n._ordinalParse:n._dayOfMonthOrdinalParseLenient}),Q(["D","DD"],Re),Q("Do",function(e,n){n[Re]=W(e.match(te)[0]);});var Nn=ht("Date",true);O("DDD",["DDDD",3],"DDDo","dayOfYear"),A("DDD",Gt),A("DDDD",tn),Q(["DDD","DDDD"],function(e,n,a){a._dayOfYear=W(e);});function gi(e){var n=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?n:this.add(e-n,"d")}O("m",["mm",2],0,"minute"),A("m",te,br),A("mm",te,Pe),Q(["m","mm"],Te);var Si=ht("Minutes",false);O("s",["ss",2],0,"second"),A("s",te,br),A("ss",te,Pe),Q(["s","ss"],Ye);var ki=ht("Seconds",false);O("S",0,0,function(){return ~~(this.millisecond()/100)}),O(0,["SS",2],0,function(){return ~~(this.millisecond()/10)}),O(0,["SSS",3],0,"millisecond"),O(0,["SSSS",4],0,function(){return this.millisecond()*10}),O(0,["SSSSS",5],0,function(){return this.millisecond()*100}),O(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),O(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),O(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),O(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),A("S",Gt,en),A("SS",Gt,Pe),A("SSS",Gt,tn);var Ze,Ln;for(Ze="SSSS";Ze.length<=9;Ze+="S")A(Ze,ct);function Pi(e,n){n[rt]=W(("0."+e)*1e3);}for(Ze="S";Ze.length<=9;Ze+="S")Q(Ze,Pi);Ln=ht("Milliseconds",false),O("z",0,0,"zoneAbbr"),O("zz",0,0,"zoneName");function Di(){return this._isUTC?"UTC":""}function bi(){return this._isUTC?"Coordinated Universal Time":""}var C=$.prototype;C.add=ms,C.calendar=Ds,C.clone=bs,C.diff=Ms,C.endOf=Vs,C.format=Rs,C.from=Is,C.fromNow=Es,C.to=Ns,C.toNow=Ls,C.get=Oa,C.invalidAt=qs,C.isAfter=ws,C.isBefore=Cs,C.isBetween=vs,C.isSame=Ts,C.isSameOrAfter=xs,C.isSameOrBefore=_s,C.isValid=js,C.lang=An,C.locale=Mn,C.localeData=On,C.max=jo,C.min=Go,C.parsingFlags=$s,C.set=Fa,C.startOf=Ys,C.subtract=ps,C.toArray=Ws,C.toObject=zs,C.toDate=Us,C.toISOString=Os,C.inspect=Fs,typeof Symbol<"u"&&Symbol.for!=null&&(C[Symbol.for("nodejs.util.inspect.custom")]=function(){return "Moment<"+this.format()+">"}),C.toJSON=Gs,C.toString=As,C.unix=Hs,C.valueOf=Bs,C.creationData=Ks,C.eraName=Qs,C.eraNarrow=ei,C.eraAbbr=ti,C.eraYear=ri,C.year=an,C.isLeapYear=Aa,C.weekYear=ci,C.isoWeekYear=ui,C.quarter=C.quarters=yi,C.month=un,C.daysInMonth=Ha,C.week=C.weeks=Ka,C.isoWeek=C.isoWeeks=Xa,C.weeksInYear=fi,C.weeksInWeekYear=mi,C.isoWeeksInYear=hi,C.isoWeeksInISOWeekYear=di,C.date=Nn,C.day=C.days=co,C.weekday=uo,C.isoWeekday=ho,C.dayOfYear=gi,C.hour=C.hours=ko,C.minute=C.minutes=Si,C.second=C.seconds=ki,C.millisecond=C.milliseconds=Ln,C.utcOffset=ts,C.utc=ns,C.local=as,C.parseZone=os,C.hasAlignedHourOffset=ss,C.isDST=is,C.isLocal=cs,C.isUtcOffset=us,C.isUtc=Cn,C.isUTC=Cn,C.zoneAbbr=Di,C.zoneName=bi,C.dates=U("dates accessor is deprecated. Use date instead.",Nn),C.months=U("months accessor is deprecated. Use month instead",un),C.years=U("years accessor is deprecated. Use year instead",an),C.zone=U("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",rs),C.isDSTShifted=U("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ls);function wi(e){return re(e*1e3)}function Ci(){return re.apply(null,arguments).parseZone()}function Yn(e){return e}var K=L.prototype;K.calendar=be,K.longDateFormat=gr,K.invalidDate=ma,K.ordinal=ga,K.preparse=Yn,K.postformat=Yn,K.relativeTime=ka,K.pastFuture=Pa,K.set=Se,K.eras=Xs,K.erasParse=Zs,K.erasConvertYear=Js,K.erasAbbrRegex=ai,K.erasNameRegex=ni,K.erasNarrowRegex=oi,K.months=La,K.monthsShort=Ya,K.monthsParse=Ba,K.monthsRegex=Wa,K.monthsShortRegex=Ua,K.week=Ga,K.firstDayOfYear=qa,K.firstDayOfWeek=$a,K.weekdays=ao,K.weekdaysMin=so,K.weekdaysShort=oo,K.weekdaysParse=lo,K.weekdaysRegex=fo,K.weekdaysShortRegex=mo,K.weekdaysMinRegex=po,K.isPM=go,K.meridiem=Po;function sr(e,n,a,o){var i=Be(),u=v().set(o,n);return i[a](u,e)}function Vn(e,n,a){if(P(e)&&(n=e,e=void 0),e=e||"",n!=null)return sr(e,n,a,"month");var o,i=[];for(o=0;o<12;o++)i[o]=sr(e,o,a,"month");return i}function Vr(e,n,a,o){typeof e=="boolean"?(P(n)&&(a=n,n=void 0),n=n||""):(n=e,a=n,e=false,P(n)&&(a=n,n=void 0),n=n||"");var i=Be(),u=e?i._week.dow:0,y,M=[];if(a!=null)return sr(n,(a+u)%7,o,"day");for(y=0;y<7;y++)M[y]=sr(n,(y+u)%7,o,"day");return M}function vi(e,n){return Vn(e,n,"months")}function Ti(e,n){return Vn(e,n,"monthsShort")}function xi(e,n,a){return Vr(e,n,a,"weekdays")}function _i(e,n,a){return Vr(e,n,a,"weekdaysShort")}function Mi(e,n,a){return Vr(e,n,a,"weekdaysMin")}Xe("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var n=e%10,a=W(e%100/10)===1?"th":n===1?"st":n===2?"nd":n===3?"rd":"th";return e+a}}),t.lang=U("moment.lang is deprecated. Use moment.locale instead.",Xe),t.langData=U("moment.langData is deprecated. Use moment.localeData instead.",Be);var He=Math.abs;function Ai(){var e=this._data;return this._milliseconds=He(this._milliseconds),this._days=He(this._days),this._months=He(this._months),e.milliseconds=He(e.milliseconds),e.seconds=He(e.seconds),e.minutes=He(e.minutes),e.hours=He(e.hours),e.months=He(e.months),e.years=He(e.years),this}function Bn(e,n,a,o){var i=xe(n,a);return e._milliseconds+=o*i._milliseconds,e._days+=o*i._days,e._months+=o*i._months,e._bubble()}function Oi(e,n){return Bn(this,e,n,1)}function Fi(e,n){return Bn(this,e,n,-1)}function Hn(e){return e<0?Math.floor(e):Math.ceil(e)}function Ri(){var e=this._milliseconds,n=this._days,a=this._months,o=this._data,i,u,y,M,N;return e>=0&&n>=0&&a>=0||e<=0&&n<=0&&a<=0||(e+=Hn(Br(a)+n)*864e5,n=0,a=0),o.milliseconds=e%1e3,i=Ce(e/1e3),o.seconds=i%60,u=Ce(i/60),o.minutes=u%60,y=Ce(u/60),o.hours=y%24,n+=Ce(y/24),N=Ce(Un(n)),a+=N,n-=Hn(Br(N)),M=Ce(a/12),a%=12,o.days=n,o.months=a,o.years=M,this}function Un(e){return e*4800/146097}function Br(e){return e*146097/4800}function Ii(e){if(!this.isValid())return NaN;var n,a,o=this._milliseconds;if(e=we(e),e==="month"||e==="quarter"||e==="year")switch(n=this._days+o/864e5,a=this._months+Un(n),e){case "month":return a;case "quarter":return a/3;case "year":return a/12}else switch(n=this._days+Math.round(Br(this._months)),e){case "week":return n/7+o/6048e5;case "day":return n+o/864e5;case "hour":return n*24+o/36e5;case "minute":return n*1440+o/6e4;case "second":return n*86400+o/1e3;case "millisecond":return Math.floor(n*864e5)+o;default:throw new Error("Unknown unit "+e)}}function Ue(e){return function(){return this.as(e)}}var Wn=Ue("ms"),Ei=Ue("s"),Ni=Ue("m"),Li=Ue("h"),Yi=Ue("d"),Vi=Ue("w"),Bi=Ue("M"),Hi=Ue("Q"),Ui=Ue("y"),Wi=Wn;function zi(){return xe(this)}function Gi(e){return e=we(e),this.isValid()?this[e+"s"]():NaN}function at(e){return function(){return this.isValid()?this._data[e]:NaN}}var ji=at("milliseconds"),$i=at("seconds"),qi=at("minutes"),Ki=at("hours"),Xi=at("days"),Zi=at("months"),Ji=at("years");function Qi(){return Ce(this.days()/7)}var We=Math.round,pt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function el(e,n,a,o,i){return i.relativeTime(n||1,!!a,e,o)}function tl(e,n,a,o){var i=xe(e).abs(),u=We(i.as("s")),y=We(i.as("m")),M=We(i.as("h")),N=We(i.as("d")),G=We(i.as("M")),ye=We(i.as("w")),ze=We(i.as("y")),Je=u<=a.ss&&["s",u]||u<a.s&&["ss",u]||y<=1&&["m"]||y<a.m&&["mm",y]||M<=1&&["h"]||M<a.h&&["hh",M]||N<=1&&["d"]||N<a.d&&["dd",N];return a.w!=null&&(Je=Je||ye<=1&&["w"]||ye<a.w&&["ww",ye]),Je=Je||G<=1&&["M"]||G<a.M&&["MM",G]||ze<=1&&["y"]||["yy",ze],Je[2]=n,Je[3]=+e>0,Je[4]=o,el.apply(null,Je)}function rl(e){return e===void 0?We:typeof e=="function"?(We=e,true):false}function nl(e,n){return pt[e]===void 0?false:n===void 0?pt[e]:(pt[e]=n,e==="s"&&(pt.ss=n-1),true)}function al(e,n){if(!this.isValid())return this.localeData().invalidDate();var a=false,o=pt,i,u;return typeof e=="object"&&(n=e,e=false),typeof e=="boolean"&&(a=e),typeof n=="object"&&(o=Object.assign({},pt,n),n.s!=null&&n.ss==null&&(o.ss=n.s-1)),i=this.localeData(),u=tl(this,!a,o,i),a&&(u=i.pastFuture(+this,u)),i.postformat(u)}var Hr=Math.abs;function yt(e){return (e>0)-(e<0)||+e}function ir(){if(!this.isValid())return this.localeData().invalidDate();var e=Hr(this._milliseconds)/1e3,n=Hr(this._days),a=Hr(this._months),o,i,u,y,M=this.asSeconds(),N,G,ye,ze;return M?(o=Ce(e/60),i=Ce(o/60),e%=60,o%=60,u=Ce(a/12),a%=12,y=e?e.toFixed(3).replace(/\.?0+$/,""):"",N=M<0?"-":"",G=yt(this._months)!==yt(M)?"-":"",ye=yt(this._days)!==yt(M)?"-":"",ze=yt(this._milliseconds)!==yt(M)?"-":"",N+"P"+(u?G+u+"Y":"")+(a?G+a+"M":"")+(n?ye+n+"D":"")+(i||o||e?"T":"")+(i?ze+i+"H":"")+(o?ze+o+"M":"")+(e?ze+y+"S":"")):"P0D"}var j=er.prototype;j.isValid=Zo,j.abs=Ai,j.add=Oi,j.subtract=Fi,j.as=Ii,j.asMilliseconds=Wn,j.asSeconds=Ei,j.asMinutes=Ni,j.asHours=Li,j.asDays=Yi,j.asWeeks=Vi,j.asMonths=Bi,j.asQuarters=Hi,j.asYears=Ui,j.valueOf=Wi,j._bubble=Ri,j.clone=zi,j.get=Gi,j.milliseconds=ji,j.seconds=$i,j.minutes=qi,j.hours=Ki,j.days=Xi,j.weeks=Qi,j.months=Zi,j.years=Ji,j.humanize=al,j.toISOString=ir,j.toString=ir,j.toJSON=ir,j.locale=Mn,j.localeData=On,j.toIsoString=U("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ir),j.lang=An,O("X",0,0,"unix"),O("x",0,0,"valueOf"),A("x",$t),A("X",Ca),Q("X",function(e,n,a){a._d=new Date(parseFloat(e)*1e3);}),Q("x",function(e,n,a){a._d=new Date(W(e));});return t.version="2.30.1",r(re),t.fn=C,t.min=$o,t.max=qo,t.now=Ko,t.utc=v,t.unix=wi,t.months=vi,t.isDate=k,t.locale=Xe,t.invalid=Y,t.duration=xe,t.isMoment=V,t.weekdays=xi,t.parseZone=Ci,t.localeData=Be,t.isDuration=tr,t.monthsShort=Ti,t.weekdaysMin=Mi,t.defineLocale=_r,t.updateLocale=Co,t.locales=vo,t.weekdaysShort=_i,t.normalizeUnits=we,t.relativeTimeRounding=rl,t.relativeTimeThreshold=nl,t.calendarFormat=Ps,t.prototype=C,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t}));});function pe(s){return s<0?-1:s===0?0:1}function ot(s,t,r){return (1-r)*s+r*t}function $n(s,t,r){return r<s?s:r>t?t:r}function ce(s,t,r){return r<s?s:r>t?t:r}function gt(s){return s=s%360,s<0&&(s=s+360),s}function he(s){return s=s%360,s<0&&(s=s+360),s}function Ot(s,t){let r=s[0]*t[0][0]+s[1]*t[0][1]+s[2]*t[0][2],l=s[0]*t[1][0]+s[1]*t[1][1]+s[2]*t[1][2],c=s[0]*t[2][0]+s[1]*t[2][1]+s[2]*t[2][2];return [r,l,c]}var qn=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],dl=[[3.2413774792388685,-1.5376652402851851,-0.49885366846268053],[-0.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-0.20395524564742123,1.0571799111220335]],Kn=[95.047,100,108.883];function lr(s,t,r){return (255<<24|(s&255)<<16|(t&255)<<8|r&255)>>>0}function Wr(s){let t=st(s[0]),r=st(s[1]),l=st(s[2]);return lr(t,r,l)}function Rt(s){return s>>16&255}function It(s){return s>>8&255}function Et(s){return s&255}function Xn(s,t,r){let l=dl,c=l[0][0]*s+l[0][1]*t+l[0][2]*r,h=l[1][0]*s+l[1][1]*t+l[1][2]*r,d=l[2][0]*s+l[2][1]*t+l[2][2]*r,p=st(c),P=st(h),k=st(d);return lr(p,P,k)}function fl(s){let t=Ie(Rt(s)),r=Ie(It(s)),l=Ie(Et(s));return Ot([t,r,l],qn)}function zr(s){let t=Ie(Rt(s)),r=Ie(It(s)),l=Ie(Et(s)),c=qn,h=c[0][0]*t+c[0][1]*r+c[0][2]*l,d=c[1][0]*t+c[1][1]*r+c[1][2]*l,p=c[2][0]*t+c[2][1]*r+c[2][2]*l,P=Kn,k=h/P[0],b=d/P[1],w=p/P[2],v=Ft(k),T=Ft(b),m=Ft(w),D=116*T-16,x=500*(v-T),Y=200*(T-m);return [D,x,Y]}function Zn(s){let t=_e(s),r=st(t);return lr(r,r,r)}function cr(s){let t=fl(s)[1];return 116*Ft(t/100)-16}function _e(s){return 100*ml((s+16)/116)}function Nt(s){return Ft(s/100)*116-16}function Ie(s){let t=s/255;return t<=.040449936?t/12.92*100:Math.pow((t+.055)/1.055,2.4)*100}function st(s){let t=s/100,r=0;return t<=.0031308?r=t*12.92:r=1.055*Math.pow(t,1/2.4)-.055,$n(0,255,Math.round(r*255))}function Jn(){return Kn}function Ft(s){let t=.008856451679035631,r=24389/27;return s>t?Math.pow(s,1/3):(r*s+16)/116}function ml(s){let t=.008856451679035631,r=24389/27,l=s*s*s;return l>t?l:(116*s-16)/r}var De=class s{static make(t=Jn(),r=200/Math.PI*_e(50)/100,l=50,c=2,h=false){let d=t,p=d[0]*.401288+d[1]*.650173+d[2]*-0.051461,P=d[0]*-0.250268+d[1]*1.204414+d[2]*.045854,k=d[0]*-2079e-6+d[1]*.048952+d[2]*.953127,b=.8+c/10,w=b>=.9?ot(.59,.69,(b-.9)*10):ot(.525,.59,(b-.8)*10),v=h?1:b*(1-1/3.6*Math.exp((-r-42)/92));v=v>1?1:v<0?0:v;let T=b,m=[v*(100/p)+1-v,v*(100/P)+1-v,v*(100/k)+1-v],D=1/(5*r+1),x=D*D*D*D,Y=1-x,H=x*r+.1*Y*Y*Math.cbrt(5*r),X=_e(l)/t[1],Z=1.48+Math.sqrt(X),$=.725/Math.pow(X,.2),V=$,z=[Math.pow(H*m[0]*p/100,.42),Math.pow(H*m[1]*P/100,.42),Math.pow(H*m[2]*k/100,.42)],U=[400*z[0]/(z[0]+27.13),400*z[1]/(z[1]+27.13),400*z[2]/(z[2]+27.13)],ne=(2*U[0]+U[1]+.05*U[2])*$;return new s(X,ne,$,V,w,T,m,H,Math.pow(H,.25),Z)}constructor(t,r,l,c,h,d,p,P,k,b){this.n=t,this.aw=r,this.nbb=l,this.ncb=c,this.c=h,this.nc=d,this.rgbD=p,this.fl=P,this.fLRoot=k,this.z=b;}};De.DEFAULT=De.make();var Ee=class s{constructor(t,r,l,c,h,d,p,P,k){this.hue=t,this.chroma=r,this.j=l,this.q=c,this.m=h,this.s=d,this.jstar=p,this.astar=P,this.bstar=k;}distance(t){let r=this.jstar-t.jstar,l=this.astar-t.astar,c=this.bstar-t.bstar,h=Math.sqrt(r*r+l*l+c*c);return 1.41*Math.pow(h,.63)}static fromInt(t){return s.fromIntInViewingConditions(t,De.DEFAULT)}static fromIntInViewingConditions(t,r){let l=(t&16711680)>>16,c=(t&65280)>>8,h=t&255,d=Ie(l),p=Ie(c),P=Ie(h),k=.41233895*d+.35762064*p+.18051042*P,b=.2126*d+.7152*p+.0722*P,w=.01932141*d+.11916382*p+.95034478*P,v=.401288*k+.650173*b-.051461*w,T=-0.250268*k+1.204414*b+.045854*w,m=-2079e-6*k+.048952*b+.953127*w,D=r.rgbD[0]*v,x=r.rgbD[1]*T,Y=r.rgbD[2]*m,H=Math.pow(r.fl*Math.abs(D)/100,.42),X=Math.pow(r.fl*Math.abs(x)/100,.42),Z=Math.pow(r.fl*Math.abs(Y)/100,.42),$=pe(D)*400*H/(H+27.13),V=pe(x)*400*X/(X+27.13),z=pe(Y)*400*Z/(Z+27.13),U=(11*$+-12*V+z)/11,ne=($+V-2*z)/9,ee=(20*$+20*V+21*z)/20,oe=(40*$+20*V+z)/20,ke=Math.atan2(ne,U)*180/Math.PI,L=he(ke),fe=L*Math.PI/180,Oe=oe*r.nbb,be=100*Math.pow(Oe/r.aw,r.c*r.z),de=4/r.c*Math.sqrt(be/100)*(r.aw+4)*r.fLRoot,et=L<20.14?L+360:L,Ke=.25*(Math.cos(et*Math.PI/180+2)+3.8),Fe=5e4/13*Ke*r.nc*r.ncb*Math.sqrt(U*U+ne*ne)/(ee+.305),O=Math.pow(Fe,.9)*Math.pow(1.64-Math.pow(.29,r.n),.73),Bt=O*Math.sqrt(be/100),Ht=Bt*r.fLRoot,lt=50*Math.sqrt(O*r.c/(r.aw+4)),Ut=(1+100*.007)*be/(1+.007*be),Wt=1/.0228*Math.log(1+.0228*Ht),gr=Wt*Math.cos(fe),Sr=Wt*Math.sin(fe);return new s(L,Bt,be,de,Ht,lt,Ut,gr,Sr)}static fromJch(t,r,l){return s.fromJchInViewingConditions(t,r,l,De.DEFAULT)}static fromJchInViewingConditions(t,r,l,c){let h=4/c.c*Math.sqrt(t/100)*(c.aw+4)*c.fLRoot,d=r*c.fLRoot,p=r/Math.sqrt(t/100),P=50*Math.sqrt(p*c.c/(c.aw+4)),k=l*Math.PI/180,b=(1+100*.007)*t/(1+.007*t),w=1/.0228*Math.log(1+.0228*d),v=w*Math.cos(k),T=w*Math.sin(k);return new s(l,r,t,h,d,P,b,v,T)}static fromUcs(t,r,l){return s.fromUcsInViewingConditions(t,r,l,De.DEFAULT)}static fromUcsInViewingConditions(t,r,l,c){let h=r,d=l,p=Math.sqrt(h*h+d*d),k=(Math.exp(p*.0228)-1)/.0228/c.fLRoot,b=Math.atan2(d,h)*(180/Math.PI);b<0&&(b+=360);let w=t/(1-(t-100)*.007);return s.fromJchInViewingConditions(w,k,b,c)}toInt(){return this.viewed(De.DEFAULT)}viewed(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),l=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),c=this.hue*Math.PI/180,h=.25*(Math.cos(c+2)+3.8),d=t.aw*Math.pow(this.j/100,1/t.c/t.z),p=h*(5e4/13)*t.nc*t.ncb,P=d/t.nbb,k=Math.sin(c),b=Math.cos(c),w=23*(P+.305)*l/(23*p+11*l*b+108*l*k),v=w*b,T=w*k,m=(460*P+451*v+288*T)/1403,D=(460*P-891*v-261*T)/1403,x=(460*P-220*v-6300*T)/1403,Y=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),H=pe(m)*(100/t.fl)*Math.pow(Y,1/.42),X=Math.max(0,27.13*Math.abs(D)/(400-Math.abs(D))),Z=pe(D)*(100/t.fl)*Math.pow(X,1/.42),$=Math.max(0,27.13*Math.abs(x)/(400-Math.abs(x))),V=pe(x)*(100/t.fl)*Math.pow($,1/.42),z=H/t.rgbD[0],U=Z/t.rgbD[1],ne=V/t.rgbD[2],ee=1.86206786*z-1.01125463*U+.14918677*ne,oe=.38752654*z+.62144744*U-.00897398*ne,Se=-0.0158415*z-.03412294*U+1.04996444*ne;return Xn(ee,oe,Se)}static fromXyzInViewingConditions(t,r,l,c){let h=.401288*t+.650173*r-.051461*l,d=-0.250268*t+1.204414*r+.045854*l,p=-2079e-6*t+.048952*r+.953127*l,P=c.rgbD[0]*h,k=c.rgbD[1]*d,b=c.rgbD[2]*p,w=Math.pow(c.fl*Math.abs(P)/100,.42),v=Math.pow(c.fl*Math.abs(k)/100,.42),T=Math.pow(c.fl*Math.abs(b)/100,.42),m=pe(P)*400*w/(w+27.13),D=pe(k)*400*v/(v+27.13),x=pe(b)*400*T/(T+27.13),Y=(11*m+-12*D+x)/11,H=(m+D-2*x)/9,X=(20*m+20*D+21*x)/20,Z=(40*m+20*D+x)/20,V=Math.atan2(H,Y)*180/Math.PI,z=V<0?V+360:V>=360?V-360:V,U=z*Math.PI/180,ne=Z*c.nbb,ee=100*Math.pow(ne/c.aw,c.c*c.z),oe=4/c.c*Math.sqrt(ee/100)*(c.aw+4)*c.fLRoot,Se=z<20.14?z+360:z,ke=1/4*(Math.cos(Se*Math.PI/180+2)+3.8),fe=5e4/13*ke*c.nc*c.ncb*Math.sqrt(Y*Y+H*H)/(X+.305),Oe=Math.pow(fe,.9)*Math.pow(1.64-Math.pow(.29,c.n),.73),be=Oe*Math.sqrt(ee/100),de=be*c.fLRoot,et=50*Math.sqrt(Oe*c.c/(c.aw+4)),Ke=(1+100*.007)*ee/(1+.007*ee),tt=Math.log(1+.0228*de)/.0228,Fe=tt*Math.cos(U),O=tt*Math.sin(U);return new s(z,be,ee,oe,de,et,Ke,Fe,O)}xyzInViewingConditions(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),l=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),c=this.hue*Math.PI/180,h=.25*(Math.cos(c+2)+3.8),d=t.aw*Math.pow(this.j/100,1/t.c/t.z),p=h*(5e4/13)*t.nc*t.ncb,P=d/t.nbb,k=Math.sin(c),b=Math.cos(c),w=23*(P+.305)*l/(23*p+11*l*b+108*l*k),v=w*b,T=w*k,m=(460*P+451*v+288*T)/1403,D=(460*P-891*v-261*T)/1403,x=(460*P-220*v-6300*T)/1403,Y=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),H=pe(m)*(100/t.fl)*Math.pow(Y,1/.42),X=Math.max(0,27.13*Math.abs(D)/(400-Math.abs(D))),Z=pe(D)*(100/t.fl)*Math.pow(X,1/.42),$=Math.max(0,27.13*Math.abs(x)/(400-Math.abs(x))),V=pe(x)*(100/t.fl)*Math.pow($,1/.42),z=H/t.rgbD[0],U=Z/t.rgbD[1],ne=V/t.rgbD[2],ee=1.86206786*z-1.01125463*U+.14918677*ne,oe=.38752654*z+.62144744*U-.00897398*ne,Se=-0.0158415*z-.03412294*U+1.04996444*ne;return [ee,oe,Se]}};var Ae=class s{static sanitizeRadians(t){return (t+Math.PI*8)%(Math.PI*2)}static trueDelinearized(t){let r=t/100,l=0;return r<=.0031308?l=r*12.92:l=1.055*Math.pow(r,1/2.4)-.055,l*255}static chromaticAdaptation(t){let r=Math.pow(Math.abs(t),.42);return pe(t)*400*r/(r+27.13)}static hueOf(t){let r=Ot(t,s.SCALED_DISCOUNT_FROM_LINRGB),l=s.chromaticAdaptation(r[0]),c=s.chromaticAdaptation(r[1]),h=s.chromaticAdaptation(r[2]),d=(11*l+-12*c+h)/11,p=(l+c-2*h)/9;return Math.atan2(p,d)}static areInCyclicOrder(t,r,l){let c=s.sanitizeRadians(r-t),h=s.sanitizeRadians(l-t);return c<h}static intercept(t,r,l){return (r-t)/(l-t)}static lerpPoint(t,r,l){return [t[0]+(l[0]-t[0])*r,t[1]+(l[1]-t[1])*r,t[2]+(l[2]-t[2])*r]}static setCoordinate(t,r,l,c){let h=s.intercept(t[c],r,l[c]);return s.lerpPoint(t,h,l)}static isBounded(t){return 0<=t&&t<=100}static nthVertex(t,r){let l=s.Y_FROM_LINRGB[0],c=s.Y_FROM_LINRGB[1],h=s.Y_FROM_LINRGB[2],d=r%4<=1?0:100,p=r%2===0?0:100;if(r<4){let P=d,k=p,b=(t-P*c-k*h)/l;return s.isBounded(b)?[b,P,k]:[-1,-1,-1]}else if(r<8){let P=d,k=p,b=(t-k*l-P*h)/c;return s.isBounded(b)?[k,b,P]:[-1,-1,-1]}else {let P=d,k=p,b=(t-P*l-k*c)/h;return s.isBounded(b)?[P,k,b]:[-1,-1,-1]}}static bisectToSegment(t,r){let l=[-1,-1,-1],c=l,h=0,d=0,p=false,P=true;for(let k=0;k<12;k++){let b=s.nthVertex(t,k);if(b[0]<0)continue;let w=s.hueOf(b);if(!p){l=b,c=b,h=w,d=w,p=true;continue}(P||s.areInCyclicOrder(h,w,d))&&(P=false,s.areInCyclicOrder(h,r,w)?(c=b,d=w):(l=b,h=w));}return [l,c]}static midpoint(t,r){return [(t[0]+r[0])/2,(t[1]+r[1])/2,(t[2]+r[2])/2]}static criticalPlaneBelow(t){return Math.floor(t-.5)}static criticalPlaneAbove(t){return Math.ceil(t-.5)}static bisectToLimit(t,r){let l=s.bisectToSegment(t,r),c=l[0],h=s.hueOf(c),d=l[1];for(let p=0;p<3;p++)if(c[p]!==d[p]){let P=-1,k=255;c[p]<d[p]?(P=s.criticalPlaneBelow(s.trueDelinearized(c[p])),k=s.criticalPlaneAbove(s.trueDelinearized(d[p]))):(P=s.criticalPlaneAbove(s.trueDelinearized(c[p])),k=s.criticalPlaneBelow(s.trueDelinearized(d[p])));for(let b=0;b<8&&!(Math.abs(k-P)<=1);b++){let w=Math.floor((P+k)/2),v=s.CRITICAL_PLANES[w],T=s.setCoordinate(c,v,d,p),m=s.hueOf(T);s.areInCyclicOrder(h,r,m)?(d=T,k=w):(c=T,h=m,P=w);}}return s.midpoint(c,d)}static inverseChromaticAdaptation(t){let r=Math.abs(t),l=Math.max(0,27.13*r/(400-r));return pe(t)*Math.pow(l,1/.42)}static findResultByJ(t,r,l){let c=Math.sqrt(l)*11,h=De.DEFAULT,d=1/Math.pow(1.64-Math.pow(.29,h.n),.73),P=.25*(Math.cos(t+2)+3.8)*(5e4/13)*h.nc*h.ncb,k=Math.sin(t),b=Math.cos(t);for(let w=0;w<5;w++){let v=c/100,T=r===0||c===0?0:r/Math.sqrt(v),m=Math.pow(T*d,1/.9),x=h.aw*Math.pow(v,1/h.c/h.z)/h.nbb,Y=23*(x+.305)*m/(23*P+11*m*b+108*m*k),H=Y*b,X=Y*k,Z=(460*x+451*H+288*X)/1403,$=(460*x-891*H-261*X)/1403,V=(460*x-220*H-6300*X)/1403,z=s.inverseChromaticAdaptation(Z),U=s.inverseChromaticAdaptation($),ne=s.inverseChromaticAdaptation(V),ee=Ot([z,U,ne],s.LINRGB_FROM_SCALED_DISCOUNT);if(ee[0]<0||ee[1]<0||ee[2]<0)return 0;let oe=s.Y_FROM_LINRGB[0],Se=s.Y_FROM_LINRGB[1],ke=s.Y_FROM_LINRGB[2],L=oe*ee[0]+Se*ee[1]+ke*ee[2];if(L<=0)return 0;if(w===4||Math.abs(L-l)<.002)return ee[0]>100.01||ee[1]>100.01||ee[2]>100.01?0:Wr(ee);c=c-(L-l)*c/(2*L);}return 0}static solveToInt(t,r,l){if(r<1e-4||l<1e-4||l>99.9999)return Zn(l);t=he(t);let c=t/180*Math.PI,h=_e(l),d=s.findResultByJ(c,r,h);if(d!==0)return d;let p=s.bisectToLimit(h,c);return Wr(p)}static solveToCam(t,r,l){return Ee.fromInt(s.solveToInt(t,r,l))}};Ae.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];Ae.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];Ae.Y_FROM_LINRGB=[.2126,.7152,.0722];Ae.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var F=class s{static from(t,r,l){return new s(Ae.solveToInt(t,r,l))}static fromInt(t){return new s(t)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(t){this.setInternalState(Ae.solveToInt(t,this.internalChroma,this.internalTone));}get chroma(){return this.internalChroma}set chroma(t){this.setInternalState(Ae.solveToInt(this.internalHue,t,this.internalTone));}get tone(){return this.internalTone}set tone(t){this.setInternalState(Ae.solveToInt(this.internalHue,this.internalChroma,t));}setValue(t,r){this[t]=r;}toString(){return `HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`}static isBlue(t){return t>=250&&t<270}static isYellow(t){return t>=105&&t<125}static isCyan(t){return t>=170&&t<207}constructor(t){this.argb=t;let r=Ee.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=cr(t),this.argb=t;}setInternalState(t){let r=Ee.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=cr(t),this.argb=t;}inViewingConditions(t){let l=Ee.fromInt(this.toInt()).xyzInViewingConditions(t),c=Ee.fromXyzInViewingConditions(l[0],l[1],l[2],De.make());return s.from(c.hue,c.chroma,Nt(l[1]))}};var le=class s{static ratioOfTones(t,r){return t=ce(0,100,t),r=ce(0,100,r),s.ratioOfYs(_e(t),_e(r))}static ratioOfYs(t,r){let l=t>r?t:r,c=l===r?t:r;return (l+5)/(c+5)}static lighter(t,r){if(t<0||t>100)return -1;let l=_e(t),c=r*(l+5)-5,h=s.ratioOfYs(c,l),d=Math.abs(h-r);if(h<r&&d>.04)return -1;let p=Nt(c)+.4;return p<0||p>100?-1:p}static darker(t,r){if(t<0||t>100)return -1;let l=_e(t),c=(l+5)/r-5,h=s.ratioOfYs(l,c),d=Math.abs(h-r);if(h<r&&d>.04)return -1;let p=Nt(c)-.4;return p<0||p>100?-1:p}static lighterUnsafe(t,r){let l=s.lighter(t,r);return l<0?100:l}static darkerUnsafe(t,r){let l=s.darker(t,r);return l<0?0:l}};var it=class s{static isDisliked(t){let r=Math.round(t.hue)>=90&&Math.round(t.hue)<=111,l=Math.round(t.chroma)>16,c=Math.round(t.tone)<65;return r&&l&&c}static fixIfDisliked(t){return s.isDisliked(t)?F.from(t.hue,t.chroma,70):t}};function pl(s,t,r){if(s.name!==r.name)throw new Error(`Attempting to extend color ${s.name} with color ${r.name} of different name for spec version ${t}.`);if(s.isBackground!==r.isBackground)throw new Error(`Attempting to extend color ${s.name} as a ${s.isBackground?"background":"foreground"} with color ${r.name} as a ${r.isBackground?"background":"foreground"} for spec version ${t}.`)}function E(s,t,r){return pl(s,t,r),g.fromPalette({name:s.name,palette:l=>l.specVersion===t?r.palette(l):s.palette(l),tone:l=>l.specVersion===t?r.tone(l):s.tone(l),isBackground:s.isBackground,chromaMultiplier:l=>{let c=l.specVersion===t?r.chromaMultiplier:s.chromaMultiplier;return c!==void 0?c(l):1},background:l=>{let c=l.specVersion===t?r.background:s.background;return c!==void 0?c(l):void 0},secondBackground:l=>{let c=l.specVersion===t?r.secondBackground:s.secondBackground;return c!==void 0?c(l):void 0},contrastCurve:l=>{let c=l.specVersion===t?r.contrastCurve:s.contrastCurve;return c!==void 0?c(l):void 0},toneDeltaPair:l=>{let c=l.specVersion===t?r.toneDeltaPair:s.toneDeltaPair;return c!==void 0?c(l):void 0}})}var g=class s{static fromPalette(t){return new s(t.name??"",t.palette,t.tone??s.getInitialToneFromBackground(t.background),t.isBackground??false,t.chromaMultiplier,t.background,t.secondBackground,t.contrastCurve,t.toneDeltaPair)}static getInitialToneFromBackground(t){return t===void 0?r=>50:r=>t(r)?t(r).getTone(r):50}constructor(t,r,l,c,h,d,p,P,k){if(this.name=t,this.palette=r,this.tone=l,this.isBackground=c,this.chromaMultiplier=h,this.background=d,this.secondBackground=p,this.contrastCurve=P,this.toneDeltaPair=k,this.hctCache=new Map,!d&&p)throw new Error(`Color ${t} has secondBackgrounddefined, but background is not defined.`);if(!d&&P)throw new Error(`Color ${t} has contrastCurvedefined, but background is not defined.`);if(d&&!P)throw new Error(`Color ${t} has backgrounddefined, but contrastCurve is not defined.`)}clone(){return s.fromPalette({name:this.name,palette:this.palette,tone:this.tone,isBackground:this.isBackground,chromaMultiplier:this.chromaMultiplier,background:this.background,secondBackground:this.secondBackground,contrastCurve:this.contrastCurve,toneDeltaPair:this.toneDeltaPair})}clearCache(){this.hctCache.clear();}getArgb(t){return this.getHct(t).toInt()}getHct(t){let r=this.hctCache.get(t);if(r!=null)return r;let l=Qn(t.specVersion).getHct(t,this);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,l),l}getTone(t){return Qn(t.specVersion).getTone(t,this)}static foregroundTone(t,r){let l=le.lighterUnsafe(t,r),c=le.darkerUnsafe(t,r),h=le.ratioOfTones(l,t),d=le.ratioOfTones(c,t);if(s.tonePrefersLightForeground(t)){let P=Math.abs(h-d)<.1&&h<r&&d<r;return h>=r||h>=d||P?l:c}else return d>=r||d>=h?c:l}static tonePrefersLightForeground(t){return Math.round(t)<60}static toneAllowsLightForeground(t){return Math.round(t)<=49}static enableLightForeground(t){return s.tonePrefersLightForeground(t)&&!s.toneAllowsLightForeground(t)?49:t}},Gr=class{getHct(t,r){let l=r.getTone(t);return r.palette(t).getHct(l)}getTone(t,r){let l=t.contrastLevel<0,c=r.toneDeltaPair?r.toneDeltaPair(t):void 0;if(c){let h=c.roleA,d=c.roleB,p=c.delta,P=c.polarity,k=c.stayTogether,b=P==="nearer"||P==="lighter"&&!t.isDark||P==="darker"&&t.isDark,w=b?h:d,v=b?d:h,T=r.name===w.name,m=t.isDark?1:-1,D=w.tone(t),x=v.tone(t);if(r.background&&w.contrastCurve&&v.contrastCurve){let Y=r.background(t),H=w.contrastCurve(t),X=v.contrastCurve(t);if(Y&&H&&X){let Z=Y.getTone(t),$=H.get(t.contrastLevel),V=X.get(t.contrastLevel);le.ratioOfTones(Z,D)<$&&(D=g.foregroundTone(Z,$)),le.ratioOfTones(Z,x)<V&&(x=g.foregroundTone(Z,V)),l&&(D=g.foregroundTone(Z,$),x=g.foregroundTone(Z,V));}}return (x-D)*m<p&&(x=ce(0,100,D+p*m),(x-D)*m>=p||(D=ce(0,100,x-p*m))),50<=D&&D<60?m>0?(D=60,x=Math.max(x,D+p*m)):(D=49,x=Math.min(x,D+p*m)):50<=x&&x<60&&(k?m>0?(D=60,x=Math.max(x,D+p*m)):(D=49,x=Math.min(x,D+p*m)):m>0?x=60:x=49),T?D:x}else {let h=r.tone(t);if(r.background==null||r.background(t)===void 0||r.contrastCurve==null||r.contrastCurve(t)===void 0)return h;let d=r.background(t).getTone(t),p=r.contrastCurve(t).get(t.contrastLevel);if(le.ratioOfTones(d,h)>=p||(h=g.foregroundTone(d,p)),l&&(h=g.foregroundTone(d,p)),r.isBackground&&50<=h&&h<60&&(le.ratioOfTones(49,d)>=p?h=49:h=60),r.secondBackground==null||r.secondBackground(t)===void 0)return h;let[P,k]=[r.background,r.secondBackground],[b,w]=[P(t).getTone(t),k(t).getTone(t)],[v,T]=[Math.max(b,w),Math.min(b,w)];if(le.ratioOfTones(v,h)>=p&&le.ratioOfTones(T,h)>=p)return h;let m=le.lighter(v,p),D=le.darker(T,p),x=[];return m!==-1&&x.push(m),D!==-1&&x.push(D),g.tonePrefersLightForeground(b)||g.tonePrefersLightForeground(w)?m<0?100:m:x.length===1?x[0]:D<0?0:D}}},jr=class{getHct(t,r){let l=r.palette(t),c=r.getTone(t),h=l.hue,d=l.chroma*(r.chromaMultiplier?r.chromaMultiplier(t):1);return F.from(h,d,c)}getTone(t,r){let l=r.toneDeltaPair?r.toneDeltaPair(t):void 0;if(l){let c=l.roleA,h=l.roleB,d=l.polarity,p=l.constraint,P=d==="darker"||d==="relative_lighter"&&t.isDark||d==="relative_darker"&&!t.isDark?-l.delta:l.delta,k=r.name===c.name,b=k?c:h,w=k?h:c,v=b.tone(t),T=w.getTone(t),m=P*(k?1:-1);if(p==="exact"?v=ce(0,100,T+m):p==="nearer"?m>0?v=ce(0,100,ce(T,T+m,v)):v=ce(0,100,ce(T+m,T,v)):p==="farther"&&(m>0?v=ce(T+m,100,v):v=ce(0,T+m,v)),r.background&&r.contrastCurve){let D=r.background(t),x=r.contrastCurve(t);if(D&&x){let Y=D.getTone(t),H=x.get(t.contrastLevel);v=le.ratioOfTones(Y,v)>=H&&t.contrastLevel>=0?v:g.foregroundTone(Y,H);}}return r.isBackground&&!r.name.endsWith("_fixed_dim")&&(v>=57?v=ce(65,100,v):v=ce(0,49,v)),v}else {let c=r.tone(t);if(r.background==null||r.background(t)===void 0||r.contrastCurve==null||r.contrastCurve(t)===void 0)return c;let h=r.background(t).getTone(t),d=r.contrastCurve(t).get(t.contrastLevel);if(c=le.ratioOfTones(h,c)>=d&&t.contrastLevel>=0?c:g.foregroundTone(h,d),r.isBackground&&!r.name.endsWith("_fixed_dim")&&(c>=57?c=ce(65,100,c):c=ce(0,49,c)),r.secondBackground==null||r.secondBackground(t)===void 0)return c;let[p,P]=[r.background,r.secondBackground],[k,b]=[p(t).getTone(t),P(t).getTone(t)],[w,v]=[Math.max(k,b),Math.min(k,b)];if(le.ratioOfTones(w,c)>=d&&le.ratioOfTones(v,c)>=d)return c;let T=le.lighter(w,d),m=le.darker(v,d),D=[];return T!==-1&&D.push(T),m!==-1&&D.push(m),g.tonePrefersLightForeground(k)||g.tonePrefersLightForeground(b)?T<0?100:T:D.length===1?D[0]:m<0?0:m}}},yl=new Gr,gl=new jr;function Qn(s){return s==="2025"?gl:yl}var _=class s{static fromInt(t){let r=F.fromInt(t);return s.fromHct(r)}static fromHct(t){return new s(t.hue,t.chroma,t)}static fromHueAndChroma(t,r){let l=new $r(t,r).create();return new s(t,r,l)}constructor(t,r,l){this.hue=t,this.chroma=r,this.keyColor=l,this.cache=new Map;}tone(t){let r=this.cache.get(t);return r===void 0&&(t==99&&F.isYellow(this.hue)?r=this.averageArgb(this.tone(98),this.tone(100)):r=F.from(this.hue,this.chroma,t).toInt(),this.cache.set(t,r)),r}getHct(t){return F.fromInt(this.tone(t))}averageArgb(t,r){let l=t>>>16&255,c=t>>>8&255,h=t&255,d=r>>>16&255,p=r>>>8&255,P=r&255,k=Math.round((l+d)/2),b=Math.round((c+p)/2),w=Math.round((h+P)/2);return (255<<24|(k&255)<<16|(b&255)<<8|w&255)>>>0}},$r=class{constructor(t,r){this.hue=t,this.requestedChroma=r,this.chromaCache=new Map,this.maxChromaValue=200;}create(){let c=0,h=100;for(;c<h;){let d=Math.floor((c+h)/2),p=this.maxChroma(d)<this.maxChroma(d+1);if(this.maxChroma(d)>=this.requestedChroma-.01)if(Math.abs(c-50)<Math.abs(h-50))h=d;else {if(c===d)return F.from(this.hue,this.requestedChroma,c);c=d;}else p?c=d+1:h=d;}return F.from(this.hue,this.requestedChroma,c)}maxChroma(t){if(this.chromaCache.has(t))return this.chromaCache.get(t);let r=F.from(this.hue,this.maxChromaValue,t).chroma;return this.chromaCache.set(t,r),r}};var Lt=class s{constructor(t){this.input=t,this.hctsByTempCache=[],this.hctsByHueCache=[],this.tempsByHctCache=new Map,this.inputRelativeTemperatureCache=-1,this.complementCache=null;}get hctsByTemp(){if(this.hctsByTempCache.length>0)return this.hctsByTempCache;let t=this.hctsByHue.concat([this.input]),r=this.tempsByHct;return t.sort((l,c)=>r.get(l)-r.get(c)),this.hctsByTempCache=t,t}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(t=5,r=12){let l=Math.round(this.input.hue),c=this.hctsByHue[l],h=this.relativeTemperature(c),d=[c],p=0;for(let m=0;m<360;m++){let D=gt(l+m),x=this.hctsByHue[D],Y=this.relativeTemperature(x),H=Math.abs(Y-h);h=Y,p+=H;}let P=1,k=p/r,b=0;for(h=this.relativeTemperature(c);d.length<r;){let m=gt(l+P),D=this.hctsByHue[m],x=this.relativeTemperature(D),Y=Math.abs(x-h);b+=Y;let H=d.length*k,X=b>=H,Z=1;for(;X&&d.length<r;){d.push(D);let $=(d.length+Z)*k;X=b>=$,Z++;}if(h=x,P++,P>360){for(;d.length<r;)d.push(D);break}}let w=[this.input],v=Math.floor((t-1)/2);for(let m=1;m<v+1;m++){let D=0-m;for(;D<0;)D=d.length+D;D>=d.length&&(D=D%d.length),w.splice(0,0,d[D]);}let T=t-v-1;for(let m=1;m<T+1;m++){let D=m;for(;D<0;)D=d.length+D;D>=d.length&&(D=D%d.length),w.push(d[D]);}return w}get complement(){if(this.complementCache!=null)return this.complementCache;let t=this.coldest.hue,r=this.tempsByHct.get(this.coldest),l=this.warmest.hue,h=this.tempsByHct.get(this.warmest)-r,d=s.isBetween(this.input.hue,t,l),p=d?l:t,P=d?t:l,k=1,b=1e3,w=this.hctsByHue[Math.round(this.input.hue)],v=1-this.inputRelativeTemperature;for(let T=0;T<=360;T+=1){let m=he(p+k*T);if(!s.isBetween(m,p,P))continue;let D=this.hctsByHue[Math.round(m)],x=(this.tempsByHct.get(D)-r)/h,Y=Math.abs(v-x);Y<b&&(b=Y,w=D);}return this.complementCache=w,this.complementCache}relativeTemperature(t){let r=this.tempsByHct.get(this.warmest)-this.tempsByHct.get(this.coldest),l=this.tempsByHct.get(t)-this.tempsByHct.get(this.coldest);return r===0?.5:l/r}get inputRelativeTemperature(){return this.inputRelativeTemperatureCache>=0?this.inputRelativeTemperatureCache:(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input),this.inputRelativeTemperatureCache)}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;let t=this.hctsByHue.concat([this.input]),r=new Map;for(let l of t)r.set(l,s.rawTemperature(l));return this.tempsByHctCache=r,r}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;let t=[];for(let r=0;r<=360;r+=1){let l=F.from(r,this.input.chroma,this.input.tone);t.push(l);}return this.hctsByHueCache=t,this.hctsByHueCache}static isBetween(t,r,l){return r<l?r<=t&&t<=l:r<=t||t<=l}static rawTemperature(t){let r=zr(t.toInt()),l=he(Math.atan2(r[2],r[1])*180/Math.PI),c=Math.sqrt(r[1]*r[1]+r[2]*r[2]);return -0.5+.02*Math.pow(c,1.07)*Math.cos(he(l-50)*Math.PI/180)}};var R=class{constructor(t,r,l,c){this.low=t,this.normal=r,this.medium=l,this.high=c;}get(t){return t<=-1?this.low:t<0?ot(this.low,this.normal,(t- -1)/1):t<.5?ot(this.normal,this.medium,(t-0)/.5):t<1?ot(this.medium,this.high,(t-.5)/.5):this.high}};var q=class{constructor(t,r,l,c,h,d){this.roleA=t,this.roleB=r,this.delta=l,this.polarity=c,this.stayTogether=h,this.constraint=d,this.constraint=d??"exact";}};var f;(function(s){s[s.MONOCHROME=0]="MONOCHROME",s[s.NEUTRAL=1]="NEUTRAL",s[s.TONAL_SPOT=2]="TONAL_SPOT",s[s.VIBRANT=3]="VIBRANT",s[s.EXPRESSIVE=4]="EXPRESSIVE",s[s.FIDELITY=5]="FIDELITY",s[s.CONTENT=6]="CONTENT",s[s.RAINBOW=7]="RAINBOW",s[s.FRUIT_SALAD=8]="FRUIT_SALAD";})(f||(f={}));function St(s){return s.variant===f.FIDELITY||s.variant===f.CONTENT}function se(s){return s.variant===f.MONOCHROME}function Sl(s,t,r,l){let c=r,h=F.from(s,t,r);if(h.chroma<t){let d=h.chroma;for(;h.chroma<t;){c+=l?-1:1;let p=F.from(s,t,c);if(d>p.chroma||Math.abs(p.chroma-t)<.4)break;let P=Math.abs(p.chroma-t),k=Math.abs(h.chroma-t);P<k&&(h=p),d=Math.max(d,p.chroma);}}return c}var ur=class{primaryPaletteKeyColor(){return g.fromPalette({name:"primary_palette_key_color",palette:t=>t.primaryPalette,tone:t=>t.primaryPalette.keyColor.tone})}secondaryPaletteKeyColor(){return g.fromPalette({name:"secondary_palette_key_color",palette:t=>t.secondaryPalette,tone:t=>t.secondaryPalette.keyColor.tone})}tertiaryPaletteKeyColor(){return g.fromPalette({name:"tertiary_palette_key_color",palette:t=>t.tertiaryPalette,tone:t=>t.tertiaryPalette.keyColor.tone})}neutralPaletteKeyColor(){return g.fromPalette({name:"neutral_palette_key_color",palette:t=>t.neutralPalette,tone:t=>t.neutralPalette.keyColor.tone})}neutralVariantPaletteKeyColor(){return g.fromPalette({name:"neutral_variant_palette_key_color",palette:t=>t.neutralVariantPalette,tone:t=>t.neutralVariantPalette.keyColor.tone})}errorPaletteKeyColor(){return g.fromPalette({name:"error_palette_key_color",palette:t=>t.errorPalette,tone:t=>t.errorPalette.keyColor.tone})}background(){return g.fromPalette({name:"background",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}onBackground(){return g.fromPalette({name:"on_background",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.background(),contrastCurve:t=>new R(3,3,4.5,7)})}surface(){return g.fromPalette({name:"surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}surfaceDim(){return g.fromPalette({name:"surface_dim",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:new R(87,87,80,75).get(t.contrastLevel),isBackground:true})}surfaceBright(){return g.fromPalette({name:"surface_bright",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(24,24,29,34).get(t.contrastLevel):98,isBackground:true})}surfaceContainerLowest(){return g.fromPalette({name:"surface_container_lowest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(4,4,2,0).get(t.contrastLevel):100,isBackground:true})}surfaceContainerLow(){return g.fromPalette({name:"surface_container_low",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(10,10,11,12).get(t.contrastLevel):new R(96,96,96,95).get(t.contrastLevel),isBackground:true})}surfaceContainer(){return g.fromPalette({name:"surface_container",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(12,12,16,20).get(t.contrastLevel):new R(94,94,92,90).get(t.contrastLevel),isBackground:true})}surfaceContainerHigh(){return g.fromPalette({name:"surface_container_high",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(17,17,21,25).get(t.contrastLevel):new R(92,92,88,85).get(t.contrastLevel),isBackground:true})}surfaceContainerHighest(){return g.fromPalette({name:"surface_container_highest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(22,22,26,30).get(t.contrastLevel):new R(90,90,84,80).get(t.contrastLevel),isBackground:true})}onSurface(){return g.fromPalette({name:"on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.highestSurface(t),contrastCurve:t=>new R(4.5,7,11,21)})}surfaceVariant(){return g.fromPalette({name:"surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:90,isBackground:true})}onSurfaceVariant(){return g.fromPalette({name:"on_surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?80:30,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,11)})}inverseSurface(){return g.fromPalette({name:"inverse_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:20,isBackground:true})}inverseOnSurface(){return g.fromPalette({name:"inverse_on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?20:95,background:t=>this.inverseSurface(),contrastCurve:t=>new R(4.5,7,11,21)})}outline(){return g.fromPalette({name:"outline",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?60:50,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1.5,3,4.5,7)})}outlineVariant(){return g.fromPalette({name:"outline_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:80,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5)})}shadow(){return g.fromPalette({name:"shadow",palette:t=>t.neutralPalette,tone:t=>0})}scrim(){return g.fromPalette({name:"scrim",palette:t=>t.neutralPalette,tone:t=>0})}surfaceTint(){return g.fromPalette({name:"surface_tint",palette:t=>t.primaryPalette,tone:t=>t.isDark?80:40,isBackground:true})}primary(){return g.fromPalette({name:"primary",palette:t=>t.primaryPalette,tone:t=>se(t)?t.isDark?100:0:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new q(this.primaryContainer(),this.primary(),10,"nearer",false)})}primaryDim(){}onPrimary(){return g.fromPalette({name:"on_primary",palette:t=>t.primaryPalette,tone:t=>se(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.primary(),contrastCurve:t=>new R(4.5,7,11,21)})}primaryContainer(){return g.fromPalette({name:"primary_container",palette:t=>t.primaryPalette,tone:t=>St(t)?t.sourceColorHct.tone:se(t)?t.isDark?85:25:t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.primaryContainer(),this.primary(),10,"nearer",false)})}onPrimaryContainer(){return g.fromPalette({name:"on_primary_container",palette:t=>t.primaryPalette,tone:t=>St(t)?g.foregroundTone(this.primaryContainer().tone(t),4.5):se(t)?t.isDark?0:100:t.isDark?90:30,background:t=>this.primaryContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}inversePrimary(){return g.fromPalette({name:"inverse_primary",palette:t=>t.primaryPalette,tone:t=>t.isDark?40:80,background:t=>this.inverseSurface(),contrastCurve:t=>new R(3,4.5,7,7)})}secondary(){return g.fromPalette({name:"secondary",palette:t=>t.secondaryPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new q(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}secondaryDim(){}onSecondary(){return g.fromPalette({name:"on_secondary",palette:t=>t.secondaryPalette,tone:t=>se(t)?t.isDark?10:100:t.isDark?20:100,background:t=>this.secondary(),contrastCurve:t=>new R(4.5,7,11,21)})}secondaryContainer(){return g.fromPalette({name:"secondary_container",palette:t=>t.secondaryPalette,tone:t=>{let r=t.isDark?30:90;return se(t)?t.isDark?30:85:St(t)?Sl(t.secondaryPalette.hue,t.secondaryPalette.chroma,r,!t.isDark):r},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}onSecondaryContainer(){return g.fromPalette({name:"on_secondary_container",palette:t=>t.secondaryPalette,tone:t=>se(t)?t.isDark?90:10:St(t)?g.foregroundTone(this.secondaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.secondaryContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}tertiary(){return g.fromPalette({name:"tertiary",palette:t=>t.tertiaryPalette,tone:t=>se(t)?t.isDark?90:25:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new q(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}tertiaryDim(){}onTertiary(){return g.fromPalette({name:"on_tertiary",palette:t=>t.tertiaryPalette,tone:t=>se(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.tertiary(),contrastCurve:t=>new R(4.5,7,11,21)})}tertiaryContainer(){return g.fromPalette({name:"tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>{if(se(t))return t.isDark?60:49;if(!St(t))return t.isDark?30:90;let r=t.tertiaryPalette.getHct(t.sourceColorHct.tone);return it.fixIfDisliked(r).tone},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}onTertiaryContainer(){return g.fromPalette({name:"on_tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>se(t)?t.isDark?0:100:St(t)?g.foregroundTone(this.tertiaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.tertiaryContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}error(){return g.fromPalette({name:"error",palette:t=>t.errorPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new q(this.errorContainer(),this.error(),10,"nearer",false)})}errorDim(){}onError(){return g.fromPalette({name:"on_error",palette:t=>t.errorPalette,tone:t=>t.isDark?20:100,background:t=>this.error(),contrastCurve:t=>new R(4.5,7,11,21)})}errorContainer(){return g.fromPalette({name:"error_container",palette:t=>t.errorPalette,tone:t=>t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.errorContainer(),this.error(),10,"nearer",false)})}onErrorContainer(){return g.fromPalette({name:"on_error_container",palette:t=>t.errorPalette,tone:t=>se(t)?t.isDark?90:10:t.isDark?90:30,background:t=>this.errorContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}primaryFixed(){return g.fromPalette({name:"primary_fixed",palette:t=>t.primaryPalette,tone:t=>se(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}primaryFixedDim(){return g.fromPalette({name:"primary_fixed_dim",palette:t=>t.primaryPalette,tone:t=>se(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}onPrimaryFixed(){return g.fromPalette({name:"on_primary_fixed",palette:t=>t.primaryPalette,tone:t=>se(t)?100:10,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new R(4.5,7,11,21)})}onPrimaryFixedVariant(){return g.fromPalette({name:"on_primary_fixed_variant",palette:t=>t.primaryPalette,tone:t=>se(t)?90:30,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new R(3,4.5,7,11)})}secondaryFixed(){return g.fromPalette({name:"secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>se(t)?80:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}secondaryFixedDim(){return g.fromPalette({name:"secondary_fixed_dim",palette:t=>t.secondaryPalette,tone:t=>se(t)?70:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}onSecondaryFixed(){return g.fromPalette({name:"on_secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>10,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new R(4.5,7,11,21)})}onSecondaryFixedVariant(){return g.fromPalette({name:"on_secondary_fixed_variant",palette:t=>t.secondaryPalette,tone:t=>se(t)?25:30,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new R(3,4.5,7,11)})}tertiaryFixed(){return g.fromPalette({name:"tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>se(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}tertiaryFixedDim(){return g.fromPalette({name:"tertiary_fixed_dim",palette:t=>t.tertiaryPalette,tone:t=>se(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}onTertiaryFixed(){return g.fromPalette({name:"on_tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>se(t)?100:10,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new R(4.5,7,11,21)})}onTertiaryFixedVariant(){return g.fromPalette({name:"on_tertiary_fixed_variant",palette:t=>t.tertiaryPalette,tone:t=>se(t)?90:30,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new R(3,4.5,7,11)})}highestSurface(t){return t.isDark?this.surfaceBright():this.surfaceDim()}};function B(s,t=0,r=100,l=1){let c=ea(s.hue,s.chroma*l,100,true);return ce(t,r,c)}function Qe(s,t=0,r=100){let l=ea(s.hue,s.chroma,0,false);return ce(t,r,l)}function ea(s,t,r,l){let c=r,h=F.from(s,t,c);for(;h.chroma<t&&!(r<0||r>100);){r+=l?-1:1;let d=F.from(s,t,r);h.chroma<d.chroma&&(h=d,c=r);}return c}function I(s){return s===1.5?new R(1.5,1.5,3,5.5):s===3?new R(3,3,4.5,7):s===4.5?new R(4.5,4.5,7,11):s===6?new R(6,6,7,11):s===7?new R(7,7,11,21):s===9?new R(9,9,11,21):s===11?new R(11,11,21,21):s===21?new R(21,21,21,21):new R(s,s,7,21)}var hr=class extends ur{surface(){let t=g.fromPalette({name:"surface",palette:r=>r.neutralPalette,tone:r=>(super.surface().tone(r),r.platform==="phone"?r.isDark?4:F.isYellow(r.neutralPalette.hue)?99:r.variant===f.VIBRANT?97:98:0),isBackground:true});return E(super.surface(),"2025",t)}surfaceDim(){let t=g.fromPalette({name:"surface_dim",palette:r=>r.neutralPalette,tone:r=>r.isDark?4:F.isYellow(r.neutralPalette.hue)?90:r.variant===f.VIBRANT?85:87,isBackground:true,chromaMultiplier:r=>{if(!r.isDark){if(r.variant===f.NEUTRAL)return 2.5;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?2.7:1.75;if(r.variant===f.VIBRANT)return 1.36}return 1}});return E(super.surfaceDim(),"2025",t)}surfaceBright(){let t=g.fromPalette({name:"surface_bright",palette:r=>r.neutralPalette,tone:r=>r.isDark?18:F.isYellow(r.neutralPalette.hue)?99:r.variant===f.VIBRANT?97:98,isBackground:true,chromaMultiplier:r=>{if(r.isDark){if(r.variant===f.NEUTRAL)return 2.5;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?2.7:1.75;if(r.variant===f.VIBRANT)return 1.36}return 1}});return E(super.surfaceBright(),"2025",t)}surfaceContainerLowest(){let t=g.fromPalette({name:"surface_container_lowest",palette:r=>r.neutralPalette,tone:r=>r.isDark?0:100,isBackground:true});return E(super.surfaceContainerLowest(),"2025",t)}surfaceContainerLow(){let t=g.fromPalette({name:"surface_container_low",palette:r=>r.neutralPalette,tone:r=>r.platform==="phone"?r.isDark?6:F.isYellow(r.neutralPalette.hue)?98:r.variant===f.VIBRANT?95:96:15,isBackground:true,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 1.3;if(r.variant===f.TONAL_SPOT)return 1.25;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?1.3:1.15;if(r.variant===f.VIBRANT)return 1.08}return 1}});return E(super.surfaceContainerLow(),"2025",t)}surfaceContainer(){let t=g.fromPalette({name:"surface_container",palette:r=>r.neutralPalette,tone:r=>r.platform==="phone"?r.isDark?9:F.isYellow(r.neutralPalette.hue)?96:r.variant===f.VIBRANT?92:94:20,isBackground:true,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 1.6;if(r.variant===f.TONAL_SPOT)return 1.4;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?1.6:1.3;if(r.variant===f.VIBRANT)return 1.15}return 1}});return E(super.surfaceContainer(),"2025",t)}surfaceContainerHigh(){let t=g.fromPalette({name:"surface_container_high",palette:r=>r.neutralPalette,tone:r=>r.platform==="phone"?r.isDark?12:F.isYellow(r.neutralPalette.hue)?94:r.variant===f.VIBRANT?90:92:25,isBackground:true,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 1.9;if(r.variant===f.TONAL_SPOT)return 1.5;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?1.95:1.45;if(r.variant===f.VIBRANT)return 1.22}return 1}});return E(super.surfaceContainerHigh(),"2025",t)}surfaceContainerHighest(){let t=g.fromPalette({name:"surface_container_highest",palette:r=>r.neutralPalette,tone:r=>r.isDark?15:F.isYellow(r.neutralPalette.hue)?92:r.variant===f.VIBRANT?88:90,isBackground:true,chromaMultiplier:r=>r.variant===f.NEUTRAL?2.2:r.variant===f.TONAL_SPOT?1.7:r.variant===f.EXPRESSIVE?F.isYellow(r.neutralPalette.hue)?2.3:1.6:r.variant===f.VIBRANT?1.29:1});return E(super.surfaceContainerHighest(),"2025",t)}onSurface(){let t=g.fromPalette({name:"on_surface",palette:r=>r.neutralPalette,tone:r=>r.variant===f.VIBRANT?B(r.neutralPalette,0,100,1.1):g.getInitialToneFromBackground(l=>l.platform==="phone"?this.highestSurface(l):this.surfaceContainerHigh())(r),chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.isDark&&r.platform==="phone"?I(11):I(9)});return E(super.onSurface(),"2025",t)}onSurfaceVariant(){let t=g.fromPalette({name:"on_surface_variant",palette:r=>r.neutralPalette,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?r.isDark?I(6):I(4.5):I(7)});return E(super.onSurfaceVariant(),"2025",t)}outline(){let t=g.fromPalette({name:"outline",palette:r=>r.neutralPalette,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(3):I(4.5)});return E(super.outline(),"2025",t)}outlineVariant(){let t=g.fromPalette({name:"outline_variant",palette:r=>r.neutralPalette,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(1.5):I(3)});return E(super.outlineVariant(),"2025",t)}inverseSurface(){let t=g.fromPalette({name:"inverse_surface",palette:r=>r.neutralPalette,tone:r=>r.isDark?98:4,isBackground:true});return E(super.inverseSurface(),"2025",t)}inverseOnSurface(){let t=g.fromPalette({name:"inverse_on_surface",palette:r=>r.neutralPalette,background:r=>this.inverseSurface(),contrastCurve:r=>I(7)});return E(super.inverseOnSurface(),"2025",t)}primary(){let t=g.fromPalette({name:"primary",palette:r=>r.primaryPalette,tone:r=>r.variant===f.NEUTRAL?r.platform==="phone"?r.isDark?80:40:90:r.variant===f.TONAL_SPOT?r.platform==="phone"?r.isDark?80:B(r.primaryPalette):B(r.primaryPalette,0,90):r.variant===f.EXPRESSIVE?r.platform==="phone"?B(r.primaryPalette,0,F.isYellow(r.primaryPalette.hue)?25:F.isCyan(r.primaryPalette.hue)?88:98):B(r.primaryPalette):r.platform==="phone"?B(r.primaryPalette,0,F.isCyan(r.primaryPalette.hue)?88:98):B(r.primaryPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7),toneDeltaPair:r=>r.platform==="phone"?new q(this.primaryContainer(),this.primary(),5,"relative_lighter",true,"farther"):void 0});return E(super.primary(),"2025",t)}primaryDim(){return g.fromPalette({name:"primary_dim",palette:t=>t.primaryPalette,tone:t=>t.variant===f.NEUTRAL?85:t.variant===f.TONAL_SPOT?B(t.primaryPalette,0,90):B(t.primaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>I(4.5),toneDeltaPair:t=>new q(this.primaryDim(),this.primary(),5,"darker",true,"farther")})}onPrimary(){let t=g.fromPalette({name:"on_primary",palette:r=>r.primaryPalette,background:r=>r.platform==="phone"?this.primary():this.primaryDim(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onPrimary(),"2025",t)}primaryContainer(){let t=g.fromPalette({name:"primary_container",palette:r=>r.primaryPalette,tone:r=>r.platform==="watch"?30:r.variant===f.NEUTRAL?r.isDark?30:90:r.variant===f.TONAL_SPOT?r.isDark?Qe(r.primaryPalette,35,93):B(r.primaryPalette,0,90):r.variant===f.EXPRESSIVE?r.isDark?B(r.primaryPalette,30,93):B(r.primaryPalette,78,F.isCyan(r.primaryPalette.hue)?88:90):r.isDark?Qe(r.primaryPalette,66,93):B(r.primaryPalette,66,F.isCyan(r.primaryPalette.hue)?88:93),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="phone"?void 0:new q(this.primaryContainer(),this.primaryDim(),10,"darker",true,"farther"),contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.primaryContainer(),"2025",t)}onPrimaryContainer(){let t=g.fromPalette({name:"on_primary_container",palette:r=>r.primaryPalette,background:r=>this.primaryContainer(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onPrimaryContainer(),"2025",t)}primaryFixed(){let t=g.fromPalette({name:"primary_fixed",palette:r=>r.primaryPalette,tone:r=>{let l=Object.assign({},r,{isDark:false,contrastLevel:0});return this.primaryContainer().getTone(l)},isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.primaryFixed(),"2025",t)}primaryFixedDim(){let t=g.fromPalette({name:"primary_fixed_dim",palette:r=>r.primaryPalette,tone:r=>this.primaryFixed().getTone(r),isBackground:true,toneDeltaPair:r=>new q(this.primaryFixedDim(),this.primaryFixed(),5,"darker",true,"exact")});return E(super.primaryFixedDim(),"2025",t)}onPrimaryFixed(){let t=g.fromPalette({name:"on_primary_fixed",palette:r=>r.primaryPalette,background:r=>this.primaryFixedDim(),contrastCurve:r=>I(7)});return E(super.onPrimaryFixed(),"2025",t)}onPrimaryFixedVariant(){let t=g.fromPalette({name:"on_primary_fixed_variant",palette:r=>r.primaryPalette,background:r=>this.primaryFixedDim(),contrastCurve:r=>I(4.5)});return E(super.onPrimaryFixedVariant(),"2025",t)}inversePrimary(){let t=g.fromPalette({name:"inverse_primary",palette:r=>r.primaryPalette,tone:r=>B(r.primaryPalette),background:r=>this.inverseSurface(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.inversePrimary(),"2025",t)}secondary(){let t=g.fromPalette({name:"secondary",palette:r=>r.secondaryPalette,tone:r=>r.platform==="watch"?r.variant===f.NEUTRAL?90:B(r.secondaryPalette,0,90):r.variant===f.NEUTRAL?r.isDark?Qe(r.secondaryPalette,0,98):B(r.secondaryPalette):r.variant===f.VIBRANT?B(r.secondaryPalette,0,r.isDark?90:98):r.isDark?80:B(r.secondaryPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7),toneDeltaPair:r=>r.platform==="phone"?new q(this.secondaryContainer(),this.secondary(),5,"relative_lighter",true,"farther"):void 0});return E(super.secondary(),"2025",t)}secondaryDim(){return g.fromPalette({name:"secondary_dim",palette:t=>t.secondaryPalette,tone:t=>t.variant===f.NEUTRAL?85:B(t.secondaryPalette,0,90),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>I(4.5),toneDeltaPair:t=>new q(this.secondaryDim(),this.secondary(),5,"darker",true,"farther")})}onSecondary(){let t=g.fromPalette({name:"on_secondary",palette:r=>r.secondaryPalette,background:r=>r.platform==="phone"?this.secondary():this.secondaryDim(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onSecondary(),"2025",t)}secondaryContainer(){let t=g.fromPalette({name:"secondary_container",palette:r=>r.secondaryPalette,tone:r=>r.platform==="watch"?30:r.variant===f.VIBRANT?r.isDark?Qe(r.secondaryPalette,30,40):B(r.secondaryPalette,84,90):r.variant===f.EXPRESSIVE?r.isDark?15:B(r.secondaryPalette,90,95):r.isDark?25:90,isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="watch"?new q(this.secondaryContainer(),this.secondaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.secondaryContainer(),"2025",t)}onSecondaryContainer(){let t=g.fromPalette({name:"on_secondary_container",palette:r=>r.secondaryPalette,background:r=>this.secondaryContainer(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onSecondaryContainer(),"2025",t)}secondaryFixed(){let t=g.fromPalette({name:"secondary_fixed",palette:r=>r.secondaryPalette,tone:r=>{let l=Object.assign({},r,{isDark:false,contrastLevel:0});return this.secondaryContainer().getTone(l)},isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.secondaryFixed(),"2025",t)}secondaryFixedDim(){let t=g.fromPalette({name:"secondary_fixed_dim",palette:r=>r.secondaryPalette,tone:r=>this.secondaryFixed().getTone(r),isBackground:true,toneDeltaPair:r=>new q(this.secondaryFixedDim(),this.secondaryFixed(),5,"darker",true,"exact")});return E(super.secondaryFixedDim(),"2025",t)}onSecondaryFixed(){let t=g.fromPalette({name:"on_secondary_fixed",palette:r=>r.secondaryPalette,background:r=>this.secondaryFixedDim(),contrastCurve:r=>I(7)});return E(super.onSecondaryFixed(),"2025",t)}onSecondaryFixedVariant(){let t=g.fromPalette({name:"on_secondary_fixed_variant",palette:r=>r.secondaryPalette,background:r=>this.secondaryFixedDim(),contrastCurve:r=>I(4.5)});return E(super.onSecondaryFixedVariant(),"2025",t)}tertiary(){let t=g.fromPalette({name:"tertiary",palette:r=>r.tertiaryPalette,tone:r=>r.platform==="watch"?r.variant===f.TONAL_SPOT?B(r.tertiaryPalette,0,90):B(r.tertiaryPalette):r.variant===f.EXPRESSIVE||r.variant===f.VIBRANT?B(r.tertiaryPalette,0,F.isCyan(r.tertiaryPalette.hue)?88:r.isDark?98:100):r.isDark?B(r.tertiaryPalette,0,98):B(r.tertiaryPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7),toneDeltaPair:r=>r.platform==="phone"?new q(this.tertiaryContainer(),this.tertiary(),5,"relative_lighter",true,"farther"):void 0});return E(super.tertiary(),"2025",t)}tertiaryDim(){return g.fromPalette({name:"tertiary_dim",palette:t=>t.tertiaryPalette,tone:t=>t.variant===f.TONAL_SPOT?B(t.tertiaryPalette,0,90):B(t.tertiaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>I(4.5),toneDeltaPair:t=>new q(this.tertiaryDim(),this.tertiary(),5,"darker",true,"farther")})}onTertiary(){let t=g.fromPalette({name:"on_tertiary",palette:r=>r.tertiaryPalette,background:r=>r.platform==="phone"?this.tertiary():this.tertiaryDim(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onTertiary(),"2025",t)}tertiaryContainer(){let t=g.fromPalette({name:"tertiary_container",palette:r=>r.tertiaryPalette,tone:r=>r.platform==="watch"?r.variant===f.TONAL_SPOT?B(r.tertiaryPalette,0,90):B(r.tertiaryPalette):r.variant===f.NEUTRAL?r.isDark?B(r.tertiaryPalette,0,93):B(r.tertiaryPalette,0,96):r.variant===f.TONAL_SPOT?B(r.tertiaryPalette,0,r.isDark?93:100):r.variant===f.EXPRESSIVE?B(r.tertiaryPalette,75,F.isCyan(r.tertiaryPalette.hue)?88:r.isDark?93:100):r.isDark?B(r.tertiaryPalette,0,93):B(r.tertiaryPalette,72,100),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="watch"?new q(this.tertiaryContainer(),this.tertiaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.tertiaryContainer(),"2025",t)}onTertiaryContainer(){let t=g.fromPalette({name:"on_tertiary_container",palette:r=>r.tertiaryPalette,background:r=>this.tertiaryContainer(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onTertiaryContainer(),"2025",t)}tertiaryFixed(){let t=g.fromPalette({name:"tertiary_fixed",palette:r=>r.tertiaryPalette,tone:r=>{let l=Object.assign({},r,{isDark:false,contrastLevel:0});return this.tertiaryContainer().getTone(l)},isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.tertiaryFixed(),"2025",t)}tertiaryFixedDim(){let t=g.fromPalette({name:"tertiary_fixed_dim",palette:r=>r.tertiaryPalette,tone:r=>this.tertiaryFixed().getTone(r),isBackground:true,toneDeltaPair:r=>new q(this.tertiaryFixedDim(),this.tertiaryFixed(),5,"darker",true,"exact")});return E(super.tertiaryFixedDim(),"2025",t)}onTertiaryFixed(){let t=g.fromPalette({name:"on_tertiary_fixed",palette:r=>r.tertiaryPalette,background:r=>this.tertiaryFixedDim(),contrastCurve:r=>I(7)});return E(super.onTertiaryFixed(),"2025",t)}onTertiaryFixedVariant(){let t=g.fromPalette({name:"on_tertiary_fixed_variant",palette:r=>r.tertiaryPalette,background:r=>this.tertiaryFixedDim(),contrastCurve:r=>I(4.5)});return E(super.onTertiaryFixedVariant(),"2025",t)}error(){let t=g.fromPalette({name:"error",palette:r=>r.errorPalette,tone:r=>r.platform==="phone"?r.isDark?Qe(r.errorPalette,0,98):B(r.errorPalette):Qe(r.errorPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7),toneDeltaPair:r=>r.platform==="phone"?new q(this.errorContainer(),this.error(),5,"relative_lighter",true,"farther"):void 0});return E(super.error(),"2025",t)}errorDim(){return g.fromPalette({name:"error_dim",palette:t=>t.errorPalette,tone:t=>Qe(t.errorPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>I(4.5),toneDeltaPair:t=>new q(this.errorDim(),this.error(),5,"darker",true,"farther")})}onError(){let t=g.fromPalette({name:"on_error",palette:r=>r.errorPalette,background:r=>r.platform==="phone"?this.error():this.errorDim(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onError(),"2025",t)}errorContainer(){let t=g.fromPalette({name:"error_container",palette:r=>r.errorPalette,tone:r=>r.platform==="watch"?30:r.isDark?Qe(r.errorPalette,30,93):B(r.errorPalette,0,90),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="watch"?new q(this.errorContainer(),this.errorDim(),10,"darker",true,"farther"):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.errorContainer(),"2025",t)}onErrorContainer(){let t=g.fromPalette({name:"on_error_container",palette:r=>r.errorPalette,background:r=>this.errorContainer(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7)});return E(super.onErrorContainer(),"2025",t)}surfaceVariant(){let t=Object.assign(this.surfaceContainerHighest().clone(),{name:"surface_variant"});return E(super.surfaceVariant(),"2025",t)}surfaceTint(){let t=Object.assign(this.primary().clone(),{name:"surface_tint"});return E(super.surfaceTint(),"2025",t)}background(){let t=Object.assign(this.surface().clone(),{name:"background"});return E(super.background(),"2025",t)}onBackground(){let t=Object.assign(this.onSurface().clone(),{name:"on_background",tone:r=>r.platform==="watch"?100:this.onSurface().getTone(r)});return E(super.onBackground(),"2025",t)}};var S=class s{constructor(){this.allColors=[this.background(),this.onBackground(),this.surface(),this.surfaceDim(),this.surfaceBright(),this.surfaceContainerLowest(),this.surfaceContainerLow(),this.surfaceContainer(),this.surfaceContainerHigh(),this.surfaceContainerHighest(),this.onSurface(),this.onSurfaceVariant(),this.outline(),this.outlineVariant(),this.inverseSurface(),this.inverseOnSurface(),this.primary(),this.primaryDim(),this.onPrimary(),this.primaryContainer(),this.onPrimaryContainer(),this.primaryFixed(),this.primaryFixedDim(),this.onPrimaryFixed(),this.onPrimaryFixedVariant(),this.inversePrimary(),this.secondary(),this.secondaryDim(),this.onSecondary(),this.secondaryContainer(),this.onSecondaryContainer(),this.secondaryFixed(),this.secondaryFixedDim(),this.onSecondaryFixed(),this.onSecondaryFixedVariant(),this.tertiary(),this.tertiaryDim(),this.onTertiary(),this.tertiaryContainer(),this.onTertiaryContainer(),this.tertiaryFixed(),this.tertiaryFixedDim(),this.onTertiaryFixed(),this.onTertiaryFixedVariant(),this.error(),this.errorDim(),this.onError(),this.errorContainer(),this.onErrorContainer()].filter(t=>t!==void 0);}highestSurface(t){return s.colorSpec.highestSurface(t)}primaryPaletteKeyColor(){return s.colorSpec.primaryPaletteKeyColor()}secondaryPaletteKeyColor(){return s.colorSpec.secondaryPaletteKeyColor()}tertiaryPaletteKeyColor(){return s.colorSpec.tertiaryPaletteKeyColor()}neutralPaletteKeyColor(){return s.colorSpec.neutralPaletteKeyColor()}neutralVariantPaletteKeyColor(){return s.colorSpec.neutralVariantPaletteKeyColor()}errorPaletteKeyColor(){return s.colorSpec.errorPaletteKeyColor()}background(){return s.colorSpec.background()}onBackground(){return s.colorSpec.onBackground()}surface(){return s.colorSpec.surface()}surfaceDim(){return s.colorSpec.surfaceDim()}surfaceBright(){return s.colorSpec.surfaceBright()}surfaceContainerLowest(){return s.colorSpec.surfaceContainerLowest()}surfaceContainerLow(){return s.colorSpec.surfaceContainerLow()}surfaceContainer(){return s.colorSpec.surfaceContainer()}surfaceContainerHigh(){return s.colorSpec.surfaceContainerHigh()}surfaceContainerHighest(){return s.colorSpec.surfaceContainerHighest()}onSurface(){return s.colorSpec.onSurface()}surfaceVariant(){return s.colorSpec.surfaceVariant()}onSurfaceVariant(){return s.colorSpec.onSurfaceVariant()}outline(){return s.colorSpec.outline()}outlineVariant(){return s.colorSpec.outlineVariant()}inverseSurface(){return s.colorSpec.inverseSurface()}inverseOnSurface(){return s.colorSpec.inverseOnSurface()}shadow(){return s.colorSpec.shadow()}scrim(){return s.colorSpec.scrim()}surfaceTint(){return s.colorSpec.surfaceTint()}primary(){return s.colorSpec.primary()}primaryDim(){return s.colorSpec.primaryDim()}onPrimary(){return s.colorSpec.onPrimary()}primaryContainer(){return s.colorSpec.primaryContainer()}onPrimaryContainer(){return s.colorSpec.onPrimaryContainer()}inversePrimary(){return s.colorSpec.inversePrimary()}primaryFixed(){return s.colorSpec.primaryFixed()}primaryFixedDim(){return s.colorSpec.primaryFixedDim()}onPrimaryFixed(){return s.colorSpec.onPrimaryFixed()}onPrimaryFixedVariant(){return s.colorSpec.onPrimaryFixedVariant()}secondary(){return s.colorSpec.secondary()}secondaryDim(){return s.colorSpec.secondaryDim()}onSecondary(){return s.colorSpec.onSecondary()}secondaryContainer(){return s.colorSpec.secondaryContainer()}onSecondaryContainer(){return s.colorSpec.onSecondaryContainer()}secondaryFixed(){return s.colorSpec.secondaryFixed()}secondaryFixedDim(){return s.colorSpec.secondaryFixedDim()}onSecondaryFixed(){return s.colorSpec.onSecondaryFixed()}onSecondaryFixedVariant(){return s.colorSpec.onSecondaryFixedVariant()}tertiary(){return s.colorSpec.tertiary()}tertiaryDim(){return s.colorSpec.tertiaryDim()}onTertiary(){return s.colorSpec.onTertiary()}tertiaryContainer(){return s.colorSpec.tertiaryContainer()}onTertiaryContainer(){return s.colorSpec.onTertiaryContainer()}tertiaryFixed(){return s.colorSpec.tertiaryFixed()}tertiaryFixedDim(){return s.colorSpec.tertiaryFixedDim()}onTertiaryFixed(){return s.colorSpec.onTertiaryFixed()}onTertiaryFixedVariant(){return s.colorSpec.onTertiaryFixedVariant()}error(){return s.colorSpec.error()}errorDim(){return s.colorSpec.errorDim()}onError(){return s.colorSpec.onError()}errorContainer(){return s.colorSpec.errorContainer()}onErrorContainer(){return s.colorSpec.onErrorContainer()}static highestSurface(t){return s.colorSpec.highestSurface(t)}};S.contentAccentToneDelta=15;S.colorSpec=new hr;S.primaryPaletteKeyColor=S.colorSpec.primaryPaletteKeyColor();S.secondaryPaletteKeyColor=S.colorSpec.secondaryPaletteKeyColor();S.tertiaryPaletteKeyColor=S.colorSpec.tertiaryPaletteKeyColor();S.neutralPaletteKeyColor=S.colorSpec.neutralPaletteKeyColor();S.neutralVariantPaletteKeyColor=S.colorSpec.neutralVariantPaletteKeyColor();S.background=S.colorSpec.background();S.onBackground=S.colorSpec.onBackground();S.surface=S.colorSpec.surface();S.surfaceDim=S.colorSpec.surfaceDim();S.surfaceBright=S.colorSpec.surfaceBright();S.surfaceContainerLowest=S.colorSpec.surfaceContainerLowest();S.surfaceContainerLow=S.colorSpec.surfaceContainerLow();S.surfaceContainer=S.colorSpec.surfaceContainer();S.surfaceContainerHigh=S.colorSpec.surfaceContainerHigh();S.surfaceContainerHighest=S.colorSpec.surfaceContainerHighest();S.onSurface=S.colorSpec.onSurface();S.surfaceVariant=S.colorSpec.surfaceVariant();S.onSurfaceVariant=S.colorSpec.onSurfaceVariant();S.inverseSurface=S.colorSpec.inverseSurface();S.inverseOnSurface=S.colorSpec.inverseOnSurface();S.outline=S.colorSpec.outline();S.outlineVariant=S.colorSpec.outlineVariant();S.shadow=S.colorSpec.shadow();S.scrim=S.colorSpec.scrim();S.surfaceTint=S.colorSpec.surfaceTint();S.primary=S.colorSpec.primary();S.onPrimary=S.colorSpec.onPrimary();S.primaryContainer=S.colorSpec.primaryContainer();S.onPrimaryContainer=S.colorSpec.onPrimaryContainer();S.inversePrimary=S.colorSpec.inversePrimary();S.secondary=S.colorSpec.secondary();S.onSecondary=S.colorSpec.onSecondary();S.secondaryContainer=S.colorSpec.secondaryContainer();S.onSecondaryContainer=S.colorSpec.onSecondaryContainer();S.tertiary=S.colorSpec.tertiary();S.onTertiary=S.colorSpec.onTertiary();S.tertiaryContainer=S.colorSpec.tertiaryContainer();S.onTertiaryContainer=S.colorSpec.onTertiaryContainer();S.error=S.colorSpec.error();S.onError=S.colorSpec.onError();S.errorContainer=S.colorSpec.errorContainer();S.onErrorContainer=S.colorSpec.onErrorContainer();S.primaryFixed=S.colorSpec.primaryFixed();S.primaryFixedDim=S.colorSpec.primaryFixedDim();S.onPrimaryFixed=S.colorSpec.onPrimaryFixed();S.onPrimaryFixedVariant=S.colorSpec.onPrimaryFixedVariant();S.secondaryFixed=S.colorSpec.secondaryFixed();S.secondaryFixedDim=S.colorSpec.secondaryFixedDim();S.onSecondaryFixed=S.colorSpec.onSecondaryFixed();S.onSecondaryFixedVariant=S.colorSpec.onSecondaryFixedVariant();S.tertiaryFixed=S.colorSpec.tertiaryFixed();S.tertiaryFixedDim=S.colorSpec.tertiaryFixedDim();S.onTertiaryFixed=S.colorSpec.onTertiaryFixed();S.onTertiaryFixedVariant=S.colorSpec.onTertiaryFixedVariant();var J=class s{static maybeFallbackSpecVersion(t,r){switch(r){case f.EXPRESSIVE:case f.VIBRANT:case f.TONAL_SPOT:case f.NEUTRAL:return t;default:return "2021"}}constructor(t){this.sourceColorArgb=t.sourceColorHct.toInt(),this.variant=t.variant,this.contrastLevel=t.contrastLevel,this.isDark=t.isDark,this.platform=t.platform??"phone",this.specVersion=s.maybeFallbackSpecVersion(t.specVersion??"2021",this.variant),this.sourceColorHct=t.sourceColorHct,this.primaryPalette=t.primaryPalette??kt(this.specVersion).getPrimaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.secondaryPalette=t.secondaryPalette??kt(this.specVersion).getSecondaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.tertiaryPalette=t.tertiaryPalette??kt(this.specVersion).getTertiaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralPalette=t.neutralPalette??kt(this.specVersion).getNeutralPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralVariantPalette=t.neutralVariantPalette??kt(this.specVersion).getNeutralVariantPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.errorPalette=t.errorPalette??kt(this.specVersion).getErrorPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel)??_.fromHueAndChroma(25,84),this.colors=new S;}toString(){return `Scheme: variant=${f[this.variant]}, mode=${this.isDark?"dark":"light"}, platform=${this.platform}, contrastLevel=${this.contrastLevel.toFixed(1)}, seed=${this.sourceColorHct.toString()}, specVersion=${this.specVersion}`}static getPiecewiseHue(t,r,l){let c=Math.min(r.length-1,l.length),h=t.hue;for(let d=0;d<c;d++)if(h>=r[d]&&h<r[d+1])return he(l[d]);return h}static getRotatedHue(t,r,l){let c=s.getPiecewiseHue(t,r,l);return Math.min(r.length-1,l.length)<=0&&(c=0),he(t.hue+c)}getArgb(t){return t.getArgb(this)}getHct(t){return t.getHct(this)}get primaryPaletteKeyColor(){return this.getArgb(this.colors.primaryPaletteKeyColor())}get secondaryPaletteKeyColor(){return this.getArgb(this.colors.secondaryPaletteKeyColor())}get tertiaryPaletteKeyColor(){return this.getArgb(this.colors.tertiaryPaletteKeyColor())}get neutralPaletteKeyColor(){return this.getArgb(this.colors.neutralPaletteKeyColor())}get neutralVariantPaletteKeyColor(){return this.getArgb(this.colors.neutralVariantPaletteKeyColor())}get errorPaletteKeyColor(){return this.getArgb(this.colors.errorPaletteKeyColor())}get background(){return this.getArgb(this.colors.background())}get onBackground(){return this.getArgb(this.colors.onBackground())}get surface(){return this.getArgb(this.colors.surface())}get surfaceDim(){return this.getArgb(this.colors.surfaceDim())}get surfaceBright(){return this.getArgb(this.colors.surfaceBright())}get surfaceContainerLowest(){return this.getArgb(this.colors.surfaceContainerLowest())}get surfaceContainerLow(){return this.getArgb(this.colors.surfaceContainerLow())}get surfaceContainer(){return this.getArgb(this.colors.surfaceContainer())}get surfaceContainerHigh(){return this.getArgb(this.colors.surfaceContainerHigh())}get surfaceContainerHighest(){return this.getArgb(this.colors.surfaceContainerHighest())}get onSurface(){return this.getArgb(this.colors.onSurface())}get surfaceVariant(){return this.getArgb(this.colors.surfaceVariant())}get onSurfaceVariant(){return this.getArgb(this.colors.onSurfaceVariant())}get inverseSurface(){return this.getArgb(this.colors.inverseSurface())}get inverseOnSurface(){return this.getArgb(this.colors.inverseOnSurface())}get outline(){return this.getArgb(this.colors.outline())}get outlineVariant(){return this.getArgb(this.colors.outlineVariant())}get shadow(){return this.getArgb(this.colors.shadow())}get scrim(){return this.getArgb(this.colors.scrim())}get surfaceTint(){return this.getArgb(this.colors.surfaceTint())}get primary(){return this.getArgb(this.colors.primary())}get primaryDim(){let t=this.colors.primaryDim();if(t===void 0)throw new Error("`primaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onPrimary(){return this.getArgb(this.colors.onPrimary())}get primaryContainer(){return this.getArgb(this.colors.primaryContainer())}get onPrimaryContainer(){return this.getArgb(this.colors.onPrimaryContainer())}get primaryFixed(){return this.getArgb(this.colors.primaryFixed())}get primaryFixedDim(){return this.getArgb(this.colors.primaryFixedDim())}get onPrimaryFixed(){return this.getArgb(this.colors.onPrimaryFixed())}get onPrimaryFixedVariant(){return this.getArgb(this.colors.onPrimaryFixedVariant())}get inversePrimary(){return this.getArgb(this.colors.inversePrimary())}get secondary(){return this.getArgb(this.colors.secondary())}get secondaryDim(){let t=this.colors.secondaryDim();if(t===void 0)throw new Error("`secondaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onSecondary(){return this.getArgb(this.colors.onSecondary())}get secondaryContainer(){return this.getArgb(this.colors.secondaryContainer())}get onSecondaryContainer(){return this.getArgb(this.colors.onSecondaryContainer())}get secondaryFixed(){return this.getArgb(this.colors.secondaryFixed())}get secondaryFixedDim(){return this.getArgb(this.colors.secondaryFixedDim())}get onSecondaryFixed(){return this.getArgb(this.colors.onSecondaryFixed())}get onSecondaryFixedVariant(){return this.getArgb(this.colors.onSecondaryFixedVariant())}get tertiary(){return this.getArgb(this.colors.tertiary())}get tertiaryDim(){let t=this.colors.tertiaryDim();if(t===void 0)throw new Error("`tertiaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onTertiary(){return this.getArgb(this.colors.onTertiary())}get tertiaryContainer(){return this.getArgb(this.colors.tertiaryContainer())}get onTertiaryContainer(){return this.getArgb(this.colors.onTertiaryContainer())}get tertiaryFixed(){return this.getArgb(this.colors.tertiaryFixed())}get tertiaryFixedDim(){return this.getArgb(this.colors.tertiaryFixedDim())}get onTertiaryFixed(){return this.getArgb(this.colors.onTertiaryFixed())}get onTertiaryFixedVariant(){return this.getArgb(this.colors.onTertiaryFixedVariant())}get error(){return this.getArgb(this.colors.error())}get errorDim(){let t=this.colors.errorDim();if(t===void 0)throw new Error("`errorDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onError(){return this.getArgb(this.colors.onError())}get errorContainer(){return this.getArgb(this.colors.errorContainer())}get onErrorContainer(){return this.getArgb(this.colors.onErrorContainer())}};J.DEFAULT_SPEC_VERSION="2021";J.DEFAULT_PLATFORM="phone";var dr=class{getPrimaryPalette(t,r,l,c,h){switch(t){case f.CONTENT:case f.FIDELITY:return _.fromHueAndChroma(r.hue,r.chroma);case f.FRUIT_SALAD:return _.fromHueAndChroma(he(r.hue-50),48);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,12);case f.RAINBOW:return _.fromHueAndChroma(r.hue,48);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,36);case f.EXPRESSIVE:return _.fromHueAndChroma(he(r.hue+240),40);case f.VIBRANT:return _.fromHueAndChroma(r.hue,200);default:throw new Error(`Unsupported variant: ${t}`)}}getSecondaryPalette(t,r,l,c,h){switch(t){case f.CONTENT:case f.FIDELITY:return _.fromHueAndChroma(r.hue,Math.max(r.chroma-32,r.chroma*.5));case f.FRUIT_SALAD:return _.fromHueAndChroma(he(r.hue-50),36);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,8);case f.RAINBOW:return _.fromHueAndChroma(r.hue,16);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,16);case f.EXPRESSIVE:return _.fromHueAndChroma(J.getRotatedHue(r,[0,21,51,121,151,191,271,321,360],[45,95,45,20,45,90,45,45,45]),24);case f.VIBRANT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,41,61,101,131,181,251,301,360],[18,15,10,12,15,18,15,12,12]),24);default:throw new Error(`Unsupported variant: ${t}`)}}getTertiaryPalette(t,r,l,c,h){switch(t){case f.CONTENT:return _.fromHct(it.fixIfDisliked(new Lt(r).analogous(3,6)[2]));case f.FIDELITY:return _.fromHct(it.fixIfDisliked(new Lt(r).complement));case f.FRUIT_SALAD:return _.fromHueAndChroma(r.hue,36);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,16);case f.RAINBOW:case f.TONAL_SPOT:return _.fromHueAndChroma(he(r.hue+60),24);case f.EXPRESSIVE:return _.fromHueAndChroma(J.getRotatedHue(r,[0,21,51,121,151,191,271,321,360],[120,120,20,45,20,15,20,120,120]),32);case f.VIBRANT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,41,61,101,131,181,251,301,360],[35,30,20,25,30,35,30,25,25]),32);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralPalette(t,r,l,c,h){switch(t){case f.CONTENT:case f.FIDELITY:return _.fromHueAndChroma(r.hue,r.chroma/8);case f.FRUIT_SALAD:return _.fromHueAndChroma(r.hue,10);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,2);case f.RAINBOW:return _.fromHueAndChroma(r.hue,0);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,6);case f.EXPRESSIVE:return _.fromHueAndChroma(he(r.hue+15),8);case f.VIBRANT:return _.fromHueAndChroma(r.hue,10);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralVariantPalette(t,r,l,c,h){switch(t){case f.CONTENT:return _.fromHueAndChroma(r.hue,r.chroma/8+4);case f.FIDELITY:return _.fromHueAndChroma(r.hue,r.chroma/8+4);case f.FRUIT_SALAD:return _.fromHueAndChroma(r.hue,16);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,2);case f.RAINBOW:return _.fromHueAndChroma(r.hue,0);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,8);case f.EXPRESSIVE:return _.fromHueAndChroma(he(r.hue+15),12);case f.VIBRANT:return _.fromHueAndChroma(r.hue,12);default:throw new Error(`Unsupported variant: ${t}`)}}getErrorPalette(t,r,l,c,h){}},qr=class s extends dr{getPrimaryPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,c==="phone"?F.isBlue(r.hue)?12:8:F.isBlue(r.hue)?16:12);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,c==="phone"&&l?26:32);case f.EXPRESSIVE:return _.fromHueAndChroma(r.hue,c==="phone"?l?36:48:40);case f.VIBRANT:return _.fromHueAndChroma(r.hue,c==="phone"?74:56);default:return super.getPrimaryPalette(t,r,l,c,h)}}getSecondaryPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,c==="phone"?F.isBlue(r.hue)?6:4:F.isBlue(r.hue)?10:6);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,16);case f.EXPRESSIVE:return _.fromHueAndChroma(J.getRotatedHue(r,[0,105,140,204,253,278,300,333,360],[-160,155,-100,96,-96,-156,-165,-160]),c==="phone"&&l?16:24);case f.VIBRANT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,38,105,140,333,360],[-14,10,-14,10,-14]),c==="phone"?56:36);default:return super.getSecondaryPalette(t,r,l,c,h)}}getTertiaryPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(J.getRotatedHue(r,[0,38,105,161,204,278,333,360],[-32,26,10,-39,24,-15,-32]),c==="phone"?20:36);case f.TONAL_SPOT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,20,71,161,333,360],[-40,48,-32,40,-32]),c==="phone"?28:32);case f.EXPRESSIVE:return _.fromHueAndChroma(J.getRotatedHue(r,[0,105,140,204,253,278,300,333,360],[-165,160,-105,101,-101,-160,-170,-165]),48);case f.VIBRANT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,38,71,105,140,161,253,333,360],[-72,35,24,-24,62,50,62,-72]),56);default:return super.getTertiaryPalette(t,r,l,c,h)}}static getExpressiveNeutralHue(t){return J.getRotatedHue(t,[0,71,124,253,278,300,360],[10,0,10,0,10,0])}static getExpressiveNeutralChroma(t,r,l){let c=s.getExpressiveNeutralHue(t);return l==="phone"?r?F.isYellow(c)?6:14:18:12}static getVibrantNeutralHue(t){return J.getRotatedHue(t,[0,38,105,140,333,360],[-14,10,-14,10,-14])}static getVibrantNeutralChroma(t,r){let l=s.getVibrantNeutralHue(t);return r==="phone"||F.isBlue(l)?28:20}getNeutralPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,c==="phone"?1.4:6);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,c==="phone"?5:10);case f.EXPRESSIVE:return _.fromHueAndChroma(s.getExpressiveNeutralHue(r),s.getExpressiveNeutralChroma(r,l,c));case f.VIBRANT:return _.fromHueAndChroma(s.getVibrantNeutralHue(r),s.getVibrantNeutralChroma(r,c));default:return super.getNeutralPalette(t,r,l,c,h)}}getNeutralVariantPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,(c==="phone"?1.4:6)*2.2);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,(c==="phone"?5:10)*1.7);case f.EXPRESSIVE:let d=s.getExpressiveNeutralHue(r),p=s.getExpressiveNeutralChroma(r,l,c);return _.fromHueAndChroma(d,p*(d>=105&&d<125?1.6:2.3));case f.VIBRANT:let P=s.getVibrantNeutralHue(r),k=s.getVibrantNeutralChroma(r,c);return _.fromHueAndChroma(P,k*1.29);default:return super.getNeutralVariantPalette(t,r,l,c,h)}}getErrorPalette(t,r,l,c,h){let d=J.getPiecewiseHue(r,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);switch(t){case f.NEUTRAL:return _.fromHueAndChroma(d,c==="phone"?50:40);case f.TONAL_SPOT:return _.fromHueAndChroma(d,c==="phone"?60:48);case f.EXPRESSIVE:return _.fromHueAndChroma(d,c==="phone"?64:48);case f.VIBRANT:return _.fromHueAndChroma(d,c==="phone"?80:60);default:return super.getErrorPalette(t,r,l,c,h)}}},kl=new dr,Pl=new qr;function kt(s){return s==="2025"?Pl:kl}var fr=class extends J{constructor(t,r,l,c=J.DEFAULT_SPEC_VERSION,h=J.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:f.VIBRANT,contrastLevel:l,isDark:r,platform:h,specVersion:c});}};function Kr(s){let t=Rt(s),r=It(s),l=Et(s),c=[t.toString(16),r.toString(16),l.toString(16)];for(let[h,d]of c.entries())d.length===1&&(c[h]="0"+d);return "#"+c.join("")}function ra(s){s=s.replace("#","");let t=s.length===3,r=s.length===6,l=s.length===8;if(!t&&!r&&!l)throw new Error("unexpected hex "+s);let c=0,h=0,d=0;return t?(c=je(s.slice(0,1).repeat(2)),h=je(s.slice(1,2).repeat(2)),d=je(s.slice(2,3).repeat(2))):r?(c=je(s.slice(0,2)),h=je(s.slice(2,4)),d=je(s.slice(4,6))):l&&(c=je(s.slice(2,4)),h=je(s.slice(4,6)),d=je(s.slice(6,8))),(255<<24|(c&255)<<16|(h&255)<<8|d&255)>>>0}function je(s){return parseInt(s,16)}function Pt(s,t){let r=F.fromInt(ra(s)),l=new fr(r,t,0),c={},h=["primary","onPrimary","primaryContainer","onPrimaryContainer","secondary","onSecondary","secondaryContainer","onSecondaryContainer","tertiary","onTertiary","tertiaryContainer","onTertiaryContainer","error","onError","errorContainer","onErrorContainer","background","onBackground","surface","onSurface","surfaceVariant","onSurfaceVariant","outline","outlineVariant","shadow","scrim","inverseSurface","inverseOnSurface","inversePrimary","surfaceDim","surfaceBright","surfaceContainerLowest","surfaceContainerLow","surfaceContainer","surfaceContainerHigh","surfaceContainerHighest"];for(let d of h){let p=S[d];p&&(c[d]=Kr(p.getArgb(l)));}return c}function Bh(s,t){let r=s.replace("#",""),l=parseInt(r.substring(0,2),16),c=parseInt(r.substring(2,4),16),h=parseInt(r.substring(4,6),16);return `rgba(${l}, ${c}, ${h}, ${t})`}function na(s,t){let r=0,l=0,c=0;return s.length===4?(r=parseInt(s[1]+s[1],16),l=parseInt(s[2]+s[2],16),c=parseInt(s[3]+s[3],16)):s.length===7&&(r=parseInt(s.slice(1,3),16),l=parseInt(s.slice(3,5),16),c=parseInt(s.slice(5,7),16)),`rgba(${r}, ${l}, ${c}, ${t})`}function Hh(s){let t=s.replace("#",""),r=parseInt(t.substring(0,2),16),l=parseInt(t.substring(2,4),16),c=parseInt(t.substring(4,6),16);return .2126*r+.7152*l+.0722*c<128}var oa=react.createContext(null),_l=Pt("#6750A4",false),Gh=({children:s,seedColor:t="#6750A4",defaultColorScheme:r="auto"})=>{let l=react.useRef(t),[c,h]=react.useState(r),[d,p]=react.useState(()=>{let k=r==="dark";return r==="auto"&&typeof window<"u"&&(k=window.matchMedia("(prefers-color-scheme: dark)").matches),Pt(l.current,k)});react.useEffect(()=>{if(c==="auto"&&typeof window<"u"){let k=window.matchMedia("(prefers-color-scheme: dark)"),b=w=>{p(Pt(l.current,w.matches));};return k.addEventListener("change",b),()=>k.removeEventListener("change",b)}},[c]);let P=react.useMemo(()=>({themeColors:d,systemTheme:c,setThemeColors:k=>{l.current=k;let b=c==="dark";c==="auto"&&(b=typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:false),p(Pt(k,b));},setColorScheme:k=>{h(k);let b=k==="dark";k==="auto"&&(b=typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:false),p(Pt(l.current,b));}}),[d,c]);return jsxRuntime.jsx(oa.Provider,{value:P,children:s})},jh=()=>{let s=react.useContext(oa);return s||{themeColors:_l,systemTheme:"auto",setThemeColors:()=>{throw new Error("[@zaide6137/m3-components-web] Wrap your app in <ThemeProvider>.")},setColorScheme:()=>{throw new Error("[@zaide6137/m3-components-web] Wrap your app in <ThemeProvider>.")}}};var yr=jn(Zr());var Jr=jn(Zr());var sa=react.forwardRef((s,t)=>{let{className:r,shape:l,type:c,hoverEffect:h=true,text:d,icon:p,onClick:P,disabled:k,loading:b=false}=s,{themeColors:w}=m3ComponentsWeb.useGlobalTheme(),v=k?c==="filled"?{backgroundColor:m3ComponentsWeb.hexToArgba(w.onSurface,.12),color:m3ComponentsWeb.hexToArgba(w.onSurface,.38),border:"none"}:{backgroundColor:"transparent",color:m3ComponentsWeb.hexToArgba(w.onSurface,.38),border:`1px solid ${m3ComponentsWeb.hexToArgba(w.onSurface,.12)}`}:c==="filled"?{backgroundColor:w.primary,color:w.onPrimary,border:"none"}:{backgroundColor:"transparent",color:w.primary,border:`1px solid ${w.primary}`},T=40,m=l==="rounded-full"?32:l==="rounded-lg"?12:l==="rounded-md"?8:4;return jsxRuntime.jsx(framerMotion.motion.button,{disabled:k||b,onClick:!k&&!b?P:void 0,className:`${r||""} m3-components-button`,style:{backgroundColor:v.backgroundColor,color:v.color,border:v.border,borderRadius:"40px"},initial:{borderRadius:T},animate:{borderRadius:T},whileHover:!k&&!b&&h?{borderRadius:m,backgroundColor:c==="outlined"?m3ComponentsWeb.hexToArgba(w.primary,.08):w.primary}:{},transition:{ease:["easeIn","easeOut"],duration:.2},children:jsxRuntime.jsxs("div",{className:"m3-components-button-content",children:[b&&jsxRuntime.jsx("span",{style:{marginRight:"4px"},children:"... "}),p&&jsxRuntime.jsx("span",{className:"m3-components-button-icon",children:p}),jsxRuntime.jsx("span",{className:"m3-components-button-text",children:d})]})})});var la=({date:s,onPrev:t,onNext:r,onToday:l,view:c,onViewChange:h})=>{let{themeColors:d}=m3ComponentsWeb.useGlobalTheme(),[p,P]=react.useState(false),k=(0, Jr.default)(),b=k.format("MMM").toUpperCase(),w=k.format("DD"),v=(0, Jr.default)(s).format("MMMM YYYY"),T=Math.ceil(k.date()/7),m=c.charAt(0).toUpperCase()+c.slice(1);return jsxRuntime.jsxs("div",{className:"m3-components-bigcalendar-toolbar-wrapper",children:[jsxRuntime.jsxs("div",{className:"m3-components-bigcalendar-toolbar-left-content",children:[jsxRuntime.jsxs("div",{className:"m3-components-bigcalendar-toolbar-date-badge",style:{backgroundColor:d.surfaceContainerLowest,borderColor:d.outlineVariant},children:[jsxRuntime.jsx("div",{className:"m3-components-bigcalendar-toolbar-badge-header",style:{backgroundColor:d.primary},children:jsxRuntime.jsx("span",{className:"m3-components-bigcalendar-toolbar-badge-month-text",style:{color:d.onPrimary},children:b})}),jsxRuntime.jsx("span",{className:"m3-components-bigcalendar-toolbar-badge-day-text",style:{color:d.onSurface},children:w})]}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("h1",{className:"text-xl font-bold",style:{color:d.onSurface},children:v}),jsxRuntime.jsxs("span",{className:"m3-components-bigcalendar-toolbar-week-chip",style:{color:d.onSurfaceVariant,borderColor:d.outlineVariant},children:["Week ",T]})]})]}),jsxRuntime.jsxs("div",{className:"m3-components-bigcalendar-toolbar-right-content",children:[jsxRuntime.jsxs("div",{className:"m3-components-bigcalendar-toolbar-nav-segmented",style:{borderColor:d.outlineVariant},children:[jsxRuntime.jsx("button",{onClick:t,className:"m3-components-bigcalendar-toolbar-nav-btn m3-components-bigcalendar-toolbar-border-separator-right",style:{borderColor:d.outlineVariant,color:d.onSurface},children:jsxRuntime.jsx(jsxRuntime.Fragment,{})}),jsxRuntime.jsx("button",{onClick:l,className:"m3-components-bigcalendar-toolbar-nav-btn m3-components-bigcalendar-toolbar-today-btn",style:{color:d.onSurface},children:"Today"}),jsxRuntime.jsx("button",{onClick:r,className:"m3-components-bigcalendar-toolbar-nav-btn m3-components-bigcalendar-toolbar-border-separator-left",style:{borderColor:d.outlineVariant,color:d.onSurface},children:jsxRuntime.jsx(jsxRuntime.Fragment,{})})]}),jsxRuntime.jsxs("div",{className:"m3-components-bigcalendar-toolbar-dropdown-host",children:[jsxRuntime.jsxs("button",{onClick:()=>P(!p),className:"m3-components-bigcalendar-toolbar-dropdown-toggle",style:{borderColor:d.outlineVariant,color:d.onSurface},children:[m,jsxRuntime.jsx("svg",{className:`m3-components-bigcalendar-toolbar-icon-rotate ${p?"m3-components-bigcalendar-toolbar-icon-rotate-active":""}`})]}),jsxRuntime.jsx(framerMotion.AnimatePresence,{children:p&&jsxRuntime.jsx(framerMotion.motion.div,{className:"m3-components-bigcalendar-toolbar-dropdown-panel",style:{backgroundColor:d.surfaceContainerHigh,borderColor:d.outlineVariant},children:["month","week","day"].map(D=>jsxRuntime.jsx("button",{onClick:()=>h(D),className:"m3-components-bigcalendar-toolbar-dropdown-option",style:{color:c===D?d.primary:d.onSurface},children:D.charAt(0).toUpperCase()+D.slice(1)},D))})})]}),jsxRuntime.jsx(sa,{type:"filled",shape:"rounded-md",text:"+ Create",onClick:()=>{},className:"m3-components-bigcalendar-toolbar-create-btn"})]})]})};var ua=({event:s,onMouseEnter:t,onMouseLeave:r})=>{let l=s.resource,c=l.eventStyleFilled??true,h=l.eventStyle||{backgroundColor:l.eventSeedColor||"#6750A4",contentColor:"#FFFFFF"},d=c?h.backgroundColor:m3ComponentsWeb.hexToArgba(h.backgroundColor,.15),p=c?"transparent":h.backgroundColor,P=c?h.contentColor:h.backgroundColor,k=react.useRef(null),[b,w]=react.useState(1e3);react.useEffect(()=>{if(!k.current)return;let T=new ResizeObserver(m=>{window.requestAnimationFrame(()=>{m[0]&&w(m[0].contentRect.width);});});return T.observe(k.current),()=>T.disconnect()},[]);let v=b<120;return jsxRuntime.jsx("div",{ref:k,className:"m3-components-bigcalendar-event-root",children:v?jsxRuntime.jsx(framerMotion.motion.div,{className:"m3-components-bigcalendar-event-dot",onMouseEnter:T=>t(T,l),onMouseLeave:r,style:{backgroundColor:d,borderColor:p==="transparent"?h.backgroundColor:p}}):jsxRuntime.jsx(framerMotion.motion.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},onMouseEnter:T=>t(T,l),onMouseLeave:r,className:"m3-components-bigcalendar-event-chip",style:{backgroundColor:d,color:P,border:c?"none":`1.5px solid ${p}`},children:jsxRuntime.jsxs("div",{className:"m3-components-bigcalendar-event-content",children:[jsxRuntime.jsx("span",{className:"m3-components-bigcalendar-event-title",children:l.eventTitle}),l.eventTrailingIcon&&jsxRuntime.jsx("div",{className:"m3-components-bigcalendar-event-trailing",style:{color:P},children:l.eventTrailingIcon})]})})})};var w0=react.forwardRef((s,t)=>{let{currentDate:r,filterOptions:l,events:c,toolBar:h,filterBar:d,filterBy:p,backgroundMode:P,defaultView:k="month",enableAnimations:b=true,slideVariants:w={enter:L=>({x:L>0?"10%":"-10%",opacity:0}),center:{zIndex:1,x:0,opacity:1},exit:L=>({zIndex:0,x:L<0?"10%":"-10%",opacity:0})},transition:v={type:"spring",stiffness:300,damping:30,opacity:{duration:.2}},onEventClicked:T}=s,{themeColors:m}=m3ComponentsWeb.useGlobalTheme(),D=r===null?new Date:new Date(r),x=reactBigCalendar.momentLocalizer(yr.default),Y=react.useMemo(()=>c?c.filter(L=>!p||p.length===0||p.includes("All")?true:p.every(fe=>L.eventCategory?.includes(fe))).map(L=>{let{eventTitle:fe,eventStart:Oe,eventEnd:be,...de}=L;return {title:fe,start:new Date(Oe),end:new Date(be),resource:de}}):[],[c,p]),H=react.useMemo(()=>({event:L=>jsxRuntime.jsx(ua,{...L,onMouseEnter:()=>{},onMouseLeave:()=>{}})}),[]),[X,Z]=react.useState(0),[$,V]=react.useState(D),[z,U]=react.useState(k),[ne,ee]=react.useState(l),oe=()=>{Z(-1),V((0, yr.default)($).subtract(1,z).toDate());},Se=()=>{Z(1),V((0, yr.default)($).add(1,z).toDate());},ke=()=>{Z(0),V(new Date);};return react.useImperativeHandle(t,()=>({previousMonth:oe,nextMonth:Se,jumpToNow:ke})),jsxRuntime.jsxs(framerMotion.motion.div,{layout:true,style:{backgroundColor:m.surfaceContainerHigh,borderColor:m.outlineVariant,flex:1,display:"flex",flexDirection:"column",minWidth:"0px",paddingTop:"16px",overflow:"hidden",position:"relative","--m3-primary":m.primary,"--m3-on-primary":m.onPrimary,"--m3-outline-variant":m.outlineVariant,"--m3-on-surface":m.onSurface,"--m3-on-surface-variant":m.onSurfaceVariant,"--m3-today-bg":na(m.primary,.03)},children:[jsxRuntime.jsxs("div",{style:{paddingInline:"16px"},children:[jsxRuntime.jsx(la,{date:$,view:z,onViewChange:U,onPrev:oe,onNext:Se,onToday:ke}),d?d(l):jsxRuntime.jsx("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px",flexShrink:0,overflowX:"auto",paddingBottom:"4px"},children:l.map(L=>jsxRuntime.jsx("button",{onClick:()=>{ee(fe=>fe.includes(L)?fe.filter(Oe=>Oe!==L):[...fe,L]);},className:"m3-components-bigcalendar-filter-chip",style:{backgroundColor:ne.includes(L)?m.onSurface:"transparent",color:ne.includes(L)?m.surface:m.onSurfaceVariant,borderColor:ne.includes(L)?m.onSurface:m.outlineVariant},children:L},L))})]}),jsxRuntime.jsx("div",{style:{backgroundColor:m.outlineVariant,width:"100%",height:"2px"}}),jsxRuntime.jsx("div",{className:"rbc-container-wrapper",style:{flex:1,position:"relative",overflow:"hidden"},children:jsxRuntime.jsx(framerMotion.AnimatePresence,{initial:false,custom:X,mode:"wait",children:jsxRuntime.jsx(framerMotion.motion.div,{custom:X,variants:w,initial:"enter",animate:"center",exit:"exit",transition:v,className:"m3-components-bigcalendar-viewport",children:jsxRuntime.jsx(reactBigCalendar.Calendar,{localizer:x,events:Y,date:$,view:z,onNavigate:L=>V(L),onView:L=>{(L==="month"||L==="week"||L==="day")&&U(L);},onSelectEvent:L=>T?.(L),toolbar:false,components:H,eventPropGetter:()=>({style:{backgroundColor:"transparent",border:"none",padding:"1px 2px"}})})},$.toISOString())})})]})});/*! Bundled license information:
|
|
5
5
|
|
|
6
6
|
moment/moment.js:
|
|
7
7
|
(*! moment.js *)
|
|
@@ -118,4 +118,5 @@ moment/moment.js:
|
|
|
118
118
|
* See the License for the specific language governing permissions and
|
|
119
119
|
* limitations under the License.
|
|
120
120
|
*)
|
|
121
|
-
*/exports.BigCalendar=w0;exports.Button=sa;exports.ThemeContext=oa;exports.ThemeProvider=Gh;exports.createModernTheme=Pt;exports.hexToArgba=Bh;exports.hexToRgba=na;exports.isDarkBackground=Hh;exports.useGlobalTheme=jh
|
|
121
|
+
*/exports.BigCalendar=w0;exports.Button=sa;exports.ThemeContext=oa;exports.ThemeProvider=Gh;exports.createModernTheme=Pt;exports.hexToArgba=Bh;exports.hexToRgba=na;exports.isDarkBackground=Hh;exports.useGlobalTheme=jh;//# sourceMappingURL=index.js.map
|
|
122
|
+
//# sourceMappingURL=index.js.map
|