(()=>{"use strict";var e,t,o="".concat(null===(e=prestoEditorData)||void 0===e?void 0:e.root).concat(null===(t=prestoEditorData)||void 0===t?void 0:t.wpVersionString,"presto-videos");jQuery(window).on("elementor/frontend/init",function(){"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=".concat(t,"&action=edit"),"_blank").focus()}),elementor.channels.editor.on("editor:widget:presto_video:section_video:activated",function(e){e.$el.find(".elementor-select2").select2({ajax:{url:o,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:(null==e?void 0:e.title)||"Untitled Video"}})}}}}),e.model.get("settings").on("change",function(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()}))})})();