(window.webpackJsonp=window.webpackJsonp||[]).push([[48],{331:function(module,exports){const ytRegex=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/;const vimeoRegex=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)/;const vineRegex=/^http(?:s?):\/\/(?:www\.)?vine\.co\/v\/([a-zA-Z0-9]{1,13}).*/;const preziRegex=/^https:\/\/prezi.com\/(.[^\/]+)/;const mfrRegex=/^http(?:s?):\/\/(?:www\.)?mfr\.osf\.io\/render\?url=http(?:s?):\/\/osf\.io\/([a-zA-Z0-9]{1,5})\/\?action=download/;const EMBED_REGEX=/@\[([a-zA-Z].+)]\([\s]*(.*?)[\s]*[)]/im;function videoEmbed(md,options){return function(state,silent){var serviceEnd,serviceStart,token,videoID,theState=state;const oldPos=state.pos;if(64!==state.src.charCodeAt(oldPos)||91!==state.src.charCodeAt(oldPos+1))return!1;const match=EMBED_REGEX.exec(state.src.slice(state.pos,state.src.length));if(!match||match.length<3)return!1;const service=match[1];videoID=match[2];const serviceLower=service.toLowerCase();if("youtube"===serviceLower)videoID=function(url){const match=url.match(ytRegex);return match&&11===match[7].length?match[7]:url}(videoID);else if("vimeo"===serviceLower)videoID=function(url){const match=url.match(vimeoRegex);return match&&"string"==typeof match[3]?match[3]:url}(videoID);else if("vine"===serviceLower)videoID=function(url){const match=url.match(vineRegex);return match&&11===match[1].length?match[1]:url}(videoID);else if("prezi"===serviceLower)videoID=function(url){const match=url.match(preziRegex);return match?match[1]:url}(videoID);else if("osf"===serviceLower)videoID=function(url){const match=url.match(mfrRegex);return match?match[1]:url}(videoID);else if(!options[serviceLower])return!1;if(")"===videoID&&(videoID=""),serviceStart=oldPos+2,serviceEnd=md.helpers.parseLinkLabel(state,oldPos+1,!1),!silent){theState.pos=serviceStart,theState.service=theState.src.slice(serviceStart,serviceEnd);const newState=new theState.md.inline.State(service,theState.md,theState.env,[]);newState.md.inline.tokenize(newState),(token=theState.push("video","")).videoID=videoID,token.service=service,token.level=theState.level}return theState.pos+=theState.src.indexOf(")",theState.pos),!0}}const defaults={url:function(service,videoID,options){switch(service){case"youtube":return"https://www.youtube.com/embed/"+videoID;case"vimeo":return"https://player.vimeo.com/video/"+videoID;case"vine":return"https://vine.co/v/"+videoID+"/embed/"+options.vine.embed;case"prezi":return"https://prezi.com/embed/"+videoID+"/?bgcolor=ffffff&lock_to_path=0&autoplay=0&autohide_ctrls=0&landing_data=bHVZZmNaNDBIWnNjdEVENDRhZDFNZGNIUE43MHdLNWpsdFJLb2ZHanI5N1lQVHkxSHFxazZ0UUNCRHloSXZROHh3PT0&landing_sign=1kD6c0N6aYpMUS0wxnQjxzSqZlEB8qNFdxtdjYhwSuI";case"osf":return"https://mfr.osf.io/render?url=https://osf.io/"+videoID+"/?action=download";default:return service}},youtube:{width:640,height:390},vimeo:{width:500,height:281},vine:{width:600,height:600,embed:"simple"},prezi:{width:550,height:400},osf:{width:"100%",height:"100%"}};module.exports=function(md,options){var theOptions=options,theMd=md;theOptions?Object.keys(defaults).forEach(function(key){void 0===theOptions[key]&&(theOptions[key]=defaults[key])}):theOptions=defaults,theMd.renderer.rules.video=function(md,options){return function(tokens,idx){const videoID=md.utils.escapeHtml(tokens[idx].videoID),service=md.utils.escapeHtml(tokens[idx].service).toLowerCase();var num;return"osf"===service&&videoID?(num=65536*Math.random(),videoID.match(/http(?:s?):\/\/(?:www\.)?[a-zA-Z0-9-:.]{1,}\/render(?:\/)?[a-zA-Z0-9.&;?=:%]{1,}url=http(?:s?):\/\/[a-zA-Z0-9 -:.]{1,}\/[a-zA-Z0-9]{1,5}\/\?[a-zA-Z0-9.=:%]{1,}/)?'