12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445 |
- (() => {
- var exports = {};
- exports.id = 54844;
- exports.ids = [54844,64820];
- exports.modules = {
- /***/ 14356:
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ pageWrapperTemplate),
- /* harmony export */ "getServerSideProps": () => (/* binding */ getServerSideProps),
- /* harmony export */ "getStaticProps": () => (/* binding */ getStaticProps)
- /* harmony export */ });
- /* harmony import */ var _sentry_server_config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96270);
- /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58097);
- /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20997);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var _umalqura_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(89942);
- /* harmony import */ var _umalqura_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_umalqura_core__WEBPACK_IMPORTED_MODULE_3__);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(60866);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4__);
- /* harmony import */ var react_virtuoso__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(78404);
- /* harmony import */ var react_virtuoso__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_virtuoso__WEBPACK_IMPORTED_MODULE_5__);
- /* harmony import */ var _calendar_module_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(52982);
- /* harmony import */ var _calendar_module_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_calendar_module_scss__WEBPACK_IMPORTED_MODULE_15__);
- /* harmony import */ var _components_NextSeoWrapper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25869);
- /* harmony import */ var _components_PageContainer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9234);
- /* harmony import */ var _components_QuranicCalendar_JoinQuranicCalendarButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(41357);
- /* harmony import */ var _components_QuranicCalendar_QuranicCalendarHero__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(31122);
- /* harmony import */ var _components_QuranicCalendar_QuranicCalendarMonth__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(17843);
- /* harmony import */ var _utils_hijri_date__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(12690);
- /* harmony import */ var _utils_locale__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(24709);
- /* harmony import */ var _utils_navigation__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(57933);
- /* harmony import */ var quranic_calendar_json__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(55269);
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_components_QuranicCalendar_JoinQuranicCalendarButton__WEBPACK_IMPORTED_MODULE_8__, _components_QuranicCalendar_QuranicCalendarMonth__WEBPACK_IMPORTED_MODULE_10__, _utils_navigation__WEBPACK_IMPORTED_MODULE_13__]);
- ([_components_QuranicCalendar_JoinQuranicCalendarButton__WEBPACK_IMPORTED_MODULE_8__, _components_QuranicCalendar_QuranicCalendarMonth__WEBPACK_IMPORTED_MODULE_10__, _utils_navigation__WEBPACK_IMPORTED_MODULE_13__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
- const MONTHS_WEEKS = Object.values(quranic_calendar_json__WEBPACK_IMPORTED_MODULE_14__);
- const PATH = (0,_utils_navigation__WEBPACK_IMPORTED_MODULE_13__/* .getQuranicCalendarNavigationUrl */ .ly)();
- const QuranicCalendarPage = ()=>{
- const { t , lang } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4___default()("quranic-calendar");
- const currentHijriDate = _umalqura_core__WEBPACK_IMPORTED_MODULE_3___default()();
- /**
- * Get the index of the current month in the MONTHS_WEEKS array
- * by comparing the current month and year with the month and year of each month in the array.
- *
- * @returns {number} The index of the current month in the MONTHS_WEEKS array
- */ const getInitialTopMostItemIndex = ()=>{
- for(let index = 0; index < MONTHS_WEEKS.length; index += 1){
- const monthWeeks = MONTHS_WEEKS[index];
- const calendarMonth = _umalqura_core__WEBPACK_IMPORTED_MODULE_3___default()(Number(monthWeeks[0].hijriYear), Number(monthWeeks[0].hijriMonth), 1);
- const isCurrentMonthAndYear = calendarMonth.hm === currentHijriDate.hm && currentHijriDate.hy === calendarMonth.hy;
- if (isCurrentMonthAndYear) {
- return index;
- }
- }
- return 0;
- };
- const currentQuranicCalendarWeek = (0,_utils_hijri_date__WEBPACK_IMPORTED_MODULE_11__/* .getCurrentQuranicCalendarWeek */ .a)(currentHijriDate);
- return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment, {
- children: [
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_NextSeoWrapper__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
- title: t("quranic-calendar"),
- url: (0,_utils_navigation__WEBPACK_IMPORTED_MODULE_13__/* .getCanonicalUrl */ .Z2)(lang, PATH),
- languageAlternates: (0,_utils_locale__WEBPACK_IMPORTED_MODULE_12__/* .getLanguageAlternates */ .qc)(PATH)
- }),
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_QuranicCalendar_QuranicCalendarHero__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z, {}),
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_components_PageContainer__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
- children: [
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_QuranicCalendar_JoinQuranicCalendarButton__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, {
- currentQuranicCalendarWeek: currentQuranicCalendarWeek,
- currentHijriDate: currentHijriDate
- }),
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
- className: (_calendar_module_scss__WEBPACK_IMPORTED_MODULE_15___default().container),
- children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(react_virtuoso__WEBPACK_IMPORTED_MODULE_5__.Virtuoso, {
- data: MONTHS_WEEKS,
- initialItemCount: 1,
- initialTopMostItemIndex: getInitialTopMostItemIndex(),
- totalCount: MONTHS_WEEKS.length,
- itemContent: (index, monthWeeks)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_QuranicCalendar_QuranicCalendarMonth__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
- currentQuranicCalendarWeek: currentQuranicCalendarWeek,
- monthWeeks: monthWeeks
- }, index)
- })
- })
- ]
- })
- ]
- });
- };
- var serverComponentModule = /*#__PURE__*/Object.freeze({
- __proto__: null,
- 'default': QuranicCalendarPage
- });
- /*
- * This file is a template for the code which will be substituted when our webpack loader handles non-API files in the
- * `pages/` directory.
- *
- * We use `__SENTRY_WRAPPING_TARGET_FILE__.cjs` as a placeholder for the path to the file being wrapped. Because it's not a real package,
- * this causes both TS and ESLint to complain, hence the pragma comments below.
- */
- const userPageModule = serverComponentModule ;
- const pageComponent = userPageModule ? userPageModule.default : undefined;
- const origGetInitialProps = pageComponent ? pageComponent.getInitialProps : undefined;
- const origGetStaticProps = userPageModule ? userPageModule.getStaticProps : undefined;
- const origGetServerSideProps = userPageModule ? userPageModule.getServerSideProps : undefined;
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- const getInitialPropsWrappers = {
- '/_app': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapAppGetInitialPropsWithSentry,
- '/_document': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapDocumentGetInitialPropsWithSentry,
- '/_error': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapErrorGetInitialPropsWithSentry,
- };
- const getInitialPropsWrapper = getInitialPropsWrappers['/calendar'] || _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetInitialPropsWithSentry;
- if (pageComponent && typeof origGetInitialProps === 'function') {
- pageComponent.getInitialProps = getInitialPropsWrapper(origGetInitialProps) ;
- }
- const getStaticProps =
- typeof origGetStaticProps === 'function'
- ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetStaticPropsWithSentry(origGetStaticProps, '/calendar')
- : undefined;
- const getServerSideProps =
- typeof origGetServerSideProps === 'function'
- ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetServerSidePropsWithSentry(origGetServerSideProps, '/calendar')
- : undefined;
- const pageWrapperTemplate = pageComponent ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapPageComponentWithSentry(pageComponent ) : pageComponent;
- __webpack_async_result__();
- } catch(e) { __webpack_async_result__(e); } });
- /***/ }),
- /***/ 19022:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16689);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
- var _path;
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
- var SvgNotificationBell = function SvgNotificationBell(props) {
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- fill: "currentColor"
- }, props), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
- fillRule: "evenodd",
- d: "M5.25 9a6.75 6.75 0 0 1 13.5 0v.75c0 2.123.8 4.057 2.118 5.52a.75.75 0 0 1-.297 1.206c-1.544.57-3.16.99-4.831 1.243a3.75 3.75 0 1 1-7.48 0 24.585 24.585 0 0 1-4.831-1.244.75.75 0 0 1-.298-1.205A8.217 8.217 0 0 0 5.25 9.75V9zm4.502 8.9a2.25 2.25 0 1 0 4.496 0 25.057 25.057 0 0 1-4.496 0z",
- clipRule: "evenodd"
- })));
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SvgNotificationBell);
- /***/ }),
- /***/ 93020:
- /***/ ((module) => {
- // Exports
- module.exports = {
- "container": "PageContainer_container__1TUET",
- "fullWidth": "PageContainer_fullWidth__RU5GM"
- };
- /***/ }),
- /***/ 99468:
- /***/ ((module) => {
- // Exports
- module.exports = {
- "hashtag": "ReflectionText_hashtag__uFX_O",
- "body": "ReflectionText_body__0Igdy"
- };
- /***/ }),
- /***/ 18320:
- /***/ ((module) => {
- // Exports
- module.exports = {
- "text": "JoinQuranicCalendarButton_text__LVgQ6",
- "cta": "JoinQuranicCalendarButton_cta__A1sPD",
- "highlight": "JoinQuranicCalendarButton_highlight__TunkA",
- "normal": "JoinQuranicCalendarButton_normal__aSk2p",
- "bordered": "JoinQuranicCalendarButton_bordered__fH_X5",
- "subTextContainer": "JoinQuranicCalendarButton_subTextContainer__vMx_r"
- };
- /***/ }),
- /***/ 42443:
- /***/ ((module) => {
- // Exports
- module.exports = {
- "monthHeader": "QuranicCalendarMonth_monthHeader__yK_65",
- "container": "QuranicCalendarMonth_container__Nxg83"
- };
- /***/ }),
- /***/ 6498:
- /***/ ((module) => {
- // Exports
- module.exports = {
- "weekContainer": "QuranicCalendarWeek_weekContainer__x1skz",
- "currentWeek": "QuranicCalendarWeek_currentWeek__cJvlZ",
- "collapsibleTitle": "QuranicCalendarWeek_collapsibleTitle__sEy8B",
- "collapsibleBody": "QuranicCalendarWeek_collapsibleBody__VGUAZ",
- "link": "QuranicCalendarWeek_link__58BsZ"
- };
- /***/ }),
- /***/ 52982:
- /***/ ((module) => {
- // Exports
- module.exports = {
- "container": "calendar_container__HzLHf"
- };
- /***/ }),
- /***/ 9234:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var _PageContainer_module_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93020);
- /* harmony import */ var _PageContainer_module_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_PageContainer_module_scss__WEBPACK_IMPORTED_MODULE_1__);
- const PageContainer = ({ children })=>{
- return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: (_PageContainer_module_scss__WEBPACK_IMPORTED_MODULE_1___default().container),
- children: children
- });
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PageContainer);
- /***/ }),
- /***/ 76057:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16689);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var _hooks_useReflectionBodyParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3204);
- /* harmony import */ var _ReflectionText_module_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99468);
- /* harmony import */ var _ReflectionText_module_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_ReflectionText_module_scss__WEBPACK_IMPORTED_MODULE_3__);
- const ReflectionText = ({ reflectionText })=>{
- const formattedText = (0,_hooks_useReflectionBodyParser__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(reflectionText, (_ReflectionText_module_scss__WEBPACK_IMPORTED_MODULE_3___default().hashtag));
- return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("span", {
- className: (_ReflectionText_module_scss__WEBPACK_IMPORTED_MODULE_3___default().body),
- // eslint-disable-next-line react/no-danger
- dangerouslySetInnerHTML: {
- __html: formattedText
- }
- });
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ReflectionText);
- /***/ }),
- /***/ 3204:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- // EXPORTS
- __webpack_require__.d(__webpack_exports__, {
- "Z": () => (/* binding */ hooks_useReflectionBodyParser)
- });
- // EXTERNAL MODULE: external "react"
- var external_react_ = __webpack_require__(16689);
- // EXTERNAL MODULE: ./src/utils/quranReflect/navigation.ts
- var navigation = __webpack_require__(70713);
- ;// CONCATENATED MODULE: ./src/utils/quranReflect/bodyParser.ts
- /* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable import/prefer-default-export */
- /**
- * Wraps hashtags in links: It finds all hashtags starting with # followed
- * by one or more word characters (\w+). The captured hashtag is then
- * used to create a link.
- *
- * @param {string} tag
- * @param {string} hashtagStyle
- * @returns {string}
- */ const tagToLink = (tag, hashtagStyle)=>{
- const tagWithHashTag = `#${tag}`;
- return `<a target="_blank" href="${(0,navigation/* getQuranReflectTagUrl */.dx)(tagWithHashTag)}" class="${hashtagStyle}">${tagWithHashTag}</a>`;
- };
- /**
- * Replaces URLs in a given text with HTML anchor tags.
- *
- * @param {string} text - The input text containing URLs.
- * @returns {string} The text with URLs replaced by anchor tags.
- */ const replaceUrlsWithLinks = (text)=>{
- const regex = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/gi;
- return text.replace(regex, (url)=>{
- // Check if URL is already linked
- const surroundingLength = 100; // Number of characters around the URL to check for <a> tag
- const index = text.indexOf(url);
- const beforeText = text.slice(Math.max(0, index - surroundingLength), index);
- const afterText = text.slice(index + url.length, index + url.length + surroundingLength);
- if (beforeText.includes("<a href=") && afterText.includes("</a>")) {
- // URL is already inside an anchor tag, return as is
- return url;
- }
- // Convert URL to a link
- return `<a href='${url}' target='_blank'>${url}</a>`;
- });
- };
- const parseReflectionBody = (reflectionBody, hashtagStyle)=>{
- return(// 1. Wraps URLs in links: Find all URLs starting with http or https. The captured URL is then used to create a link.
- replaceUrlsWithLinks(reflectionBody)// 2. Replaces new lines: match all occurrences of new lines (\n) and carriage returns (\r) and replaces them with the <br> tag.
- .replace(/\r?\n/g, "<br>")// 3. Wraps hashtags in links: Find all hashtags starting with # followed by one or more word characters (\w+). The captured hashtag is then used to create a link.
- .replace(/#(\w+)/g, (_, tag)=>tagToLink(tag, hashtagStyle)));
- };
- ;// CONCATENATED MODULE: ./src/components/QuranReflect/hooks/useReflectionBodyParser.ts
- /**
- * A hook to parse the reflection body and replace the hashtags with links.
- *
- * TODO: make all usages of this hook DRY.
- *
- * @param {string} reflectionText
- * @param {string} hashtagStyle
- * @returns {string}
- */ const useReflectionBodyParser = (reflectionText, hashtagStyle)=>{
- const parsedBody = (0,external_react_.useMemo)(()=>parseReflectionBody(reflectionText, hashtagStyle), [
- hashtagStyle,
- reflectionText
- ]);
- return parsedBody;
- };
- /* harmony default export */ const hooks_useReflectionBodyParser = (useReflectionBodyParser);
- /***/ }),
- /***/ 41357:
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16689);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59003);
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71853);
- /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_3__);
- /* harmony import */ var next_translate_Trans__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(74137);
- /* harmony import */ var next_translate_Trans__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_translate_Trans__WEBPACK_IMPORTED_MODULE_4__);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(60866);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5__);
- /* harmony import */ var _JoinQuranicCalendarButton_module_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(18320);
- /* harmony import */ var _JoinQuranicCalendarButton_module_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_JoinQuranicCalendarButton_module_scss__WEBPACK_IMPORTED_MODULE_14__);
- /* harmony import */ var _dls_Button_Button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(50497);
- /* harmony import */ var _dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(79717);
- /* harmony import */ var _icons_notification_bell_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(19022);
- /* harmony import */ var _utils_auth_login__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(22197);
- /* harmony import */ var _utils_auth_qf_api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(91450);
- /* harmony import */ var _utils_eventLogger__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(55943);
- /* harmony import */ var _utils_locale__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(24709);
- /* harmony import */ var _utils_navigation__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(57933);
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_dls_Button_Button__WEBPACK_IMPORTED_MODULE_6__, _dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_7__, _utils_auth_login__WEBPACK_IMPORTED_MODULE_9__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_11__, _utils_navigation__WEBPACK_IMPORTED_MODULE_13__]);
- ([_dls_Button_Button__WEBPACK_IMPORTED_MODULE_6__, _dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_7__, _utils_auth_login__WEBPACK_IMPORTED_MODULE_9__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_11__, _utils_navigation__WEBPACK_IMPORTED_MODULE_13__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
- const QC_USERNAME = "calendar";
- const JoinQuranicCalendarButton = ({ currentQuranicCalendarWeek , currentHijriDate , })=>{
- const { t , lang } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5___default()("quranic-calendar");
- const toast = (0,_dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_7__/* .useToast */ .pm)();
- const { 0: isLoading , 1: setIsLoading } = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
- const { 0: hasJoined , 1: setHasJoined } = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
- const { 0: hasError , 1: setHasError } = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
- (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{
- if ((0,_utils_auth_login__WEBPACK_IMPORTED_MODULE_9__/* .isLoggedIn */ .jl)()) {
- setIsLoading(true);
- (0,_utils_auth_qf_api__WEBPACK_IMPORTED_MODULE_10__/* .isUserFollowed */ .ST)(QC_USERNAME).then((response)=>{
- setHasJoined(response.followed);
- }).catch(()=>{
- setHasError(true);
- }).finally(()=>{
- setIsLoading(false);
- });
- }
- }, []);
- const router = (0,next_router__WEBPACK_IMPORTED_MODULE_3__.useRouter)();
- const onClick = ()=>{
- (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_11__/* .logButtonClick */ .MY)("join_quranic_calendar");
- if ((0,_utils_auth_login__WEBPACK_IMPORTED_MODULE_9__/* .isLoggedIn */ .jl)()) {
- setIsLoading(true);
- (0,_utils_auth_qf_api__WEBPACK_IMPORTED_MODULE_10__/* .followUser */ .P_)(QC_USERNAME).then(()=>{
- toast(t("join-quranic-calendar-success"), {
- status: _dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_7__/* .ToastStatus.Success */ .YZ.Success
- });
- setHasJoined(true);
- }).catch(()=>{
- toast(t("common:error.general"), {
- status: _dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_7__/* .ToastStatus.Error */ .YZ.Error
- });
- }).finally(()=>{
- setIsLoading(false);
- });
- } else {
- router.replace((0,_utils_navigation__WEBPACK_IMPORTED_MODULE_13__/* .getLoginNavigationUrl */ .gk)((0,_utils_navigation__WEBPACK_IMPORTED_MODULE_13__/* .getQuranicCalendarNavigationUrl */ .ly)()));
- }
- };
- return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
- className: (_JoinQuranicCalendarButton_module_scss__WEBPACK_IMPORTED_MODULE_14___default().text),
- children: [
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
- className: (_JoinQuranicCalendarButton_module_scss__WEBPACK_IMPORTED_MODULE_14___default().bordered),
- children: [
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((next_translate_Trans__WEBPACK_IMPORTED_MODULE_4___default()), {
- i18nKey: "quranic-calendar:today",
- components: {
- br: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("br", {}, 0),
- highlight: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("span", {
- className: (_JoinQuranicCalendarButton_module_scss__WEBPACK_IMPORTED_MODULE_14___default().highlight)
- }, 1)
- },
- values: {
- day: (0,_utils_locale__WEBPACK_IMPORTED_MODULE_12__/* .toLocalizedNumber */ .rQ)(currentHijriDate.hd, lang),
- month: t(`islamic-months.${currentHijriDate.hm}`),
- year: (0,_utils_locale__WEBPACK_IMPORTED_MODULE_12__/* .toLocalizedNumber */ .rQ)(currentHijriDate.hy, lang, false, {
- useGrouping: false
- }),
- gregorianDate: (0,_utils_locale__WEBPACK_IMPORTED_MODULE_12__/* .toLocalizedDate */ .K8)(currentHijriDate.date, lang, {
- dateStyle: "long"
- })
- }
- }),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("br", {}),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((next_translate_Trans__WEBPACK_IMPORTED_MODULE_4___default()), {
- i18nKey: "quranic-calendar:join-qc.line-1",
- components: {
- br: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("br", {}, 0),
- highlight: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("span", {
- className: (_JoinQuranicCalendarButton_module_scss__WEBPACK_IMPORTED_MODULE_14___default().highlight)
- }, 1)
- },
- values: {
- weekNumber: (0,_utils_locale__WEBPACK_IMPORTED_MODULE_12__/* .toLocalizedNumber */ .rQ)(currentQuranicCalendarWeek, lang)
- }
- }),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("br", {})
- ]
- }),
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
- className: (_JoinQuranicCalendarButton_module_scss__WEBPACK_IMPORTED_MODULE_14___default().subTextContainer),
- children: [
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((next_translate_Trans__WEBPACK_IMPORTED_MODULE_4___default()), {
- i18nKey: "quranic-calendar:join-qc.line-2",
- components: {
- br: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("br", {}, 0),
- normal: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("span", {
- className: (_JoinQuranicCalendarButton_module_scss__WEBPACK_IMPORTED_MODULE_14___default().normal)
- }, 1),
- highlight: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("span", {
- className: (_JoinQuranicCalendarButton_module_scss__WEBPACK_IMPORTED_MODULE_14___default().highlight)
- }, 1)
- },
- values: {
- weekNumber: (0,_utils_locale__WEBPACK_IMPORTED_MODULE_12__/* .toLocalizedNumber */ .rQ)(currentQuranicCalendarWeek, lang)
- }
- }),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: classnames__WEBPACK_IMPORTED_MODULE_2___default()((_JoinQuranicCalendarButton_module_scss__WEBPACK_IMPORTED_MODULE_14___default().cta), (_JoinQuranicCalendarButton_module_scss__WEBPACK_IMPORTED_MODULE_14___default().text)),
- children: hasJoined ? "" : t("join-quranic-calendar")
- }),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Button_Button__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP, {
- isLoading: isLoading,
- isDisabled: hasJoined || hasError,
- onClick: onClick,
- type: _dls_Button_Button__WEBPACK_IMPORTED_MODULE_6__/* .ButtonType.Success */ .L$.Success,
- shape: _dls_Button_Button__WEBPACK_IMPORTED_MODULE_6__/* .ButtonShape.Pill */ .jL.Pill,
- size: _dls_Button_Button__WEBPACK_IMPORTED_MODULE_6__/* .ButtonSize.Small */ .qE.Small,
- prefix: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_icons_notification_bell_svg__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, {}),
- children: hasJoined ? t("common:subscribed") : t("common:subscribe")
- })
- ]
- })
- ]
- });
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JoinQuranicCalendarButton);
- __webpack_async_result__();
- } catch(e) { __webpack_async_result__(e); } });
- /***/ }),
- /***/ 31122:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16689);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60866);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var _components_RamadanActivity_RamadanActivityHero_Hero_module_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51470);
- /* harmony import */ var _components_RamadanActivity_RamadanActivityHero_Hero_module_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_components_RamadanActivity_RamadanActivityHero_Hero_module_scss__WEBPACK_IMPORTED_MODULE_3__);
- /* eslint-disable i18next/no-literal-string */
- const QuranicCalendarHero = ()=>{
- const { t } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2___default()("quranic-calendar");
- return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: (_components_RamadanActivity_RamadanActivityHero_Hero_module_scss__WEBPACK_IMPORTED_MODULE_3___default().container),
- dir: "ltr",
- children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: (_components_RamadanActivity_RamadanActivityHero_Hero_module_scss__WEBPACK_IMPORTED_MODULE_3___default().rowContainer),
- children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
- className: (_components_RamadanActivity_RamadanActivityHero_Hero_module_scss__WEBPACK_IMPORTED_MODULE_3___default().row),
- children: [
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
- className: (_components_RamadanActivity_RamadanActivityHero_Hero_module_scss__WEBPACK_IMPORTED_MODULE_3___default().header),
- children: t("quranic-calendar")
- }),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: (_components_RamadanActivity_RamadanActivityHero_Hero_module_scss__WEBPACK_IMPORTED_MODULE_3___default().desc),
- children: t("hero.line-1")
- })
- ]
- })
- })
- });
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (QuranicCalendarHero);
- /***/ }),
- /***/ 17843:
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16689);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60866);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var _QuranicCalendarMonth_module_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42443);
- /* harmony import */ var _QuranicCalendarMonth_module_scss__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_QuranicCalendarMonth_module_scss__WEBPACK_IMPORTED_MODULE_4__);
- /* harmony import */ var src_components_QuranicCalendar_QuranicCalendarWeek__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1367);
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([src_components_QuranicCalendar_QuranicCalendarWeek__WEBPACK_IMPORTED_MODULE_3__]);
- src_components_QuranicCalendar_QuranicCalendarWeek__WEBPACK_IMPORTED_MODULE_3__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
- const QuranicCalendarMonth = ({ monthWeeks , currentQuranicCalendarWeek })=>{
- const { t } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2___default()("quranic-calendar");
- const localizedMonth = `${t(`islamic-months.${monthWeeks[0].hijriMonth}`)}`;
- return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
- className: (_QuranicCalendarMonth_module_scss__WEBPACK_IMPORTED_MODULE_4___default().container),
- children: [
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: (_QuranicCalendarMonth_module_scss__WEBPACK_IMPORTED_MODULE_4___default().monthHeader),
- children: localizedMonth
- }),
- monthWeeks.map((week)=>{
- const { ranges , weekNumber } = week;
- return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(src_components_QuranicCalendar_QuranicCalendarWeek__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
- isCurrentWeek: currentQuranicCalendarWeek === Number(weekNumber),
- weekNumber: Number(weekNumber),
- localizedMonth: localizedMonth,
- ranges: ranges
- }, ranges);
- })
- ]
- });
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (QuranicCalendarMonth);
- __webpack_async_result__();
- } catch(e) { __webpack_async_result__(e); } });
- /***/ }),
- /***/ 1367:
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16689);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59003);
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(60866);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3__);
- /* harmony import */ var swr_immutable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(79847);
- /* harmony import */ var _QuranicCalendarWeek_module_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(6498);
- /* harmony import */ var _QuranicCalendarWeek_module_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_QuranicCalendarWeek_module_scss__WEBPACK_IMPORTED_MODULE_15__);
- /* harmony import */ var _components_QuranReflect_ReflectionText__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(76057);
- /* harmony import */ var _dls_Collapsible_Collapsible__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(92775);
- /* harmony import */ var _dls_Link_Link__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61239);
- /* harmony import */ var _icons_chevron_down_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(24868);
- /* harmony import */ var _utils_auth_qf_api__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(91450);
- /* harmony import */ var _utils_auth_qf_apiPaths__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(65899);
- /* harmony import */ var _utils_eventLogger__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(55943);
- /* harmony import */ var _utils_locale__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(24709);
- /* harmony import */ var _utils_navigation__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(57933);
- /* harmony import */ var _utils_quranReflect_navigation__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(70713);
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([swr_immutable__WEBPACK_IMPORTED_MODULE_4__, _dls_Collapsible_Collapsible__WEBPACK_IMPORTED_MODULE_6__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_11__, _utils_navigation__WEBPACK_IMPORTED_MODULE_13__]);
- ([swr_immutable__WEBPACK_IMPORTED_MODULE_4__, _dls_Collapsible_Collapsible__WEBPACK_IMPORTED_MODULE_6__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_11__, _utils_navigation__WEBPACK_IMPORTED_MODULE_13__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
- /* eslint-disable max-lines */
- const QuranicCalendarWeek = ({ weekNumber , localizedMonth , isCurrentWeek , ranges , })=>{
- const { t , lang } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3___default()("quranic-calendar");
- const onRangesClicked = (settings)=>{
- (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_11__/* .logButtonClick */ .MY)("quranic_calendar_week", {
- ranges,
- weekNumber,
- settings
- });
- };
- const onInteractClicked = ()=>{
- (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_11__/* .logButtonClick */ .MY)("quranic_calendar_interact", {
- ranges,
- weekNumber
- });
- };
- const { data , isValidating , error } = (0,swr_immutable__WEBPACK_IMPORTED_MODULE_4__["default"])((0,_utils_auth_qf_apiPaths__WEBPACK_IMPORTED_MODULE_10__/* .makeQuranicCalendarPostOfWeekUrl */ .Sv)(weekNumber), async ()=>{
- const response = await (0,_utils_auth_qf_api__WEBPACK_IMPORTED_MODULE_9__/* .getQuranicCalendarPostOfWeek */ .Fp)(weekNumber);
- return response;
- });
- const hasPost = !isValidating && !error && !!data?.post?.body;
- return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
- className: classnames__WEBPACK_IMPORTED_MODULE_2___default()((_QuranicCalendarWeek_module_scss__WEBPACK_IMPORTED_MODULE_15___default().weekContainer), {
- [(_QuranicCalendarWeek_module_scss__WEBPACK_IMPORTED_MODULE_15___default().currentWeek)]: isCurrentWeek
- }),
- children: [
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
- children: t("week-title", {
- weekNumber: (0,_utils_locale__WEBPACK_IMPORTED_MODULE_12__/* .toLocalizedNumber */ .rQ)(weekNumber, lang),
- month: localizedMonth,
- rangeStart: (0,_utils_locale__WEBPACK_IMPORTED_MODULE_12__/* .toLocalizedVerseKey */ .Tj)(ranges.split("-")[0], lang),
- rangeEnd: (0,_utils_locale__WEBPACK_IMPORTED_MODULE_12__/* .toLocalizedVerseKey */ .Tj)(ranges.split("-")[1], lang)
- })
- }),
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
- children: [
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Link_Link__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
- className: (_QuranicCalendarWeek_module_scss__WEBPACK_IMPORTED_MODULE_15___default().link),
- isNewTab: true,
- onClick: ()=>{
- onRangesClicked(_utils_navigation__WEBPACK_IMPORTED_MODULE_13__/* .QuranicCalendarRangesNavigationSettings.EnglishAndArabic */ .uv.EnglishAndArabic);
- },
- variant: _dls_Link_Link__WEBPACK_IMPORTED_MODULE_7__/* .LinkVariant.Blend */ .r.Blend,
- href: (0,_utils_navigation__WEBPACK_IMPORTED_MODULE_13__/* .getQuranicCalendarRangesNavigationUrl */ .nT)(ranges, _utils_navigation__WEBPACK_IMPORTED_MODULE_13__/* .QuranicCalendarRangesNavigationSettings.EnglishAndArabic */ .uv.EnglishAndArabic),
- children: t("reading-options.en-and-ar")
- }),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Link_Link__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
- isNewTab: true,
- className: (_QuranicCalendarWeek_module_scss__WEBPACK_IMPORTED_MODULE_15___default().link),
- onClick: ()=>{
- onRangesClicked(_utils_navigation__WEBPACK_IMPORTED_MODULE_13__/* .QuranicCalendarRangesNavigationSettings.EnglishOnly */ .uv.EnglishOnly);
- },
- variant: _dls_Link_Link__WEBPACK_IMPORTED_MODULE_7__/* .LinkVariant.Blend */ .r.Blend,
- href: (0,_utils_navigation__WEBPACK_IMPORTED_MODULE_13__/* .getQuranicCalendarRangesNavigationUrl */ .nT)(ranges, _utils_navigation__WEBPACK_IMPORTED_MODULE_13__/* .QuranicCalendarRangesNavigationSettings.EnglishOnly */ .uv.EnglishOnly),
- children: t("reading-options.en-only")
- }),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Link_Link__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
- isNewTab: true,
- className: (_QuranicCalendarWeek_module_scss__WEBPACK_IMPORTED_MODULE_15___default().link),
- onClick: ()=>{
- onRangesClicked(_utils_navigation__WEBPACK_IMPORTED_MODULE_13__/* .QuranicCalendarRangesNavigationSettings.DefaultSettings */ .uv.DefaultSettings);
- },
- variant: _dls_Link_Link__WEBPACK_IMPORTED_MODULE_7__/* .LinkVariant.Blend */ .r.Blend,
- href: (0,_utils_navigation__WEBPACK_IMPORTED_MODULE_13__/* .getQuranicCalendarRangesNavigationUrl */ .nT)(ranges, _utils_navigation__WEBPACK_IMPORTED_MODULE_13__/* .QuranicCalendarRangesNavigationSettings.DefaultSettings */ .uv.DefaultSettings),
- children: t("reading-options.default-settings")
- })
- ]
- }),
- !!hasPost && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Collapsible_Collapsible__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
- direction: _dls_Collapsible_Collapsible__WEBPACK_IMPORTED_MODULE_6__/* .CollapsibleDirection.Right */ .a.Right,
- title: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: (_QuranicCalendarWeek_module_scss__WEBPACK_IMPORTED_MODULE_15___default().collapsibleTitle),
- children: t("supplemental-resources")
- }),
- prefix: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_icons_chevron_down_svg__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, {}),
- shouldRotatePrefixOnToggle: true,
- shouldOpen: isCurrentWeek,
- children: ({ isOpen: isCollapsibleOpen })=>{
- if (!isCollapsibleOpen) return null;
- return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
- children: [
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: (_QuranicCalendarWeek_module_scss__WEBPACK_IMPORTED_MODULE_15___default().collapsibleBody),
- children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_QuranReflect_ReflectionText__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
- reflectionText: data?.post?.body
- })
- }),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Link_Link__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
- isNewTab: true,
- onClick: onInteractClicked,
- variant: _dls_Link_Link__WEBPACK_IMPORTED_MODULE_7__/* .LinkVariant.Blend */ .r.Blend,
- href: (0,_utils_quranReflect_navigation__WEBPACK_IMPORTED_MODULE_14__/* .getQuranReflectPostUrl */ .rW)(data.post.id),
- children: t("interact-with-post")
- })
- ]
- });
- }
- })
- ]
- });
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (QuranicCalendarWeek);
- __webpack_async_result__();
- } catch(e) { __webpack_async_result__(e); } });
- /***/ }),
- /***/ 91450:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Fp": () => (/* binding */ getQuranicCalendarPostOfWeek),
- /* harmony export */ "GG": () => (/* binding */ postReflectionViews),
- /* harmony export */ "P_": () => (/* binding */ followUser),
- /* harmony export */ "ST": () => (/* binding */ isUserFollowed)
- /* harmony export */ });
- /* unused harmony export getAllUserReflections */
- /* harmony import */ var _apiPaths__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65899);
- /* harmony import */ var _utils_auth_api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37883);
- const postReflectionViews = async (postId)=>(0,_utils_auth_api__WEBPACK_IMPORTED_MODULE_1__/* .postRequest */ .j0)((0,_apiPaths__WEBPACK_IMPORTED_MODULE_0__/* .makePostReflectionViewsUrl */ .PI)(postId), {});
- const followUser = async (usernameOrId)=>(0,_utils_auth_api__WEBPACK_IMPORTED_MODULE_1__/* .postRequest */ .j0)((0,_apiPaths__WEBPACK_IMPORTED_MODULE_0__/* .makeFollowUserUrl */ .bE)(usernameOrId), {});
- const isUserFollowed = async (usernameOrId)=>{
- return (0,_utils_auth_api__WEBPACK_IMPORTED_MODULE_1__/* .privateFetcher */ .UK)((0,_apiPaths__WEBPACK_IMPORTED_MODULE_0__/* .makeIsUserFollowedUrl */ .BC)(usernameOrId));
- };
- const getAllUserReflections = async (params)=>{
- return privateFetcher(makeGetUserReflectionsUrl(params));
- };
- const getQuranicCalendarPostOfWeek = async (weekNumber)=>{
- return (0,_utils_auth_api__WEBPACK_IMPORTED_MODULE_1__/* .privateFetcher */ .UK)((0,_apiPaths__WEBPACK_IMPORTED_MODULE_0__/* .makeQuranicCalendarPostOfWeekUrl */ .Sv)(weekNumber));
- };
- /***/ }),
- /***/ 65899:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "BC": () => (/* binding */ makeIsUserFollowedUrl),
- /* harmony export */ "PI": () => (/* binding */ makePostReflectionViewsUrl),
- /* harmony export */ "Sv": () => (/* binding */ makeQuranicCalendarPostOfWeekUrl),
- /* harmony export */ "YV": () => (/* binding */ makeGetUserReflectionsUrl),
- /* harmony export */ "bE": () => (/* binding */ makeFollowUserUrl)
- /* harmony export */ });
- /* harmony import */ var _utils_auth_apiPaths__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13830);
- const getPrefixedUrl = (url)=>`qf/${url}`;
- const makePostReflectionViewsUrl = (postId)=>(0,_utils_auth_apiPaths__WEBPACK_IMPORTED_MODULE_0__/* .makeUrl */ .bf)(getPrefixedUrl(`posts/${postId}/views`));
- const makeFollowUserUrl = (userNameOrId)=>(0,_utils_auth_apiPaths__WEBPACK_IMPORTED_MODULE_0__/* .makeUrl */ .bf)(getPrefixedUrl(`users/${userNameOrId}/follow`));
- const makeIsUserFollowedUrl = (userNameOrId)=>(0,_utils_auth_apiPaths__WEBPACK_IMPORTED_MODULE_0__/* .makeUrl */ .bf)(getPrefixedUrl(`users/${userNameOrId}/is-followed`));
- const makeGetUserReflectionsUrl = (params)=>(0,_utils_auth_apiPaths__WEBPACK_IMPORTED_MODULE_0__/* .makeUrl */ .bf)(getPrefixedUrl("posts"), params);
- const makeQuranicCalendarPostOfWeekUrl = (weekNumber)=>(0,_utils_auth_apiPaths__WEBPACK_IMPORTED_MODULE_0__/* .makeUrl */ .bf)(getPrefixedUrl(`quranic-calendar/${weekNumber}`));
- /***/ }),
- /***/ 12690:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "a": () => (/* binding */ getCurrentQuranicCalendarWeek)
- /* harmony export */ });
- /* unused harmony export generateWeeksOfMonths */
- /* harmony import */ var _umalqura_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(89942);
- /* harmony import */ var _umalqura_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_umalqura_core__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98492);
- /* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_groupBy__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var quranic_calendar_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55269);
- /* eslint-disable guard-for-in */ /* eslint-disable no-restricted-syntax */ /* eslint-disable react-func/max-lines-per-function */
- /**
- * The idea is to sum the number of weeks from the start of the Quranic
- * calendar to the current week. This is done by summing the number of weeks
- * in each month before the current month and then adding the current week
- * in the current month.
- *
- * @param {umalqura.UmAlQura} currentHijriDate
- * @returns {number}
- */ const getCurrentQuranicCalendarWeek = (currentHijriDate)=>{
- // Today's date
- const today = currentHijriDate.date;
- // Convert today's date to the start of the day
- today.setHours(0, 0, 0, 0);
- // Iterate through the weeks to find the current week
- for(const key in quranic_calendar_json__WEBPACK_IMPORTED_MODULE_2__){
- const weeks = quranic_calendar_json__WEBPACK_IMPORTED_MODULE_2__[key];
- for (const week of weeks){
- const startDate = new Date(week.year, week.month - 1, week.day);
- const endDate = new Date(startDate);
- endDate.setDate(startDate.getDate() + 7);
- if (today >= startDate && today < endDate) {
- return Number(week.weekNumber);
- }
- }
- }
- return 0;
- };
- // TODO: add unit tests
- const generateWeeksOfMonths = (months)=>{
- const today = umalqura();
- const monthsDataMap = {};
- let currentMonthIndex;
- // 1. loop through each first day of each month
- for(let i = 0; i < months.length; i += 1){
- const firstDayOfHijriMonth = umalqura(months[i].year, months[i].month, months[i].day);
- const monthYearKey = `${firstDayOfHijriMonth.hy}-${firstDayOfHijriMonth.hm}`;
- // 2. initialize current month details
- // @ts-ignore
- monthsDataMap[monthYearKey] = {};
- // @ts-ignore
- monthsDataMap[monthYearKey].weeks = {};
- // @ts-ignore
- monthsDataMap[monthYearKey].firstDateOfMonth = firstDayOfHijriMonth.date;
- // filter null days (days before or after start of month) and also filter days before the first day of the month if we are not starting from the first day of the month exactly
- const daysInMonth = firstDayOfHijriMonth.monthArray.flat().filter((day)=>day !== null && day.isSameOrAfter(firstDayOfHijriMonth));
- /**
- * 3. group days by week of the month. Since 0 dayOfWeek starts is
- * Monday, we are modifying weekOfYear to start on Friday
- */ const weeksOfMonthDaysMap = groupBy(daysInMonth, (day)=>{
- const shiftedDayOfWeek = (day.dayOfWeek + 2) % 7;
- const shiftedWeekOfYear = day.weekOfYear + (shiftedDayOfWeek < day.dayOfWeek ? 1 : 0);
- return `${day.hy}-${shiftedWeekOfYear}`;
- });
- // 4. if the month is the current month, set the current month flag
- const isCurrentMonth = today.hy === months[i].year && today.hm === months[i].month;
- // @ts-ignore
- monthsDataMap[monthYearKey].isCurrentMonth = isCurrentMonth;
- // 5. save the index of the current month so we can automatically scroll to later
- if (isCurrentMonth) {
- currentMonthIndex = i;
- }
- Object.keys(weeksOfMonthDaysMap).forEach((weekKey)=>{
- const weekDays = weeksOfMonthDaysMap[weekKey];
- // @ts-ignore
- monthsDataMap[monthYearKey].weeks[weekKey] = {
- weekDays,
- isCurrentWeek: isCurrentMonth && weekDays[0].weekOfYear === today.weekOfYear
- };
- });
- }
- return {
- monthsDataMap,
- currentMonthIndex
- };
- };
- /***/ }),
- /***/ 70713:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "dx": () => (/* binding */ getQuranReflectTagUrl),
- /* harmony export */ "rW": () => (/* binding */ getQuranReflectPostUrl)
- /* harmony export */ });
- /* unused harmony exports API_HOST, getQuranReflectVerseUrl, getQuranReflectEditUrl, getQuranReflectAuthorUrl */
- /* harmony import */ var _utils_qs_stringify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(99921);
- const STAGING_API_HOST = "https://quranreflect.org";
- const PRODUCTION_API_HOST = "https://quranreflect.com";
- // env variables in Vercel can't be dynamic, we have to hardcode the urls here. https://stackoverflow.com/questions/44342226/next-js-error-only-absolute-urls-are-supported
- const API_HOST = process.env.NEXT_PUBLIC_VERCEL_ENV === "production" ? PRODUCTION_API_HOST : STAGING_API_HOST;
- const getQuranReflectFilteredVerseUrl = (chapterId, verseNumber, params)=>{
- return `${API_HOST}?filters=${chapterId}:${verseNumber}&${stringify(params)}`;
- };
- const getQuranReflectVerseUrl = (chapterId, verseNumber)=>{
- return getQuranReflectFilteredVerseUrl(chapterId, verseNumber, {
- feed: true
- });
- };
- const getQuranReflectEditUrl = (chapterId, verseNumber)=>{
- return getQuranReflectFilteredVerseUrl(chapterId, verseNumber, {
- edit: true
- });
- };
- const getQuranReflectAuthorUrl = (username)=>{
- return `${API_HOST}/${username}`;
- };
- const getQuranReflectPostUrl = (postId, viewComments = false)=>`${API_HOST}/posts/${postId}${viewComments ? "#comments" : ""}`;
- const getQuranReflectTagUrl = (tag)=>`${API_HOST}/?tags=${encodeURIComponent(tag)}`;
- /***/ }),
- /***/ 75184:
- /***/ ((module) => {
- "use strict";
- module.exports = require("@reduxjs/toolkit");
- /***/ }),
- /***/ 58097:
- /***/ ((module) => {
- "use strict";
- module.exports = require("@sentry/nextjs");
- /***/ }),
- /***/ 89942:
- /***/ ((module) => {
- "use strict";
- module.exports = require("@umalqura/core");
- /***/ }),
- /***/ 59003:
- /***/ ((module) => {
- "use strict";
- module.exports = require("classnames");
- /***/ }),
- /***/ 59606:
- /***/ ((module) => {
- "use strict";
- module.exports = require("humps");
- /***/ }),
- /***/ 12372:
- /***/ ((module) => {
- "use strict";
- module.exports = require("lodash/findKey");
- /***/ }),
- /***/ 98492:
- /***/ ((module) => {
- "use strict";
- module.exports = require("lodash/groupBy");
- /***/ }),
- /***/ 35526:
- /***/ ((module) => {
- "use strict";
- module.exports = require("lodash/random");
- /***/ }),
- /***/ 64042:
- /***/ ((module) => {
- "use strict";
- module.exports = require("lodash/range");
- /***/ }),
- /***/ 16641:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next-seo");
- /***/ }),
- /***/ 74137:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next-translate/Trans");
- /***/ }),
- /***/ 60866:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next-translate/useTranslation");
- /***/ }),
- /***/ 3280:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/app-router-context.js");
- /***/ }),
- /***/ 92796:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/head-manager-context.js");
- /***/ }),
- /***/ 3539:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/i18n/detect-domain-locale.js");
- /***/ }),
- /***/ 34014:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/i18n/normalize-locale-path.js");
- /***/ }),
- /***/ 78524:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/is-plain-object.js");
- /***/ }),
- /***/ 78020:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/mitt.js");
- /***/ }),
- /***/ 64406:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/page-path/denormalize-page-path.js");
- /***/ }),
- /***/ 24964:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router-context.js");
- /***/ }),
- /***/ 93431:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/add-locale.js");
- /***/ }),
- /***/ 11751:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/add-path-prefix.js");
- /***/ }),
- /***/ 46220:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/compare-states.js");
- /***/ }),
- /***/ 10299:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/format-next-pathname-info.js");
- /***/ }),
- /***/ 23938:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/format-url.js");
- /***/ }),
- /***/ 29565:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/get-asset-path-from-route.js");
- /***/ }),
- /***/ 35789:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/get-next-pathname-info.js");
- /***/ }),
- /***/ 1897:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/is-bot.js");
- /***/ }),
- /***/ 1428:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/is-dynamic.js");
- /***/ }),
- /***/ 28854:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/parse-path.js");
- /***/ }),
- /***/ 91292:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/parse-relative-url.js");
- /***/ }),
- /***/ 34567:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/path-has-prefix.js");
- /***/ }),
- /***/ 80979:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/querystring.js");
- /***/ }),
- /***/ 93297:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/remove-trailing-slash.js");
- /***/ }),
- /***/ 36052:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/resolve-rewrites.js");
- /***/ }),
- /***/ 84226:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/route-matcher.js");
- /***/ }),
- /***/ 95052:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/route-regex.js");
- /***/ }),
- /***/ 59232:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/utils.js");
- /***/ }),
- /***/ 71853:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/router");
- /***/ }),
- /***/ 16689:
- /***/ ((module) => {
- "use strict";
- module.exports = require("react");
- /***/ }),
- /***/ 78404:
- /***/ ((module) => {
- "use strict";
- module.exports = require("react-virtuoso");
- /***/ }),
- /***/ 20997:
- /***/ ((module) => {
- "use strict";
- module.exports = require("react/jsx-runtime");
- /***/ }),
- /***/ 52648:
- /***/ ((module) => {
- "use strict";
- module.exports = require("refresh-fetch");
- /***/ }),
- /***/ 74973:
- /***/ ((module) => {
- "use strict";
- module.exports = import("@radix-ui/react-collapsible");;
- /***/ }),
- /***/ 66704:
- /***/ ((module) => {
- "use strict";
- module.exports = import("@radix-ui/react-tooltip");;
- /***/ }),
- /***/ 88813:
- /***/ ((module) => {
- "use strict";
- module.exports = import("firebase/compat/analytics");;
- /***/ }),
- /***/ 33773:
- /***/ ((module) => {
- "use strict";
- module.exports = import("firebase/compat/app");;
- /***/ }),
- /***/ 69915:
- /***/ ((module) => {
- "use strict";
- module.exports = import("js-cookie");;
- /***/ }),
- /***/ 3590:
- /***/ ((module) => {
- "use strict";
- module.exports = import("react-toastify");;
- /***/ }),
- /***/ 79847:
- /***/ ((module) => {
- "use strict";
- module.exports = import("swr/immutable");;
- /***/ }),
- /***/ 63477:
- /***/ ((module) => {
- "use strict";
- module.exports = require("querystring");
- /***/ }),
- /***/ 55269:
- /***/ ((module) => {
- "use strict";
- module.exports = JSON.parse('{"1445-10":[{"weekNumber":"1","hijriYear":"1445","hijriMonth":"10","year":"2024","month":"4","day":"12","ranges":"1:1-2:74"},{"weekNumber":"2","hijriYear":"1445","hijriMonth":"10","year":"2024","month":"4","day":"19","ranges":"2:75-2:157"},{"weekNumber":"3","hijriYear":"1445","hijriMonth":"10","year":"2024","month":"4","day":"26","ranges":"2:158-2:230"},{"weekNumber":"4","hijriYear":"1445","hijriMonth":"10","year":"2024","month":"5","day":"3","ranges":"2:231-2:286"}],"1445-11":[{"weekNumber":"5","hijriYear":"1445","hijriMonth":"11","year":"2024","month":"5","day":"10","ranges":"3:1-3:109"},{"weekNumber":"6","hijriYear":"1445","hijriMonth":"11","year":"2024","month":"5","day":"17","ranges":"3:110-3:200"},{"weekNumber":"7","hijriYear":"1445","hijriMonth":"11","year":"2024","month":"5","day":"24","ranges":"4:1-4:57"},{"weekNumber":"8","hijriYear":"1445","hijriMonth":"11","year":"2024","month":"5","day":"31","ranges":"4:58-4:115"}],"1445-12":[{"weekNumber":"9","hijriYear":"1445","hijriMonth":"12","year":"2024","month":"6","day":"7","ranges":"4:116-4:176"},{"weekNumber":"10","hijriYear":"1445","hijriMonth":"12","year":"2024","month":"6","day":"14","ranges":"5:1-5:50"},{"weekNumber":"11","hijriYear":"1445","hijriMonth":"12","year":"2024","month":"6","day":"21","ranges":"5:51-5:120"},{"weekNumber":"12","hijriYear":"1445","hijriMonth":"12","year":"2024","month":"6","day":"28","ranges":"6:1-6:94"},{"weekNumber":"13","hijriYear":"1445","hijriMonth":"12","year":"2024","month":"7","day":"5","ranges":"6:95-6:165"}],"1446-1":[{"weekNumber":"14","hijriYear":"1446","hijriMonth":"1","year":"2024","month":"7","day":"12","ranges":"7:1-7:102"},{"weekNumber":"15","hijriYear":"1446","hijriMonth":"1","year":"2024","month":"7","day":"19","ranges":"7:103-7:206"},{"weekNumber":"16","hijriYear":"1446","hijriMonth":"1","year":"2024","month":"7","day":"26","ranges":"8:1-8:75"},{"weekNumber":"17","hijriYear":"1446","hijriMonth":"1","year":"2024","month":"8","day":"2","ranges":"9:1-9:59"}],"1446-2":[{"weekNumber":"18","hijriYear":"1446","hijriMonth":"2","year":"2024","month":"8","day":"9","ranges":"9:60-9:129"},{"weekNumber":"19","hijriYear":"1446","hijriMonth":"2","year":"2024","month":"8","day":"16","ranges":"10:1-10:109"},{"weekNumber":"20","hijriYear":"1446","hijriMonth":"2","year":"2024","month":"8","day":"23","ranges":"11:1-11:123"},{"weekNumber":"21","hijriYear":"1446","hijriMonth":"2","year":"2024","month":"8","day":"30","ranges":"12:1-12:111"}],"1446-3":[{"weekNumber":"22","hijriYear":"1446","hijriMonth":"3","year":"2024","month":"9","day":"6","ranges":"13:1-14:52"},{"weekNumber":"23","hijriYear":"1446","hijriMonth":"3","year":"2024","month":"9","day":"13","ranges":"15:1-16:89"},{"weekNumber":"24","hijriYear":"1446","hijriMonth":"3","year":"2024","month":"9","day":"20","ranges":"16:90-17:111"},{"weekNumber":"25","hijriYear":"1446","hijriMonth":"3","year":"2024","month":"9","day":"27","ranges":"18:1-18:110"}],"1446-4":[{"weekNumber":"26","hijriYear":"1446","hijriMonth":"4","year":"2024","month":"10","day":"4","ranges":"19:1-20:135"},{"weekNumber":"27","hijriYear":"1446","hijriMonth":"4","year":"2024","month":"10","day":"11","ranges":"21:1-21:112"},{"weekNumber":"28","hijriYear":"1446","hijriMonth":"4","year":"2024","month":"10","day":"18","ranges":"22:1-23:118"},{"weekNumber":"29","hijriYear":"1446","hijriMonth":"4","year":"2024","month":"10","day":"25","ranges":"24:1-24:64"},{"weekNumber":"30","hijriYear":"1446","hijriMonth":"4","year":"2024","month":"11","day":"1","ranges":"25:1-26:227"}],"1446-5":[{"weekNumber":"31","hijriYear":"1446","hijriMonth":"5","year":"2024","month":"11","day":"8","ranges":"27:1-28:50"},{"weekNumber":"32","hijriYear":"1446","hijriMonth":"5","year":"2024","month":"11","day":"15","ranges":"28:51-29:69"},{"weekNumber":"33","hijriYear":"1446","hijriMonth":"5","year":"2024","month":"11","day":"22","ranges":"30:1-32:30"},{"weekNumber":"34","hijriYear":"1446","hijriMonth":"5","year":"2024","month":"11","day":"29","ranges":"33:1-34:30"}],"1446-6":[{"weekNumber":"35","hijriYear":"1446","hijriMonth":"6","year":"2024","month":"12","day":"6","ranges":"34:31-36:83"},{"weekNumber":"36","hijriYear":"1446","hijriMonth":"6","year":"2024","month":"12","day":"13","ranges":"37:1-38:88"},{"weekNumber":"37","hijriYear":"1446","hijriMonth":"6","year":"2024","month":"12","day":"20","ranges":"39:1-40:85"},{"weekNumber":"38","hijriYear":"1446","hijriMonth":"6","year":"2024","month":"12","day":"27","ranges":"41:1-42:53"}],"1446-7":[{"weekNumber":"39","hijriYear":"1446","hijriMonth":"7","year":"2025","month":"1","day":"3","ranges":"43:1-45:37"},{"weekNumber":"40","hijriYear":"1446","hijriMonth":"7","year":"2025","month":"1","day":"10","ranges":"46:1-49:18"},{"weekNumber":"41","hijriYear":"1446","hijriMonth":"7","year":"2025","month":"1","day":"17","ranges":"50:1-54:55"},{"weekNumber":"42","hijriYear":"1446","hijriMonth":"7","year":"2025","month":"1","day":"24","ranges":"55:1-58:22"}],"1446-8":[{"weekNumber":"43","hijriYear":"1446","hijriMonth":"8","year":"2025","month":"1","day":"31","ranges":"59:1-66:12"},{"weekNumber":"44","hijriYear":"1446","hijriMonth":"8","year":"2025","month":"2","day":"7","ranges":"67:1-74:56"},{"weekNumber":"45","hijriYear":"1446","hijriMonth":"8","year":"2025","month":"2","day":"14","ranges":"75:1-83:36"},{"weekNumber":"46","hijriYear":"1446","hijriMonth":"8","year":"2025","month":"2","day":"21","ranges":"84:1-114:6"}]}');
- /***/ })
- };
- ;
- // load runtime
- var __webpack_require__ = require("../webpack-runtime.js");
- __webpack_require__.C(exports);
- var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
- var __webpack_exports__ = __webpack_require__.X(0, [11497,79165,96270,24709,57933,61239,25869,50497,76410,79717,13830,37883,22197,80695], () => (__webpack_exec__(14356)));
- module.exports = __webpack_exports__;
- })();
- //# sourceMappingURL=calendar.js.map
|