{"version":3,"sources":["jsdelivr-header.js","/npm/nodebb-plugin-qqvideo@0.0.3/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,CCAC,SAAS,GACN,aAEA,IAAI,EAAU,CAAC,EACX,EAAQ,8JACR,EAAa,gIACb,EAAW,yGAEf,EAAQ,MAAQ,SAAS,EAAM,GAC3B,IAAK,IAAS,EAAK,WAAa,EAAK,SAAS,QAC1C,OAAO,EAAS,KAAM,GAEtB,EAAK,SAAS,QAAQ,MAAM,KAC5B,EAAK,SAAS,QAAU,EAAK,SAAS,QAAQ,QAAQ,EAAU,IAEhE,EAAK,SAAS,QAAQ,MAAM,KAC5B,EAAK,SAAS,QAAU,EAAK,SAAS,QAAQ,QAAQ,EAAY,IAGtE,EAAS,KAAM,EACnB,EAEA,EAAO,QAAU,CACrB,CAvBA,CAuBE","file":"/npm/nodebb-plugin-qqvideo@0.0.3/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/nodebb-plugin-qqvideo@0.0.3/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * Created by Narsiss on 16-12-16.\n * Author Narsiss (vvwyot@126.com)\n */\n\n\n(function(module) {\n    \"use strict\";\n    // responsive format found at http://avexdesigns.com/responsive-youtube-embed/\n    var QQVideo = {},\n        embed = '<div class=\"video-container\"><iframe class=\"qqvideo-plugin\"  src=\"https://v.qq.com/iframe/player.html?vid=$1&tiny=0&auto=0\" allowfullscreen></iframe></div>';\n    var regularUrl = /<a href=\"(?:https?:\\/\\/)?imgcache.qq.com\\/tencentvideo_v1\\/playerv3\\/TPout.swf\\b\\?\\b.*\\bvid=([a-z0-9A-Z]+)(.*)[^<]*?>.+<\\/a>/g;\n    var embedUrl = /<a href=\"(?:https?:\\/\\/)?v.qq.com\\/iframe\\/player\\.html\\b\\?\\b.*\\bvid=([a-z0-9A-Z]+)(.*)[^<]*?>.+<\\/a>/g;\n\n    QQVideo.parse = function(data, callback) {\n        if (!data || !data.postData || !data.postData.content) {\n            return callback(null, data);\n        }\n        if (data.postData.content.match(embedUrl)) {\n            data.postData.content = data.postData.content.replace(embedUrl, embed);\n        }\n        if (data.postData.content.match(regularUrl)) {\n            data.postData.content = data.postData.content.replace(regularUrl, embed);\n        }\n\n        callback(null, data);\n    };\n\n    module.exports = QQVideo;\n}(module));\n"]}