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,EAAYwB,WAAWC,aAAaxB,EAAMD,GAC1CF,SAAS4B,iBAAiB,sBAAsBnB,GAAGR,iBAAiB,QAAS,WACzE,IAAIC,EAAc2B,KAAKH,WACnBI,EAAQ5B,EAAYa,QAAQe,MAC1B/B,cAAc+B,GAAOf,QAAQD,MAC/Bf,cAAc+B,GAAOhB,IAAMf,cAAc+B,GAAOf,QAAQD,IACxDf,cAAc+B,GAAOC,gBAAgB,aAEzChC,cAAc+B,GAAOhB,IAAMf,cAAc+B,GAAOhB,IAAIW,QAAQ,oBAAqB,4BACjFvB,EAAYwB,WAAWC,aAAa5B,cAAc+B,GAAQ5B,GAC1DH,cAAc+B,GAAOE,UAAUC,IAAI,mBACnClC,cAAc+B,GAAOJ,WAAWM,UAAUC,IAAI,6BAClD,GAAG,GAEX,E","sources":["webpack://a4-meinberlin/./node_modules/dsgvo-video-embed/js/dsgvo-video-embed.js"],"sourcesContent":["/**\n * DSGVO Video Embed, v1.1.0\n * (c) 2021 Arndt von Lucadou\n * MIT License\n * https://github.com/a-v-l/dsgvo-video-embed\n */\n\n(function () {\n    // Config\n    var text = {\n        youtube: '<strong>' + django.gettext('External Video') + '</strong>' +\n             '<div>' + '<p>' + django.gettext('Here you can find a video from Google (YouTube). To protect your data the content will only be loaded after you give your consent. Only then will YouTube set Cookies that collect information on user behaviour.') +\n             '</p>' + '<p>' + django.gettext('More information can be found in the privacy policy of Google under: ') +\n             '<a href=\"https://www.google.de/intl/de/policies/privacy/\" rel=\"noopener\" target=\"_blank\">' + 'https://policies.google.com/privacy/' +\n             '</a>' + '</p>' + '</div>' + '<a class=\"video-link\" href=\"https://youtu.be/%id%\" rel=\"noopener\" target=\"_blank\">' + django.gettext('Link to video: ') + 'https://youtu.be/%id%' + '</a>' + '<button>' + django.gettext('Play video') + '</button>',\n        vimeo: '<strong>' + django.gettext('External video') + '</strong>' +\n             '<div>' + '<p>' + django.gettext('Here you can find a video from Vimeo. To protect your data the content will only be loaded after you give your consent. Only then will Vimeo set cookies that collect information on user behaviour.') +\n             '</p>' + '<p>' + django.gettext('More information can be found in the privacy policy of Vimeo under: ') +\n             '<a href=\"https://vimeo.com/privacy\" rel=\"noopener\" target=\"_blank\">' + 'https://vimeo.com/privacy' +\n             '</a>' + '</p>' + '</div>' + '<a class=\"video-link\" href=\"https://vimeo.com/%id%\" rel=\"noopener\" target=\"_blank\">' + django.gettext('Link to video: ') + 'https://vimeo.com/%id%' + '</a>' + '<button>' + django.gettext('play video') + '</button>'\n    };\n    window.video_iframes = [];\n    document.addEventListener(\"DOMContentLoaded\", function () {\n        var video_frame, wall, video_platform, video_src, video_id, video_w, video_h;\n        for (var i = 0, max = window.frames.length - 1; i <= max; i += 1) {\n            video_frame = document.getElementsByTagName('iframe')[0];\n            video_src = video_frame.src || video_frame.dataset.src;\n            // Only process video iframes [youtube|vimeo]\n            if (video_src.match(/youtube|vimeo/) == null) {\n                continue;\n            }\n\n            video_iframes.push(video_frame);\n            video_w = video_frame.getAttribute('width');\n            video_h = video_frame.getAttribute('height');\n            wall = document.createElement('article');\n\n            // Prevent iframes from loading remote content\n            if (!!video_frame.src) {\n                if (typeof (window.frames[0].stop) === 'undefined') {\n                    setTimeout(function () {\n                        window.frames[0].execCommand('Stop');\n                    }, 1000);\n                } else {\n                    setTimeout(function () {\n                        window.frames[0].stop();\n                    }, 1000);\n                }\n            }\n            video_platform = video_src.match(/vimeo/) == null ? 'youtube' : 'vimeo';\n            video_id = video_src.match(/(embed|video)\\/([^?\\s]*)/)[2];\n            wall.setAttribute('class', 'video-wall');\n            wall.setAttribute('data-index', i);\n            if (video_w && video_h) {\n                wall.setAttribute('style', 'width:' + video_w + 'px;height:' + video_h + 'px');\n            }\n            wall.innerHTML = text[video_platform].replace(/\\%id\\%/g, video_id);\n            video_frame.parentNode.replaceChild(wall, video_frame);\n            document.querySelectorAll('.video-wall button')[i].addEventListener('click', function () {\n                var video_frame = this.parentNode,\n                    index = video_frame.dataset.index;\n                if (!!video_iframes[index].dataset.src) {\n                    video_iframes[index].src = video_iframes[index].dataset.src;\n                    video_iframes[index].removeAttribute('data-src');\n                }\n                video_iframes[index].src = video_iframes[index].src.replace(/www\\.youtube\\.com/, 'www.youtube-nocookie.com');\n                video_frame.parentNode.replaceChild(video_iframes[index], video_frame);\n                video_iframes[index].classList.add('ck_embed_iframe');\n                video_iframes[index].parentNode.classList.add('ck_embed_iframe__container');\n            }, false);\n        }\n    });\n})();\n"],"names":["text","youtube","django","gettext","vimeo","window","video_iframes","document","addEventListener","video_frame","wall","video_platform","video_src","video_id","video_w","video_h","i","max","frames","length","getElementsByTagName","src","dataset","match","push","getAttribute","createElement","setTimeout","execCommand","stop","setAttribute","innerHTML","replace","parentNode","replaceChild","querySelectorAll","this","index","removeAttribute","classList","add"],"ignoreList":[],"sourceRoot":""}