{"version":3,"sources":["webpack:///../WCC.UI/App/components/fancybox/vimeo.html?b5e5","webpack:///../WCC.UI/App/components/fancybox/vimeo.scss?c214","webpack:///../WCC.UI/App/components/fancybox/vimeo.ts","webpack:///../WCC.UI/App/webpack/runtime/htmlExposer.js","webpack:///../WCC.UI/App/components/fancybox/vimeo.scss","webpack:///../WCC.UI/App/components/fancybox/vimeo.html"],"names":["content","expose","__esModule","default","api","module","i","options","exports","locals","components","preload","WCCFancyboxVimeoVM","constructor","config","info","id","ko","flattenComputed","this","src","pluck","thumbnail","fromPromise","undefined","getThumbnailURL","isReady","pureComputed","applyBindingsToNode","element","apiUrl","$","get","thumbnail_url","__decorate","injectable","__param","inject","wccModules","componentConfig","componentInfo","system","SystemHelpers","html","getTemplatesAndResources","forEach","node","document","head","appendChild","___CSS_LOADER_API_IMPORT___","push"],"mappings":"kIAAA,UAAO,CACC,kGACA,wDAIC,KAJyC,EAAF,SAAYA,EAASC,GAGzD,OADAA,EADAD,EAAUA,EAAQE,WAAaF,EAAQG,QAAUH,GAE1CA,GACV,4B,+DCNT,IAAII,EAAM,EAAQ,gFACFJ,EAAU,EAAQ,6IAIC,iBAFvBA,EAAUA,EAAQE,WAAaF,EAAQG,QAAUH,KAG/CA,EAAU,CAAC,CAACK,EAAOC,EAAIN,EAAS,MAG9C,IAAIO,EAAU,CAEd,OAAiB,OACjB,WAAoB,GAEPH,EAAIJ,EAASO,GAI1BF,EAAOG,QAAUR,EAAQS,QAAU,I,8uBCZnCC,EAAWC,QAAQ,6BAOnB,IAAqBC,EAArB,MAMIC,YACwCC,EACFC,GAElC,MAAMC,EAAKC,EAAGC,gBAAgBJ,EAAOE,IAErCG,KAAKC,IAAMJ,EAAGK,MAAML,GAAM,kCAAkCA,GAC5DG,KAAKG,UAAYL,EAAGM,YAAaP,GAAaQ,MAANR,EAAkBG,KAAKM,gBAAgBT,QAAMQ,EAAW,CAACR,IAEjGG,KAAKO,QAAUT,EAAGU,aAAa,IAAcH,MAARR,KAErCC,EAAGW,oBAAoBb,EAAKc,QAAS,CACjC,QAAWV,KAAKO,QAEhB,IAAO,CACH,sBAAsB,KAK1B,sBAAsBV,GAC1B,MAAMc,EAAS,2DAA2Dd,EAG1E,aAFuBe,EAAEC,IAAIF,IAELG,gBA9BXrB,EAAkBsB,EAAA,CADtCC,cAQQC,EAAA,EAAAC,YAAOC,IAAWC,kBAClBH,EAAA,EAAAC,YAAOC,IAAWE,iBARN5B,gB,8PCbrB,WAOC,KAPD,aACI,MAAM6B,EAAS,EAAQ,mCAAkBC,cAEzC,OAAO,SAAUC,GACbF,EAAOG,yBAAyBD,GAC3BE,SAAQ,SAAUC,GAAQC,SAASC,KAAKC,YAAYH,QAEhE,+B,6JCLDtC,EADkC,EAAQ,wDAChC0C,EAA4B,IAE9BC,KAAK,CAAC9C,EAAOC,EAAI,qCAAsC,KAE/DD,EAAOG,QAAUA,G,6GCHjBH,EAAOG,QAFI","file":"302.ecb2989502ea708d3596.js","sourcesContent":["define([\n \"!!../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./vimeo.html\", \n \"!../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./vimeo.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import { wccModules } from 'enums/wccModules';\r\nimport { inject, injectable } from 'inversify';\r\nimport { Subscribable, SubscribableOrNullableValue } from 'knockout';\r\nimport './vimeo.html';\r\nimport './vimeo.scss';\r\n\r\ncomponents.preload('fancybox-video-iframe-new');\r\n\r\nexport interface WCCFancyboxVimeoVMConfig {\n id: SubscribableOrNullableValue\r\n}\n\n@injectable()\nexport default class WCCFancyboxVimeoVM {\n src: Subscribable\n thumbnail: Subscribable\n\n isReady: Subscribable\n\n constructor(\r\n @inject(wccModules.componentConfig) config: WCCFancyboxVimeoVMConfig,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo\r\n ) {\r\n const id = ko.flattenComputed(config.id);\n\n this.src = id.pluck(id => `https://player.vimeo.com/video/${id}`);\n this.thumbnail = ko.fromPromise((id) => id != undefined ? this.getThumbnailURL(id) : undefined, [id]);\n\n this.isReady = ko.pureComputed(() => id() != undefined);\r\n\r\n ko.applyBindingsToNode(info.element, {\n 'visible': this.isReady,\n\n 'css': {\n 'wcc-fancybox-vimeo': true\n }\n });\r\n }\n\n private async getThumbnailURL(id: string) {\n const apiUrl = `https://vimeo.com/api/oembed.json?url=https://vimeo.com/${id}`;\n const response = await $.get(apiUrl);\n\n return response.thumbnail_url;\r\n }\n}","define(function () {\r\n const system = require('helpers/system').SystemHelpers;\r\n\r\n return function (html) {\r\n system.getTemplatesAndResources(html)\r\n .forEach(function (node) { document.head.appendChild(node) });\r\n }\r\n});","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".wcc-fancybox-vimeo{display:block}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;"],"sourceRoot":""}