(()=>{"use strict";const e=`${prestoEditorData?.root}${prestoEditorData?.wpVersionString}presto-videos`;jQuery(window).on("elementor/frontend/init",()=>{"undefined"!=typeof elementor&&(elementor.channels.editor.on("presto:video:edit",function(e){var t=e.elementSettingsModel.get("video_block");t&&window.open(prestoEditorData.siteURL+`/wp-admin/post.php?post=${t}&action=edit`,"_blank").focus()}),elementor.channels.editor.on("editor:widget:presto_video:section_video:activated",function(t){t.$el.find(".elementor-select2").select2({ajax:{url:e,dataType:"json",headers:{"X-WP-Nonce":prestoEditorData.nonce},data:function(e){return{search:e.term}},processResults:function(e){return{results:jQuery.map(e,function(e){return{id:e.id,text:e?.title||"Untitled Video"}})}}}}),t.model.get("settings").on("change",e=>{})}),elementor.channels.editor.on("presto:video:create",function(){window.open(prestoEditorData.siteURL+"/wp-admin/post-new.php?post_type=pp_video_block","_blank").focus()}))})})();