PageSourceSearch

https://storyweaver.org.in/assets/SmileyRatingModal.Dl2MWynW.js

js storyweaver.org.in collected 2026-10-01 10:12:06 UTC 5,036 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LottieAnimation.Iv4LtDkT.js","assets/react-vendor.B75MsAI9.js","assets/AuthModalContainer.D3JsQqnf.js","assets/AuthModalContainer-BhQ3rY72.css","assets/RTLProvider.Bmr48mpV.js","assets/LottieAnimation-B0eGlewC.css"])))=>i.map(i=>d[i]);
2import{r as e,j as i}from"./react-vendor.B75MsAI9.js";import{fA as t,aB as o,u as a,t as s,p as l,fB as r,c7 as n,M as d,U as u,o as m,b0 as c,L as g,S as p,g as _,w as y,a as k,q as f,aO as b,fC as h,ct as S,aX as j,aZ as v,fD as R,a4 as x}from"./AuthModalContainer.D3JsQqnf.js";import w from"./FlagModal.D8X6a44F.js";import{t as C}from"./LazyFontLoader.5DGfhuFK.js";import{u as N}from"./RTLProvider.Bmr48mpV.js";const M=e.lazy(()=>o(()=>import("./LottieAnimation.Iv4LtDkT.js"),__vite__mapDeps([0,1,2,3,4,5]))),L=({onSelect:o})=>{const a=N(),[s,l]=e.useState(null),r=e=>{l(e),"function"==typeof o&&o(e)};return i.jsx("div",{className:"pb-three-point-rating",style:{width:"100%",minHeight:"200px"},children:i.jsxs(e.Suspense,{fallback:null,children:[i.jsx(M,{type:t.okay,isSelected:s===t.okay,onClick:()=>r(t.okay),isRtl:a}),i.jsx(M,{type:t.like,isSelected:s===t.like,onClick:()=>r(t.like),isRtl:a}),i.jsx(M,{type:t.love,isSelected:s===t.love,onClick:()=>r(t.love),isRtl:a})]})})},B=[],P=({isVisible:t,slug:o,book:x,lastStoryPage:N,showAudioBookReaderOnBack:M,storyfinder:P,isRtl:T})=>{const A=a(),F=s(),$=l(e=>e.viewport),E=l(e=>e.user.isLoggedIn),D=l(e=>e.user.profile.id),O=l(e=>e.user.profile.profile_type),U=l(e=>e.user.profile.profile_type),q=l(e=>e.user.profile.is_email_confirmed),z=l(e=>e.user.profile.roles),V=e.useMemo(()=>z||B,[z]),I=l(e=>e.user.profile.organizationRoles),H=e.useMemo(()=>I||B,[I]),Z=l(e=>e.book.isSubmittingSmileyRating),G=l(e=>e.book.isFetchingSmileyRatingBook),W=l(e=>e.book.isFetchingNextReadBooks),X=l(e=>e.book.isFetchingAssets),J=l(e=>e.book.isFlaggingBook),[K,Q]=e.useState(null),[Y,ee]=e.useState(!1),ie="pb-smiley-rating-modal";if(e.useEffect(()=>{x&&x.isFlagged&&(F(r()),F(n()))},[x,F]),!t)return null;if(G||W||X)return i.jsx(d,{children:i.jsx(u,{size:"s"})});const te=i.jsx("h2",{className:`${ie}__title`,children:x.isLanguageReviewer?A("SmileyRatingModal.reviewer-title"):A("SmileyRatingModal.title")},"header"),oe=i.jsx("div",{className:`${ie}__submit-wrapper`,children:i.jsx(m,{parentClassName:`${ie}__submit`,label:A("SmileyRatingModal.submit"),variant:"primary",fullWidth:!0,onClick:()=>{P?window.dataLayer.push({event:k.ratingSubmitted,label:_.storyfinder,category:U===f[b.STUDENT]?y.homePageStudent:y.homePage,item_type:_.book,item_id:x.id,item_value:x.title,user_profile:O,user_id:D}):window.dataLayer.push({event:k.ratingSubmitted,category:_.storyModal,label:x.id,item_type:null,item_id:null,item_value:null,user_profile:O,user_id:D}),F(h({bookSlug:o,reaction:K})).then(()=>{F(S({slug:o})).then(e=>{e&&!e.error&&(F(r()),F(n()))})})},disabled:null===K,loading:Z})},"submit"),ae=V&&V.includes(c.CONTENT_MANAGER),se=H&&H.includes(c.PUBLISHER),le=x.recommended&&(ae||se)||!x.recommended,re=i.jsxs("div",{className:`${ie}__footer`,children:[i.jsxs(g,{parentClassName:`${ie}__link`,onClick:()=>{P?window.dataLayer.push({event:k.clickedBackStory,label:_.storyfinder,category:U===f[b.STUDENT]?y.homePageStudent:y.homePage,item_type:_.book,item_id:x.id,item_value:x.title,user_profile:O,user_id:D}):window.dataLayer.push({event:k.clickedBackStory,category:_.storyModal,label:_.ratingModal,item_type:_.book,item_id:x.id,item_value:x.title||x.name,user_profile:O,user_id:D}),F(j({slug:o,isAudio:M})).then(e=>{e&&!e.error&&(F(r()),F(v({book:x,showAudioBookReader:M,startPage:N||1})))})},children:[i.jsx(p,{parentClassName:`${ie}__icon`,name:"chevron-left"}),A("SmileyRatingModal.back")]}),E&&!x.isFlagged&&q&&le?i.jsxs(g,{parentClassName:`${ie}__link`,onClick:()=>{ee(!0)},children:[i.jsx(p,{parentClassName:`${ie}__icon`,name:"flag",title:A("SvgTitle.flag")}),A("SmileyRatingModal.footer-report")]}):null,i.jsxs(g,{parentClassName:`${ie}__link`,onClick:()=>{P?window.dataLayer.push({event:k.bookCompleted,label:_.storyfinder,category:U===f[b.STUDENT]?y.homePageStudent:y.homePage,item_type:_.book,item_id:x.id,item_value:x.title,user_profile:O,user_id:D}):window.dataLayer.push({event:k.clickedNextStory,category:_.storyModal,label:_.ratingModal,item_type:_.book,item_id:x.id,item_value:x.title||x.name,user_profile:O,user_id:D}),F(S({slug:o})).then(e=>{e&&!e.error&&(F(r()),F(n()))})},children:[C(A("SmileyRatingModal.footer-read-more"),10),i.jsx(p,{parentClassName:`${ie}__icon`,name:"chevron-right"})]})]}),ne=[te,i.jsx(L,{onSelect:e=>{Q(e)},isRtl:T},"rating"),oe];return Y?i.jsx(w,{isVisible:Y,onCloseClicked:()=>{ee(!1),F(r()),F(n())},onFlagClicked:e=>((e,i)=>F(R({bookSlug:e,reasons:i})))(o,e),viewport:$,isFlaggingBook:J[o],isRtl:T,isContentManager:ae}):i.jsxs(d,{long:!0,isRtl:T,children:[ne,re]})};P.propTypes={isVisible:x.bool.isRequired,slug:x.string.isRequired,book:x.object.isRequired,lastStoryPage:x.number,showAudioBookReaderOnBack:x.bool,storyfinder:x.bool};export{P as default};

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