PageSourceSearch

https://www.kanopy.com/kui-assets/_clipid-BUjbgMd_.js

js kanopy.com collected 2026-09-24 08:30:51 UTC 18,503 bytes, 2 lines download raw bytes

1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};t.SENTRY_RELEASE={id:"f2e84f41ed6c0beba456d92f07f35b71be0836fd"};var e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="60664987-96aa-466d-aebc-13f7b19917a6",t._sentryDebugIdIdentifier="sentry-dbid-60664987-96aa-466d-aebc-13f7b19917a6")}catch(i){}}();import{V as t,bQ as e,bR as i,b5 as s,n as a,a4 as _,bn as l,C as r,aN as d,aM as n,aQ as o,d as c,N as p,aR as u,bf as h,G as m,S as v,bJ as f}from"./client-ANZ33kkl.js";import{T as C}from"./TrashIconSvg-Djs4Ddz7.js";import{D as y}from"./DarkTextview-BNdA5NhR.js";import{D as b}from"./DarkTextfield-wEQuMk45.js";import{D as g}from"./DurationView-BYTddQ0Y.js";import{M as w}from"./MetadataPoster-uI5DCtGi.js";import{v as x}from"./Playlist-Bk6DxD8t.js";import{M as k}from"./MobileBlocker-BjTLuamh.js";import"./MoviePoster-ByXOBmKH.js";const $=a(t.extend({name:"EditClipVideoPlayer",data:()=>({user_clicked_on_play:!1}),props:{clip_start_time:{type:Number,required:!1,default:0},clip_end_time:{type:Number,required:!1,default:void 0}},watch:{show_video_player(){null!=this.clip_media_info&&(this.$kuistore.dispatch("video_player/close_player"),this.$kuistore.dispatch("video_player/update_player_settings",this.clip_player_settings),this.$kuistore.dispatch("video_player/setup_media",this.clip_media_info))}},computed:{show_video_player(){return this.user_clicked_on_play&&null!=this.clip_product_video_id},clip(){return this.$kuistore.getters["mylists/custom_playlist_current_clip"]},clip_product_instance(){return null==this.clip?void 0:s(this.clip.video)},clip_product_video_id(){return this.clip_product_instance?.videoId},clip_product_video_title(){return this.clip_product_instance?.title??""},clip_product_thumbnail(){return this.clip_product_instance?.images.landscapes.medium??this.clip_product_instance?.images.landscapes.small},clip_media_info(){if(null!=this.clip_product_video_id&&null!=this.clip_product_video_title&&null!=this.clip_product_thumbnail)return{video_id:this.clip_product_video_id,video_title:this.clip_product_video_title,video_thumbnail:this.clip_product_thumbnail,start_time_s:this.clip_start_time}},clip_player_settings:()=>({can_autoplay:!0,can_autoplay_next:!0,source_type:i.Clip}),poster_data(){return{product:this.clip_product_instance,poster:this.clip_product_thumbnail,description:this.clip_product_video_title}},play_active_svg:()=>"data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1.38461'%20y='1.38461'%20width='45.2308'%20height='45.2308'%20rx='11.9487'%20fill='%23DE3F00'/%3e%3crect%20x='1.38461'%20y='1.38461'%20width='45.2308'%20height='45.2308'%20rx='11.9487'%20stroke='%23DE3F00'%20stroke-width='2.76923'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M19.6238%2031.331C18.484%2031.9009%2017.1429%2031.072%2017.1429%2029.7976L17.1431%2018.2023C17.1431%2016.928%2018.4842%2016.0991%2019.624%2016.6691L31.2191%2022.4667C32.4826%2023.0985%2032.4826%2024.9016%2031.2191%2025.5333L19.6238%2031.331Z'%20fill='%23F3F3F3'/%3e%3c/svg%3e"},methods:{on_poster_clicked(){null!=this.clip&&(this.user_clicked_on_play=!0)},on_start_time_selected(t){this.$emit("start_time_selected",t)},on_end_time_selected(t){this.$emit("end_time_selected",t)}},components:{KanopyVideoPlayer:e,MetadataPoster:w}}),function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{staticClass:"edit-clip-video-container"},[t.show_video_player?e("kanopy-video-player",{staticClass:"clip-video-player",attrs:{show_back_button:!1,enable_playback_speed:!1,enable_rewind_and_ff:!1,enable_chromecast:!1,enable_transcript:!1,enable_picture_in_picture:!1,enable_fullscreen:!1,enable_cut_progress_bar:!0,enable_metadata:!1,enable_top_title:!0,min_cut_time_second:t.clip_start_time,max_cut_time_second:t.clip_end_time},on:{start_time_selected:t.on_start_time_selected,end_time_selected:t.on_end_time_selected}}):e("button",{staticClass:"movie-poster-button",on:{click:t.on_poster_clicked}},[e("metadata-poster",{staticClass:"movie-poster",attrs:{poster_data:t.poster_data,poster_rounded_in_kids:!1}}),e("img",{staticClass:"play-button-icon",attrs:{src:t.play_active_svg,alt:"Play".localized()}}
1)],1)],1)},[],!1,null,"5c1f1fd2").exports;const D=a(t.extend({name:"EditClipPage",layout:()=>m.isMobileOrTabletDevice()?"empty":"default",middleware(t){new v(f).guard(t)},head:()=>({title:`${"Edit Clip".localized()} | Kanopy`}),validate:t=>x(t),data:()=>({is_trash_hovered:!1,new_description:"",new_start_time_formatted:"",new_end_time_formatted:"",new_title:"",time_updated_from_player:!1,updated_clip_attributes:{title:!1,description:!1,time_from_player:{start:!1,end:!1},time_from_text_input:{start:!1,end:!1}},updates_saved:!1}),created(){this.new_title=this.clip_title,this.new_description=this.clip?.description??"",this.new_start_time_formatted=this.clip_start_second_formatted,this.new_end_time_formatted=this.clip_end_second_formatted},beforeDestroy(){this.updates_saved||this.send_analytics_event(u.ClipAbandonEdit)},computed:{playlist(){const t=Number(this.$nuxt.context.params.customplaylistid);return this.$kuistore.state.mylists.custom_playlists?.find(e=>e.id===t)},clip(){const t=Number(this.$nuxt.context.params.clipid);return this.playlist?.items.find(e=>e.itemId===t)},clip_product_instance(){return null==this.clip?void 0:s(this.clip.video)},clip_product_video_id(){return this.clip_product_instance?.videoId},product_source_link(){return`/video/${this.clip_product_video_id}`},clip_title(){return this.clip?.title??""},playlist_title(){return this.playlist?.title??""},clip_description(){return this.new_description},clip_start_second(){return this.clip?.clipStartSeconds??0},clip_start_second_formatted(){return this.format_duration(this.clip_start_second)},new_start_time_second(){return this.is_start_time_valid?this.convert_to_number(this.new_start_time_formatted):this.clip_start_second},is_start_time_valid(){return null!==this.new_start_time_formatted.match(this.regex_time)&&this.convert_to_number(this.new_start_time_formatted)<this.convert_to_number(this.new_end_time_formatted)},new_end_time_second(){return this.is_end_time_valid?this.convert_to_number(this.new_end_time_formatted):this.clip_end_second},is_end_time_valid(){return null!==this.new_end_time_formatted.match(this.regex_time)&&this.convert_to_number(this.new_start_time_formatted)<this.convert_to_number(this.new_end_time_formatted)},clip_end_second(){return this.clip?.clipEndSeconds??0},clip_end_second_formatted(){return this.format_duration(this.clip_end_second)},clip_length_second(){return this.new_end_time_second-this.new_start_time_second},regex_time:()=>/^([0-5]?\d)(:([0-5]?\d)){0,2}$/,start_time_error(){return this.is_start_time_valid?void 0:""},end_time_error(){return this.is_end_time_valid?void 0:""},is_new_title_empty(){return""===this.new_title},can_save(){return this.is_start_time_valid&&this.is_end_time_valid&&!this.is_new_title_empty},is_mobile:()=>m.isMobileOrTabletDevice(),go_to_source_svg:()=>"data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.9848%202.24269C20.9568%202.24358%2020.9289%202.24602%2020.9013%202.25002H14.9994C14.9001%202.24861%2014.8
1014%202.26697%2014.7092%202.30403C14.6169%202.34109%2014.533%202.39612%2014.4622%202.4659C14.3914%202.53568%2014.3352%202.61884%2014.2969%202.71053C14.2585%202.80222%2014.2388%202.90062%2014.2388%203.00002C14.2388%203.09941%2014.2585%203.19781%2014.2969%203.28951C14.3352%203.3812%2014.3914%203.46436%2014.4622%203.53414C14.533%203.60392%2014.6169%203.65894%2014.7092%203.696C14.8014%203.73306%2014.9001%203.75142%2014.9994%203.75002H19.1889L9.96912%2012.9698C9.89729%2013.0389%209.83997%2013.1217%209.80051%2013.2132C9.76105%2013.3048%209.74024%2013.4033%209.73929%2013.503C9.73835%2013.6027%209.75728%2013.7016%209.795%2013.7939C9.83272%2013.8862%209.88845%2013.97%209.95895%2014.0405C10.0294%2014.111%2010.1133%2014.1667%2010.2056%2014.2045C10.2979%2014.2422%2010.3968%2014.2611%2010.4965%2014.2602C10.5961%2014.2592%2010.6947%2014.2384%2010.7862%2014.1989C10.8778%2014.1595%2010.9605%2014.1022%2011.0297%2014.0303L20.2494%204.81059V9.00002C20.248%209.0994%2020.2664%209.19807%2020.3035%209.2903C20.3405%209.38253%2020.3955%209.46647%2020.4653%209.53724C20.5351%209.60802%2020.6183%209.66422%2020.71%209.70258C20.8016%209.74095%2020.9%209.7607%2020.9994%209.7607C21.0988%209.7607%2021.1972%209.74095%2021.2889%209.70258C21.3806%209.66422%2021.4638%209.60802%2021.5336%209.53724C21.6033%209.46647%2021.6584%209.38253%2021.6954%209.2903C21.7325%209.19807%2021.7508%209.0994%2021.7494%209.00002V3.09527C21.7644%202.98729%2021.7556%202.87735%2021.7237%202.77312C21.6918%202.66888%2021.6376%202.57284%2021.5648%202.49169C21.492%202.41054%2021.4025%202.34623%2021.3023%202.30324C21.2021%202.26025%2021.0938%202.2396%2020.9848%202.24274L20.9848%202.24269Z'%20fill='%23DE3F00'/%3e%3cpath%20d='M10.5%205.25C8.62817%205.25%207.21359%205.24732%206.08642%205.37452C4.95932%205.50172%204.05707%205.76986%203.41162%206.41604C2.76617%207.06223%202.50097%207.96277%202.37452%209.08942C2.24802%2010.216%202.25%2011.6304%202.25%2013.5001C2.25%2015.3702%202.24845%2016.7851%202.37744%2017.9122C2.50643%2019.0393%2
102.77787%2019.9404%203.42482%2020.5856C4.07176%2021.2307%204.97237%2021.4984%206.09819%2021.6256C7.22402%2021.7528%208.63552%2021.7501%2010.5%2021.7501C12.3647%2021.7501%2013.7759%2021.7509%2014.9018%2021.6227C16.0278%2021.4944%2016.9301%2021.2255%2017.5766%2020.5797C18.2231%2019.934%2018.4921%2019.0329%2018.6211%2017.9063C18.7501%2016.7798%2018.75%2015.367%2018.75%2013.5001C18.7514%2013.4007%2018.733%2013.302%2018.696%2013.2098C18.6589%2013.1176%2018.6039%2013.0336%2018.5341%2012.9629C18.4643%2012.8921%2018.3812%2012.8359%2018.2895%2012.7975C18.1978%2012.7592%2018.0994%2012.7394%2018%2012.7394C17.9006%2012.7394%2017.8022%2012.7592%2017.7105%2012.7975C17.6188%2012.8359%2017.5357%2012.8921%2017.4659%2012.9629C17.3961%2013.0336%2017.3411%2013.1176%2017.304%2013.2098C17.267%2013.302%2017.2486%2013.4007%2017.25%2013.5001C17.25%2015.3656%2017.2436%2016.7569%2017.1314%2017.7364C17.0192%2018.716%2016.8126%2019.223%2016.5161%2019.5191C16.2197%2019.8153%2015.7127%2020.0213%2014.7334%2020.1329C13.754%2020.2445%2012.3635%2020.2501%2010.5%2020.2501C8.63624%2020.2501%207.24612%2020.2451%206.26662%2020.1344C5.28712%2020.0237%204.77989%2019.8187%204.48387%2019.5235C4.18784%2019.2284%203.98081%2018.721%203.86864%2017.7408C3.75646%2016.7606%203.74999%2015.3687%203.74999%2013.5001C3.74999%2011.6309%203.75413%2010.2385%203.86424%209.25791C3.97435%208.27729%204.17979%207.77081%204.47362%207.47666C4.76744%207.18251%205.27394%206.97652%206.25487%206.86583C7.23579%206.75513%208.62892%206.7501%2010.5%206.7501C10.5994%206.75151%2010.6981%206.73315%2010.7903%206.69609C10.8825%206.65903%2010.9665%206.60401%2011.0372%206.53422C11.108%206.46444%2011.1642%206.38128%2011.2026%206.28959C11.2409%206.1979%2011.2607%206.0995%2011.2607%206.0001C11.2607%205.90071%2011.2409%205.80231%2011.2026%205.71061C11.1642%205.61892%2011.108%205.53577%2011.0372%205.46598C10.9665%205.3962%2010.8825%205.34118%2010.7903%205.30412C10.6981%205.26706%2010.5994%205.2487%2010.5%205.2501V5.25Z'%20fill='%23DE3F00'/%3e%3c/svg%3e",duration_label(){return h.from_seconds(this.clip_length_second).long_duration_format()}},methods:{update_clip_start(t){this.time_updated_from_player?this.time_updated_from_player=!1:this.updated_clip_attributes.time_from_text_input.start=!0,this.new_start_time_formatted=t},update_clip_end(t){this.time_updated_from_player?this.time_updated_from_player=!1:this.updated_clip_attributes.time_from_text_input.end=!0,this.new_end_time_formatted=t},format_duration:t=>h.from_seconds(t).to_string({fill_with_0:"not_for_first",separator:":",show_hours:"auto",show_minutes:"auto",show_seconds:"always",add_space_separator:!1}),on_start_time_selected(t){this.updated_clip_attributes.time_from_player.start=!0,this.time_updated_from_player=!0,this.$refs.textfield_start_time.set_input(this.format_duration(t))},on_end_time_selected(t){this.updated_clip_attributes.time_from_player.end=!0,this.time_updated_from_player=!0,this.$refs.textfield_end_time.set_input(this.format_duration(t))},on_trash_hover_starts(){this.is_trash_hovered=!0},on_trash_hover_ends(){this.is_trash_hovered=!1},handle_cancel(){p.navigate(this.$router,`/mylists/customplaylists/edit/${this.playlist?.id}`)},convert_to_number:t=>h.from_string(t).to_seconds(),on_clip_title_update(t){this.updated_clip_attributes.title=!0,this.new_title=t},handle_save(){if(null==this.playlist||null==this.clip)return;const t={title:this.new_title,description:this.new_description,clipStartSeconds:this.new_start_time_second,clipEndSeconds:this.new_end_time_second},e={playlist_id:this.playlist.id,item_id:this.clip.itemId,item_to_edit:t};this.$kuistore.dispatch("mylists/edit_playlist_item",e).then(()=>{this.updates_saved=!0,this.send_analytics_event(u.ClipEdit),c.notify("Clip changes saved".localized()).asSuccess().push(),p.navigate(this.$router,`/mylists/customplaylists/edit/${e.playlist_id}`)}).catch(t=>{c.notify(t.userMessaging?.message??"An error occured").asFailure().push()})},on_description_update(t){0===this.new_description.length&&t.length>0?this.updated_clip_attributes.description=!0:this.new_description.length>0&&0===t.length&&(this.updated_clip_attributes.description=!1),this.new_description=t},handle_clip_delete(){if(null==this.playlist||null==this.clip)return;const t={playlist_id:this.playlist.id,item_to_delete:this.clip};this.$kuistore.dispatch("mylists/delete_playlist_item",t).then(()=>{c.notify("Clip deleted").asSuccess().push(),p.navigate(this.$router,`/mylists/customplaylists/edit/${t.playlist_id}`)}).catch(e=>{404===e.httpCode?(c.notify("The clip was already deleted").asFailure().push(),p.navigate(this.$router,`/mylists/customplaylists/edit/${t.playlist_id}
1`)):c.notify(e.userMessaging?.message??"Failed to delete the clip").asFailure().push()})},send_analytics_event(t){const e={library_name:this.$kuistore.getters["site/institution_name"]??"",library_type:this.$kuistore.getters["site/vp_type"]??"",clip_title:this.new_title,video_title:this.clip_product_instance?.title,video_id:this.clip_product_video_id,clip_action:""};[[this.updated_clip_attributes.title,"clip_rename"],[this.updated_clip_attributes.description,"clip_notes"],[this.updated_clip_attributes.time_from_player.start,"clip_scrub_start"],[this.updated_clip_attributes.time_from_player.end,"clip_scrub_end"],[this.updated_clip_attributes.time_from_text_input.start,"clip_timecode_start"],[this.updated_clip_attributes.time_from_text_input.end,"clip_timecode_end"]].forEach(([i,s])=>{i&&(e.clip_action=s,o.sendEvent(this.$nuxt.context,t,e))})}},components:{TrashIcon:C,ContentSection:n,DurationView:g,CTAButtonGray:d,CTAButton:r,HoverableDiv:l,DarkTextview:y,ImageLink:_,DarkTextfield:b,MobileBlocker:k,EditClipVideoPlayer:$}}),function(){var t=this,e=t._self._c;return t._self._setupProxy,t.is_mobile?e("mobile-blocker"):e("div",{staticClass:"edit-clip-container"},[e("div",{staticClass:"inner-container"},[e("div",{staticClass:"header"},[e("div",{staticClass:"header-inner"},[e("h4",[t._v(t._s("Edit Clip".localized()))]),e("div",{staticClass:"trash-button-outer-container"},[e("hoverable-div",{staticClass:"trash-button-container",attrs:{tooltip_text:"Delete Clip".localized()},on:{hoverstarts:t.on_trash_hover_starts,hoverends:t.on_trash_hover_ends}},[e("button",{staticClass:"trash-button",on:{click:t.handle_clip_delete}},[e("trash-icon",{staticClass:"trash-icon",attrs:{color:t.is_trash_hovered?"#000000":"#FFFFFF"}})],1)])],1)])]),e("content-section",{staticClass:"content"},[e("p",{staticClass:"gray"},[t._v(t._s("Playlist Title".localized()))]),e("p",{staticClass:"playlist-title"},[t._v(t._s(t.playlist_title))]),e("div",{staticClass:"clip-title-container"},[e("label",{staticClass:"gray",attrs:{for:"clip-title"}},[t._v(" "+t._s("Clip Title".localized())+" "+t._s("(required)".localized())+" ")]),e("hoverable-div",{staticClass:"source-container",attrs:{tooltip_text:"Go to Source".localized()}},[e("image-link",{attrs:{to:t.product_source_link,src:t.go_to_source_svg}})],1)],1),e("dark-textfield",{staticClass:"clip-title",attrs:{id:"clip-title",default_text:t.clip_title,maxlength:32},on:{update_value:t.on_clip_title_update}}),e("p",{staticClass:"gray"},[t._v(t._s("Notes".localized()))]),e("dark-textview",{attrs:{default_text:t.clip_description},on:{update_value:t.on_description_update}})],1),e("content-section",{staticClass:"content"},[e("p",{staticClass:"gray"},[t._v(t._s("Instructions".localized())+":")]),e("p",[t._v(" "+t._s("Select the start and end times for your clip. Use the scrubber on the player to drag and drop clip positions, or enter in the timecodes directly in the fields.".localized())+" ")]),e("edit-clip-video-player",{staticClass:"clip-video-player",attrs:{clip_start_time:t.new_start_time_second,clip_end_time:t.new_end_time_second},on:{start_time_selected:t.on_start_time_selected,end_time_selected:t.on_end_time_selected}}),e("div",{staticClass:"time-container"},[e("div",{staticClass:"time-box"},[e("p",{staticClass:"gray"},[t._v(t._s("Start time".localized()))]),e("dark-textfield",{ref:"textfield_start_time",staticClass:"time",attrs:{default_text:t.clip_start_second_formatted,error_msg:t.start_time_error},on:{update_value:t.update_clip_start}})],1),e("div",{staticClass:"time-box"},[e("p",{staticClass:"gray"},[t._v(t._s("End time".localized()))]),e("dark-textfield",{ref:"textfield_end_time",staticClass:"time",attrs:{default_text:t.clip_end_second_formatted,error_msg:t.end_time_error},on:{update_value:t.update_clip_end}})],1),e("div",{staticClass:"time-box"},[e("p",{staticClass:"gray"},[t._v(t._s("Clip Length".localized()))]),e("duration-view",{staticClass:"time",attrs:{duration_second:t.clip_length_second,"aria-label":t.duration_label}})],1)])],1),e("div",{staticClass:"button-container"},[e("c-t-a-button-gray",{staticClass:"decision-button",attrs:{title:"Cancel".localized()},on:{click:t.handle_cancel}}),e("c-t-a-button",{staticClass:"decision-button",attrs:{title:"Save Changes".localized(),disabled:!t.can_save},on:{click:t.handle_save}})],1)],1)])},[],!1,null,"75f8150b").exports;export{D as default};
2//# sourceMappingURL=_clipid-BUjbgMd_.js.map

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.