12 |
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[60660],{99807:function(e,n,r){"use strict";var a=r(57611),t=(r(67597),r(61395)),s=r(36773),i=r.n(s),c=r(42366);n.Z=function(e){var n=e.searchQuery,r=(0,t.Z)("common").t;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:i().container,children:(0,a.jsxs)("div",{className:i().mainBody,children:[(0,a.jsx)("div",{className:i().iconContainer,children:(0,a.jsx)(c.Z,{})}),(0,a.jsx)("p",{className:i().mainMessage,children:r("search.no-results")}),(0,a.jsx)("p",{className:i().secondaryMessage,children:r("search.no-results-suggestion",{searchQuery:n})})]})})})}},60660:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return ge}});var a,t,s=r(45361),i=r(57611),c=r(67597),o=r(37014),l=r.n(o),u=r(61395),h=r(99807),d=r(52086),m=r.n(d),_=function(e){var n=e.text;return(0,i.jsx)("p",{className:m().header,children:n})},v=r(6109),g=r.n(v),x=r(66942),f=r.n(x),p=r(53473),j=function(e){var n=e.title,r=e.prefix,a=e.suffix,t=e.onClick;return(0,i.jsxs)("div",{className:f().item,children:[(0,i.jsx)("span",{className:f().prefix,children:(0,i.jsx)(p.ZP,{size:p.Jh.Small,color:p.EY.secondary,icon:r})}),(0,i.jsx)("span",{className:f().itemContent,onClick:t,children:n}),a&&(0,i.jsx)("span",{children:a})]})},C=r(92040),y=r.n(C),S=r(85494),w=r(43172),N=r(42366),Z=function(e){var n=e.searchQuery,r=e.onSearchKeywordClicked,a=e.onRemoveSearchQueryClicked;return(0,i.jsx)("div",{className:y().searchSuggestion,children:(0,i.jsx)(j,{title:n,prefix:(0,i.jsx)(N.Z,{}),onClick:function(){return r(n)},suffix:a&&(0,i.jsx)(S.ZP,{shape:S.jL.Circle,onClick:function(e){return function(e,n){e.stopPropagation(),a(n)}(e,n)},variant:S.Wu.Ghost,size:S.qE.Small,children:(0,i.jsx)(w.Z,{})})})})},I=r(648),k=r(61257),R=r.n(k),P=r(88548),b=r(1050),Q=r(12195),M=function(e){var n=e.onSearchKeywordClicked,r=e.isSearchDrawer,a=(0,u.Z)("common").t,t=(0,I.v9)(P.ag,b.Hj),s=(0,I.I0)(),o=(0,c.useCallback)((function(e){(0,Q.MY)("search_".concat(r?"drawer":"page","_remove_query")),s({type:P.rd.type,payload:e})}),[s,r]);return t.length?(0,i.jsxs)("div",{className:R().container,children:[(0,i.jsx)(_,{text:a("search.recent")}),t.map((function(e){return(0,i.jsx)(Z,{searchQuery:e,onSearchKeywordClicked:function(e){(0,Q.MY)("search_".concat(r?"drawer":"page","_history_item")),n(e)},onRemoveSearchQueryClicked:o},"".concat(e))}))]}):(0,i.jsx)(i.Fragment,{})},K=r(57830),D=r(15104);function E(){return E=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},E.apply(null,arguments)}var O,T=function(e){return c.createElement("svg",E({width:25,height:24,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a||(a=c.createElement("g",{clipPath:"url(#a)"},c.createElement("path",{d:"M24.5 6H13.932l4.759 4.759-4.8 5.331-5.553-5.553a1.056 1.056 0 0 0-1.494 0L1.56 15.82a1.056 1.056 0 1 0 1.494 1.494l4.537-4.537 5.594 5.594a1.054 1.054 0 0 0 1.532-.04l5.47-6.077 4.313 4.313V6Z",fill:"#000"}))),t||(t=c.createElement("defs",null,c.createElement("clipPath",{id:"a"},c.createElement("path",{fill:"#fff",transform:"translate(.25)",d:"M0 0h24v24H0z"})))))},Y=r(22582),z=r(43609),B=r(84020),H={Mulk:67,Noah:71,Kahf:18,Yaseen:36},F=function(e){var n=e.onSearchKeywordClicked,r=e.isSearchDrawer,a=(0,u.Z)("common"),t=a.t,s=a.lang,c=(0,D.Z)(s);if(!c)return(0,i.jsx)(i.Fragment,{});var o=["".concat(t("juz")," ").concat((0,z.rQ)(1,s)),"".concat(t("page")," ").concat((0,z.rQ)(1,s)),(0,Y.dy)(c,"36").transliteratedName,(0,z.rQ)(36,s),(0,z.Tj)("2:255",s)];return(0,i.jsx)("div",{className:g().container,children:(0,i.jsxs)("div",{children:[(0,i.jsx)(_,{text:t("search.popular")}),(0,i.jsx)("div",{children:Object.keys(H).map((function(e){var n=H[e],a=(0,B.qm)(H[e]),t=(0,Y.dy)(c,n);return(0,i.jsx)(K.Z,{href:a,className:g().popularSearchItem,children:(0,i.jsx)(j,{prefix:(0,i.jsx)(T,{}),title:t.transliteratedName,onClick:function(){(0,Q.MY)("search_".concat(r?"drawer":"page","_popular_search_").concat(e))}},a)},a)}))}),(0,i.jsx)(M,{onSearchKeywordClicked:n,isSearchDrawer:r}),(0,i.jsx)(_,{text:t("search.hint")}),o.map((function(e,a){return(0,i.jsx)(Z,{searchQuery:e,onSearchKeywordClicked:function(e){(0,Q.MY)("search_".concat(r?"drawer":"page","_search_hint_").concat(a)),n(e)}},e)}))]})})},L=r(71603),A=r.n(L),G=r(17580),q=r(43466),W=r.n(q),J=r(9192),U=r(61388),V=r(18054),X=r(53131),$=r(94292),ee=function(e){var n=e.navigation,r=e.isSearchDrawer,a=e.service,t=void 0===a?U.Z.QDC:a,s=(0,u.Z)("common"),o=s.t,l=s.lang,h=(0,c.useContext)(J.Z),d=t===U.Z.KALIMAT,m=(0,B.zp)(n.resultType,n.key,d),_=d?(0,X.Em)(h,n,o,l):n,v=d?n.resultType===$.H.SURAH?"(".concat((0,z.rQ)(Number(_.key),l),")"):n.resultType===$.H.AYAH?"(".concat((0,z.Tj)(_.key,l),")"):void 0:"(".concat(n.key,")");return(0,i.jsx)(S.ZP,{onClick:function(){(0,Q.MY)("search_navigation_result",{type:n.resultType,service:t,source:r?V.Z.SearchDrawer:V.Z.SearchPage})},href:m,suffix:v,children:_.name})},ne=r(8522),re=r(57065),ae=r.n(re),te=r(33813),se=r.n(te);function ie(){return ie=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},ie.apply(null,arguments)}var ce,oe=function(e){return c.createElement("svg",ie({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),O||(O=c.createElement("path",{d:"m17.25 3-10.5 9 10.5 9V3Z",fill:"currentColor"})))};function le(){return le=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},le.apply(null,arguments)}var ue=function(e){return c.createElement("svg",le({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ce||(ce=c.createElement("path",{d:"m6.75 21 10.5-9-10.5-9v18Z",fill:"currentColor"})))},he="...",de=function(e,n){return ae()(e,n+1)},me=function(e){var n=e.onPageChange,r=e.totalCount,a=e.currentPage,t=e.pageSize,o=void 0===t?20:t,h=e.siblingsCount,d=void 0===h?1:h,m=e.showSummary,_=void 0===m||m,v=(0,u.Z)("common"),g=v.t,x=v.lang,f=(0,c.useMemo)((function(){var e=Math.ceil(r/o);if(d+5>=e)return de(1,e);var n=Math.max(a-d,1),t=Math.min(a+d,e),s=n>2,i=t<e-2,c=1,l=e;if(!s&&i){var u=de(1,3+2*d);return(0,ne.Z)(u).concat([he,e])}if(s&&!i){var h=de(e-(3+2*d)+1,e);return[c,he].concat((0,ne.Z)(h))}if(s&&i){var m=de(n,t);return[c,he].concat((0,ne.Z)(m),[he,l])}return[]}),[r,o,d,a]);if(0===a||f.length<1)return null;var p=a*o;return(0,i.jsxs)("div",{className:se().container,children:[(0,i.jsx)("div",{className:se().buttonContainer,children:(0,i.jsx)(S.ZP,{tooltip:g("prev"),variant:S.Wu.Ghost,isDisabled:1===a,onClick:function(){n(a-1)},children:(0,i.jsx)(oe,{})})}),f.map((function(e,r){return e===he?(0,i.jsx)("div",{children:he},"".concat(e,"-").concat(r)):(0,i.jsx)("div",{className:l()(se().buttonContainer,(0,s.Z)({},se().selectedButton,e===a)),children:(0,i.jsx)(S.ZP,{variant:S.Wu.Ghost,onClick:function(){return n(e)},children:(0,z.rQ)(Number(e),x)})},"".concat(e,"-").concat(r))})),(0,i.jsx)("div",{className:se().buttonContainer,children:(0,i.jsx)(S.ZP,{tooltip:g("next"),variant:S.Wu.Ghost,isDisabled:a===f[f.length-1],onClick:function(){n(a+1)},children:(0,i.jsx)(ue,{})})}),_&&(0,i.jsx)("p",{className:se().uppercase,children:g("pagination-summary",{currentResultNumber:(0,z.rQ)(p-(o-1),x),endOfResultNumber:(0,z.rQ)(r<p?r:p,x),totalNumberOfResults:(0,z.rQ)(r,x)})})]})},_e=function(e){var n,r=e.searchResult,a=e.searchQuery,t=e.isSearchDrawer,s=void 0===t||t,c=e.currentPage,o=e.onPageChange,l=e.pageSize,h=e.onSearchResultClicked,d=(0,u.Z)(),m=d.t,_=d.lang;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{children:[!!(null===(n=r.result.navigation)||void 0===n?void 0:n.length)&&(0,i.jsx)("div",{className:W().navigationItemsListContainer,children:r.result.navigation.map((function(e){return(0,i.jsx)("span",{className:W().navigationItemContainer,children:(0,i.jsx)(ee,{isSearchDrawer:s,navigation:e,service:r.service})},e.key)}))}),(0,i.jsx)("p",{className:W().header,children:m("common:search-results",{count:(0,z.rQ)(r.pagination.totalRecords,_)})}),(0,i.jsxs)(i.Fragment,{children:[r.result.verses.map((function(e){return(0,i.jsx)(G.Z,{result:e,source:s?V.Z.SearchDrawer:V.Z.SearchPage,service:r.service},e.verseKey)})),s?(0,i.jsxs)("div",{className:W().resultsSummaryContainer,children:[(0,i.jsxs)("p",{children:[(0,z.rQ)(r.pagination.totalRecords,_)," ",m("common:search.results")]}),r.pagination.totalRecords>0&&(0,i.jsx)(K.Z,{href:"/search?query=".concat(a),shouldPassHref:!0,onClick:function(){h&&h(),(0,Q.MY)("search_drawer_show_all")},children:(0,i.jsx)("a",{children:(0,i.jsx)("p",{className:W().showAll,children:m("common:search.show-all")})})})]}):(0,i.jsx)(i.Fragment,{children:a&&(0,i.jsx)(me,{currentPage:c,totalCount:r.pagination.totalRecords,onPageChange:o,pageSize:l})})]})]})})},ve=r(10117),ge=function(e){var n=e.searchQuery,r=e.isSearching,a=e.hasError,t=e.searchResult,c=e.onSearchKeywordClicked,o=e.onSearchResultClicked,d=e.isSearchDrawer,m=void 0===d||d,_=e.currentPage,v=e.pageSize,g=e.onPageChange,x=(0,u.Z)("common").t,f=t&&0===t.pagination.totalRecords&&!t.result.navigation.length,p=!n||r||a||!r&&!a&&f;return(0,i.jsx)("div",{className:l()((0,s.Z)({},A().internalContainer,p)),children:n?(0,i.jsx)(i.Fragment,{children:r?(0,i.jsx)(ve.Z,{size:ve.E.Large}):(0,i.jsxs)(i.Fragment,{children:[a&&(0,i.jsx)("div",{children:x("error.general")}),!a&&t&&(0,i.jsx)(i.Fragment,{children:f?(0,i.jsx)(h.Z,{searchQuery:n}):(0,i.jsx)(_e,{onSearchResultClicked:o,searchResult:t,searchQuery:n,isSearchDrawer:m,currentPage:_,onPageChange:g,pageSize:v})})]})}):(0,i.jsx)(F,{onSearchKeywordClicked:c,isSearchDrawer:m})})}},17580:function(e,n,r){"use strict";var a=r(57611),t=r(67597),s=r(61395),i=r(77684),c=r.n(i),o=r(57830),l=r(18636),u=r(15104),h=r(61388),d=r(22582),m=r(12195),_=r(43609),v=r(84020),g=r(69640);n.Z=function(e){var n,r=e.result,i=e.source,x=e.service,f=void 0===x?h.Z.QDC:x,p=(0,s.Z)("quran-reader").lang,j=(0,t.useMemo)((function(){return(0,_.Tj)(r.verseKey,p)}),[p,r.verseKey]),C=(0,u.Z)(p);if(!C)return null;var y=(0,g.Tc)(r.verseKey),S=(0,d.dy)(C,y.toString());return(0,a.jsx)("div",{className:c().container,children:(0,a.jsxs)("div",{className:c().itemContainer,children:[(0,a.jsxs)(o.Z,{className:c().verseKey,href:(0,v.P6)(r.verseKey),onClick:function(){(0,m.MY)("search_result_item",{service:f,source:i})},children:[S.transliteratedName," ",j]}),(0,a.jsx)("div",{className:c().quranTextContainer,children:(0,a.jsx)("div",{className:c().quranTextResult,translate:"no",children:r.words.map((function(e,n){return(0,a.jsx)(l.Z,{isHighlighted:!!e.highlight,word:e,isWordByWordAllowed:!1,isAudioHighlightingAllowed:!1},"".concat(r.verseKey,":").concat(n+1))}))})}),null===(n=r.translations)||void 0===n?void 0:n.map((function(e){return(0,a.jsxs)("div",{className:c().translationContainer,children:[(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e.text}}),(0,a.jsxs)("p",{className:c().translationName,children:[" - ",e.resourceName]})]},e.resourceId)}))]})})}},53473:function(e,n,r){"use strict";r.d(n,{EY:function(){return a},Jh:function(){return t}});var a,t,s=r(45361),i=r(57611),c=(r(67597),r(37014)),o=r.n(c),l=r(79999),u=r.n(l),h=r(22209);!function(e){e.default="default",e.primary="primary",e.secondary="secondary"}(a||(a={})),function(e){e.Xsmall="xsmall",e.Small="small",e.Medium="medium",e.Large="large"}(t||(t={}));n.ZP=function(e){var n,r=e.icon,c=e.size,l=void 0===c?t.Medium:c,d=e.color,m=void 0===d?a.default:d,_=e.shouldFlipOnRTL,v=void 0===_||_,g=e.shouldForceSetColors,x=void 0===g||g,f=e.className,p=(0,h.Z)();return(0,i.jsx)("span",{className:o()(f,u().container,(n={},(0,s.Z)(n,u().defaultColor,x&&m===a.default||m===a.primary),(0,s.Z)(n,u().secondaryColor,x&&m===a.secondary),(0,s.Z)(n,u().xsmallIcon,l===t.Xsmall),(0,s.Z)(n,u().smallIcon,l===t.Small),(0,s.Z)(n,u().mediumIcon,l===t.Medium),(0,s.Z)(n,u().largeIcon,l===t.Large),n)),"data-auto-flip-icon":v,dir:p,children:r})}},36773:function(e){e.exports={container:"NoResults_container__I2jHF",mainBody:"NoResults_mainBody__GC8l_",iconContainer:"NoResults_iconContainer__ks7uY",mainMessage:"NoResults_mainMessage__o3ksN",secondaryMessage:"NoResults_secondaryMessage__CNI0d"}},52086:function(e){e.exports={header:"Header_header__r4qda"}},6109:function(e){e.exports={container:"PreInput_container___K1DL",popularSearchesContainer:"PreInput_popularSearchesContainer__30iiP",popularSearchItem:"PreInput_popularSearchItem__R2cQD"}},66942:function(e){e.exports={item:"SearchItem_item__eQZAY",itemContent:"SearchItem_itemContent__h6vxl",prefix:"SearchItem_prefix__SOnRa"}},92040:function(e){e.exports={searchSuggestion:"SearchQuerySuggestion_searchSuggestion__BKIWB"}},71603:function(e){e.exports={internalContainer:"SearchBodyContainer_internalContainer__Yb3_Y"}},61257:function(e){e.exports={container:"SearchHistory_container__UwtT_"}},77684:function(e){e.exports={translationName:"SearchResultItem_translationName__5mkDi",translationContainer:"SearchResultItem_translationContainer__OaPZE",container:"SearchResultItem_container__Cvqx0",itemContainer:"SearchResultItem_itemContainer__NRd1r",quranTextResult:"SearchResultItem_quranTextResult__texyH",verseKey:"SearchResultItem_verseKey__dyumW"}},43466:function(e){e.exports={resultsSummaryContainer:"SearchResults_resultsSummaryContainer__giFzL",header:"SearchResults_header__WwvQ5",showAll:"SearchResults_showAll__W5zdh",navigationItemsListContainer:"SearchResults_navigationItemsListContainer__pt45x",navigationItemContainer:"SearchResults_navigationItemContainer__mGz8h"}},79999:function(e){e.exports={container:"IconContainer_container__kS6o8",defaultColor:"IconContainer_defaultColor__jGhPh",secondaryColor:"IconContainer_secondaryColor__KDGmK",xsmallIcon:"IconContainer_xsmallIcon__QIQZu",smallIcon:"IconContainer_smallIcon__slfID",mediumIcon:"IconContainer_mediumIcon__WGpBm",largeIcon:"IconContainer_largeIcon__oO0B9"}},33813:function(e){e.exports={container:"Pagination_container__lcGYl",uppercase:"Pagination_uppercase__OgSGf",buttonContainer:"Pagination_buttonContainer__GsblO",selectedButton:"Pagination_selectedButton__0o6Sb"}}}]);
- //# sourceMappingURL=60660-fb6caacfae5abcf8.js.map
|