"use strict";(self.webpackChunkacademia_app=self.webpackChunkacademia_app||[]).push([[1789],{9862:function(e,t,n){var i;n.r(t),i=function(){function e(e){this.set_attrs(e)}return e.users={},e.set_current=function(e){return this.current=this.from_json(e)},e.set_viewed=function(e){return this.viewed=this.from_json(e)},e.from_json=function(t){var n;if("string"==typeof t&&(t=JSON.parse(t)),null==(n=t.id))throw"id is required";return n in this.users?this.users[n].set_attrs(t):this.users[n]=new e(t)},e.prototype.set_attrs=function(e){if(_.extend(this,e),null==this.first_name||null==this.last_name)throw"first and last name are required";if(this.display_name=this.first_name+" "+this.last_name,null==this.domain_name||null==this.page_name)throw"subdomain and page are required";return this.url=$r.new_profile_url({subdomain:this.domain_name,page_name:this.page_name}),this},e.prototype.is_affiliated=function(){return"independent"!==this.domain_name},e.prototype.update_url=function(e){var t;return this.url=e,t=e.replace(/https?:\/\//,"").split("."+$app_host+"/"),this.domain_name=t[0],this.page_name=t[1],t},e.prototype.affiliationString=function(e){return null==e&&(e={}),this.affiliation().toString(e)},e.prototype.affiliation=function(){return{category:this.is_affiliated()?"university":"independent",department:this.department,position:{id:this.position_id,name:4!==this.position_id?this.position:void 0},custom_position:{name:4===this.position_id?this.position:void 0},is_primary:!0,positionPlaceholder:function(e){var t;return null==(t=e.useIndependentResearcherFallback)&&(t=!0),t?"Independent Researcher":""},toString:function(e){return null==e&&(e={}),this.department?[this.department.university.name,this.position.name||this.custom_position.name,this.department.name].join(", "):this.positionPlaceholder(e)}}},e.prototype.has_teaching_position=function(){var e;return 1===(e=this.position_id)||2===e||3===e||6===e||9===e},e.prototype.isPremium=function(){return this.premium},e.prototype.is_analytics_visible=function(){return this.is_analytics_public||this.is_current_user()},e.prototype.message_me_path=function(){return"/Messages?recipient="+this.id},e.prototype.is_current_user=function(){var e;return(null!=(e=this.constructor.current)?e.id:void 0)===this.id},e.prototype.is_viewed_user=function(){var e;return(null!=(e=this.constructor.viewed)?e.id:void 0)===this.id},e.prototype.load_followers_count=function(){return this._load_async_attr("followers_count",$r.api_v0_user_followers_url({user_id:this.id,limit:0}),(function(e){return e.meta.count}))},e.prototype.load_works_count=function(){return this._load_async_attr("works_count",$r.count_api_v0_user_works_url({user_id:this.id}),(function(e){return e.count}))},e.prototype.load_suggestions_count=function(){return this._load_async_attr("suggestions_count",$r.api_v0_suggestions_following_index_path({count:6,grouped:!0,subdomain_param:"api"}),(function(e){return e}))},e.prototype.load_views_counts=function(){return this._load_async_attr("views_counts",$r.api_v0_user_stats_url({user_id:this.id}),(function(e){return e}))},e.prototype._load_async_attr=function(e,t,n){var i,a;return this._async_attr_promises||(this._async_attr_promises={}),(i=this._async_attr_promises)[e]||(i[e]=$.ajax({url:t,dataType:"jsonp"})),a=new $.Deferred,this._async_attr_promises[e].done((function(e){return a.resolve(n(e))})),a},e}();try{"undefined"!=typeof $current_user&&null!==$current_user&&i.set_current($current_user),"undefined"!=typeof window&&(window.c||(window.c={}),window.Aedu&&(window.Aedu.User=i))}catch(e){}t.default=i},10538:function(e,t,n){function i(e){return e.match(/^((https?:)?\/\/|\/)/)?e:(t="/images/"+e,"undefined"!=typeof window&&window.$asset_host?"development"===window.$rails_env?`//cfassets0.${window.$asset_host}${t}`:`//a.${window.$asset_host}${t}`:t);var t}n.d(t,{Ay:function(){return i},b8:function(){return a}});const a=i;"undefined"!=typeof window&&(window.$image_url=i)},16420:function(e,t,n){n.d(t,{M:function(){return o}});var i=n(17618),a=n(53760);const o=({source:e,bucket:t,entityId:n,extra:o})=>{var s,l;if("undefined"==typeof window)return;const r=i.default.api_v0_clicks_path({subdomain_param:"api"});(0,a.A)(r,{source:e,occurred_at:new Date,bucket:t,entity_id:n,extra:o,hit_id:null==(l=null==(s=window.Aedu)?void 0:s.hit_data)?void 0:l.id})};t.A=o},21781:function(e,t,n){n.d(t,{md:function(){return l},E6:function(){return s},Lo:function(){return o},Xh:function(){return r}});var i=n(9862);function a(){var e,t,n,i,a,o,s,l;window.FS||(window._fs_debug="development"===$rails_env,window._fs_host="fullstory.com",window._fs_script="edge.fullstory.com/s/fs.js",window._fs_org="17I9",window._fs_namespace="FS",e=window,t=document,n=window._fs_namespace,i="script",a="user",n in e?e.console&&e.console.log&&e.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].'):((s=e[n]=function(e,t,n){s.q?s.q.push([e,t,n]):s._api(e,t,n)}).q=[],(o=t.createElement(i)).async=1,o.crossOrigin="anonymous",o.src="proxy.php?u=https://"+_fs_script,(l=t.getElementsByTagName(i)[0]).parentNode.insertBefore(o,l),s.identify=function(e,t,n){s(a,{uid:e},n),t&&s(a,t,n)},s.setUserVars=function(e,t){s(a,e,t)},s.event=function(e,t,n){s("event",{n:e,p:t},n)},s.anonymize=function(){s.identify(!1)},s.shutdown=function(){s("rec",!1)},s.restart=function(){s("rec",!0)},s.log=function(e,t){s("log",[e,t])},s.consent=function(e){s("consent",!arguments.length||e)},s.identifyAccount=function(e,t){o="account",(t=t||{}).acctId=e,s(o,t)},s.clearUserCookie=function(){},s.setVars=function(e,t){s("setVars",[e,t])},s._w={},l="XMLHttpRequest",s._w[l]=e[l],l="fetch",s._w[l]=e[l],e[l]&&(e[l]=function(){return s._w[l].apply(this,arguments)}),s._v="1.3.0"))}function o(e,t=!1){var n,i,o,s,r,c,d;if(t){if(!window.FS)return;null==(n=null==window?void 0:window.FS)||n.restart()}else{if(window.FS)return;a()}if(e){const t={id_int:e.id,displayName:e.display_name,email:e.email,premium_bool:e.premium};null==(i=null==window?void 0:window.FS)||i.identify(e.id.toString(),t)}return l("ServerHit",{controller_str:window.$controller_name,actionName_str:window.$action_name,hitId_int:null==(s=null==(o=null==window?void 0:window.Aedu)?void 0:o.hit_data)?void 0:s.id}),window.$controller_name&&window.$action_name&&(null==(d=null==window?void 0:window.FS)||d.setVars("page",{pageName:`${window.$controller_name}/${window.$action_name}`,controller_str:window.$controller_name,actionName_str:window.$action_name,hitId_int:null==(c=null==(r=null==window?void 0:window.Aedu)?void 0:r.hit_data)?void 0:c.id})),!0}function s(){var e;if(!window.FS)return a(),null==(e=null==window?void 0:window.FS)||e.shutdown(),!0}function l(e,t){var n;null==(n=window.FS)||n.event(e,t)}function r(e){var t;void 0!==function(){var e;return null==(e=window.document.cookie.split("; ").find((e=>e.startsWith("record_session="))))?void 0:e.split("=")[1]}()?o(e||i.default.current):(null==(t=window.Aedu)?void 0:t.activateFullstory)&&s()}},49166:function(e,t,n){n.d(t,{N:function(){return i}});const i=(()=>{if("undefined"==typeof window)return null;const e=window.$current_user;return null==e?null:"string"==typeof e?JSON.parse(e):e})()},68607:function(e,t,n){n.d(t,{B8:function(){return u},Rb:function(){return r},S:function(){return l},SH:function(){return d},jj:function(){return p},oE:function(){return c}});var i=n(21213),a=n(20053),o=n.n(a),s=(e,t,n)=>new Promise(((i,a)=>{var o=e=>{try{l(n.next(e))}catch(e){a(e)}},s=e=>{try{l(n.throw(e))}catch(e){a(e)}},l=e=>e.done?i(e.value):Promise.resolve(e.value).then(o,s);l((n=n.apply(e,t)).next())}));const l=e=>s(void 0,null,(function*(){return(yield(0,i.A)(o().api_v0_ai_podcast_create_podcast_episode_path({subdomain_param:"api"}),{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({work_id:e})})).json()})),r=e=>s(void 0,null,(function*(){return(yield(0,i.A)(o().api_v0_ai_podcast_generate_podcast_episode_path({subdomain_param:"api"}),{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({id:e})})).json()})),c=e=>s(void 0,null,(function*(){return(yield(0,i.A)(o().api_v0_ai_podcast_continue_generate_podcast_episode_path({subdomain_param:"api"}),{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({id:e})})).json()})),d=e=>s(void 0,null,(function*(){return(yield(0,i.A)(o().api_v0_ai_podcast_request_podcast_path({subdomain_param:"api"}),{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({work_id:e})})).json()})),u=(e,t)=>s(void 0,null,(function*(){return(yield(0,i.A)(o().api_v0_ai_podcast_update_podcast_episode_path({subdomain_param:"api"}),{headers:{"Content-Type":"application/json"},method:"PATCH",body:JSON.stringify({id:e,visibility:t})})).json()})),p=(e,t,n,a,l,r)=>s(void 0,null,(function*(){return(yield(0,i.A)(o().api_v0_ai_podcast_record_podcast_listen_session_path({subdomain_param:"api"}),{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({work_id:e,podcast_episode_id:t,listen_session_id:n,segments:a,listen_duration_seconds:l,source:r})})).json()}))},71789:function(e,t,n){n.d(t,{L:function(){return N}});var i,a=n(6888),o=n.n(a),s=n(15361),l=n(92612),r=n(20039),c=n(53609),d=n(17618),u=n(10538),p=n(16420),m=n(21919),_=n(87443),y=n(21781),f=n(49166);function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{size:t,color:n,svgProps:o}=e;return e={width:t||24,height:t||24,color:n||"currentColor",...o},a.createElement("svg",P({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 19 22",fill:"currentColor"},e),i||(i=a.createElement("path",{d:"M.561 21.667V.333L18.34 11 .561 21.667z"})))},w=n(82882),v=n(48043),S=n(20053),g=n.n(S),b=n(21213),k=n(68607),E=(e,t,n)=>new Promise(((i,a)=>{var o=e=>{try{l(n.next(e))}catch(e){a(e)}},s=e=>{try{l(n.throw(e))}catch(e){a(e)}},l=e=>e.done?i(e.value):Promise.resolve(e.value).then(o,s);l((n=n.apply(e,t)).next())}));const A=new Map,N=({workId:e,workTitle:t,showTitle:i=!0,impressionSource:s="paper_to_podcast_profile",onsitePodcastPromotion:l=!1,onsitePodcastPromotionRevised:P=!1,showFeedbackSection:S=!0,onPlayerReady:N,initialEpisode:ae})=>{const{showPlayer:oe,feedbackInput:se,loading:le,feedbackSubmitted:re,audioRef:ce,setFeedbackInput:de,handlePlay:ue,handlePause:pe,onSubmitFeedback:me,isReady:_e,hasError:ye,isPremiumUser:fe}=(({workId:e,impressionSource:t="paper_to_podcast_swp",initialEpisode:i=null})=>{var o;const[s,l]=(0,a.useState)(!1),[r,c]=(0,a.useState)(""),[d,u]=(0,a.useState)(!1),[m,_]=(0,a.useState)(!1),[P,h]=(0,a.useState)(""),S=(0,a.useRef)(null),[A,N]=(0,a.useState)(!1),[x,T]=(0,a.useState)([]),[L,C]=(0,a.useState)(i),[$,j]=(0,a.useState)(Math.floor(Date.now()/1e3)),[R,F]=(0,a.useState)([]),O=(0,a.useRef)();(0,a.useEffect)((()=>{i&&i.generationCompletedAt||(0,k.S)(Number(e)).then((e=>{C(e.podcast_episode)}))}),[e,i]);const z=(0,a.useCallback)((()=>E(void 0,null,(function*(){var n,i;let a=0,o=0;const s=[...x,new Date];if(x.length>0){for(;void 0!==s[o]&&void 0!==s[o+1];)a+=s[o+1].getTime()-s[o].getTime(),o+=2;T(s)}(0,p.M)({source:`${t}.pause`,extra:{work_id:e,current_time:(null==(n=S.current)?void 0:n.currentTime)||null,total_time:(null==(i=S.current)?void 0:i.duration)||null,total_play_time:a}})}))),[x,e,t]);(0,a.useEffect)((()=>{O.current=z}),[z]);const I=(0,a.useCallback)((()=>E(void 0,null,(function*(){(0,b.A)(g().api_v0_feature_limits_path(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({feature_name:"paper_to_podcast"})})}))),[]),M=(0,a.useCallback)((0,v.debounce)(k.jj,3e3),[]),q=(0,a.useCallback)((t=>{t.addEventListener("timeupdate",(()=>{F((n=>{const i=Math.round(t.currentTime);if(i===n[n.length-1])return n;const a=[...n,i];if(L){const t=(e=>{const t=[];for(let n=0;ne+t.duration),0)];i%3==0?((0,k.jj)(...n),i>=30&&i<=60&&(0,k.oE)(Number(L.id)).then((e=>{e.success||h(e.error||"Failed to continue generation")}))):M(...n)}return a}))})),t.addEventListener("pause",(()=>{var e;null==(e=O.current)||e.call(O)}))}),[L,e,$,M]),B=(0,a.useCallback)((e=>E(void 0,null,(function*(){let i=0;const a=S.current;if(a){for(q(a);i<20;)try{return void(yield E(void 0,null,(function*(){const{default:i}=yield n.e(7463).then(n.bind(n,77463));return new Promise(((n,o)=>{const s=new i({maxBufferLength:2,startPosition:0,liveDurationInfinity:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:6,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3});s.loadSource(e),s.attachMedia(a),s.on(i.Events.MANIFEST_PARSED,(()=>{u(!1),l(!0),a.play().catch((e=>{console.error("Autoplay failed:",e)})),n()})),s.on(i.Events.ERROR,((e,n)=>{(0,y.md)(`${t}_failed`,{reason:n.reason}),s.destroy(),o(n)}))}))})))}catch(e){i++,yield new Promise((e=>setTimeout(e,2e3)))}h("Failed to load playlist after maximum retries.")}}))),[q,t]),U=(0,a.useCallback)((e=>E(void 0,null,(function*(){let n=0;const i=S.current;for(;n<20&&i;)try{return i.src=e,i.load(),yield new Promise(((e,n)=>{const a=e=>{(0,y.md)(`${t}_failed`,{error_type:e.type,error_message:e.message,error_timeStamp:e.timeStamp}),i.removeEventListener("canplaythrough",o),i.removeEventListener("error",(e=>a(e))),i.removeEventListener("loadedmetadata",o),n(new Error("Failed to load media"))},o=()=>{i.removeEventListener("canplaythrough",o),i.removeEventListener("error",(e=>a(e))),i.removeEventListener("loadedmetadata",o),e(!0)};q(i),i.addEventListener("loadedmetadata",o,{once:!0}),i.addEventListener("canplaythrough",o,{once:!0}),i.addEventListener("error",(e=>a(e)),{once:!0})})),yield new Promise((e=>setTimeout(e,100))),i.play().catch((e=>{console.error("Autoplay failed:",e)})),u(!1),void l(!0)}catch(e){n++,yield new Promise((e=>setTimeout(e,2e3)))}h("Failed to load playlist after maximum retries.")}))),[q,t]),D=(0,a.useCallback)((()=>E(void 0,null,(function*(){let e;(0,y.Lo)(),(0,y.md)(`${t}_clicked`),u(!0);try{e=yield(0,k.Rb)(Number(null==L?void 0:L.id))}catch(e){return void h("Failed to generate audio stream")}const{url:i}=e,a=S.current;if(a&&(a.canPlayType("application/vnd.apple.mpegurl")||a.canPlayType("audio/x-mpegurl")))U(i);else try{const{default:e}=yield n.e(7463).then(n.bind(n,77463));if(!e.isSupported())throw new Error("HLS is not supported in this browser.");B(i)}catch(e){throw new Error("Failed to load HLS library or HLS is not supported in this browser.")}}))),[null==L?void 0:L.id,U,B,t]),H=(0,a.useCallback)((()=>E(void 0,null,(function*(){var n;if((0,p.M)({source:`${t}.play`,extra:{work_id:e}}),A){T((e=>[...e,new Date]));const e=null==(n=S.current)?void 0:n.play();void 0!==e&&e.catch((e=>{console.error("Failed to resume playback:",e)}))}else I(),yield D(),N(!0)}))),[e,A,D,I,t]),J=(0,a.useCallback)((()=>E(void 0,null,(function*(){try{const t=yield(0,k.SH)(Number(e));return t.success?{success:!0,message:t.message}:{success:!1,error:t.error}}catch(e){return{success:!1,error:"Failed to submit podcast request"}}}))),[e]);return{showPlayer:s,feedbackInput:r,loading:d,feedbackSubmitted:m,error:P,episode:L,audioRef:S,initializedStream:A,setFeedbackInput:c,setError:h,handlePlay:H,handlePause:z,onSubmitFeedback:()=>{(0,b.A)(g().api_v0_arbitrary_event_index_path({subdomain_param:"api"}),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_type:"PaperToPodcastFeedback",data:{feedback:r,work_id:e,type:"swp"},hit_id:window.Aedu&&Aedu.hit_data&&Aedu.hit_data.id||null})}).then((()=>{_(!0)}))},handleError:e=>{(0,w.Cp)(e),h("Failed to generate audio summary.")},handleRequestPodcast:J,isReady:!!L,hasError:!!P,isPremiumUser:!!(null==(o=f.N)?void 0:o.premium)}})({workId:e,impressionSource:s,initialEpisode:ae});return o().useEffect((()=>(A.set(e,ue),()=>{A.delete(e)})),[e,ue]),(0,a.useEffect)((()=>{var e,t;l&&!(null==(e=f.N)?void 0:e.admin)&&((0,y.Lo)(null!=(t=f.N)?t:void 0),(0,y.md)("OnsitePodcastPromotion"))}),[l]),(0,a.useEffect)((()=>{_e&&N&&N()}),[_e,N]),ye?o().createElement(T,null,o().createElement(ne,null,o().createElement(r.I,{name:"error_outline",size:16}),o().createElement("span",null,"Unable to load podcast"))):o().createElement(m._,{style:{width:"100%"},source:`${s}.player`,entity_id:e,entity_type:_.rE.Work,noBatch:!0,extra:{workId:e},onClick:e=>e.preventDefault()},o().createElement(T,null,o().createElement(L,{className:"podcast-spotlight-target",onClick:le?void 0:ue,style:{display:oe?"none":"block",cursor:le?"default":"pointer",opacity:le?.7:1}},o().createElement(C,null,i&&o().createElement($,null,o().createElement(j,null,t)),o().createElement(I,null,le?o().createElement(M,null,o().createElement(q,null,o().createElement(B,{src:(0,u.Ay)("value_props/premium-loading.gif")})),o().createElement(U,null,o().createElement(D,null,"Generating podcast..."),o().createElement(H,null,"This will take a moment"))):o().createElement(J,null,o().createElement(G,null,o().createElement(h,{size:16})),o().createElement(W,null,o().createElement(V,null,"Listen to Podcast Summary"),o().createElement(X,null,"Generated with AI • ~5 min")),o().createElement(Q,null,o().createElement(r.I,{name:"headphones",size:16})))))),o().createElement("div",{style:{display:oe?"block":"none"}},o().createElement(C,null,i&&o().createElement($,null,o().createElement(j,null,t)),o().createElement(R,null,o().createElement(F,null,o().createElement(O,null,o().createElement(z,{ref:ce,controls:!0,src:"placeholder",preload:"none",onPlay:ue,onPause:pe,onLoadedMetadata:()=>{ce.current&&(ce.current.currentTime=0)},style:{width:"100%"}},"Your browser does not support the audio element."))),l&&o().createElement(ie,{onClick:()=>{if((0,p.M)({source:`${s}.publish_button`,extra:{work_id:e}}),P){const e=(()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))})()?"/upgrade?feature=ai_podcast&trigger=work_edit_promotion":"/upgrade?feature=ai_podcast&referrer=work_edit&trigger=work_edit_promotion";window.location.href=e}else window.location.href="proxy.php?u=/upgrade?feature=ai_podcast&trigger=own_profile_promotion"}},P?"Publish podcast":"Publish to Academia"))),S&&!l&&o().createElement(K,null,re?o().createElement(ee,null,o().createElement(r.I,{name:"check",size:14}),o().createElement("span",null,"Thanks for the feedback!")):o().createElement(Z,null,o().createElement(Y,{value:se,onChange:e=>de(e.target.value),placeholder:"Share feedback..."}),o().createElement(x,{onClick:me,size:"sm"},"Send")),!fe&&o().createElement(te,null,o().createElement(c.v,{onClick:()=>{(0,p.M)({source:`${s}.upgrade_link`,extra:{work_id:e}})},href:d.default.upgrade_url({feature:"ai_podcast",trigger:s})},"Create podcasts for your papers →"))))))};N.play=e=>{return t=function*(){if(e&&A.has(e)){const t=A.get(e);yield t()}else if(1===A.size){const e=A.entries().next();if(!e.done){const[,t]=e.value;yield t()}}},new Promise(((e,n)=>{var i=e=>{try{o(t.next(e))}catch(e){n(e)}},a=e=>{try{o(t.throw(e))}catch(e){n(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(i,a);o((t=t.apply(undefined,null)).next())}));var t};const x=(0,s.Ay)(l.$,null,{displayName:"FeedbackButton",styles:{cls1:"SimplePaperPodcast-cls1__8m",cls2:"SimplePaperPodcast-cls2_j_O SimplePaperPodcast-cls1__8m"}}),T=(0,s.Ay)("div",null,{displayName:"Container",styles:{a0:"SimplePaperPodcast-cls1__Sz",cls1:"SimplePaperPodcast-cls1_h8h",cls2:"SimplePaperPodcast-cls2_oJc SimplePaperPodcast-cls1_h8h"}}),L=(0,s.Ay)("div",null,{displayName:"ClickableArea",styles:{cls1:"SimplePaperPodcast-cls1_p2P",cls2:"SimplePaperPodcast-cls2_WRI SimplePaperPodcast-cls1_p2P"}}),C=(0,s.Ay)("div",null,{displayName:"ContentSection",styles:{cls1:"SimplePaperPodcast-cls1_hIM",cls2:"SimplePaperPodcast-cls2_zX5 SimplePaperPodcast-cls1_hIM"}}),$=(0,s.Ay)("div",null,{displayName:"TitleContainer",styles:{cls1:"SimplePaperPodcast-cls1_RdU",cls2:"SimplePaperPodcast-cls2_r8R SimplePaperPodcast-cls1_RdU"}}),j=(0,s.Ay)("h3",null,{displayName:"WorkTitle",styles:{cls1:"SimplePaperPodcast-cls1_y7A",cls2:"SimplePaperPodcast-cls2_Tei SimplePaperPodcast-cls1_y7A"}}),R=(0,s.Ay)("div",null,{displayName:"PlayerWithButtonContainer",styles:{cls1:"SimplePaperPodcast-cls1_TOW",cls2:"SimplePaperPodcast-cls2_ycb SimplePaperPodcast-cls1_TOW"}}),F=(0,s.Ay)("div",null,{displayName:"PlayerContainer",styles:{cls1:"SimplePaperPodcast-cls1_wVk",cls2:"SimplePaperPodcast-cls2_lUU SimplePaperPodcast-cls1_wVk"}}),O=(0,s.Ay)("div",null,{displayName:"AudioPlayerWrapper",styles:{cls1:"SimplePaperPodcast-cls1__Ge",cls2:"SimplePaperPodcast-cls2_zUa SimplePaperPodcast-cls1__Ge"}}),z=(0,s.Ay)("audio",null,{displayName:"AudioPlayer",styles:{cls1:"SimplePaperPodcast-cls1_muL",cls2:"SimplePaperPodcast-cls2_bEa SimplePaperPodcast-cls1_muL"}}),I=(0,s.Ay)("div",null,{displayName:"PlaySection",styles:{cls1:"SimplePaperPodcast-cls1__lk",cls2:"SimplePaperPodcast-cls2_GyH SimplePaperPodcast-cls1__lk"}}),M=(0,s.Ay)("div",null,{displayName:"LoadingRow",styles:{cls1:"SimplePaperPodcast-cls1_fiL",cls2:"SimplePaperPodcast-cls2_lQP SimplePaperPodcast-cls1_fiL"}}),q=(0,s.Ay)("div",null,{displayName:"LoadingButtonContainer",styles:{cls1:"SimplePaperPodcast-cls1_d8P",cls2:"SimplePaperPodcast-cls2_IcH SimplePaperPodcast-cls1_d8P"}}),B=(0,s.Ay)("img",null,{displayName:"LoadingSpinner",styles:{cls1:"SimplePaperPodcast-cls1_fdB",cls2:"SimplePaperPodcast-cls2_x7n SimplePaperPodcast-cls1_fdB"}}),U=(0,s.Ay)("div",null,{displayName:"LoadingContent",styles:{cls1:"SimplePaperPodcast-cls1_ecq",cls2:"SimplePaperPodcast-cls2__ql SimplePaperPodcast-cls1_ecq"}}),D=(0,s.Ay)("div",null,{displayName:"LoadingText",styles:{cls1:"SimplePaperPodcast-cls1_DMb",cls2:"SimplePaperPodcast-cls2_pzK SimplePaperPodcast-cls1_DMb"}}),H=(0,s.Ay)("div",null,{displayName:"LoadingSubtext",styles:{cls1:"SimplePaperPodcast-cls1_uzG",cls2:"SimplePaperPodcast-cls2_Xq_ SimplePaperPodcast-cls1_uzG"}}),J=(0,s.Ay)("div",null,{displayName:"PlayRow",styles:{cls1:"SimplePaperPodcast-cls1_tdx",cls2:"SimplePaperPodcast-cls2_gbP SimplePaperPodcast-cls1_tdx"}}),G=(0,s.Ay)("div",null,{displayName:"PlayButton",styles:{cls1:"SimplePaperPodcast-cls1_m8Q",cls2:"SimplePaperPodcast-cls2__Xr SimplePaperPodcast-cls1_m8Q"}}),W=(0,s.Ay)("div",null,{displayName:"PlayInfo",styles:{cls1:"SimplePaperPodcast-cls1_B6y",cls2:"SimplePaperPodcast-cls2_PqR SimplePaperPodcast-cls1_B6y"}}),V=(0,s.Ay)("div",null,{displayName:"PlayLabel",styles:{cls1:"SimplePaperPodcast-cls1_szG",cls2:"SimplePaperPodcast-cls2_hgp SimplePaperPodcast-cls1_szG"}}),X=(0,s.Ay)("div",null,{displayName:"PlayMeta",styles:{cls1:"SimplePaperPodcast-cls1_Utb",cls2:"SimplePaperPodcast-cls2_zJr SimplePaperPodcast-cls1_Utb"}}),Q=(0,s.Ay)("div",null,{displayName:"HeadphonesIcon",styles:{cls1:"SimplePaperPodcast-cls1_c2Z",cls2:"SimplePaperPodcast-cls2_wRV SimplePaperPodcast-cls1_c2Z"}}),K=(0,s.Ay)("div",null,{displayName:"BottomSection",styles:{cls1:"SimplePaperPodcast-cls1_iiv",cls2:"SimplePaperPodcast-cls2_WgC SimplePaperPodcast-cls1_iiv"}}),Z=(0,s.Ay)("div",null,{displayName:"FeedbackRow",styles:{cls1:"SimplePaperPodcast-cls1_Oco",cls2:"SimplePaperPodcast-cls2_KRI SimplePaperPodcast-cls1_Oco"}}),Y=(0,s.Ay)("input",null,{displayName:"FeedbackInput",styles:{cls1:"SimplePaperPodcast-cls1_tiE",cls2:"SimplePaperPodcast-cls2_czu SimplePaperPodcast-cls1_tiE"}}),ee=(0,s.Ay)("div",null,{displayName:"FeedbackSuccess",styles:{cls1:"SimplePaperPodcast-cls1_AOv",cls2:"SimplePaperPodcast-cls2_Hec SimplePaperPodcast-cls1_AOv"}}),te=(0,s.Ay)("div",null,{displayName:"UpgradeLink",styles:{cls1:"SimplePaperPodcast-cls1_adc",cls2:"SimplePaperPodcast-cls2_XsR SimplePaperPodcast-cls1_adc"}}),ne=(0,s.Ay)("div",null,{displayName:"ErrorContent",styles:{cls1:"SimplePaperPodcast-cls1__GN",cls2:"SimplePaperPodcast-cls2_WPF SimplePaperPodcast-cls1__GN"}}),ie=(0,s.Ay)("button",null,{displayName:"PublishButton",styles:{cls1:"SimplePaperPodcast-cls1_cbU",cls2:"SimplePaperPodcast-cls2__1g SimplePaperPodcast-cls1_cbU"}})}}]); //# sourceMappingURL=1789-2e8afb179c403726083b.js.map