(this.webpackJsonptorahstream=this.webpackJsonptorahstream||[]).push([[0],{119:function(e,a,t){e.exports=t(153)},124:function(e,a,t){},153:function(e,a,t){"use strict";t.r(a);var n=t(0),r=t.n(n),o=t(10),i=t.n(o),c=(t(124),t(30)),l=t(36),s=t.n(l),m=t(96),u=t.n(m),d={caseSensitive:!1,shouldSort:!0,threshold:.6,location:0,distance:100,maxPatternLength:32,minMatchCharLength:2,keys:["title"]},h=Object(n.createContext)(),p=function(e){var a=e.children,t=Object(n.useState)({series:[],index:!1}),o=Object(c.a)(t,2),i=o[0],l=o[1];return Object(n.useEffect)((function(){s.a.get("/Rabbi_Viener/topics.json").then((function(e){l({series:e.data,index:new u.a(e.data,d)})}))}),[]),r.a.createElement(h.Provider,{value:i},a)},f=t(188),E=t(193),b=t(207),v=t(191),g=t(51),y=t(192),w=t(23),j=t(33),_=Object(j.f)((function(e){var a=e.history,t=["/shiurim","/about"].includes(a.location.pathname)?a.location.pathname:"/"===a.location.pathname&&"/about";return r.a.createElement("nav",{style:{flexGrow:1}},r.a.createElement(f.a,null,r.a.createElement(v.a,{style:{display:"flex"}},r.a.createElement(y.a,null,r.a.createElement(g.a,{component:"span",display:"inline",gutterBottom:!0,noWrap:!0,variant:"h6"},"TorahStream")),r.a.createElement("div",{style:{display:"inline-flex",marginLeft:"auto"}},r.a.createElement(b.a,{value:t},r.a.createElement(E.a,{component:w.a,label:"Shiurim",to:"/shiurim",value:"/shiurim"}),r.a.createElement(E.a,{component:w.a,label:"About",to:"/about",value:"/about"}))))))})),S=function(e){var a=[{title:"",image:"https://cdn.shopify.com/s/files/1/0093/3625/8657/products/138-8_6be6977d-80d2-4360-b721-bac44a64643a_500x.jpg?v=1635954806",url:"https://www.artscroll.com/Books/9781422611388.html",buyNow:!0},{title:r.a.createElement(r.a.Fragment,null,"Available in many seforim stores. (Also at ZBerman) If you cannot find it near you, you can reach out to:",r.a.createElement("br",null),r.a.createElement("span",{className:"email mr-5","data-email":"seforim@torahstream.org"})," ",r.a.createElement("br",null),r.a.createElement("span",{className:"email","data-email":"chukoseyhem@torahstream.org"})),image:"assets/2023-06-19_21-59.png",url:"https://judaicaplaza.com/products/6197066",buyNow:!1},{title:"Torah 2 Go: R' Yosef Viener Nisyonos, Bitachon, and Tefilah Series (USB)",image:"https://judaicaplaza.com/cdn/shop/products/6197067_600x.jpg?v=1689778722",url:"https://judaicaplaza.com/products/6197067?_pos=3&_sid=60577d0f7&_ss=r",buyNow:!0},{title:"Torah 2 Go: R' Yosef Viener Inyunei Mishpacha Shiurim (USB)",image:"https://judaicaplaza.com/cdn/shop/products/6197066_500x.jpg?v=1689778719",url:"https://judaicaplaza.com/products/6197066",buyNow:!0},{title:"Torah 2 Go: R' Yosef Viener - Parshah (USB)",image:"https://judaicaplaza.com/cdn/shop/files/6197112_1_c1fa1481-2f1f-4b1d-9e91-f609035b0bdc_400x.jpg?v=1725465008",url:"https://judaicaplaza.com/products/6197112?_pos=1&_sid=4f8fe5479&_ss=r",buyNow:!0},{title:"Torah 2 Go: R' Yosef Viener - Tzedakah (USB)",image:"https://judaicaplaza.com/cdn/shop/files/6197114_1_3d7f0b2f-03fb-4bb2-892d-b0ff16e5b497_400x.jpg?v=1725465014",url:"https://judaicaplaza.com/products/6197114?_pos=2&_sid=4f8fe5479&_ss=r",buyNow:!0},{title:"Torah 2 Go: R' Yosef Viener - Sefer Melachim (USB)",image:"https://judaicaplaza.com/cdn/shop/files/6197116_1_44d2946a-909f-47de-ad77-5c3224ae44b8_300x.jpg?v=1725465020",url:"https://judaicaplaza.com/products/6197116?_pos=3&_sid=4f8fe5479&_ss=r",buyNow:!0},{title:"Torah 2 Go: R' Yosef Viener - Sefer Bereishis (USB)",image:"https://judaicaplaza.com/cdn/shop/files/6197072_1_300x.jpg?v=1694451066",url:"https://judaicaplaza.com/products/6197072?_pos=4&_sid=4f8fe5479&_ss=r",buyNow:!0},{title:"Torah 2 Go: R' Yosef Viener - Lifnei Iver (USB)",image:"https://judaicaplaza.com/cdn/shop/files/6197117_1_d79c4ba0-6e8f-43cd-89ff-8b6472737735_400x.jpg?v=1725465023",url:"https://judaicaplaza.com/products/6197117?_pos=5&_sid=4f8fe5479&_ss=r",buyNow:!0},{title:"Torah 2 Go: R' Yosef Viener - Chukoseihem Lo Seileichu (USB)",image:"https://judaicaplaza.com/cdn/shop/files/6197113_1_bf1f74c1-9d1c-4ae7-a78b-52efaf341b23_400x.jpg?v=1725465011",url:"https://judaicaplaza.com/products/6197113?_pos=6&_sid=4f8fe5479&_ss=r",buyNow:!0},{title:"Torah 2 Go: R' Yosef Viener - Navi Sefer Shoftim (USB)",image:"https://judaicaplaza.com/cdn/shop/files/6197115_1_a9d46081-5161-4b19-9687-c3af3156d0fb_400x.jpg?v=1725465016",url:"https://judaicaplaza.com/products/6197115?_pos=7&_sid=4f8fe5479&_ss=r",buyNow:!0}];return r.a.createElement(v.a,null,r.a.createElement(_,null),r.a.createElement("h1",{className:"text-5xl py-8"},"Welcome to TorahStream "),r.a.createElement("div",{className:"flex mb-10 flex-col md:flex-row"},r.a.createElement("div",{className:"w-2/3 mr-20 rounded-md"},r.a.createElement("img",{alt:"Rav Viener",id:"rav-viener-picture",src:"assets/rabbi_viener.jpg",className:"w-96"})),r.a.createElement("div",{className:"text-xl"},r.a.createElement("div",null,"Rabbi Yosef Viener, author of"," ",r.a.createElement(w.a,{to:"http://www.artscroll.com/Books/cqhh.html"}," ","Contemporary Questions in Halachah and Hashkafah"),", has inspired and enlightened listeners worldwide with his shiurim on Halachah and Hashkafah - crystallizing the Torah's timeless wisdom and applying to our daily lives. TorahStream.org is proud to bring you"," ",r.a.createElement(w.a,{to:"/shiurim"},"these fascinating lectures")," so you too can benefit from his Torah knowledge and practical life guidance at the time and place of your convenience."),r.a.createElement("div",{className:"pt-6"},r.a.createElement("a",{href:"/shiurim",className:"bg-blue-400 p-3 my-5 rounded-md"},"Go To Shiurim")))),r.a.createElement("div",{className:"grid grid-cols-2 md:grid-cols-4 mb-10"},a.map((function(e){return r.a.createElement("div",{className:"flex flex-col p-2",key:e.title},r.a.createElement("img",{className:"lg:w-2/3 w-full p-5 mx-auto",src:e.image}),r.a.createElement("div",{className:"mx-auto"},e.title,r.a.createElement("div",{className:"pt-5 text-center"},e.buyNow&&r.a.createElement("a",{href:e.url,className:"bg-blue-400 p-3 my-5 rounded-md"},"Buy Now"))))}))))},x=t(60),k=t(61),N=t(66),z=t(65),T=t(194),O=t(206),B=t(21),C=t(62),V=t.n(C),I=t(63),P=t.n(I),R=function(e){var a=e.data;return r.a.createElement(r.a.Fragment,null,r.a.createElement(O.a,{mb:2},r.a.createElement(g.a,{gutterBottom:!0,variant:"h4"},"".concat(a.title," (").concat(a.count,")")),r.a.createElement(T.a,{color:"primary",component:"a",href:a.podcast,onClick:function(){B.a.event({category:"Clicked on Podcast",action:"Podcast link: ".concat(a.title)})},startIcon:r.a.createElement(V.a,null),variant:"contained"},"Audio Podcast")," ",a.vodcast&&r.a.createElement(T.a,{color:"secondary",component:"a",href:a.vodcast,onClick:function(){B.a.event({category:"Clicked on Vodcast",action:"Vodcast link: ".concat(a.title)})},startIcon:r.a.createElement(P.a,null),variant:"contained"},"Video Podcast")))},F=t(195),G=t(198),U=t(196),Y=t(197),A=t(208),W=t(101),q=t.n(W),L=t(103),M=t.n(L),D=t(102),H=t.n(D),J=function(e){return" ,.'\":;_?!$@#%^&*()[]{}-".split("").reduce((function(e,a){return e.replaceAll(a,"-")}),e).toLowerCase()},Q=function(e){var a=e.match(/(\d{4}-\d{2}-\d{2}) (.*)/);if(a){var t=a[1],n="-"===a[2][0]?a[2].substr(2):a[2];return r.a.createElement(r.a.Fragment,null,n.split("
").map((function(e,a){return r.a.createElement(g.a,{display:"inline",variant:"h5"},e,r.a.createElement("br",null))}))," ",r.a.createElement(g.a,{color:"textSecondary",display:"inline",variant:"subtitle1"},t))}return r.a.createElement(r.a.Fragment,null,e.split("
").map((function(e,a){return r.a.createElement(g.a,{display:"inline",variant:"h5"},e,r.a.createElement("br",null))})))},$=function(e){var a,t,o=e.shiur,i=e.shiurId,l=Object(n.useState)(!1),s=Object(c.a)(l,2),m=s[0],u=s[1];return r.a.createElement(O.a,{mb:1},r.a.createElement(F.a,null,r.a.createElement(U.a,{subheader:r.a.createElement(r.a.Fragment,null,o.video&&r.a.createElement(Y.a,{control:r.a.createElement(A.a,{checked:m,onChange:function(){return u(!m)},value:"video"}),label:"Show Video"}),r.a.createElement(g.a,{component:"span",display:"inline",variant:"body1"}," ",r.a.createElement(T.a,{color:"secondary",component:"a",download:!0,href:m?o.video:o.audio,onClick:function(){B.a.event({category:"Download a Shiur",action:"Shiur downloaded: ".concat(o.Title)})},size:"small",startIcon:r.a.createElement(H.a,null),variant:"outlined"},"Download"))),title:r.a.createElement("a",{href:(a=i,t=J(o.Title),"".concat(window.location.origin,"/shiur/").concat(a,"/").concat(t))},Q(o.Title))}),r.a.createElement(G.a,null,r.a.createElement(q.a,{controls:!0,height:m?"100%":"2.5rem",light:!0,onPlay:function(){B.a.event({category:"Play Shiur",action:"Shiur played: ".concat(o.Title)})},playbackRate:1,playIcon:r.a.createElement(M.a,{fontSize:"large"}),url:m?o.video:o.audio,width:"100%"}))))},Z=t(210),K=t(104),X=t.n(K),ee=t(105),ae=t.n(ee),te=function(e){var a=e.items,t=e.numPerPage,o=e.renderFunction,i=Object(n.useState)(0),l=Object(c.a)(i,2),s=l[0],m=l[1],u=Math.ceil(a.length/t);return r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.a,{activeStep:s,backButton:r.a.createElement(T.a,{disabled:0===s,onClick:function(){m(s-1)},size:"small"},r.a.createElement(X.a,null),"Back"),nextButton:r.a.createElement(T.a,{disabled:s===u-1,onClick:function(){m(s+1)},size:"small"},"Next",r.a.createElement(ae.a,null)),position:"static",steps:u,variant:"text"}),r.a.createElement("br",null),o(function(e){return e.slice(s*t,s*t+t)}(a)))},ne=t(199),re=function(e){Object(N.a)(t,e);var a=Object(z.a)(t);function t(e){var n;return Object(x.a)(this,t),(n=a.call(this,e)).reverseOrder=function(){n.setState((function(e){return{orderNewestFirst:!e.orderNewestFirst,episodes:e.episodes.reverse()}}))},n.fetchShiurim=function(e){s.a.get("/Rabbi_Viener/".concat(e,"/episodes.json")).then((function(e){return n.setState({episodes:e.data})})),s.a.get("/Rabbi_Viener/".concat(e,"/topic.json")).then((function(e){return n.setState({topic:e.data})}))},n.state={episodes:[],topic:!1,shiurId:null,orderNewestFirst:!1},n}return Object(k.a)(t,[{key:"componentDidMount",value:function(){var e=this.props.match.params.shiurId;this.fetchShiurim(e),this.setState({shiurId:e})}},{key:"render",value:function(){var e=this;return r.a.createElement(v.a,{maxWidth:"md"},this.state.episodes.length>0&&this.state.topic?r.a.createElement(r.a.Fragment,null,r.a.createElement(R,{data:this.state.topic}),r.a.createElement(Y.a,{control:r.a.createElement(A.a,{checked:this.state.orderNewestFirst,color:"primary",onChange:function(){return e.reverseOrder()},size:"medium",value:"order"}),label:"Show Newest First"}),r.a.createElement("hr",null),r.a.createElement(te,{items:this.state.episodes,numPerPage:5,renderFunction:function(a){return a.map((function(a,t){return r.a.createElement($,{key:a.Title,shiur:a,shiurId:e.state.shiurId})}))}})):r.a.createElement(O.a,{mt:20},r.a.createElement(g.a,{align:"center",component:"div"},r.a.createElement(ne.a,{color:"primary",size:100,thickness:2}))))}}]),t}(n.Component),oe=Object(j.f)(re),ie=t(75),ce=t(200),le=t(201),se=t(203),me=t(202),ue=function(e){var a=e.series,t=void 0===a?[]:a;return r.a.createElement(ce.a,null,t.map((function(e){return r.a.createElement(le.a,{component:w.a,divider:!0,key:e.id,style:{textTransform:"none"},to:"/shiurim/".concat(e.id)},r.a.createElement(me.a,null,r.a.createElement(r.a.Fragment,null,r.a.createElement(V.a,null)," ",e.vodcast&&r.a.createElement(P.a,null))),e.id.replace(/_/g," "),r.a.createElement(se.a,null,e.count))})))},de=t(204),he=function(e){var a=Object(n.useState)({query:""}),t=Object(c.a)(a,2),o=t[0],i=t[1],l=Object(n.useContext)(h);return r.a.createElement(v.a,{maxWidth:"md"},r.a.createElement(g.a,{gutterBottom:!0,variant:"h4"},"Choose A Topic"),r.a.createElement(de.a,{fullWidth:!0,onChange:function(e){return i(Object(ie.a)(Object(ie.a)({},o),{},{query:e.target.value}))},placeholder:"Search...",type:"text",value:o.query,variant:"outlined"}),r.a.createElement("br",null),r.a.createElement("br",null),l.series.length>0?r.a.createElement(ue,{series:l.index&&o.query.length>0?l.index.search(o.query):l.series}):r.a.createElement(O.a,{mt:20},r.a.createElement(g.a,{align:"center",component:"div"},r.a.createElement(ne.a,{color:"primary",size:100,thickness:2}))))},pe=function(e){Object(N.a)(t,e);var a=Object(z.a)(t);function t(e){var n;return Object(x.a)(this,t),(n=a.call(this,e)).fetchEpisode=function(e,a){s.a.get("/Rabbi_Viener/".concat(e,"/episodes.json")).then((function(e){console.log(e);var t=e.data;console.log(t);var r=a.replaceAll("_"," ");console.log(r);var o=t.find((function(e){return J(e.Title)===r}));n.setState({episode:o})}))},n.state={episode:{Title:"",audio:"",video:""}},n}return Object(k.a)(t,[{key:"componentDidMount",value:function(){var e=this.props.match.params,a=e.shiurId,t=e.episodeId;this.fetchEpisode(a,t)}},{key:"render",value:function(){var e=this.state.episode;return r.a.createElement(v.a,{maxWidth:"md"},r.a.createElement(g.a,{variant:"h2"},this.state.episode.Title),e.video?r.a.createElement("video",{controls:!0,onPlay:function(){B.a.event({category:"Play Shiur",action:"Shiur played: ".concat(e.Title)})},src:e.video,style:{width:"100%",margin:"2em 0 0 0"}}):r.a.createElement("audio",{onPlay:function(){B.a.event({category:"Play Shiur",action:"Shiur played: ".concat(e.Title)})},controls:!0,src:e.audio,style:{width:"100%",margin:"5em 0 0 0"}}))}}]),t}(n.Component),fe=Object(j.f)(pe),Ee=function(){return r.a.createElement(j.c,null,r.a.createElement(j.a,{component:S,path:"/about"}),r.a.createElement(j.a,{component:fe,path:"/shiur/:shiurId/:episodeId"}),r.a.createElement(j.a,{component:oe,path:"/shiurim/:shiurId"}),r.a.createElement(j.a,{component:he,path:"/shiurim"}),r.a.createElement(j.a,{component:S,path:""}))},be=function(){return r.a.createElement("footer",{className:"footer"},r.a.createElement(v.a,null,r.a.createElement(g.a,{align:"center",variant:"body2"},"Questions or comments? Please, contact the"," ",r.a.createElement("a",{href:"mailto:webmaster.torahstream at gmail dot com",rel:"tooltip",title:"Click to email the webmaster, make sure to edit the e-mail address prior to sending."},"webmaster")," ","or"," ",r.a.createElement("a",{href:"mailto:yv at torahstream dot org",rel:"tooltip",title:"Click to email Rabbi Viener, make sure to edit the e-mail address prior to sending."},"Rabbi Viener"),".")))},ve=t(17);B.a.initialize("UA-33191551-1");var ge=Object(ve.a)();ge.listen((function(e){B.a.set({page:e.pathname}),B.a.pageview(e.pathname)}));var ye=function(){return r.a.createElement(p,null,r.a.createElement("div",{className:"app"},r.a.createElement("div",{className:"content-wrap"},r.a.createElement(j.b,{history:ge},r.a.createElement(_,null),r.a.createElement(O.a,{mt:10},r.a.createElement(Ee,null)))),r.a.createElement(be,null)))};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));i.a.render(r.a.createElement(ye,null),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[119,1,2]]]); //# sourceMappingURL=main.c9f71a19.chunk.js.map