{"version":3,"sources":["webpack:///../node_modules/react-calendar/dist/esm/shared/const.js","webpack:///../node_modules/react-calendar/dist/esm/shared/dateFormatter.js","webpack:///../node_modules/react-calendar/dist/esm/shared/dates.js","webpack:///../node_modules/react-calendar/dist/esm/Calendar/Navigation.js","webpack:///../node_modules/react-calendar/dist/esm/Flex.js","webpack:///../node_modules/react-calendar/dist/esm/shared/utils.js","webpack:///../node_modules/react-calendar/dist/esm/TileGroup.js","webpack:///../node_modules/react-calendar/dist/esm/Tile.js","webpack:///../node_modules/react-calendar/dist/esm/CenturyView/Decade.js","webpack:///../node_modules/react-calendar/dist/esm/CenturyView/Decades.js","webpack:///../node_modules/react-calendar/dist/esm/CenturyView.js","webpack:///../node_modules/react-calendar/dist/esm/DecadeView/Year.js","webpack:///../node_modules/react-calendar/dist/esm/DecadeView/Years.js","webpack:///../node_modules/react-calendar/dist/esm/DecadeView.js","webpack:///../node_modules/react-calendar/dist/esm/YearView/Month.js","webpack:///../node_modules/react-calendar/dist/esm/YearView/Months.js","webpack:///../node_modules/react-calendar/dist/esm/YearView.js","webpack:///../node_modules/react-calendar/dist/esm/MonthView/Day.js","webpack:///../node_modules/react-calendar/dist/esm/MonthView/Days.js","webpack:///../node_modules/react-calendar/dist/esm/MonthView/Weekdays.js","webpack:///../node_modules/react-calendar/dist/esm/MonthView/WeekNumber.js","webpack:///../node_modules/react-calendar/dist/esm/MonthView/WeekNumbers.js","webpack:///../node_modules/react-calendar/dist/esm/MonthView.js","webpack:///../node_modules/react-calendar/dist/esm/Calendar.js","webpack:///../node_modules/react-calendar/dist/esm/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAI,OAAE;AACC;AACP;AACA;AACA;AACA;AACA;AACO,6BAA6B,OAAE,KAAK;AAC3C,IAAI,OAAE;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAE;AACN,IAAI,OAAE;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAE;AACC;;;ACrDqC;AAC5C;AACA;AACA;AACA,0CAA0C,8BAAa;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,wDAAwD;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,iCAAiC;AACjC,4BAA4B;AAC5B,yBAAyB;AAClB;AACA,IAAI,uBAAS;AACb,IAAI,4BAAc;AAClB,IAAI,yBAAW;AACf,IAAI,6BAAe;AACnB,IAAI,gCAAkB;AACtB,IAAI,2BAAa;AACjB,IAAI,wBAAU;;;AC1DghB;AAC/e;AACe;AACrE,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,QAAQ;AACvB;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;AACO;AACP,kCAAkC,gBAAgB,cAAc,UAAU;AAC1E;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA,aAAa,cAAc;AAC3B;AACA,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,OAAO;AACpB;AACO;AACP,yBAAyB,2CAAe;AACxC,WAAW,mCAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,OAAO;AACpB;AACO;AACP,wBAAwB,0CAAc;AACtC,WAAW,mCAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;AACO;AACP,kCAAkC,gBAAgB,cAAc,UAAU;AAC1E,eAAe,mCAAO;AACtB,qBAAqB,oCAAa;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;AACO;AACP,kCAAkC,gBAAgB,cAAc,UAAU;AAC1E,qDAAqD,cAAc,WAAW,cAAc,WAAW,cAAc;AACrH;AACA,eAAe,mCAAO;AACtB;AACA;AACA;AACA;AACA,uEAAuE,cAAc;AACrF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;AACO;AACP;AACA;AACA,mBAAmB,2CAAe;AAClC;AACA,mBAAmB,0CAAc;AACjC;AACA,mBAAmB,wCAAY;AAC/B;AACA,mBAAmB,yCAAa;AAChC;AACA,mBAAmB,uCAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;AACO;AACP;AACA;AACA,mBAAmB,mDAAuB;AAC1C;AACA,mBAAmB,kDAAsB;AACzC;AACA,mBAAmB,gDAAoB;AACvC;AACA,mBAAmB,iDAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;AACO;AACP;AACA;AACA,mBAAmB,+CAAmB;AACtC;AACA,mBAAmB,8CAAkB;AACrC;AACA,mBAAmB,4CAAgB;AACnC;AACA,mBAAmB,6CAAiB;AACpC;AACA;AACA;AACA;AACO;AACP;AACA;AACA,mBAAmB,kDAAsB;AACzC;AACA,mBAAmB,gDAAoB;AACvC;AACA,mBAAmB,iDAAqB;AACxC;AACA;AACA;AACA;AACO;AACP;AACA;AACA,mBAAmB,8CAAkB;AACrC;AACA,mBAAmB,4CAAgB;AACnC;AACA,mBAAmB,6CAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;AACO;AACP;AACA;AACA,mBAAmB,yCAAa;AAChC;AACA,mBAAmB,wCAAY;AAC/B;AACA,mBAAmB,sCAAU;AAC7B;AACA,mBAAmB,uCAAW;AAC9B;AACA,mBAAmB,qCAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;AACO;AACP;AACA;AACA,mBAAmB,iDAAqB;AACxC;AACA,mBAAmB,gDAAoB;AACvC;AACA,mBAAmB,8CAAkB;AACrC;AACA,mBAAmB,+CAAmB;AACtC;AACA;AACA;AACA;AACO;AACP;AACA;AACA,mBAAmB,gDAAoB;AACvC;AACA,mBAAmB,8CAAkB;AACrC;AACA,mBAAmB,+CAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,KAAK;AAChB,aAAa,OAAO;AACpB;AACO;AACP;AACA;AACA,mBAAmB,2CAAe;AAClC;AACA,mBAAmB,0CAAc;AACjC;AACA,mBAAmB,wCAAY;AAC/B;AACA,mBAAmB,yCAAa;AAChC;AACA,mBAAmB,uCAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB,aAAa,OAAO;AACpB;AACO;AACP,4DAA4D,kCAAkC,EAAE;AAChG;AACA;AACA;AACA,gCAAgC,cAAc,wBAAiB,CAAC;AAChE,sCAAsC,iCAAiC,EAAE;AACzE;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,mBAAmB;AAC9B,aAAa,OAAO;AACpB;AACO;AACP,2CAA2C,2CAAe;AAC1D;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,mBAAmB;AAC9B,aAAa,OAAO;AACpB;AACO;AACP,2CAA2C,0CAAc;AACzD;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,QAAQ;AACrB;AACO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;AACO;AACP,kCAAkC,gBAAgB,cAAc,UAAU;AAC1E;AACA;AACA,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B;AACA,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;;ACpVA;AACsF;AACtC;AACyH;AAChD;AACzH,IAAI,oBAAS;AACE;AACf,+HAA+H,6BAAsB,wDAAwD,wBAAiB;AAC9N;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA,UAAU,iBAAiB;AAC3B;AACA,8BAA8B,YAAY;AAC1C;AACA,UAAU,aAAa;AACvB;AACA;AACA;AACA;AACA;AACA,oCAAoC,cAAc;AAClD;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,wCAAwC,eAAe;AACvD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,kCAAkC,oCAAa;AAC/C;AACA,aAAa;AACb;AACA;AACA;AACA,uCAAuC,oBAAS;AAChD,gBAAgB,2BAAK,YAAY,uJAAuJ,cAAc,6BAA6B,0BAAI,UAAU,2IAA2I,qBAAqB,2BAAK,CAAC,uBAAS,GAAG,YAAY,0BAAI,UAAU,0EAA0E,GAAG,0BAAI,UAAU,6IAA6I,IAAI,YAAY;AACrrB;AACA,YAAY,2BAAK,SAAS,YAAY,oBAAS,kEAAkE,0BAAI,YAAY,oDAAoD,oBAAS,qBAAqB,oBAAS,qHAAqH,kCAAkC,0BAAI,YAAY,mDAAmD,oBAAS,qBAAqB,oBAAS,iHAAiH,2CAA2C,0BAAI,YAAY,mDAAmD,oBAAS,qBAAqB,oBAAS,6GAA6G,yDAAyD,0BAAI,YAAY,oDAAoD,oBAAS,qBAAqB,oBAAS,iHAAiH,YAAY;AACjnC;;;AC5EA,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAI,IAAI,SAAI;AAC1B;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;AACA;AACA;AACgD;AACD;AAC/C;AACA;AACA;AACe;AACf;AACA,YAAY,0BAAI,kBAAkB,wCAAwC,gFAAgF,UAAU,eAAe,WAAW,iBAAQ;AACtM;AACA,mBAAmB,6BAAY,4BAA4B,iBAAiB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,EAAE;AACnB,SAAS,GAAG;AACZ;;;ACzCsC;AACtC;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,KAAK;AACL;AACA;AACA;AACA;AAC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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B;AACA,uBAAuB,MAAM;AAC7B;AACA;AACA;AACA,KAAK;AACL,WAAW,OAAO;AAClB;AACA,0CAA0C,gCAAgC;AAC1E,wCAAwC,gCAAgC;AACxE;AACA,qEAAqE,iBAAiB,EAAE;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAQ,GAAG,2BAAU;AACzB;AACA,aAAa,yBAAQ;AACrB,aAAa,yBAAQ;AACrB,aAAa,yBAAQ;AACrB,0CAA0C,0CAA0C,EAAE;AACtF;AACA;AACA;AACA,aAAa,yBAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,0CAA0C,0CAA0C,EAAE;AACtF;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,4BAAW;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL,6BAA6B,4BAAW;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,sBAAsB,4BAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,oBAAoB,4BAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4BAAW;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,oCAAmB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,EAAE,EAAE;AACT;AACA;AACA,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0BAAI,CAAC,WAAW,EAAE,eAAQ,EAAE,yEAAyE;AAC7H;AACA;AACA,wBAAwB,0BAAI,CAAC,UAAU,EAAE,eAAQ,EAAE,uEAAuE;AAC1H;AACA;AACA,wBAAwB,0BAAI,CAAC,QAAQ,EAAE,eAAQ,EAAE,6DAA6D;AAC9G;AACA;AACA,wBAAwB,0BAAI,CAAC,SAAS,EAAE,eAAQ,EAAE;AAClD;AACA,wHAAwH;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,0BAAI,CAAC,UAAU,GAAG,ilBAAilB;AACnnB;AACA;AACA,YAAY,2BAAK,SAAS,YAAY,+BAAI,2NAA2N,2BAAK,SAAS,yOAAyO,IAAI;AAChgB,CAAC;AACc,kEAAQ,EAAC;;;ACzca;AACM;AACF;AACF;AACW;AACb;AACyC;AAC/D,mGAAQ,EAAC","file":"vendor.react-calendar.f8ca5ae716dc3b3e471b.js","sourcesContent":["var _a;\nexport var CALENDAR_TYPES = {\n GREGORY: 'gregory',\n HEBREW: 'hebrew',\n ISLAMIC: 'islamic',\n ISO_8601: 'iso8601',\n};\nexport var CALENDAR_TYPE_LOCALES = (_a = {},\n _a[CALENDAR_TYPES.GREGORY] = [\n 'en-CA',\n 'en-US',\n 'es-AR',\n 'es-BO',\n 'es-CL',\n 'es-CO',\n 'es-CR',\n 'es-DO',\n 'es-EC',\n 'es-GT',\n 'es-HN',\n 'es-MX',\n 'es-NI',\n 'es-PA',\n 'es-PE',\n 'es-PR',\n 'es-SV',\n 'es-VE',\n 'pt-BR',\n ],\n _a[CALENDAR_TYPES.HEBREW] = ['he', 'he-IL'],\n _a[CALENDAR_TYPES.ISLAMIC] = [\n // ar-LB, ar-MA intentionally missing\n 'ar',\n 'ar-AE',\n 'ar-BH',\n 'ar-DZ',\n 'ar-EG',\n 'ar-IQ',\n 'ar-JO',\n 'ar-KW',\n 'ar-LY',\n 'ar-OM',\n 'ar-QA',\n 'ar-SA',\n 'ar-SD',\n 'ar-SY',\n 'ar-YE',\n 'dv',\n 'dv-MV',\n 'ps',\n 'ps-AR',\n ],\n _a);\nexport var WEEKDAYS = [0, 1, 2, 3, 4, 5, 6];\n","import getUserLocale from 'get-user-locale';\nvar formatterCache = new Map();\nfunction getFormatter(options) {\n return function formatter(locale, date) {\n var localeWithDefault = locale || getUserLocale();\n if (!formatterCache.has(localeWithDefault)) {\n formatterCache.set(localeWithDefault, new Map());\n }\n var formatterCacheLocale = formatterCache.get(localeWithDefault);\n if (!formatterCacheLocale.has(options)) {\n formatterCacheLocale.set(options, new Intl.DateTimeFormat(localeWithDefault || undefined, options).format);\n }\n return formatterCacheLocale.get(options)(date);\n };\n}\n/**\n * Changes the hour in a Date to ensure right date formatting even if DST is messed up.\n * Workaround for bug in WebKit and Firefox with historical dates.\n * For more details, see:\n * https://bugs.chromium.org/p/chromium/issues/detail?id=750465\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1385643\n *\n * @param {Date} date Date.\n * @returns {Date} Date with hour set to 12.\n */\nfunction toSafeHour(date) {\n var safeDate = new Date(date);\n return new Date(safeDate.setHours(12));\n}\nfunction getSafeFormatter(options) {\n return function (locale, date) { return getFormatter(options)(locale, toSafeHour(date)); };\n}\nvar formatDateOptions = {\n day: 'numeric',\n month: 'numeric',\n year: 'numeric',\n};\nvar formatDayOptions = { day: 'numeric' };\nvar formatLongDateOptions = {\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n};\nvar formatMonthOptions = { month: 'long' };\nvar formatMonthYearOptions = {\n month: 'long',\n year: 'numeric',\n};\nvar formatShortWeekdayOptions = { weekday: 'short' };\nvar formatWeekdayOptions = { weekday: 'long' };\nvar formatYearOptions = { year: 'numeric' };\nexport var formatDate = getSafeFormatter(formatDateOptions);\nexport var formatDay = getSafeFormatter(formatDayOptions);\nexport var formatLongDate = getSafeFormatter(formatLongDateOptions);\nexport var formatMonth = getSafeFormatter(formatMonthOptions);\nexport var formatMonthYear = getSafeFormatter(formatMonthYearOptions);\nexport var formatShortWeekday = getSafeFormatter(formatShortWeekdayOptions);\nexport var formatWeekday = getSafeFormatter(formatWeekdayOptions);\nexport var formatYear = getSafeFormatter(formatYearOptions);\n","import { getYear, getMonth as getMonthIndex, getCenturyStart, getPreviousCenturyStart, getNextCenturyStart, getCenturyEnd, getPreviousCenturyEnd, getCenturyRange, getDecadeStart, getPreviousDecadeStart, getNextDecadeStart, getDecadeEnd, getPreviousDecadeEnd, getDecadeRange, getYearStart, getPreviousYearStart, getNextYearStart, getYearEnd, getPreviousYearEnd, getYearRange, getMonthStart, getPreviousMonthStart, getNextMonthStart, getMonthEnd, getPreviousMonthEnd, getMonthRange, getDayStart, getDayEnd, getDayRange, } from '@wojtekmaj/date-utils';\nimport { CALENDAR_TYPES, WEEKDAYS } from './const.js';\nimport { formatYear as defaultFormatYear } from './dateFormatter.js';\nvar SUNDAY = WEEKDAYS[0];\nvar FRIDAY = WEEKDAYS[5];\nvar SATURDAY = WEEKDAYS[6];\n/* Simple getters - getting a property of a given point in time */\n/**\n * Gets day of the week of a given date.\n * @param {Date} date Date.\n * @param {CalendarType} [calendarType=\"iso8601\"] Calendar type.\n * @returns {number} Day of the week.\n */\nexport function getDayOfWeek(date, calendarType) {\n if (calendarType === void 0) { calendarType = CALENDAR_TYPES.ISO_8601; }\n var weekday = date.getDay();\n switch (calendarType) {\n case CALENDAR_TYPES.ISO_8601:\n // Shifts days of the week so that Monday is 0, Sunday is 6\n return (weekday + 6) % 7;\n case CALENDAR_TYPES.ISLAMIC:\n return (weekday + 1) % 7;\n case CALENDAR_TYPES.HEBREW:\n case CALENDAR_TYPES.GREGORY:\n return weekday;\n default:\n throw new Error('Unsupported calendar type.');\n }\n}\n/**\n * Century\n */\n/**\n * Gets the year of the beginning of a century of a given date.\n * @param {Date} date Date.\n * @returns {number} Year of the beginning of a century.\n */\nexport function getBeginOfCenturyYear(date) {\n var beginOfCentury = getCenturyStart(date);\n return getYear(beginOfCentury);\n}\n/**\n * Decade\n */\n/**\n * Gets the year of the beginning of a decade of a given date.\n * @param {Date} date Date.\n * @returns {number} Year of the beginning of a decade.\n */\nexport function getBeginOfDecadeYear(date) {\n var beginOfDecade = getDecadeStart(date);\n return getYear(beginOfDecade);\n}\n/**\n * Week\n */\n/**\n * Returns the beginning of a given week.\n *\n * @param {Date} date Date.\n * @param {CalendarType} [calendarType=\"iso8601\"] Calendar type.\n * @returns {Date} Beginning of a given week.\n */\nexport function getBeginOfWeek(date, calendarType) {\n if (calendarType === void 0) { calendarType = CALENDAR_TYPES.ISO_8601; }\n var year = getYear(date);\n var monthIndex = getMonthIndex(date);\n var day = date.getDate() - getDayOfWeek(date, calendarType);\n return new Date(year, monthIndex, day);\n}\n/**\n * Gets week number according to ISO 8601 or US standard.\n * In ISO 8601, Arabic and Hebrew week 1 is the one with January 4.\n * In US calendar week 1 is the one with January 1.\n *\n * @param {Date} date Date.\n * @param {CalendarType} [calendarType=\"iso8601\"] Calendar type.\n * @returns {number} Week number.\n */\nexport function getWeekNumber(date, calendarType) {\n if (calendarType === void 0) { calendarType = CALENDAR_TYPES.ISO_8601; }\n var calendarTypeForWeekNumber = calendarType === CALENDAR_TYPES.GREGORY ? CALENDAR_TYPES.GREGORY : CALENDAR_TYPES.ISO_8601;\n var beginOfWeek = getBeginOfWeek(date, calendarType);\n var year = getYear(date) + 1;\n var dayInWeekOne;\n var beginOfFirstWeek;\n // Look for the first week one that does not come after a given date\n do {\n dayInWeekOne = new Date(year, 0, calendarTypeForWeekNumber === CALENDAR_TYPES.ISO_8601 ? 4 : 1);\n beginOfFirstWeek = getBeginOfWeek(dayInWeekOne, calendarType);\n year -= 1;\n } while (date < beginOfFirstWeek);\n return Math.round((beginOfWeek.getTime() - beginOfFirstWeek.getTime()) / (8.64e7 * 7)) + 1;\n}\n/**\n * Others\n */\n/**\n * Returns the beginning of a given range.\n *\n * @param {RangeType} rangeType Range type (e.g. 'day')\n * @param {Date} date Date.\n * @returns {Date} Beginning of a given range.\n */\nexport function getBegin(rangeType, date) {\n switch (rangeType) {\n case 'century':\n return getCenturyStart(date);\n case 'decade':\n return getDecadeStart(date);\n case 'year':\n return getYearStart(date);\n case 'month':\n return getMonthStart(date);\n case 'day':\n return getDayStart(date);\n default:\n throw new Error(\"Invalid rangeType: \".concat(rangeType));\n }\n}\n/**\n * Returns the beginning of a previous given range.\n *\n * @param {RangeType} rangeType Range type (e.g. 'day')\n * @param {Date} date Date.\n * @returns {Date} Beginning of a previous given range.\n */\nexport function getBeginPrevious(rangeType, date) {\n switch (rangeType) {\n case 'century':\n return getPreviousCenturyStart(date);\n case 'decade':\n return getPreviousDecadeStart(date);\n case 'year':\n return getPreviousYearStart(date);\n case 'month':\n return getPreviousMonthStart(date);\n default:\n throw new Error(\"Invalid rangeType: \".concat(rangeType));\n }\n}\n/**\n * Returns the beginning of a next given range.\n *\n * @param {RangeType} rangeType Range type (e.g. 'day')\n * @param {Date} date Date.\n * @returns {Date} Beginning of a next given range.\n */\nexport function getBeginNext(rangeType, date) {\n switch (rangeType) {\n case 'century':\n return getNextCenturyStart(date);\n case 'decade':\n return getNextDecadeStart(date);\n case 'year':\n return getNextYearStart(date);\n case 'month':\n return getNextMonthStart(date);\n default:\n throw new Error(\"Invalid rangeType: \".concat(rangeType));\n }\n}\nexport function getBeginPrevious2(rangeType, date) {\n switch (rangeType) {\n case 'decade':\n return getPreviousDecadeStart(date, -100);\n case 'year':\n return getPreviousYearStart(date, -10);\n case 'month':\n return getPreviousMonthStart(date, -12);\n default:\n throw new Error(\"Invalid rangeType: \".concat(rangeType));\n }\n}\nexport function getBeginNext2(rangeType, date) {\n switch (rangeType) {\n case 'decade':\n return getNextDecadeStart(date, 100);\n case 'year':\n return getNextYearStart(date, 10);\n case 'month':\n return getNextMonthStart(date, 12);\n default:\n throw new Error(\"Invalid rangeType: \".concat(rangeType));\n }\n}\n/**\n * Returns the end of a given range.\n *\n * @param {RangeType} rangeType Range type (e.g. 'day')\n * @param {Date} date Date.\n * @returns {Date} End of a given range.\n */\nexport function getEnd(rangeType, date) {\n switch (rangeType) {\n case 'century':\n return getCenturyEnd(date);\n case 'decade':\n return getDecadeEnd(date);\n case 'year':\n return getYearEnd(date);\n case 'month':\n return getMonthEnd(date);\n case 'day':\n return getDayEnd(date);\n default:\n throw new Error(\"Invalid rangeType: \".concat(rangeType));\n }\n}\n/**\n * Returns the end of a previous given range.\n *\n * @param {RangeType} rangeType Range type (e.g. 'day')\n * @param {Date} date Date.\n * @returns {Date} End of a previous given range.\n */\nexport function getEndPrevious(rangeType, date) {\n switch (rangeType) {\n case 'century':\n return getPreviousCenturyEnd(date);\n case 'decade':\n return getPreviousDecadeEnd(date);\n case 'year':\n return getPreviousYearEnd(date);\n case 'month':\n return getPreviousMonthEnd(date);\n default:\n throw new Error(\"Invalid rangeType: \".concat(rangeType));\n }\n}\nexport function getEndPrevious2(rangeType, date) {\n switch (rangeType) {\n case 'decade':\n return getPreviousDecadeEnd(date, -100);\n case 'year':\n return getPreviousYearEnd(date, -10);\n case 'month':\n return getPreviousMonthEnd(date, -12);\n default:\n throw new Error(\"Invalid rangeType: \".concat(rangeType));\n }\n}\n/**\n * Returns an array with the beginning and the end of a given range.\n *\n * @param {RangeType} rangeType Range type (e.g. 'day')\n * @param {Date} date Date.\n * @returns {Date[]} Beginning and end of a given range.\n */\nexport function getRange(rangeType, date) {\n switch (rangeType) {\n case 'century':\n return getCenturyRange(date);\n case 'decade':\n return getDecadeRange(date);\n case 'year':\n return getYearRange(date);\n case 'month':\n return getMonthRange(date);\n case 'day':\n return getDayRange(date);\n default:\n throw new Error(\"Invalid rangeType: \".concat(rangeType));\n }\n}\n/**\n * Creates a range out of two values, ensuring they are in order and covering entire period ranges.\n *\n * @param {RangeType} rangeType Range type (e.g. 'day')\n * @param {Date} date1 First date.\n * @param {Date} date2 Second date.\n * @returns {Date[]} Beginning and end of a given range.\n */\nexport function getValueRange(rangeType, date1, date2) {\n var rawNextValue = [date1, date2].sort(function (a, b) { return a.getTime() - b.getTime(); });\n return [getBegin(rangeType, rawNextValue[0]), getEnd(rangeType, rawNextValue[1])];\n}\nfunction toYearLabel(locale, formatYear, dates) {\n if (formatYear === void 0) { formatYear = defaultFormatYear; }\n return dates.map(function (date) { return formatYear(locale, date); }).join(' – ');\n}\n/**\n * @callback FormatYear\n * @param {string} locale Locale.\n * @param {Date} date Date.\n * @returns {string} Formatted year.\n */\n/**\n * Returns a string labelling a century of a given date.\n * For example, for 2017 it will return 2001-2100.\n *\n * @param {string} locale Locale.\n * @param {FormatYear} formatYear Function to format a year.\n * @param {Date|string|number} date Date or a year as a string or as a number.\n * @returns {string} String labelling a century of a given date.\n */\nexport function getCenturyLabel(locale, formatYear, date) {\n return toYearLabel(locale, formatYear, getCenturyRange(date));\n}\n/**\n * Returns a string labelling a decade of a given date.\n * For example, for 2017 it will return 2011-2020.\n *\n * @param {string} locale Locale.\n * @param {FormatYear} formatYear Function to format a year.\n * @param {Date|string|number} date Date or a year as a string or as a number.\n * @returns {string} String labelling a decade of a given date.\n */\nexport function getDecadeLabel(locale, formatYear, date) {\n return toYearLabel(locale, formatYear, getDecadeRange(date));\n}\n/**\n * Returns a boolean determining whether a given date is the current day of the week.\n *\n * @param {Date} date Date.\n * @returns {boolean} Whether a given date is the current day of the week.\n */\nexport function isCurrentDayOfWeek(date) {\n return date.getDay() === new Date().getDay();\n}\n/**\n * Returns a boolean determining whether a given date is a weekend day.\n *\n * @param {Date} date Date.\n * @param {CalendarType} [calendarType=\"iso8601\"] Calendar type.\n * @returns {boolean} Whether a given date is a weekend day.\n */\nexport function isWeekend(date, calendarType) {\n if (calendarType === void 0) { calendarType = CALENDAR_TYPES.ISO_8601; }\n var weekday = date.getDay();\n switch (calendarType) {\n case CALENDAR_TYPES.ISLAMIC:\n case CALENDAR_TYPES.HEBREW:\n return weekday === FRIDAY || weekday === SATURDAY;\n case CALENDAR_TYPES.ISO_8601:\n case CALENDAR_TYPES.GREGORY:\n return weekday === SATURDAY || weekday === SUNDAY;\n default:\n throw new Error('Unsupported calendar type.');\n }\n}\n","'use client';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { getUserLocale } from 'get-user-locale';\nimport { getCenturyLabel, getDecadeLabel, getBeginNext, getBeginNext2, getBeginPrevious, getBeginPrevious2, getEndPrevious, getEndPrevious2, } from '../shared/dates.js';\nimport { formatMonthYear as defaultFormatMonthYear, formatYear as defaultFormatYear, } from '../shared/dateFormatter.js';\nvar className = 'react-calendar__navigation';\nexport default function Navigation(_a) {\n var activeStartDate = _a.activeStartDate, drillUp = _a.drillUp, _b = _a.formatMonthYear, formatMonthYear = _b === void 0 ? defaultFormatMonthYear : _b, _c = _a.formatYear, formatYear = _c === void 0 ? defaultFormatYear : _c, locale = _a.locale, maxDate = _a.maxDate, minDate = _a.minDate, _d = _a.navigationAriaLabel, navigationAriaLabel = _d === void 0 ? '' : _d, navigationAriaLive = _a.navigationAriaLive, navigationLabel = _a.navigationLabel, _e = _a.next2AriaLabel, next2AriaLabel = _e === void 0 ? '' : _e, _f = _a.next2Label, next2Label = _f === void 0 ? '»' : _f, _g = _a.nextAriaLabel, nextAriaLabel = _g === void 0 ? '' : _g, _h = _a.nextLabel, nextLabel = _h === void 0 ? '›' : _h, _j = _a.prev2AriaLabel, prev2AriaLabel = _j === void 0 ? '' : _j, _k = _a.prev2Label, prev2Label = _k === void 0 ? '«' : _k, _l = _a.prevAriaLabel, prevAriaLabel = _l === void 0 ? '' : _l, _m = _a.prevLabel, prevLabel = _m === void 0 ? '‹' : _m, setActiveStartDate = _a.setActiveStartDate, showDoubleView = _a.showDoubleView, view = _a.view, views = _a.views;\n var drillUpAvailable = views.indexOf(view) > 0;\n var shouldShowPrevNext2Buttons = view !== 'century';\n var previousActiveStartDate = getBeginPrevious(view, activeStartDate);\n var previousActiveStartDate2 = shouldShowPrevNext2Buttons\n ? getBeginPrevious2(view, activeStartDate)\n : undefined;\n var nextActiveStartDate = getBeginNext(view, activeStartDate);\n var nextActiveStartDate2 = shouldShowPrevNext2Buttons\n ? getBeginNext2(view, activeStartDate)\n : undefined;\n var prevButtonDisabled = (function () {\n if (previousActiveStartDate.getFullYear() < 0) {\n return true;\n }\n var previousActiveEndDate = getEndPrevious(view, activeStartDate);\n return minDate && minDate >= previousActiveEndDate;\n })();\n var prev2ButtonDisabled = shouldShowPrevNext2Buttons &&\n (function () {\n if (previousActiveStartDate2.getFullYear() < 0) {\n return true;\n }\n var previousActiveEndDate = getEndPrevious2(view, activeStartDate);\n return minDate && minDate >= previousActiveEndDate;\n })();\n var nextButtonDisabled = maxDate && maxDate < nextActiveStartDate;\n var next2ButtonDisabled = shouldShowPrevNext2Buttons && maxDate && maxDate < nextActiveStartDate2;\n function onClickPrevious() {\n setActiveStartDate(previousActiveStartDate, 'prev');\n }\n function onClickPrevious2() {\n setActiveStartDate(previousActiveStartDate2, 'prev2');\n }\n function onClickNext() {\n setActiveStartDate(nextActiveStartDate, 'next');\n }\n function onClickNext2() {\n setActiveStartDate(nextActiveStartDate2, 'next2');\n }\n function renderLabel(date) {\n var label = (function () {\n switch (view) {\n case 'century':\n return getCenturyLabel(locale, formatYear, date);\n case 'decade':\n return getDecadeLabel(locale, formatYear, date);\n case 'year':\n return formatYear(locale, date);\n case 'month':\n return formatMonthYear(locale, date);\n default:\n throw new Error(\"Invalid view: \".concat(view, \".\"));\n }\n })();\n return navigationLabel\n ? navigationLabel({\n date: date,\n label: label,\n locale: locale || getUserLocale() || undefined,\n view: view,\n })\n : label;\n }\n function renderButton() {\n var labelClassName = \"\".concat(className, \"__label\");\n return (_jsxs(\"button\", { \"aria-label\": navigationAriaLabel, \"aria-live\": navigationAriaLive, className: labelClassName, disabled: !drillUpAvailable, onClick: drillUp, style: { flexGrow: 1 }, type: \"button\", children: [_jsx(\"span\", { className: \"\".concat(labelClassName, \"__labelText \").concat(labelClassName, \"__labelText--from\"), children: renderLabel(activeStartDate) }), showDoubleView ? (_jsxs(_Fragment, { children: [_jsx(\"span\", { className: \"\".concat(labelClassName, \"__divider\"), children: \" \\u2013 \" }), _jsx(\"span\", { className: \"\".concat(labelClassName, \"__labelText \").concat(labelClassName, \"__labelText--to\"), children: renderLabel(nextActiveStartDate) })] })) : null] }));\n }\n return (_jsxs(\"div\", { className: className, children: [prev2Label !== null && shouldShowPrevNext2Buttons ? (_jsx(\"button\", { \"aria-label\": prev2AriaLabel, className: \"\".concat(className, \"__arrow \").concat(className, \"__prev2-button\"), disabled: prev2ButtonDisabled, onClick: onClickPrevious2, type: \"button\", children: prev2Label })) : null, prevLabel !== null && (_jsx(\"button\", { \"aria-label\": prevAriaLabel, className: \"\".concat(className, \"__arrow \").concat(className, \"__prev-button\"), disabled: prevButtonDisabled, onClick: onClickPrevious, type: \"button\", children: prevLabel })), renderButton(), nextLabel !== null && (_jsx(\"button\", { \"aria-label\": nextAriaLabel, className: \"\".concat(className, \"__arrow \").concat(className, \"__next-button\"), disabled: nextButtonDisabled, onClick: onClickNext, type: \"button\", children: nextLabel })), next2Label !== null && shouldShowPrevNext2Buttons ? (_jsx(\"button\", { \"aria-label\": next2AriaLabel, className: \"\".concat(className, \"__arrow \").concat(className, \"__next2-button\"), disabled: next2ButtonDisabled, onClick: onClickNext2, type: \"button\", children: next2Label })) : null] }));\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Children, cloneElement } from 'react';\nfunction toPercent(num) {\n return \"\".concat(num, \"%\");\n}\nexport default function Flex(_a) {\n var children = _a.children, className = _a.className, count = _a.count, direction = _a.direction, offset = _a.offset, style = _a.style, wrap = _a.wrap, otherProps = __rest(_a, [\"children\", \"className\", \"count\", \"direction\", \"offset\", \"style\", \"wrap\"]);\n return (_jsx(\"div\", __assign({ className: className, style: __assign({ display: 'flex', flexDirection: direction, flexWrap: wrap ? 'wrap' : 'nowrap' }, style) }, otherProps, { children: Children.map(children, function (child, index) {\n var marginInlineStart = offset && index === 0 ? toPercent((100 * offset) / count) : null;\n return cloneElement(child, __assign(__assign({}, child.props), { style: {\n flexBasis: toPercent(100 / count),\n flexShrink: 0,\n flexGrow: 0,\n overflow: 'hidden',\n marginLeft: marginInlineStart,\n marginInlineStart: marginInlineStart,\n marginInlineEnd: 0,\n } }));\n }) })));\n}\n","import { getRange } from './dates.js';\n/**\n * Returns a value no smaller than min and no larger than max.\n *\n * @param {Date} value Value to return.\n * @param {Date} min Minimum return value.\n * @param {Date} max Maximum return value.\n * @returns {Date} Value between min and max.\n */\nexport function between(value, min, max) {\n if (min && min > value) {\n return min;\n }\n if (max && max < value) {\n return max;\n }\n return value;\n}\nexport function isValueWithinRange(value, range) {\n return range[0] <= value && range[1] >= value;\n}\nexport function isRangeWithinRange(greaterRange, smallerRange) {\n return greaterRange[0] <= smallerRange[0] && greaterRange[1] >= smallerRange[1];\n}\nexport function doRangesOverlap(range1, range2) {\n return isValueWithinRange(range1[0], range2) || isValueWithinRange(range1[1], range2);\n}\nfunction getRangeClassNames(valueRange, dateRange, baseClassName) {\n var isRange = doRangesOverlap(dateRange, valueRange);\n var classes = [];\n if (isRange) {\n classes.push(baseClassName);\n var isRangeStart = isValueWithinRange(valueRange[0], dateRange);\n var isRangeEnd = isValueWithinRange(valueRange[1], dateRange);\n if (isRangeStart) {\n classes.push(\"\".concat(baseClassName, \"Start\"));\n }\n if (isRangeEnd) {\n classes.push(\"\".concat(baseClassName, \"End\"));\n }\n if (isRangeStart && isRangeEnd) {\n classes.push(\"\".concat(baseClassName, \"BothEnds\"));\n }\n }\n return classes;\n}\nfunction isCompleteValue(value) {\n if (Array.isArray(value)) {\n return value[0] !== null && value[1] !== null;\n }\n return value !== null;\n}\nexport function getTileClasses(args) {\n if (!args) {\n throw new Error('args is required');\n }\n var value = args.value, date = args.date, hover = args.hover;\n var className = 'react-calendar__tile';\n var classes = [className];\n if (!date) {\n return classes;\n }\n var now = new Date();\n var dateRange = (function () {\n if (Array.isArray(date)) {\n return date;\n }\n var dateType = args.dateType;\n if (!dateType) {\n throw new Error('dateType is required when date is not an array of two dates');\n }\n return getRange(dateType, date);\n })();\n if (isValueWithinRange(now, dateRange)) {\n classes.push(\"\".concat(className, \"--now\"));\n }\n if (!value || !isCompleteValue(value)) {\n return classes;\n }\n var valueRange = (function () {\n if (Array.isArray(value)) {\n return value;\n }\n var valueType = args.valueType;\n if (!valueType) {\n throw new Error('valueType is required when value is not an array of two dates');\n }\n return getRange(valueType, value);\n })();\n if (isRangeWithinRange(valueRange, dateRange)) {\n classes.push(\"\".concat(className, \"--active\"));\n }\n else if (doRangesOverlap(valueRange, dateRange)) {\n classes.push(\"\".concat(className, \"--hasActive\"));\n }\n var valueRangeClassNames = getRangeClassNames(valueRange, dateRange, \"\".concat(className, \"--range\"));\n classes.push.apply(classes, valueRangeClassNames);\n var valueArray = Array.isArray(value) ? value : [value];\n if (hover && valueArray.length === 1) {\n var hoverRange = hover > valueRange[0] ? [valueRange[0], hover] : [hover, valueRange[0]];\n var hoverRangeClassNames = getRangeClassNames(hoverRange, dateRange, \"\".concat(className, \"--hover\"));\n classes.push.apply(classes, hoverRangeClassNames);\n }\n return classes;\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport Flex from './Flex.js';\nimport { getTileClasses } from './shared/utils.js';\nexport default function TileGroup(_a) {\n var className = _a.className, _b = _a.count, count = _b === void 0 ? 3 : _b, dateTransform = _a.dateTransform, dateType = _a.dateType, end = _a.end, hover = _a.hover, offset = _a.offset, renderTile = _a.renderTile, start = _a.start, _c = _a.step, step = _c === void 0 ? 1 : _c, value = _a.value, valueType = _a.valueType;\n var tiles = [];\n for (var point = start; point <= end; point += step) {\n var date = dateTransform(point);\n tiles.push(renderTile({\n classes: getTileClasses({\n date: date,\n dateType: dateType,\n hover: hover,\n value: value,\n valueType: valueType,\n }),\n date: date,\n }));\n }\n return (_jsx(Flex, { className: className, count: count, offset: offset, wrap: true, children: tiles }));\n}\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useMemo } from 'react';\nimport clsx from 'clsx';\nexport default function Tile(props) {\n var activeStartDate = props.activeStartDate, children = props.children, classes = props.classes, date = props.date, formatAbbr = props.formatAbbr, locale = props.locale, maxDate = props.maxDate, maxDateTransform = props.maxDateTransform, minDate = props.minDate, minDateTransform = props.minDateTransform, onClick = props.onClick, onMouseOver = props.onMouseOver, style = props.style, tileClassNameProps = props.tileClassName, tileContentProps = props.tileContent, tileDisabled = props.tileDisabled, view = props.view;\n var tileClassName = useMemo(function () {\n var args = { activeStartDate: activeStartDate, date: date, view: view };\n return typeof tileClassNameProps === 'function' ? tileClassNameProps(args) : tileClassNameProps;\n }, [activeStartDate, date, tileClassNameProps, view]);\n var tileContent = useMemo(function () {\n var args = { activeStartDate: activeStartDate, date: date, view: view };\n return typeof tileContentProps === 'function' ? tileContentProps(args) : tileContentProps;\n }, [activeStartDate, date, tileContentProps, view]);\n return (_jsxs(\"button\", { className: clsx(classes, tileClassName), disabled: (minDate && minDateTransform(minDate) > date) ||\n (maxDate && maxDateTransform(maxDate) < date) ||\n (tileDisabled && tileDisabled({ activeStartDate: activeStartDate, date: date, view: view })), onClick: onClick ? function (event) { return onClick(date, event); } : undefined, onFocus: onMouseOver ? function () { return onMouseOver(date); } : undefined, onMouseOver: onMouseOver ? function () { return onMouseOver(date); } : undefined, style: style, type: \"button\", children: [formatAbbr ? _jsx(\"abbr\", { \"aria-label\": formatAbbr(locale, date), children: children }) : children, tileContent] }));\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { getDecadeStart, getDecadeEnd, getCenturyStart } from '@wojtekmaj/date-utils';\nimport Tile from '../Tile.js';\nimport { getDecadeLabel } from '../shared/dates.js';\nimport { formatYear as defaultFormatYear } from '../shared/dateFormatter.js';\nvar className = 'react-calendar__century-view__decades__decade';\nexport default function Decade(_a) {\n var _b = _a.classes, classes = _b === void 0 ? [] : _b, currentCentury = _a.currentCentury, _c = _a.formatYear, formatYear = _c === void 0 ? defaultFormatYear : _c, otherProps = __rest(_a, [\"classes\", \"currentCentury\", \"formatYear\"]);\n var date = otherProps.date, locale = otherProps.locale;\n var classesProps = [];\n if (classes) {\n classesProps.push.apply(classesProps, classes);\n }\n if (className) {\n classesProps.push(className);\n }\n if (getCenturyStart(date).getFullYear() !== currentCentury) {\n classesProps.push(\"\".concat(className, \"--neighboringCentury\"));\n }\n return (_jsx(Tile, __assign({}, otherProps, { classes: classesProps, maxDateTransform: getDecadeEnd, minDateTransform: getDecadeStart, view: \"century\", children: getDecadeLabel(locale, formatYear, date) })));\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { getDecadeStart } from '@wojtekmaj/date-utils';\nimport TileGroup from '../TileGroup.js';\nimport Decade from './Decade.js';\nimport { getBeginOfCenturyYear } from '../shared/dates.js';\nexport default function Decades(props) {\n var activeStartDate = props.activeStartDate, hover = props.hover, showNeighboringCentury = props.showNeighboringCentury, value = props.value, valueType = props.valueType, otherProps = __rest(props, [\"activeStartDate\", \"hover\", \"showNeighboringCentury\", \"value\", \"valueType\"]);\n var start = getBeginOfCenturyYear(activeStartDate);\n var end = start + (showNeighboringCentury ? 119 : 99);\n return (_jsx(TileGroup, { className: \"react-calendar__century-view__decades\", dateTransform: getDecadeStart, dateType: \"decade\", end: end, hover: hover, renderTile: function (_a) {\n var date = _a.date, otherTileProps = __rest(_a, [\"date\"]);\n return (_jsx(Decade, __assign({}, otherProps, otherTileProps, { activeStartDate: activeStartDate, currentCentury: start, date: date }), date.getTime()));\n }, start: start, step: 10, value: value, valueType: valueType }));\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport Decades from './CenturyView/Decades.js';\n/**\n * Displays a given century.\n */\nexport default function CenturyView(props) {\n function renderDecades() {\n return _jsx(Decades, __assign({}, props));\n }\n return _jsx(\"div\", { className: \"react-calendar__century-view\", children: renderDecades() });\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { getYearStart, getYearEnd, getDecadeStart } from '@wojtekmaj/date-utils';\nimport Tile from '../Tile.js';\nimport { formatYear as defaultFormatYear } from '../shared/dateFormatter.js';\nvar className = 'react-calendar__decade-view__years__year';\nexport default function Year(_a) {\n var _b = _a.classes, classes = _b === void 0 ? [] : _b, currentDecade = _a.currentDecade, _c = _a.formatYear, formatYear = _c === void 0 ? defaultFormatYear : _c, otherProps = __rest(_a, [\"classes\", \"currentDecade\", \"formatYear\"]);\n var date = otherProps.date, locale = otherProps.locale;\n var classesProps = [];\n if (classes) {\n classesProps.push.apply(classesProps, classes);\n }\n if (className) {\n classesProps.push(className);\n }\n if (getDecadeStart(date).getFullYear() !== currentDecade) {\n classesProps.push(\"\".concat(className, \"--neighboringDecade\"));\n }\n return (_jsx(Tile, __assign({}, otherProps, { classes: classesProps, maxDateTransform: getYearEnd, minDateTransform: getYearStart, view: \"decade\", children: formatYear(locale, date) })));\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { getYearStart } from '@wojtekmaj/date-utils';\nimport TileGroup from '../TileGroup.js';\nimport Year from './Year.js';\nimport { getBeginOfDecadeYear } from '../shared/dates.js';\nexport default function Years(props) {\n var activeStartDate = props.activeStartDate, hover = props.hover, showNeighboringDecade = props.showNeighboringDecade, value = props.value, valueType = props.valueType, otherProps = __rest(props, [\"activeStartDate\", \"hover\", \"showNeighboringDecade\", \"value\", \"valueType\"]);\n var start = getBeginOfDecadeYear(activeStartDate);\n var end = start + (showNeighboringDecade ? 11 : 9);\n return (_jsx(TileGroup, { className: \"react-calendar__decade-view__years\", dateTransform: getYearStart, dateType: \"year\", end: end, hover: hover, renderTile: function (_a) {\n var date = _a.date, otherTileProps = __rest(_a, [\"date\"]);\n return (_jsx(Year, __assign({}, otherProps, otherTileProps, { activeStartDate: activeStartDate, currentDecade: start, date: date }), date.getTime()));\n }, start: start, value: value, valueType: valueType }));\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport Years from './DecadeView/Years.js';\n/**\n * Displays a given decade.\n */\nexport default function DecadeView(props) {\n function renderYears() {\n return _jsx(Years, __assign({}, props));\n }\n return _jsx(\"div\", { className: \"react-calendar__decade-view\", children: renderYears() });\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { getMonthStart, getMonthEnd } from '@wojtekmaj/date-utils';\nimport Tile from '../Tile.js';\nimport { formatMonth as defaultFormatMonth, formatMonthYear as defaultFormatMonthYear, } from '../shared/dateFormatter.js';\nvar className = 'react-calendar__year-view__months__month';\nexport default function Month(_a) {\n var _b = _a.classes, classes = _b === void 0 ? [] : _b, _c = _a.formatMonth, formatMonth = _c === void 0 ? defaultFormatMonth : _c, _d = _a.formatMonthYear, formatMonthYear = _d === void 0 ? defaultFormatMonthYear : _d, otherProps = __rest(_a, [\"classes\", \"formatMonth\", \"formatMonthYear\"]);\n var date = otherProps.date, locale = otherProps.locale;\n return (_jsx(Tile, __assign({}, otherProps, { classes: __spreadArray(__spreadArray([], classes, true), [className], false), formatAbbr: formatMonthYear, maxDateTransform: getMonthEnd, minDateTransform: getMonthStart, view: \"year\", children: formatMonth(locale, date) })));\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { getMonthStart, getYear } from '@wojtekmaj/date-utils';\nimport TileGroup from '../TileGroup.js';\nimport Month from './Month.js';\nexport default function Months(props) {\n var activeStartDate = props.activeStartDate, hover = props.hover, value = props.value, valueType = props.valueType, otherProps = __rest(props, [\"activeStartDate\", \"hover\", \"value\", \"valueType\"]);\n var start = 0;\n var end = 11;\n var year = getYear(activeStartDate);\n return (_jsx(TileGroup, { className: \"react-calendar__year-view__months\", dateTransform: function (monthIndex) {\n var date = new Date();\n date.setFullYear(year, monthIndex, 1);\n return getMonthStart(date);\n }, dateType: \"month\", end: end, hover: hover, renderTile: function (_a) {\n var date = _a.date, otherTileProps = __rest(_a, [\"date\"]);\n return (_jsx(Month, __assign({}, otherProps, otherTileProps, { activeStartDate: activeStartDate, date: date }), date.getTime()));\n }, start: start, value: value, valueType: valueType }));\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport Months from './YearView/Months.js';\n/**\n * Displays a given year.\n */\nexport default function YearView(props) {\n function renderMonths() {\n return _jsx(Months, __assign({}, props));\n }\n return _jsx(\"div\", { className: \"react-calendar__year-view\", children: renderMonths() });\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { getDayStart, getDayEnd } from '@wojtekmaj/date-utils';\nimport Tile from '../Tile.js';\nimport { isWeekend } from '../shared/dates.js';\nimport { formatDay as defaultFormatDay, formatLongDate as defaultFormatLongDate, } from '../shared/dateFormatter.js';\nvar className = 'react-calendar__month-view__days__day';\nexport default function Day(_a) {\n var calendarType = _a.calendarType, _b = _a.classes, classes = _b === void 0 ? [] : _b, currentMonthIndex = _a.currentMonthIndex, _c = _a.formatDay, formatDay = _c === void 0 ? defaultFormatDay : _c, _d = _a.formatLongDate, formatLongDate = _d === void 0 ? defaultFormatLongDate : _d, otherProps = __rest(_a, [\"calendarType\", \"classes\", \"currentMonthIndex\", \"formatDay\", \"formatLongDate\"]);\n var date = otherProps.date, locale = otherProps.locale;\n var classesProps = [];\n if (classes) {\n classesProps.push.apply(classesProps, classes);\n }\n if (className) {\n classesProps.push(className);\n }\n if (isWeekend(date, calendarType)) {\n classesProps.push(\"\".concat(className, \"--weekend\"));\n }\n if (date.getMonth() !== currentMonthIndex) {\n classesProps.push(\"\".concat(className, \"--neighboringMonth\"));\n }\n return (_jsx(Tile, __assign({}, otherProps, { classes: classesProps, formatAbbr: formatLongDate, maxDateTransform: getDayEnd, minDateTransform: getDayStart, view: \"month\", children: formatDay(locale, date) })));\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { getYear, getMonth, getDaysInMonth, getDayStart } from '@wojtekmaj/date-utils';\nimport TileGroup from '../TileGroup.js';\nimport Day from './Day.js';\nimport { getDayOfWeek } from '../shared/dates.js';\nexport default function Days(props) {\n var activeStartDate = props.activeStartDate, calendarType = props.calendarType, hover = props.hover, showFixedNumberOfWeeks = props.showFixedNumberOfWeeks, showNeighboringMonth = props.showNeighboringMonth, value = props.value, valueType = props.valueType, otherProps = __rest(props, [\"activeStartDate\", \"calendarType\", \"hover\", \"showFixedNumberOfWeeks\", \"showNeighboringMonth\", \"value\", \"valueType\"]);\n var year = getYear(activeStartDate);\n var monthIndex = getMonth(activeStartDate);\n var hasFixedNumberOfWeeks = showFixedNumberOfWeeks || showNeighboringMonth;\n var dayOfWeek = getDayOfWeek(activeStartDate, calendarType);\n var offset = hasFixedNumberOfWeeks ? 0 : dayOfWeek;\n /**\n * Defines on which day of the month the grid shall start. If we simply show current\n * month, we obviously start on day one, but if showNeighboringMonth is set to\n * true, we need to find the beginning of the week the first day of the month is in.\n */\n var start = (hasFixedNumberOfWeeks ? -dayOfWeek : 0) + 1;\n /**\n * Defines on which day of the month the grid shall end. If we simply show current\n * month, we need to stop on the last day of the month, but if showNeighboringMonth\n * is set to true, we need to find the end of the week the last day of the month is in.\n */\n var end = (function () {\n if (showFixedNumberOfWeeks) {\n // Always show 6 weeks\n return start + 6 * 7 - 1;\n }\n var daysInMonth = getDaysInMonth(activeStartDate);\n if (showNeighboringMonth) {\n var activeEndDate = new Date();\n activeEndDate.setFullYear(year, monthIndex, daysInMonth);\n activeEndDate.setHours(0, 0, 0, 0);\n var daysUntilEndOfTheWeek = 7 - getDayOfWeek(activeEndDate, calendarType) - 1;\n return daysInMonth + daysUntilEndOfTheWeek;\n }\n return daysInMonth;\n })();\n return (_jsx(TileGroup, { className: \"react-calendar__month-view__days\", count: 7, dateTransform: function (day) {\n var date = new Date();\n date.setFullYear(year, monthIndex, day);\n return getDayStart(date);\n }, dateType: \"day\", hover: hover, end: end, renderTile: function (_a) {\n var date = _a.date, otherTileProps = __rest(_a, [\"date\"]);\n return (_jsx(Day, __assign({}, otherProps, otherTileProps, { activeStartDate: activeStartDate, calendarType: calendarType, currentMonthIndex: monthIndex, date: date }), date.getTime()));\n }, offset: offset, start: start, value: value, valueType: valueType }));\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nimport { getYear, getMonth, getMonthStart } from '@wojtekmaj/date-utils';\nimport Flex from '../Flex.js';\nimport { getDayOfWeek, isCurrentDayOfWeek, isWeekend } from '../shared/dates.js';\nimport { formatShortWeekday as defaultFormatShortWeekday, formatWeekday as defaultFormatWeekday, } from '../shared/dateFormatter.js';\nvar className = 'react-calendar__month-view__weekdays';\nvar weekdayClassName = \"\".concat(className, \"__weekday\");\nexport default function Weekdays(props) {\n var calendarType = props.calendarType, _a = props.formatShortWeekday, formatShortWeekday = _a === void 0 ? defaultFormatShortWeekday : _a, _b = props.formatWeekday, formatWeekday = _b === void 0 ? defaultFormatWeekday : _b, locale = props.locale, onMouseLeave = props.onMouseLeave;\n var anyDate = new Date();\n var beginOfMonth = getMonthStart(anyDate);\n var year = getYear(beginOfMonth);\n var monthIndex = getMonth(beginOfMonth);\n var weekdays = [];\n for (var weekday = 1; weekday <= 7; weekday += 1) {\n var weekdayDate = new Date(year, monthIndex, weekday - getDayOfWeek(beginOfMonth, calendarType));\n var abbr = formatWeekday(locale, weekdayDate);\n weekdays.push(_jsx(\"div\", { className: clsx(weekdayClassName, isCurrentDayOfWeek(weekdayDate) && \"\".concat(weekdayClassName, \"--current\"), isWeekend(weekdayDate, calendarType) && \"\".concat(weekdayClassName, \"--weekend\")), children: _jsx(\"abbr\", { \"aria-label\": abbr, title: abbr, children: formatShortWeekday(locale, weekdayDate).replace('.', '') }) }, weekday));\n }\n return (_jsx(Flex, { className: className, count: 7, onFocus: onMouseLeave, onMouseOver: onMouseLeave, children: weekdays }));\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar className = 'react-calendar__tile';\nexport default function WeekNumber(props) {\n var onClickWeekNumber = props.onClickWeekNumber, weekNumber = props.weekNumber;\n var children = _jsx(\"span\", { children: weekNumber });\n if (onClickWeekNumber) {\n var date_1 = props.date, onClickWeekNumber_1 = props.onClickWeekNumber, weekNumber_1 = props.weekNumber, otherProps = __rest(props, [\"date\", \"onClickWeekNumber\", \"weekNumber\"]);\n return (_jsx(\"button\", __assign({}, otherProps, { className: className, onClick: function (event) { return onClickWeekNumber_1(weekNumber_1, date_1, event); }, type: \"button\", children: children })));\n }\n else {\n var date = props.date, onClickWeekNumber_2 = props.onClickWeekNumber, weekNumber_2 = props.weekNumber, otherProps = __rest(props, [\"date\", \"onClickWeekNumber\", \"weekNumber\"]);\n return (_jsx(\"div\", __assign({}, otherProps, { className: className, children: children })));\n }\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { getYear, getMonth, getDate, getDaysInMonth } from '@wojtekmaj/date-utils';\nimport WeekNumber from './WeekNumber.js';\nimport Flex from '../Flex.js';\nimport { getBeginOfWeek, getDayOfWeek, getWeekNumber } from '../shared/dates.js';\nexport default function WeekNumbers(props) {\n var activeStartDate = props.activeStartDate, calendarType = props.calendarType, onClickWeekNumber = props.onClickWeekNumber, onMouseLeave = props.onMouseLeave, showFixedNumberOfWeeks = props.showFixedNumberOfWeeks;\n var numberOfWeeks = (function () {\n if (showFixedNumberOfWeeks) {\n return 6;\n }\n var numberOfDays = getDaysInMonth(activeStartDate);\n var startWeekday = getDayOfWeek(activeStartDate, calendarType);\n var days = numberOfDays - (7 - startWeekday);\n return 1 + Math.ceil(days / 7);\n })();\n var dates = (function () {\n var year = getYear(activeStartDate);\n var monthIndex = getMonth(activeStartDate);\n var day = getDate(activeStartDate);\n var result = [];\n for (var index = 0; index < numberOfWeeks; index += 1) {\n result.push(getBeginOfWeek(new Date(year, monthIndex, day + index * 7), calendarType));\n }\n return result;\n })();\n var weekNumbers = dates.map(function (date) { return getWeekNumber(date, calendarType); });\n return (_jsx(Flex, { className: \"react-calendar__month-view__weekNumbers\", count: numberOfWeeks, direction: \"column\", onFocus: onMouseLeave, onMouseOver: onMouseLeave, style: { flexBasis: 'calc(100% * (1 / 8)', flexShrink: 0 }, children: weekNumbers.map(function (weekNumber, weekIndex) {\n var date = dates[weekIndex];\n if (!date) {\n throw new Error('date is not defined');\n }\n return (_jsx(WeekNumber, { date: date, onClickWeekNumber: onClickWeekNumber, weekNumber: weekNumber }, weekNumber));\n }) }));\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nimport Days from './MonthView/Days.js';\nimport Weekdays from './MonthView/Weekdays.js';\nimport WeekNumbers from './MonthView/WeekNumbers.js';\nimport { CALENDAR_TYPES, CALENDAR_TYPE_LOCALES } from './shared/const.js';\nfunction getCalendarTypeFromLocale(locale) {\n if (locale) {\n for (var _i = 0, _a = Object.entries(CALENDAR_TYPE_LOCALES); _i < _a.length; _i++) {\n var _b = _a[_i], calendarType = _b[0], locales = _b[1];\n if (locales.includes(locale)) {\n return calendarType;\n }\n }\n }\n return CALENDAR_TYPES.ISO_8601;\n}\n/**\n * Displays a given month.\n */\nexport default function MonthView(props) {\n var activeStartDate = props.activeStartDate, locale = props.locale, onMouseLeave = props.onMouseLeave, showFixedNumberOfWeeks = props.showFixedNumberOfWeeks;\n var _a = props.calendarType, calendarType = _a === void 0 ? getCalendarTypeFromLocale(locale) : _a, formatShortWeekday = props.formatShortWeekday, formatWeekday = props.formatWeekday, onClickWeekNumber = props.onClickWeekNumber, showWeekNumbers = props.showWeekNumbers, childProps = __rest(props, [\"calendarType\", \"formatShortWeekday\", \"formatWeekday\", \"onClickWeekNumber\", \"showWeekNumbers\"]);\n function renderWeekdays() {\n return (_jsx(Weekdays, { calendarType: calendarType, formatShortWeekday: formatShortWeekday, formatWeekday: formatWeekday, locale: locale, onMouseLeave: onMouseLeave }));\n }\n function renderWeekNumbers() {\n if (!showWeekNumbers) {\n return null;\n }\n return (_jsx(WeekNumbers, { activeStartDate: activeStartDate, calendarType: calendarType, onClickWeekNumber: onClickWeekNumber, onMouseLeave: onMouseLeave, showFixedNumberOfWeeks: showFixedNumberOfWeeks }));\n }\n function renderDays() {\n return _jsx(Days, __assign({ calendarType: calendarType }, childProps));\n }\n var className = 'react-calendar__month-view';\n return (_jsx(\"div\", { className: clsx(className, showWeekNumbers ? \"\".concat(className, \"--weekNumbers\") : ''), children: _jsxs(\"div\", { style: {\n display: 'flex',\n alignItems: 'flex-end',\n }, children: [renderWeekNumbers(), _jsxs(\"div\", { style: {\n flexGrow: 1,\n width: '100%',\n }, children: [renderWeekdays(), renderDays()] })] }) }));\n}\n","'use client';\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { forwardRef, useCallback, useImperativeHandle, useState } from 'react';\nimport clsx from 'clsx';\nimport Navigation from './Calendar/Navigation.js';\nimport CenturyView from './CenturyView.js';\nimport DecadeView from './DecadeView.js';\nimport YearView from './YearView.js';\nimport MonthView from './MonthView.js';\nimport { getBegin, getBeginNext, getEnd, getValueRange } from './shared/dates.js';\nimport { between } from './shared/utils.js';\nvar baseClassName = 'react-calendar';\nvar allViews = ['century', 'decade', 'year', 'month'];\nvar allValueTypes = ['decade', 'year', 'month', 'day'];\nvar defaultMinDate = new Date();\ndefaultMinDate.setFullYear(1, 0, 1);\ndefaultMinDate.setHours(0, 0, 0, 0);\nvar defaultMaxDate = new Date(8.64e15);\nfunction toDate(value) {\n if (value instanceof Date) {\n return value;\n }\n return new Date(value);\n}\n/**\n * Returns views array with disallowed values cut off.\n */\nfunction getLimitedViews(minDetail, maxDetail) {\n return allViews.slice(allViews.indexOf(minDetail), allViews.indexOf(maxDetail) + 1);\n}\n/**\n * Determines whether a given view is allowed with currently applied settings.\n */\nfunction isViewAllowed(view, minDetail, maxDetail) {\n var views = getLimitedViews(minDetail, maxDetail);\n return views.indexOf(view) !== -1;\n}\n/**\n * Gets either provided view if allowed by minDetail and maxDetail, or gets\n * the default view if not allowed.\n */\nfunction getView(view, minDetail, maxDetail) {\n if (!view) {\n return maxDetail;\n }\n if (isViewAllowed(view, minDetail, maxDetail)) {\n return view;\n }\n return maxDetail;\n}\n/**\n * Returns value type that can be returned with currently applied settings.\n */\nfunction getValueType(view) {\n var index = allViews.indexOf(view);\n return allValueTypes[index];\n}\nfunction getValue(value, index) {\n var rawValue = Array.isArray(value) ? value[index] : value;\n if (!rawValue) {\n return null;\n }\n var valueDate = toDate(rawValue);\n if (isNaN(valueDate.getTime())) {\n throw new Error(\"Invalid date: \".concat(value));\n }\n return valueDate;\n}\nfunction getDetailValue(_a, index) {\n var value = _a.value, minDate = _a.minDate, maxDate = _a.maxDate, maxDetail = _a.maxDetail;\n var valuePiece = getValue(value, index);\n if (!valuePiece) {\n return null;\n }\n var valueType = getValueType(maxDetail);\n var detailValueFrom = (function () {\n switch (index) {\n case 0:\n return getBegin(valueType, valuePiece);\n case 1:\n return getEnd(valueType, valuePiece);\n default:\n throw new Error(\"Invalid index value: \".concat(index));\n }\n })();\n return between(detailValueFrom, minDate, maxDate);\n}\nvar getDetailValueFrom = function (args) { return getDetailValue(args, 0); };\nvar getDetailValueTo = function (args) { return getDetailValue(args, 1); };\nvar getDetailValueArray = function (args) {\n return [getDetailValueFrom, getDetailValueTo].map(function (fn) { return fn(args); });\n};\nfunction getActiveStartDate(_a) {\n var maxDate = _a.maxDate, maxDetail = _a.maxDetail, minDate = _a.minDate, minDetail = _a.minDetail, value = _a.value, view = _a.view;\n var rangeType = getView(view, minDetail, maxDetail);\n var valueFrom = getDetailValueFrom({\n value: value,\n minDate: minDate,\n maxDate: maxDate,\n maxDetail: maxDetail,\n }) || new Date();\n return getBegin(rangeType, valueFrom);\n}\nfunction getInitialActiveStartDate(_a) {\n var activeStartDate = _a.activeStartDate, defaultActiveStartDate = _a.defaultActiveStartDate, defaultValue = _a.defaultValue, defaultView = _a.defaultView, maxDate = _a.maxDate, maxDetail = _a.maxDetail, minDate = _a.minDate, minDetail = _a.minDetail, value = _a.value, view = _a.view;\n var rangeType = getView(view, minDetail, maxDetail);\n var valueFrom = activeStartDate || defaultActiveStartDate;\n if (valueFrom) {\n return getBegin(rangeType, valueFrom);\n }\n return getActiveStartDate({\n maxDate: maxDate,\n maxDetail: maxDetail,\n minDate: minDate,\n minDetail: minDetail,\n value: value || defaultValue,\n view: view || defaultView,\n });\n}\nfunction getIsSingleValue(value) {\n return value && (!Array.isArray(value) || value.length === 1);\n}\nfunction areDatesEqual(date1, date2) {\n return date1 instanceof Date && date2 instanceof Date && date1.getTime() === date2.getTime();\n}\nvar Calendar = forwardRef(function Calendar(props, ref) {\n var activeStartDateProps = props.activeStartDate, allowPartialRange = props.allowPartialRange, calendarType = props.calendarType, className = props.className, defaultActiveStartDate = props.defaultActiveStartDate, defaultValue = props.defaultValue, defaultView = props.defaultView, formatDay = props.formatDay, formatLongDate = props.formatLongDate, formatMonth = props.formatMonth, formatMonthYear = props.formatMonthYear, formatShortWeekday = props.formatShortWeekday, formatWeekday = props.formatWeekday, formatYear = props.formatYear, _a = props.goToRangeStartOnSelect, goToRangeStartOnSelect = _a === void 0 ? true : _a, inputRef = props.inputRef, locale = props.locale, _b = props.maxDate, maxDate = _b === void 0 ? defaultMaxDate : _b, _c = props.maxDetail, maxDetail = _c === void 0 ? 'month' : _c, _d = props.minDate, minDate = _d === void 0 ? defaultMinDate : _d, _e = props.minDetail, minDetail = _e === void 0 ? 'century' : _e, navigationAriaLabel = props.navigationAriaLabel, navigationAriaLive = props.navigationAriaLive, navigationLabel = props.navigationLabel, next2AriaLabel = props.next2AriaLabel, next2Label = props.next2Label, nextAriaLabel = props.nextAriaLabel, nextLabel = props.nextLabel, onActiveStartDateChange = props.onActiveStartDateChange, onChangeProps = props.onChange, onClickDay = props.onClickDay, onClickDecade = props.onClickDecade, onClickMonth = props.onClickMonth, onClickWeekNumber = props.onClickWeekNumber, onClickYear = props.onClickYear, onDrillDown = props.onDrillDown, onDrillUp = props.onDrillUp, onViewChange = props.onViewChange, prev2AriaLabel = props.prev2AriaLabel, prev2Label = props.prev2Label, prevAriaLabel = props.prevAriaLabel, prevLabel = props.prevLabel, _f = props.returnValue, returnValue = _f === void 0 ? 'start' : _f, selectRange = props.selectRange, showDoubleView = props.showDoubleView, showFixedNumberOfWeeks = props.showFixedNumberOfWeeks, _g = props.showNavigation, showNavigation = _g === void 0 ? true : _g, showNeighboringCentury = props.showNeighboringCentury, showNeighboringDecade = props.showNeighboringDecade, _h = props.showNeighboringMonth, showNeighboringMonth = _h === void 0 ? true : _h, showWeekNumbers = props.showWeekNumbers, tileClassName = props.tileClassName, tileContent = props.tileContent, tileDisabled = props.tileDisabled, valueProps = props.value, viewProps = props.view;\n var _j = useState(defaultActiveStartDate), activeStartDateState = _j[0], setActiveStartDateState = _j[1];\n var _k = useState(null), hoverState = _k[0], setHoverState = _k[1];\n var _l = useState(Array.isArray(defaultValue)\n ? defaultValue.map(function (el) { return (el !== null ? toDate(el) : null); })\n : defaultValue !== null && defaultValue !== undefined\n ? toDate(defaultValue)\n : null), valueState = _l[0], setValueState = _l[1];\n var _m = useState(defaultView), viewState = _m[0], setViewState = _m[1];\n var activeStartDate = activeStartDateProps ||\n activeStartDateState ||\n getInitialActiveStartDate({\n activeStartDate: activeStartDateProps,\n defaultActiveStartDate: defaultActiveStartDate,\n defaultValue: defaultValue,\n defaultView: defaultView,\n maxDate: maxDate,\n maxDetail: maxDetail,\n minDate: minDate,\n minDetail: minDetail,\n value: valueProps,\n view: viewProps,\n });\n var value = (function () {\n var rawValue = (function () {\n // In the middle of range selection, use value from state\n if (selectRange && getIsSingleValue(valueState)) {\n return valueState;\n }\n return valueProps !== undefined ? valueProps : valueState;\n })();\n if (!rawValue) {\n return null;\n }\n return Array.isArray(rawValue)\n ? rawValue.map(function (el) { return (el !== null ? toDate(el) : null); })\n : rawValue !== null\n ? toDate(rawValue)\n : null;\n })();\n var valueType = getValueType(maxDetail);\n var view = getView(viewProps || viewState, minDetail, maxDetail);\n var views = getLimitedViews(minDetail, maxDetail);\n var hover = selectRange ? hoverState : null;\n var drillDownAvailable = views.indexOf(view) < views.length - 1;\n var drillUpAvailable = views.indexOf(view) > 0;\n var getProcessedValue = useCallback(function (value) {\n var processFunction = (function () {\n switch (returnValue) {\n case 'start':\n return getDetailValueFrom;\n case 'end':\n return getDetailValueTo;\n case 'range':\n return getDetailValueArray;\n default:\n throw new Error('Invalid returnValue.');\n }\n })();\n return processFunction({\n maxDate: maxDate,\n maxDetail: maxDetail,\n minDate: minDate,\n value: value,\n });\n }, [maxDate, maxDetail, minDate, returnValue]);\n var setActiveStartDate = useCallback(function (nextActiveStartDate, action) {\n setActiveStartDateState(nextActiveStartDate);\n var args = {\n action: action,\n activeStartDate: nextActiveStartDate,\n value: value,\n view: view,\n };\n if (onActiveStartDateChange && !areDatesEqual(activeStartDate, nextActiveStartDate)) {\n onActiveStartDateChange(args);\n }\n }, [activeStartDate, onActiveStartDateChange, value, view]);\n var onClickTile = useCallback(function (value, event) {\n var callback = (function () {\n switch (view) {\n case 'century':\n return onClickDecade;\n case 'decade':\n return onClickYear;\n case 'year':\n return onClickMonth;\n case 'month':\n return onClickDay;\n default:\n throw new Error(\"Invalid view: \".concat(view, \".\"));\n }\n })();\n if (callback)\n callback(value, event);\n }, [onClickDay, onClickDecade, onClickMonth, onClickYear, view]);\n var drillDown = useCallback(function (nextActiveStartDate, event) {\n if (!drillDownAvailable) {\n return;\n }\n onClickTile(nextActiveStartDate, event);\n var nextView = views[views.indexOf(view) + 1];\n if (!nextView) {\n throw new Error('Attempted to drill down from the lowest view.');\n }\n setActiveStartDateState(nextActiveStartDate);\n setViewState(nextView);\n var args = {\n action: 'drillDown',\n activeStartDate: nextActiveStartDate,\n value: value,\n view: nextView,\n };\n if (onActiveStartDateChange && !areDatesEqual(activeStartDate, nextActiveStartDate)) {\n onActiveStartDateChange(args);\n }\n if (onViewChange && view !== nextView) {\n onViewChange(args);\n }\n if (onDrillDown) {\n onDrillDown(args);\n }\n }, [\n activeStartDate,\n drillDownAvailable,\n onActiveStartDateChange,\n onClickTile,\n onDrillDown,\n onViewChange,\n value,\n view,\n views,\n ]);\n var drillUp = useCallback(function () {\n if (!drillUpAvailable) {\n return;\n }\n var nextView = views[views.indexOf(view) - 1];\n if (!nextView) {\n throw new Error('Attempted to drill up from the highest view.');\n }\n var nextActiveStartDate = getBegin(nextView, activeStartDate);\n setActiveStartDateState(nextActiveStartDate);\n setViewState(nextView);\n var args = {\n action: 'drillUp',\n activeStartDate: nextActiveStartDate,\n value: value,\n view: nextView,\n };\n if (onActiveStartDateChange && !areDatesEqual(activeStartDate, nextActiveStartDate)) {\n onActiveStartDateChange(args);\n }\n if (onViewChange && view !== nextView) {\n onViewChange(args);\n }\n if (onDrillUp) {\n onDrillUp(args);\n }\n }, [\n activeStartDate,\n drillUpAvailable,\n onActiveStartDateChange,\n onDrillUp,\n onViewChange,\n value,\n view,\n views,\n ]);\n var onChange = useCallback(function (rawNextValue, event) {\n var previousValue = value;\n onClickTile(rawNextValue, event);\n var isFirstValueInRange = selectRange && !getIsSingleValue(previousValue);\n var nextValue;\n if (selectRange) {\n // Range selection turned on\n if (isFirstValueInRange) {\n // Value has 0 or 2 elements - either way we're starting a new array\n // First value\n nextValue = getBegin(valueType, rawNextValue);\n }\n else {\n if (!previousValue) {\n throw new Error('previousValue is required');\n }\n if (Array.isArray(previousValue)) {\n throw new Error('previousValue must not be an array');\n }\n // Second value\n nextValue = getValueRange(valueType, previousValue, rawNextValue);\n }\n }\n else {\n // Range selection turned off\n nextValue = getProcessedValue(rawNextValue);\n }\n var nextActiveStartDate = \n // Range selection turned off\n !selectRange ||\n // Range selection turned on, first value\n isFirstValueInRange ||\n // Range selection turned on, second value, goToRangeStartOnSelect toggled on\n goToRangeStartOnSelect\n ? getActiveStartDate({\n maxDate: maxDate,\n maxDetail: maxDetail,\n minDate: minDate,\n minDetail: minDetail,\n value: nextValue,\n view: view,\n })\n : null;\n event.persist();\n setActiveStartDateState(nextActiveStartDate);\n setValueState(nextValue);\n var args = {\n action: 'onChange',\n activeStartDate: nextActiveStartDate,\n value: nextValue,\n view: view,\n };\n if (onActiveStartDateChange && !areDatesEqual(activeStartDate, nextActiveStartDate)) {\n onActiveStartDateChange(args);\n }\n if (onChangeProps) {\n if (selectRange) {\n var isSingleValue = getIsSingleValue(nextValue);\n if (!isSingleValue) {\n onChangeProps(nextValue || null, event);\n }\n else if (allowPartialRange) {\n if (Array.isArray(nextValue)) {\n throw new Error('value must not be an array');\n }\n onChangeProps([nextValue || null, null], event);\n }\n }\n else {\n onChangeProps(nextValue || null, event);\n }\n }\n }, [\n activeStartDate,\n allowPartialRange,\n getProcessedValue,\n goToRangeStartOnSelect,\n maxDate,\n maxDetail,\n minDate,\n minDetail,\n onActiveStartDateChange,\n onChangeProps,\n onClickTile,\n selectRange,\n value,\n valueType,\n view,\n ]);\n function onMouseOver(nextHover) {\n setHoverState(nextHover);\n }\n function onMouseLeave() {\n setHoverState(null);\n }\n useImperativeHandle(ref, function () { return ({\n activeStartDate: activeStartDate,\n drillDown: drillDown,\n drillUp: drillUp,\n onChange: onChange,\n setActiveStartDate: setActiveStartDate,\n value: value,\n view: view,\n }); }, [activeStartDate, drillDown, drillUp, onChange, setActiveStartDate, value, view]);\n function renderContent(next) {\n var currentActiveStartDate = next\n ? getBeginNext(view, activeStartDate)\n : getBegin(view, activeStartDate);\n var onClick = drillDownAvailable ? drillDown : onChange;\n var commonProps = {\n activeStartDate: currentActiveStartDate,\n hover: hover,\n locale: locale,\n maxDate: maxDate,\n minDate: minDate,\n onClick: onClick,\n onMouseOver: selectRange ? onMouseOver : undefined,\n tileClassName: tileClassName,\n tileContent: tileContent,\n tileDisabled: tileDisabled,\n value: value,\n valueType: valueType,\n };\n switch (view) {\n case 'century': {\n return (_jsx(CenturyView, __assign({ formatYear: formatYear, showNeighboringCentury: showNeighboringCentury }, commonProps)));\n }\n case 'decade': {\n return (_jsx(DecadeView, __assign({ formatYear: formatYear, showNeighboringDecade: showNeighboringDecade }, commonProps)));\n }\n case 'year': {\n return (_jsx(YearView, __assign({ formatMonth: formatMonth, formatMonthYear: formatMonthYear }, commonProps)));\n }\n case 'month': {\n return (_jsx(MonthView, __assign({ calendarType: calendarType, formatDay: formatDay, formatLongDate: formatLongDate, formatShortWeekday: formatShortWeekday, formatWeekday: formatWeekday, onClickWeekNumber: onClickWeekNumber, onMouseLeave: selectRange ? onMouseLeave : undefined, showFixedNumberOfWeeks: typeof showFixedNumberOfWeeks !== 'undefined'\n ? showFixedNumberOfWeeks\n : showDoubleView, showNeighboringMonth: showNeighboringMonth, showWeekNumbers: showWeekNumbers }, commonProps)));\n }\n default:\n throw new Error(\"Invalid view: \".concat(view, \".\"));\n }\n }\n function renderNavigation() {\n if (!showNavigation) {\n return null;\n }\n return (_jsx(Navigation, { activeStartDate: activeStartDate, drillUp: drillUp, formatMonthYear: formatMonthYear, formatYear: formatYear, locale: locale, maxDate: maxDate, minDate: minDate, navigationAriaLabel: navigationAriaLabel, navigationAriaLive: navigationAriaLive, navigationLabel: navigationLabel, next2AriaLabel: next2AriaLabel, next2Label: next2Label, nextAriaLabel: nextAriaLabel, nextLabel: nextLabel, prev2AriaLabel: prev2AriaLabel, prev2Label: prev2Label, prevAriaLabel: prevAriaLabel, prevLabel: prevLabel, setActiveStartDate: setActiveStartDate, showDoubleView: showDoubleView, view: view, views: views }));\n }\n var valueArray = Array.isArray(value) ? value : [value];\n return (_jsxs(\"div\", { className: clsx(baseClassName, selectRange && valueArray.length === 1 && \"\".concat(baseClassName, \"--selectRange\"), showDoubleView && \"\".concat(baseClassName, \"--doubleView\"), className), ref: inputRef, children: [renderNavigation(), _jsxs(\"div\", { className: \"\".concat(baseClassName, \"__viewContainer\"), onBlur: selectRange ? onMouseLeave : undefined, onMouseLeave: selectRange ? onMouseLeave : undefined, children: [renderContent(), showDoubleView ? renderContent(true) : null] })] }));\n});\nexport default Calendar;\n","import Calendar from './Calendar.js';\nimport CenturyView from './CenturyView.js';\nimport DecadeView from './DecadeView.js';\nimport MonthView from './MonthView.js';\nimport Navigation from './Calendar/Navigation.js';\nimport YearView from './YearView.js';\nexport { Calendar, CenturyView, DecadeView, MonthView, Navigation, YearView };\nexport default Calendar;\n"],"sourceRoot":""}