PageSourceSearch

https://www.kanopy.com/kui-assets/index-JT9HxS1Z.js

js kanopy.com collected 2026-09-24 08:30:50 UTC 9,013 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]="ab8d7830-c0b8-4d69-9a24-28c5e622c93e",t._sentryDebugIdIdentifier="sentry-dbid-ab8d7830-c0b8-4d69-9a24-28c5e622c93e")}catch(s){}}();import{V as t,aM as e,bf as s,b5 as i,n as l,bn as a,O as o,aN as n,C as r,p as c,aQ as d,aR as _,N as u,d as h,w as p,q as m,S as y,bJ as f}from"./client-ANZ33kkl.js";import{T as v}from"./TrashIconSvg-Djs4Ddz7.js";import{D as b}from"./DarkTextfield-wEQuMk45.js";import{C,a as k}from"./CircleActionButton-BO7cfAuu.js";import{P as g}from"./ProductDescription-z5_VOzLN.js";import"./AddIconSvg-CwH4_4E6.js";const x=l(t.extend({name:"Clip",props:{item:{type:Object,required:!0},idx:{type:Number,required:!0}},computed:{title(){return this.item.title},source_clip_title(){return this.item.video.video?.title??""},image(){const t=i(this.item.video);return t?.images.landscapes.medium??""},notes(){return this.item.description},duration(){const t=this.item.clipEndSeconds-this.item.clipStartSeconds;return s.from_seconds(t).to_string({fill_with_0:"not_for_hours",separator:"hr_min_s",show_hours:"auto",show_minutes:"always",show_seconds:"never",add_space_separator:!0})},edit_action_name:()=>k.Edit,delete_action_name:()=>k.Delete},methods:{delete_item(){this.$emit("delete_click",this.item)},edit_item(){this.$emit("edit_click",this.item)}},components:{ContentSection:e,CircleActionButton:C,ProductDescription:g}}),function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{staticClass:"clip-container"},[e("div",{staticClass:"content-section-container"},[e("content-section",[e("div",{staticClass:"contents"},[e("div",{staticClass:"image-container"},[e("img",{attrs:{src:t.image,alt:""}})]),e("div",{staticClass:"item-info"},[e("p",{staticClass:"gray"},[t._v(t._s("Clip".localized())+" "+t._s(t.idx+1))]),e("div",{staticClass:"title-and-actions"},[e("h2",{staticClass:"title"},[t._v(t._s(t.title))]),e("div",{staticClass:"icons-container"},[e("circle-action-button",{attrs:{action:t.edit_action_name,action_label:"Edit Clip".localized(),aria_label:"Edit Clip {suffix}".localized({suffix:`${t.idx+1} - ${t.title}`})},on:{click:t.edit_item}}),e("circle-action-button",{attrs:{action:t.delete_action_name,action_label:"Delete Clip".localized(),aria_label:"Delete Clip {suffix}".localized({suffix:`${t.idx+1} - ${t.title}`})},on:{click:t.delete_item}})],1)]),e("p",{staticClass:"clip-length"},[t._v(" "+t._s("Clip Length".localized())+": "+t._s(t.duration)+" "),e("span",{staticClass:"gray"},[t._v("|")]),t._v(" "+t._s(t.source_clip_title)+" ")]),e("br"),e("p",{staticClass:"gray"},[t._v(t._s("Notes".localized()))]),e("product-description",{staticClass:"notes",attrs:{html_description:t.notes,cut_offset:78,show_readmore_button:!1}})],1)])])],1)])},[],!1,null,"97772822").exports;const w=l(t.extend({name:"CustomPlaylistIdPage",layout:"default",middleware(t){new y(f).guard(t)},head:()=>({title:`${"Edit Playlist".localized()} | Kanopy`}),validate(t){const e=t.params.customplaylistid;if(m.isEmpty(e))return Promise.resolve(!1);const s=Number(e);if(isNaN(s))return Promise.resolve(!1);if(null==t.$kuistore.state.mylists.custom_playlists)return t.$kuistore.dispatch("mylists/fetch_custom_playlist",!1).then(()=>{const e=t.$kuistore.state.mylists.custom_playlists?.find(t=>t.id===s);return Promise.resolve(null!=e)}).catch(e=>(h.notify(e.userMessaging?.message??"An error occurred".localized()).asFailure().push(),u.redirect(t,"/"),Promise.resolve(!1)));{const e=t.$kuistore.state.mylists.custom_playlists.find(t=>t.id===s);return Promise.resolve(null!=e)}},data:()=>({new_title:"",is_trash_hovered:!1,view_label:"View Playlist".localized(),delete_label:"Delete Playlist".localized(),trash_button_id:"trash-button"}),computed:{playlist(){const t=Number(this.$nuxt.context.params.customplaylistid);return this.$kuistore.state.mylists.custom_playlists?.find(e=>e.id===t)},playlist_title(){return this.playlist?.title??""},can_save(){return""!==this.new_title.trim()&&this.new_title!==this.playlist_title},is_empty_playlist(){return 0===(this.playlist?.items.length??0)}},methods:{on_trash_hover_starts(){this.is_trash_hovered=!0},on_trash_hover_ends(){this.is_trash_hovered=!1},on_click_save(){null==this.playlist||m.isEmpty(this.new_title.trim())||this.new_title===this.playlist_title||this.$kuistore.dispatch("mylists/change_playlist_title",{id:this.playlist.id,title:this.new_title}).then(()=>{this.make_textfield_border_normal(),u.navigate(this.$router,"/mylists/customplaylists"),h.notify("Changes saved".localized()).asSuccess().push(),this.send_analytics()}).catch(t=>{this.make_textfield_border_red(),h.notify(t.userMessaging?.message??"Please add a title to your playlist".localized()).asFailure().push()})}
1,make_textfield_border_red(){const t=p.html_element(this.$refs["dark-textfield"])?.firstChild;t?.classList.add("has-error")},make_textfield_border_normal(){const t=p.html_element(this.$refs["dark-textfield"])?.firstChild;t?.classList.remove("has-error")},on_click_cancel(){this.new_title="",u.navigate(this.$router,"/mylists/customplaylists")},on_title_update(t){this.new_title=t},on_click_delete_playlist(){this.show_delete_playlist_modal()},show_delete_playlist_modal(){void 0!==this.playlist&&(this.$kuistore.commit("site/set_focus_ids",{previous:this.trash_button_id}),this.$kuistore.dispatch("site/save_playlist_for_deletion",this.playlist),this.$kuistore.dispatch("site/show_delete_playlist_modal",!0))},delete_item(t){if(null!=this.playlist){const e={playlist_id:this.playlist.id,item_to_delete:t};this.$kuistore.dispatch("mylists/delete_playlist_item",e).then(()=>{h.notify("Clip deleted!".localized()).asSuccess().push()}).catch(t=>{404===t.httpCode?h.notify("The clip was already deleted".localized()).asFailure().push():h.notify(t.userMessaging?.message??"Failed to delete the clip".localized()).asFailure().push()})}},edit_item(t){u.navigate(this.$router,`/mylists/customplaylists/edit/${this.playlist?.id}/${t.itemId}`)},on_play_button_clicked(){u.navigate(this.$router,`/mylists/customplaylists/${this.playlist?.id}`)},send_analytics(){d.sendEvent(this.$nuxt.context,_.PlaylistEdit)}},components:{TrashIcon:v,FontAwesomeIcon:c,ContentSection:e,DarkTextfield:b,Clip:x,CTAButton:r,CTAButtonGray:n,OrangeLink:o,HoverableDiv:a}}),function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{staticClass:"customplaylistid-container"},[null!=t.playlist?e("div",{staticClass:"contents-container"},[e("div",{staticClass:"header-container"},[e("h1",[t._v(t._s("Edit Playlist".localized()))]),e("div",{staticClass:"button-container"},[e("hoverable-div",{staticClass:"play-button-container",attrs:{tooltip_text:t.view_label}},[e("button",{staticClass:"play-button",attrs:{"aria-label":t.view_label},on:{click:t.on_play_button_clicked}},[e("font-awesome-icon",{staticClass:"play-icon",attrs:{name:"play"}})],1)]),e("hoverable-div",{staticClass:"trash-button-container",attrs:{tooltip_text:t.delete_label},on:{hoverstarts:t.on_trash_hover_starts,hoverends:t.on_trash_hover_ends}},[e("button",{staticClass:"trash-button",attrs:{id:t.trash_button_id,"aria-label":t.delete_label},on:{click:t.on_click_delete_playlist}},[e("trash-icon",{staticClass:"trash-icon",attrs:{color:t.is_trash_hovered?"#000000":"#FFFFFF"}})],1)])],1)]),e("div",{staticClass:"title-container"},[e("content-section",[e("label",{staticClass:"title-label",attrs:{for:"playlist-title"}},[t._v(" "+t._s("Playlist Title".localized())+" "),e("span",{staticClass:"req"},[t._v(t._s("(required)".localized()))])]),e("dark-textfield",{ref:"dark-textfield",staticClass:"dark-textfield",attrs:{id:"playlist-title",maxlength:32,default_text:t.playlist_title},on:{update_value:t.on_title_update}})],1)],1),t.is_empty_playlist?e("content-section",{staticClass:"clips-container-empty"},[e("p",{staticClass:"no-clips-text"},[t._v(t._s("You haven't added any clips to this playlist.".localized()))]),e("p",[t._v(" "+t._s("To add a new clip, first".localized()+" ")),e("orange-link",{staticClass:"search-link",attrs:{title:"search for a video".localized(),to:"/search"}}),t._v(t._s(". "+"Then, click on “Playlists” to add the video to your playlist.".localized())+" ")],1)]):e("div",{staticClass:"clips-container"},t._l(t.playlist.items,function(s,i){return e("clip",{key:s.nid,attrs:{item:s,idx:i},on:{edit_click:t.edit_item,delete_click:t.delete_item}})}),1),e("div",{staticClass:"submit-container"},[e("c-t-a-button-gray",{staticClass:"cancel-button",attrs:{title:"Cancel".localized()},on:{click:t.on_click_cancel}}),e("c-t-a-button",{staticClass:"save-playlist-button",attrs:{title:"Save Changes".localized(),disabled:!t.can_save},on:{click:t.on_click_save}})],1)],1):t._e()])},[],!1,null,"c39b0591").exports;export{w as default};
2//# sourceMappingURL=index-JT9HxS1Z.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.