File: /var/www/html/wp-content/plugins/wpseo-video/js/yoast-video-seo-plugin-1510.min.js
(()=>{var e={22:(e,t,o)=>{"use strict";o.d(t,{bN:()=>l,IC:()=>u,Ge:()=>i,qW:()=>a,T1:()=>d,Wo:()=>s,m5:()=>r,d9:()=>g,Hw:()=>f,Px:()=>m,rU:()=>c,$4:()=>E,Wt:()=>y,pM:()=>p});class n{static prefixElementId(e){return"yoast_wpseo_videositemap-"+e}static get disableElement(){return document.getElementById(this.prefixElementId("disable"))}static get thumbnailElement(){return document.getElementById(this.prefixElementId("thumbnail"))}static get durationElement(){return document.getElementById(this.prefixElementId("duration"))}static get tagsElement(){return document.getElementById(this.prefixElementId("tags"))}static get ratingElement(){return document.getElementById(this.prefixElementId("rating"))}static get notFamilyFriendlyElement(){return document.getElementById(this.prefixElementId("not-family-friendly"))}static get disable(){return n.disableElement&&n.disableElement.value||""}static set disable(e){n.disableElement.value=e}static get thumbnail(){return n.thumbnailElement&&n.thumbnailElement.value||""}static set thumbnail(e){n.thumbnailElement.value=e}static get duration(){return n.durationElement&&parseInt(n.durationElement.value,10)||0}static set duration(e){n.durationElement.value=e}static get tags(){const e=n.tagsElement&&n.tagsElement.value;return e?e.split(","):[]}static set tags(e){n.tagsElement.value=e.join(",")}static get rating(){return n.ratingElement&&n.ratingElement.value||""}static set rating(e){n.ratingElement.value=e}static get notFamilyFriendly(){return n.notFamilyFriendlyElement&&"on"===n.notFamilyFriendlyElement.value||!1}static set notFamilyFriendly(e){n.notFamilyFriendlyElement.value=e?"on":"off"}}const i="VIDEO_LOAD_EDITOR_DATA",a="VIDEO_SET_DURATION",r="VIDEO_SET_NOT_FAMILY_FRIENDLY",s="VIDEO_SET_THUMBNAIL",l="VIDEO_CLEAR_THUMBNAIL",d="VIDEO_SET_TAGS",u="VIDEO_DISMISS_ALERT";function m(){return{type:i,duration:n.duration,notFamilyFriendly:n.notFamilyFriendly,thumbnail:n.thumbnail,videoTagsArray:n.tags,reactAlertIsDismissed:wpseoVideoL10n.react_alert_is_dismissed}}function c(e){return n.duration=e,{type:a,value:e}}function p(){return n.notFamilyFriendly=!n.notFamilyFriendly,{type:r}}function y(e){return n.thumbnail=e,{type:s,thumbnailUrl:e}}function g(){return n.thumbnail="",{type:l}}function E(e){return n.tags=e,{type:d,videoTagsArray:e}}function f(){return{type:u}}},642:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>a});var n=o(22);const i={isLoaded:!1,notFamilyFriendly:!1,duration:0,thumbnail:"",reactAlertIsDismissed:!0};function a(e=i,t){switch(t.type){case n.Ge:return{...e,duration:t.duration,notFamilyFriendly:t.notFamilyFriendly,thumbnail:t.thumbnail,tags:t.videoTagsArray,reactAlertIsDismissed:t.reactAlertIsDismissed,isLoaded:!0};case n.qW:return{...e,duration:t.value};case n.m5:return{...e,notFamilyFriendly:!e.notFamilyFriendly};case n.Wo:return{...e,thumbnail:t.thumbnailUrl};case n.bN:return{...e,thumbnail:""};case n.T1:return{...e,tags:t.videoTagsArray};case n.IC:return{...e,reactAlertIsDismissed:!0};default:return e}}},694:(e,t,o)=>{"use strict";var n=o(925);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,o,i,a,r){if(r!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var o={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return o.PropTypes=o,o}},556:(e,t,o)=>{e.exports=o(694)()},925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};o.r(e),o.d(e,{VIDEO_CLEAR_THUMBNAIL:()=>I.bN,VIDEO_DISMISS_ALERT:()=>I.IC,VIDEO_LOAD_EDITOR_DATA:()=>I.Ge,VIDEO_SET_DURATION:()=>I.qW,VIDEO_SET_TAGS:()=>I.T1,VIDEO_SET_THUMBNAIL:()=>I.Wo,VIDEO_TOGGLE_NOT_FAMILY_FRIENDLY:()=>I.m5,clearVideoThumbnail:()=>I.d9,dismissAlert:()=>I.Hw,loadVideoEditorData:()=>I.Px,setDuration:()=>I.rU,setVideoTags:()=>I.$4,setVideoThumbnail:()=>I.Wt,toggleNotFamilyFriendly:()=>I.pM});var t={};o.r(t),o.d(t,{getDuration:()=>O,getNotFamilyFriendly:()=>V,getReactAlertIsDismissed:()=>R,getVideoTags:()=>k,getVideoThumbnail:()=>A});const n=window.wp.element,i=window.wp.hooks,a=window.wp.components,r=window.wp.compose,s=window.wp.data,l=window.yoast.componentsNew,d=window.wp.i18n;var u=o(556),m=o.n(u);function c(e){const t=(0,n.useCallback)((()=>{"blockEditor"===e.editorType?((0,s.dispatch)("core/interface").enableComplementaryArea("core/edit-post","yoast-seo/seo-sidebar"),(0,s.dispatch)("yoast-seo/editor").openEditorModal("yoast-search-appearance-modal")):"elementorEditor"===e.editorType?(0,s.dispatch)("yoast-seo/editor").openEditorModal("yoast-search-appearance-modal"):function(){document.getElementById("wpseo-meta-tab-content").click();const e=document.querySelector("#yoast-snippet-editor-metabox .yoast-svg-icon-chevron-down");e&&e.parentElement.click()}()}),[e.editorType]);return wp.element.createElement(l.FieldGroup,{label:(0,d.__)("Title and description","yoast-video-seo"),description:(0,d.__)("Your video will use the same SEO title and meta description you enter in our Search appearance.","yoast-video-seo")},wp.element.createElement(l.NewButton,{variant:"secondary",onClick:t},(0,d.__)("Open Search appearance","yoast-video-seo")))}c.propTypes={editorType:m().string.isRequired};const{location:{LocationConsumer:p}}=window.yoast.editorModules.components.contexts,{setTextdomainL10n:y}=window.yoast.editorModules.helpers.i18n,g=window.yoast.editorModules.containers.PersistentDismissableAlert;y("yoast-video-seo","wpseoVideoL10n");function E(e){return(0,n.useEffect)((()=>{e.onLoad()}),[]),wpseoVideoL10n.has_video?wp.element.createElement(p,null,(t=>{return wp.element.createElement("div",{className:"yoast"},wp.element.createElement(g,{type:"info",alertKey:"video-editor-reactification-alert"},(0,d.__)("We've made some changes to Yoast SEO Video.","yoast-video-seo")+" ",wp.element.createElement("a",{href:wpseoVideoL10n["shortlinks.video_changes"],target:"_blank",rel:"noopener noreferrer"},(0,d.__)("Learn more about what has changed.","yoast-video-seo"))),wp.element.createElement("p",null,(0,d.__)("Edit the Schema information below to optimize your video for search engines. ","yoast-video-seo"),wpseoVideoL10n["shortlinks.configuration_guide"]&&(o=wpseoVideoL10n["shortlinks.configuration_guide"],((e,t)=>{try{return(0,n.createInterpolateElement)(e,t)}catch(t){return console.error("Error in translation for:",e,t),e}})(/* translators: %s expands to an opening anchor tag, %s expands to a closing anchor tag */ /* translators: %s expands to an opening anchor tag, %s expands to a closing anchor tag */
(0,d.sprintf)((0,d.__)("To learn more, read the %sYoast SEO Video configuration guide.%s","yoast-video-seo"),"<a>","</a>"),{a:wp.element.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer"})}))),wp.element.createElement(l.ImageSelect,{label:(0,d.__)("Video thumbnail","yoast-video-seo"),hasPreview:!0,imageUrl:e.thumbnail,defaultImageUrl:e.defaultThumbnail,onClick:e.onSelectImageClick,onRemoveImageClick:e.onRemoveImageClick}),wp.element.createElement(c,{editorType:e.editorType}),wp.element.createElement(l.DurationInput,{label:(0,d.__)("Duration","yoast-video-seo"),id:t+"-duration-input",duration:e.duration,onChange:e.setDuration}),wp.element.createElement(l.FieldGroup,{label:(0,d.__)("Tags","yoast-video-seo")},wp.element.createElement(a.FormTokenField,{label:"",value:e.tags,onChange:e.setVideoTags})),wp.element.createElement("p",{className:"field-group-description"},(0,d.__)("If this video should not be available for safe search users, check this box.","yoast-video-seo")),wp.element.createElement(l.Checkbox,{id:`video-family-friendly-checkbox-${t}`,label:(0,d.__)("Mark this video as not family friendly","yoast-video-seo"),checked:e.notFamilyFriendly,onChange:e.toggleNotFamilyFriendly}));var o})):wp.element.createElement("p",null,(0,d.__)("It looks like your content does not yet contain a video. Please add a video and save your draft in order for Video SEO to work.","yoast-video-seo"))}E.propTypes={onLoad:m().func.isRequired,editorType:m().string.isRequired,thumbnail:m().string.isRequired,defaultThumbnail:m().string.isRequired,onSelectImageClick:m().func.isRequired,onRemoveImageClick:m().func.isRequired,duration:m().number.isRequired,setDuration:m().func.isRequired,tags:m().array.isRequired,setVideoTags:m().func.isRequired,notFamilyFriendly:m().bool.isRequired,toggleNotFamilyFriendly:m().func.isRequired};let f=null;const w=()=>(f||(f=window.wp.media(),f.on("select",(()=>{const e=f.state().get("selection").first();(0,s.dispatch)("yoast-seo-video/editor").setVideoThumbnail(e.attributes.url)}))),f).open(),h=(0,r.compose)([(0,s.withSelect)((e=>{const{getDuration:t,getNotFamilyFriendly:o,getVideoThumbnail:n,getVideoTags:i,getReactAlertIsDismissed:a}=e("yoast-seo-video/editor"),{getEditorType:r}=e("yoast-seo/editor");return{duration:t(),notFamilyFriendly:o(),thumbnail:n(),defaultThumbnail:wpseoVideoL10n.default_thumbnail||"",editorType:r(),tags:i(),reactAlertIsDismissed:a()}})),(0,s.withDispatch)((e=>{const{loadVideoEditorData:t,setDuration:o,toggleNotFamilyFriendly:n,clearVideoThumbnail:i,setVideoTags:a,dismissAlert:r}=e("yoast-seo-video/editor");return{onLoad:t,onSelectImageClick:w,onRemoveImageClick:i,setVideoTags:a,setDuration:o,toggleNotFamilyFriendly:n,dismissAlert:r}}))])(E),{SidebarItem:b,SidebarCollapsible:v}=window.yoast.editorModules.components;function _(e){const t=e.fillName?e.fillName:"YoastSidebar";return wp.element.createElement(a.Fill,{name:t},wp.element.createElement(b,{key:"video",renderPriority:33},wp.element.createElement(v,{title:"Video"},wp.element.createElement(h,null))))}_.propTypes={fillName:m().string},_.defaultProps={fillName:""};var I=o(22),T=o(642);const{default:F}=o(642),S={editor:T.default},D=window.lodash;function O(e){return(0,D.get)(e,"editor.duration",0)}function V(e){return(0,D.get)(e,"editor.notFamilyFriendly",!1)}function A(e){return(0,D.get)(e,"editor.thumbnail","")}function k(e){return(0,D.get)(e,"editor.tags",[])}function R(e){return(0,D.get)(e,"editor.reactAlertIsDismissed",!0)}function L(){return(0,s.registerStore)("yoast-seo-video/editor",{reducer:(0,s.combineReducers)(S),actions:e,selectors:t})}const{location:{LocationProvider:N}}=window.yoast.editorModules.components.contexts;function C(){return"undefined"!=typeof YoastSEO&&void 0!==YoastSEO.analysis&&void 0!==YoastSEO.analysis.worker}function x(){window.YoastSEO._registerReactComponent("yoast-seo-video",(()=>wp.element.createElement(_,{fillName:"YoastElementor"})))}function M(){C()&&YoastSEO.analysis.worker.loadScript(wpseoVideoL10n.script_url).then((()=>YoastSEO.analysis.worker.sendMessage("initialize",wpseoVideoL10n,"YoastVideoSEO")))}"1"===wpseoVideoL10n.has_video&&(C()?M():jQuery(window).on("YoastSEO:ready",M)),jQuery(window).on("elementor:init",(()=>{window.elementor.on("panel:init",(()=>{L()})),(0,i.addAction)("yoast.elementor.loaded","yoast/yoast-video-seo/load-video-in-elementor",x)})),jQuery(window).on("YoastSEO:ready",(()=>{L(),function(){if(wpseoScriptData.isBlockEditor){const{registerPlugin:e}=wp.plugins;e("yoast-seo-video",{render:_})}(0,n.createRoot)(document.getElementById("wpseo-video-react-metabox-root")).render(wp.element.createElement(N,{value:"metabox"},wp.element.createElement(h,null)))}()}))})()})();