You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
27 KiB

9 months ago
(()=>{var e={967:(e,t)=>{var l;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var l=arguments[t];l&&(e=r(e,o(l)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var l in e)n.call(e,l)&&e[l]&&(t=r(t,l));return t}function r(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(l=function(){return a}.apply(t,[]))||(e.exports=l)}()}},t={};function l(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,l),o.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.React,t=window.lodash,n=(window.wp.i18n,window.wp.element),a=window.wp.domReady;var o=l.n(a);const r=window.wp.components,i=window.wp.apiFetch;var s=l.n(i);const c=(()=>{let e=!1;try{e=MFB.isPremium}catch(e){}return e})(),u={headers:{"Content-Type":"application/json"},method:"GET"};class d{constructor(e=""){e||(e=window.location.href),this.parsedURL=new URL(e)}get(e,t=null){return this.parsedURL.searchParams.get(e)||t}set(e,t,l=!0){this.parsedURL.searchParams.set(e,t),l&&history.pushState&&history.pushState({},null,this.parsedURL.href)}delete(e,t=!0){this.parsedURL.searchParams.delete(e),t&&history.pushState&&history.pushState({},null,this.parsedURL.href)}reload(){history?.go?history.go():window.location.reload()}getHref(){return this.parsedURL.href}}const m=(0,n.createContext)(),h=({title:t,description:l,children:n})=>(0,e.createElement)("div",{className:"settings-section"},t&&(0,e.createElement)("h3",{className:"settings-section__title"},t),l&&(0,e.createElement)("p",{className:"settings-section__description"},l),(0,e.createElement)("div",{className:"meta-box-sortables"},n));var f=l(967),p=l.n(f);const b=window.wp.url,g=({title:l,settingsName:a="mfb-settings",children:o,renderFooter:r=null,isFullRow:i=!1,isHeaderHidden:s=!1,className:c,initialOpen:u=!0})=>{const d=`${a}-${(0,b.cleanForSlug)(l)}`,[m,h]=((e,t=null)=>{const[l,a]=(0,n.useState)((()=>{try{const l=JSON.parse(localStorage.getItem(e));return isNil(l)?t:l}catch(e){return((e,t="log")=>{e&&"development"===window?.MFBLOG?.environmentType&&(["log","info","warn","error","debug","dir","table"].includes(t)?console[t](e):console.log(e))})(e,"error"),t}}));return[l,t=>{a(t),localStorage.setItem(e,JSON.stringify(t))}]})(d,!u);return(0,e.createElement)("div",{className:p()("postbox settings-widget",c,{closed:m,"is-full-row":i,"is-header-hidden":s})},!s&&(0,e.createElement)("div",{className:"postbox-header","aria-expanded":m?"false":"true",tabIndex:-1,onClick:e=>{e.preventDefault(),h(!m)}},(0,e.createElement)("h2",{className:"hndle"},l),(0,e.createElement)("div",{className:"handle-actions hide-if-no-js"},(0,e.createElement)("button",{type:"button",className:"handlediv","aria-expanded":m?"false":"true",onClick:e=>{e.preventDefault(),h(!m)}},(0,e.createElement)("span",{className:"screen-reader-text"},"Toggle panel: ",l),(0,e.createElement)("span",{className:"toggle-indicator","aria-hidden":m?"true":"false"})))),(0,e.createElement)("div",{className:"inside"},o),(0,t.isFunction)(r)&&(0,e.createElement)("div",{className:"postbox-footer"},r()))},y=({name:t,videos:l={}})=>{var n;const a=null!==(n=l[t])&&void 0!==n?n:null;return a?(0,e.createElement)(e.Fragment,null,a.title&&(0,e.createElement)("h4",null,a.title),(0,e.createElement)("video",{width:"1024",controls:"controls"},(0,e.createElement)("source",{src:a.url,type:"video/mp4"})),a.caption&&(0,e.createElement)("p",{className:"video-caption"},a.caption)):null},E=()=>{const{data:{videos:t={}}={}}=(0,n.useContext)(m);return(0,e.createElement)(g,{isHeaderHidden:!0,isFullRow:!0,className:"widget-welcome"},(0,e.createElement)("h1",n