{"version":3,"sources":["webpack:///./src/components/Forms/FieldTypes/FormVideoUploadField.vue?bc9f","webpack:///./node_modules/client-website-ts-library/components/ReCaptcha.vue?285b","webpack:///./node_modules/client-website-ts-library/components/ReCaptcha.vue?c1f0","webpack:///./node_modules/client-website-ts-library/components/ReCaptcha.vue?83ee","webpack:///./node_modules/client-website-ts-library/components/ReCaptcha.vue","webpack:///./node_modules/client-website-ts-library/components/VideoRecorder.vue?d8cd","webpack:///./node_modules/client-website-ts-library/components/VideoRecorder.vue?c337","webpack:///./node_modules/client-website-ts-library/components/VideoRecorder.vue?c12c","webpack:///./node_modules/client-website-ts-library/components/VideoRecorder.vue","webpack:///./node_modules/client-website-ts-library/components/VideoRecorder.vue?a6af","webpack:///./node_modules/client-website-ts-library/components/Map/Map.vue?0d6e","webpack:///./node_modules/client-website-ts-library/components/Map/Map.vue?484d","webpack:///./node_modules/client-website-ts-library/components/Map/Map.vue?5d21","webpack:///./node_modules/client-website-ts-library/components/Map/Map.vue","webpack:///./node_modules/client-website-ts-library/components/Map/Map.vue?c455","webpack:///./src/components/Forms/FieldTypes/FormVideoUploadField.vue?99e3","webpack:///./src/components/Forms/FieldTypes/FormVideoUploadField.vue","webpack:///./src/components/Forms/FieldTypes/FormVideoUploadField.vue?8f35","webpack:///./src/components/Forms/FieldTypes/FormVideoUploadField.vue?0867","webpack:///./node_modules/client-website-ts-library/components/ReCaptcha.vue?2a77"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","class","recaptchaVersion","attrs","id","siteKey","callbackFunctionName","staticRenderFns","GetGuid","response","responseWaiter","Website","Settings","ReCaptcha","ReCaptchaSiteKey","ReCaptchaVersion","window","Log","Debug","loadLibrary","then","Info","catch","Error","grecaptcha","reset","Promise","resolve","reject","length","win","execute","ex","undefined","scr","document","createElement","pl_recaptcha_loaded","onerror","async","defer","head","appendChild","src","component","domProps","_s","def","Labels","Prompt","needsFallback","isMobile","on","uploadVideo","_v","Upload","Record","showRecorder","directives","name","rawName","value","isActive","ready","expression","isRunningOutatime","formattedTime","ref","doneRecording","isRecording","toggleRecording","cancelRecording","initVideoStream","_e","fatalErrorMessage","needsPermissions","hasNoDevices","permissionDenied","hasFatalError","videoBlob","outatimeThreshold","captureConfig","currentTime","currentTimeInterval","videoStream","mediaRecorder","capturedChunks","test","navigator","userAgent","mins","Math","floor","secs","totalMins","MaxRecordLength","totalSecs","fallback","mediaDevices","enumerateDevices","availableDevices","some","device","kind","permissions","query","res","state","Warning","err","stopRecording","startRecording","codecs","codec","i","MediaRecorder","isTypeSupported","initCaptureConfig","mimeType","ondataavailable","e","push","data","onstop","Blob","type","clearInterval","start","setInterval","stop","hideRecorder","$emit","fi","accept","setAttribute","style","display","createFileInput","onchange","files","file","size","MaxFileSize","alert","FormattedMaxFileSize","remove","onblur","setTimeout","body","click","getTracks","forEach","track","constraints","audio","video","width","height","getUserMedia","mediaStream","$refs","preview","srcObject","message","config","MapProvider","settings","$event","MapBoxMap","Config","center","zoom","map","SetCenter","GetZoom","components","hasErrors","TypeName","handleDone","deleteVideo","Delete","recordNewVideo","Replace","videoBlobUrl","errors","URL","revokeObjectURL","createObjectURL","recorder","requestRecording","Key","Value","VideoRecorder"],"mappings":"qLAAA,W,mICAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,YAAYC,MAAM,CAAC,qBAA8C,IAAxBP,EAAIQ,mBAAyB,CAACJ,EAAG,MAAM,CAACE,YAAY,+BAA+BG,MAAM,CAAC,GAAK,aAAeT,EAAIU,GAAG,eAAeV,EAAIW,QAAQ,YAAoC,IAAxBX,EAAIQ,iBAAyB,GAAK,YAAY,gBAAgBR,EAAIY,qBAAqB,wBAAwBZ,EAAIY,2BAC1aC,EAAkB,G,gDCkBtB,IAAqB,EAArB,cAAuC,OAAvC,c,oBACmB,KAAAH,GAAK,OAAMI,UAEpB,KAAAC,SAA0B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AKoF,UAAYA,EAES,OAAtBpF,KAAK4L,eACPE,IAAIC,gBAAgB/L,KAAK4L,cACzB5L,KAAK4L,aAAe,MAGC,OAAnB5L,KAAKoF,YACPpF,KAAK4L,aAAeE,IAAIE,gBAAgBhM,KAAKoF,YAG9CpF,KAAKqK,MAAMC,QAA6BtH,IAAuB,QAApB,EAAGhD,KAAK4L,oBAAY,QAAI,GAG9D,iBACL5L,KAAKqK,MAAM4B,SAAsCC,mBAG5C,cACNlM,KAAKuL,WAAW,MAGlB,WACE,MAAO,CACLY,IAAKnM,KAAKoD,IAAI+I,IACdC,MAAOpM,KAAKoF,WAIhB,SAASlB,IACHA,EAAMkI,iBAAiBnE,MAAwB,OAAhB/D,EAAMkI,SACvCpM,KAAKoF,UAAYlB,EAAMkI,SA7C3B,GADC,kB,0BAID,GADC,kB,6BAJkB,EAAoB,GALxC,eAAU,CACThB,WAAY,CACViB,cAAA,WAGiB,WC9B8Z,I,wBCQ/apJ,EAAY,eACd,EACAnD,EACAc,GACA,EACA,KACA,WACA,MAIa,aAAAqC,E,2CCnBf","file":"js/chunk-0a1d925f.e7a1250e.js","sourcesContent":["export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FormVideoUploadField.vue?vue&type=style&index=0&id=6832a9d6&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"recaptcha\",class:{'recaptcha--visible': _vm.recaptchaVersion == 20}},[_c('div',{staticClass:\"g-recaptcha recaptcha__inner\",attrs:{\"id\":'recaptcha_' + _vm.id,\"data-sitekey\":_vm.siteKey,\"data-size\":_vm.recaptchaVersion == 20 ? '' : 'invisible',\"data-callback\":_vm.callbackFunctionName,\"data-expired-callback\":_vm.callbackFunctionName}})])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Vue, Prop } from \"vue-property-decorator\";\r\n\r\nimport { Config, Logger, LogLevel } from \"../services\";\r\nimport { Utils } from \"../util\";\r\n\r\n@Component\r\nexport default class ReCaptcha extends Vue {\r\n private readonly id = Utils.GetGuid();\r\n\r\n private response: string | null = null;\r\n\r\n private responseWaiter: ((value?: string | PromiseLike | undefined) => void) | null = null;\r\n\r\n private siteKey = Config.Website.Settings!.ReCaptcha.ReCaptchaSiteKey;\r\n\r\n private recaptchaVersion = Config.Website.Settings!.ReCaptcha.ReCaptchaVersion;\r\n\r\n get callbackFunctionName() {\r\n return `_recaptcha_callback_${this.id}`;\r\n }\r\n\r\n mounted() {\r\n (window as any)[this.callbackFunctionName] = (response: string | null) => {\r\n Logger.Log(LogLevel.Debug, '[ReCaptcha]', 'Got response');\r\n\r\n this.response = response || null;\r\n\r\n if(this.responseWaiter !== null && this.response !== null) {\r\n this.responseWaiter(this.response);\r\n this.responseWaiter = null;\r\n }\r\n }\r\n\r\n this.loadLibrary().then(() => {\r\n Logger.Log(LogLevel.Info, '[ReCaptcha]', 'Loaded ReCaptcha');\r\n }).catch(() => {\r\n Logger.Log(LogLevel.Error, '[ReCaptcha]', 'Failed to load ReCaptcha');\r\n });\r\n\r\n Logger.Log(LogLevel.Info, '[ReCaptcha]', 'Registered ReCaptcha', this.id);\r\n }\r\n\r\n reset() {\r\n (window as any).grecaptcha.reset();\r\n }\r\n\r\n getResponse(): Promise {\r\n return new Promise((resolve, reject) => {\r\n if(this.response !== null && this.response.length > 0) {\r\n resolve(this.response);\r\n return;\r\n }\r\n\r\n this.responseWaiter = () => {\r\n Logger.Log(LogLevel.Debug, '[ReCaptcha]', 'Resolving response');\r\n resolve();\r\n };\r\n\r\n const win = window as any;\r\n\r\n try {\r\n win.grecaptcha.execute();\r\n } catch (ex) {\r\n Logger.Log(LogLevel.Error, '[ReCaptcha]', 'Error executing recaptcha', ex)\r\n win.grecaptcha.render(`recaptcha_${this.id}`);\r\n win.grecaptcha.execute();\r\n }\r\n });\r\n }\r\n\r\n loadLibrary(): Promise {\r\n return new Promise((resolve, reject) => {\r\n if((window as any).grecaptcha !== undefined) {\r\n Logger.Log(LogLevel.Debug, '[ReCaptcha]', 'ReCaptcha is already defined.');\r\n\r\n resolve(true);\r\n return;\r\n }\r\n \r\n const scr = document.createElement('script');\r\n\r\n (window as any).pl_recaptcha_loaded = () => {\r\n resolve(true);\r\n }\r\n\r\n scr.onerror = () => {\r\n reject();\r\n }\r\n\r\n scr.async = true;\r\n scr.defer = true;\r\n\r\n document.head.appendChild(scr);\r\n\r\n scr.src = 'https://www.google.com/recaptcha/api.js?onload=pl_recaptcha_loaded';\r\n });\r\n }\r\n}\r\n","import mod from \"-!../../cache-loader/dist/cjs.js??ref--14-0!../../thread-loader/dist/cjs.js!../../babel-loader/lib/index.js!../../ts-loader/index.js??ref--14-3!../../cache-loader/dist/cjs.js??ref--0-0!../../vue-loader/lib/index.js??vue-loader-options!./ReCaptcha.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../cache-loader/dist/cjs.js??ref--14-0!../../thread-loader/dist/cjs.js!../../babel-loader/lib/index.js!../../ts-loader/index.js??ref--14-3!../../cache-loader/dist/cjs.js??ref--0-0!../../vue-loader/lib/index.js??vue-loader-options!./ReCaptcha.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./ReCaptcha.vue?vue&type=template&id=95eda1a8&scoped=true&\"\nimport script from \"./ReCaptcha.vue?vue&type=script&lang=ts&\"\nexport * from \"./ReCaptcha.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./ReCaptcha.vue?vue&type=style&index=0&id=95eda1a8&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"95eda1a8\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"video-recorder-wrap\"},[_c('div',{staticClass:\"video-recorder__form-elem\"},[_c('p',{domProps:{\"innerHTML\":_vm._s(_vm.def.Labels.Prompt)}}),(_vm.needsFallback || !_vm.isMobile)?_c('Button',{on:{\"click\":_vm.uploadVideo}},[_vm._v(_vm._s(_vm.def.Labels.Upload || _vm.def.Labels.Record))]):_c('Button',{on:{\"click\":_vm.showRecorder}},[_vm._v(_vm._s(_vm.def.Labels.Record))])],1),_c('portal',{attrs:{\"to\":\"overlays\"}},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.isActive && _vm.ready && !_vm.needsFallback),expression:\"isActive && ready && !needsFallback\"}],staticClass:\"video-recorder\"},[_c('div',{staticClass:\"video-recorder__viewport\"},[_c('div',{staticClass:\"video-recorder__viewport__overlay\"},[_c('span',{staticClass:\"video-recorder__time\",class:{'video-recorder__time--running-out': _vm.isRunningOutatime}},[_vm._v(_vm._s(_vm.formattedTime))])]),_c('video',{ref:\"preview\",staticClass:\"video-recorder__preview\",attrs:{\"autoplay\":\"\",\"muted\":\"\",\"playsinline\":\"\"},domProps:{\"muted\":true}})]),_c('div',{staticClass:\"video-recorder__controls\"},[_c('button',{staticClass:\"video-recorder__control video-recorder__control--text\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.doneRecording}},[_vm._v(\"Done\")]),_c('button',{staticClass:\"video-recorder__control video-recorder__control__start-stop\",class:{'recording': _vm.isRecording},attrs:{\"type\":\"button\"},on:{\"click\":_vm.toggleRecording}}),_c('button',{staticClass:\"video-recorder__control video-recorder__control--text\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.cancelRecording}},[_vm._v(\"Cancel\")])]),(_vm.needsPermissions)?_c('div',{staticClass:\"video-recorder__modal\"},[_c('div',{staticClass:\"video-recorder__modal__icon\"},[_c('svg',{staticClass:\"feather feather-video\",attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"stroke\":\"#333\",\"stroke-width\":\"2\",\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\"}},[_c('polygon',{attrs:{\"points\":\"23 7 16 12 23 17 23 7\"}}),_c('rect',{attrs:{\"x\":\"1\",\"y\":\"5\",\"width\":\"15\",\"height\":\"14\",\"rx\":\"2\",\"ry\":\"2\"}})])]),_c('p',{staticClass:\"video-recorder__modal__message\"},[_vm._v(\" We need permission to use your camera & microphone to continue. \")]),_c('div',{staticClass:\"video-recorder__modal__buttons\"},[_c('button',{staticClass:\"video-recorder__modal__button video-recorder__modal__button--secondary\",on:{\"click\":_vm.cancelRecording}},[_vm._v(\"Cancel\")]),_c('button',{staticClass:\"video-recorder__modal__button\",on:{\"click\":_vm.initVideoStream}},[_vm._v(\"Allow\")])])]):_vm._e(),(_vm.permissionDenied)?_c('div',{staticClass:\"video-recorder__modal\"},[_c('div',{staticClass:\"video-recorder__modal__icon\"},[_c('svg',{staticClass:\"feather feather-video-off\",attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"stroke\":\"#333\",\"stroke-width\":\"2\",\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\"}},[_c('path',{attrs:{\"d\":\"M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10\"}}),_c('line',{attrs:{\"x1\":\"1\",\"y1\":\"1\",\"x2\":\"23\",\"y2\":\"23\"}})])]),_c('p',{staticClass:\"video-recorder__modal__message\"},[_vm._v(\" Permission to access the camera & microphone was denied. \")]),_c('div',{staticClass:\"video-recorder__modal__buttons video-recorder__modal__buttons--centered\"},[_c('button',{staticClass:\"video-recorder__modal__button\",on:{\"click\":_vm.cancelRecording}},[_vm._v(\"Okay\")])])]):_vm._e(),(_vm.hasFatalError)?_c('div',{staticClass:\"video-recorder__modal\"},[_c('div',{staticClass:\"video-recorder__modal__icon\"},[_c('svg',{staticClass:\"feather feather-alert-triangle\",attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"stroke\":\"#333\",\"stroke-width\":\"2\",\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\"}},[_c('path',{attrs:{\"d\":\"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\"}}),_c('line',{attrs:{\"x1\":\"12\",\"y1\":\"9\",\"x2\":\"12\",\"y2\":\"13\"}}),_c('line',{attrs:{\"x1\":\"12\",\"y1\":\"17\",\"x2\":\"12.01\",\"y2\":\"17\"}})])]),_c('p',{staticClass:\"video-recorder__modal__message\"},[_vm._v(\" An error occurred. \")]),_c('p',{staticClass:\"video-recorder__modal__message\"},[_vm._v(\" \"+_vm._s(_vm.fatalErrorMessage)+\" \")]),_c('div',{staticClass:\"video-recorder__modal__buttons video-recorder__modal__buttons--centered\"},[_c('button',{staticClass:\"video-recorder__modal__button\",on:{\"click\":_vm.cancelRecording}},[_vm._v(\"Okay\")])])]):_vm._e()])])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Vue, Prop } from \"vue-property-decorator\";\r\n\r\nimport { Config, Logger, LogLevel } from \"../services\";\r\nimport { VideoRecorderField } from \"../types/Forms/FieldTypes\";\r\n\r\ninterface VideoCaptureConfig {\r\n codec: string;\r\n}\r\n\r\n@Component\r\nexport default class VideoRecorder extends Vue {\r\n @Prop()\r\n private readonly def!: VideoRecorderField;\r\n\r\n private isActive = false;\r\n\r\n private ready = false;\r\n\r\n private needsFallback = false;\r\n\r\n private get isMobile(): boolean {\r\n return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);\r\n }\r\n\r\n private needsPermissions = false;\r\n\r\n private hasNoDevices = false;\r\n\r\n private permissionDenied = false;\r\n\r\n private hasFatalError = false;\r\n \r\n private fatalErrorMessage = '';\r\n\r\n private isRecording = false;\r\n\r\n private videoBlob: Blob | null = null;\r\n\r\n private outatimeThreshold: number | null = null;\r\n\r\n private captureConfig: VideoCaptureConfig | null = null;\r\n\r\n private currentTime = 0;\r\n\r\n private currentTimeInterval: number | null = null;\r\n\r\n private videoStream: MediaStream | null = null;\r\n\r\n private mediaRecorder: MediaRecorder | null = null;\r\n\r\n private capturedChunks: Blob[] = [];\r\n\r\n get formattedTime(): string {\r\n let mins: string | number = Math.floor(this.currentTime / 60);\r\n let secs: string | number = this.currentTime - (mins * 60);\r\n\r\n let totalMins: string | number = Math.floor(this.def.MaxRecordLength / 60);\r\n let totalSecs: string | number = this.def.MaxRecordLength - (totalMins * 60);\r\n\r\n if (secs < 10) secs = \"0\" + secs;\r\n if (totalSecs < 10) totalSecs = \"0\" + totalSecs;\r\n\r\n return mins + \":\" + secs + \" / \" + totalMins + \":\" + totalSecs;\r\n }\r\n\r\n get isRunningOutatime(): boolean {\r\n return this.currentTime >= this.def.MaxRecordLength * 0.75;\r\n }\r\n\r\n mounted() {\r\n\r\n if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent) === false) {\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'Falling back to upload on a non-mobile device.');\r\n\r\n this.fallback();\r\n return;\r\n }\r\n\r\n if ('MediaRecorder' in window && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices) {\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'MediaRecorder, enumerateDevices are supported');\r\n\r\n navigator.mediaDevices.enumerateDevices().then((availableDevices) => {\r\n\r\n if (availableDevices.some((device) => device.kind === 'videoinput')) {\r\n\r\n // Check that the permissions API is supported\r\n if('permissions' in navigator) {\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'Attempting to determine if camera permissions are granted');\r\n\r\n try {\r\n // Check to see if we have permission to use the camera\r\n navigator.permissions.query({ name: \"camera\" }).then(res => {\r\n if(res.state !== 'granted') {\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'Camera permissions not yet granted');\r\n \r\n // If the state is not granted, we need to ask for permissions\r\n this.ready = true;\r\n this.needsPermissions = true;\r\n } else {\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'Camera permissions granted');\r\n\r\n this.ready = true;\r\n }\r\n });\r\n } catch (ex) {\r\n Logger.Log(LogLevel.Warning, '[Video Recorder]', 'Failed to get camera permissions state', ex);\r\n\r\n // Error checking for permissions\r\n this.needsPermissions = true;\r\n }\r\n } else {\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'Permissions API not supported. Requesting permissions manually.');\r\n\r\n // The permissions API isn't supported\r\n this.needsPermissions = true;\r\n }\r\n\r\n } else {\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'No videoinput devices are available. Falling back to traditional methods.');\r\n this.fallback();\r\n }\r\n\r\n }).catch((err) => {\r\n Logger.Log(LogLevel.Error, '[Video Recorder]', 'Failed to enumerate media devices', err);\r\n\r\n this.fallback();\r\n });\r\n } else {\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'MediaRecorder is not supported, falling back to traditional upload mechanisms');\r\n\r\n this.fallback();\r\n }\r\n }\r\n\r\n private toggleRecording(): void {\r\n if (this.isRecording) {\r\n this.stopRecording();\r\n } else {\r\n this.startRecording();\r\n }\r\n }\r\n\r\n private initCaptureConfig(): void {\r\n const codecs = [\r\n \"video/mp4\",\r\n \"video/mpeg\",\r\n \"video/webm;codecs=h264\",\r\n \"video/webm\",\r\n \"video/webm;codecs=vp8\",\r\n \"video/webm;codecs=daala\"\r\n ];\r\n\r\n this.captureConfig = {\r\n codec: ''\r\n };\r\n\r\n for (var i = 0; i < codecs.length; i += 1) {\r\n if (MediaRecorder.isTypeSupported(codecs[i])) {\r\n this.captureConfig.codec = codecs[i];\r\n break;\r\n }\r\n }\r\n\r\n if (this.captureConfig.codec.length === 0) {\r\n throw new Error('Unable to find a suitable codec.');\r\n }\r\n\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', `Using codec ${codecs[i]}`)\r\n }\r\n\r\n private startRecording() {\r\n if (this.isRecording) return;\r\n\r\n this.isRecording = true;\r\n\r\n this.initVideoStream().then(() => {\r\n this.capturedChunks = [];\r\n\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'Start Recording');\r\n\r\n if (this.mediaRecorder === null) {\r\n\r\n if (this.captureConfig === null) {\r\n try {\r\n this.initCaptureConfig();\r\n } catch (ex) {\r\n Logger.Log(LogLevel.Error, '[Video Recorder]', 'Failed to initialise capture config.');\r\n \r\n this.fallback();\r\n\r\n return;\r\n }\r\n }\r\n\r\n this.mediaRecorder = new MediaRecorder(this.videoStream!, {\r\n mimeType: this.captureConfig!.codec\r\n });\r\n\r\n this.mediaRecorder.ondataavailable = (e: BlobEvent) => {\r\n this.capturedChunks.push(e.data);\r\n }\r\n\r\n this.mediaRecorder.onstop = () => {\r\n this.videoBlob = new Blob(this.capturedChunks, { type: this.captureConfig!.codec });\r\n\r\n this.isRecording = false;\r\n\r\n window.clearInterval(this.currentTimeInterval!);\r\n this.currentTime = 0;\r\n\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'Stopped recording');\r\n\r\n this.doneRecording();\r\n }\r\n\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'Initialised MediaRecorder', this.mediaRecorder);\r\n }\r\n\r\n this.currentTime = 0;\r\n\r\n this.mediaRecorder.start();\r\n\r\n this.currentTimeInterval = window.setInterval(() => {\r\n this.currentTime += 1;\r\n \r\n if (this.currentTime >= this.def.MaxRecordLength) {\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'Outatime 🔥 (stopping recording)');\r\n this.stopRecording();\r\n }\r\n }, 1000);\r\n });\r\n }\r\n\r\n private stopRecording(): void {\r\n this.mediaRecorder!.stop();\r\n }\r\n\r\n private doneRecording(): void {\r\n this.hideRecorder();\r\n\r\n this.$emit('done', this.videoBlob);\r\n }\r\n\r\n private cancelRecording(): void {\r\n if (this.isRecording) {\r\n this.stopRecording();\r\n }\r\n\r\n this.doneRecording();\r\n }\r\n\r\n private createFileInput(): HTMLInputElement {\r\n const fi = document.createElement('input');\r\n\r\n fi.type = 'file';\r\n fi.accept = 'video/mp4';\r\n\r\n fi.setAttribute('capture', 'environment');\r\n\r\n fi.style.display = 'none';\r\n\r\n return fi as HTMLInputElement;\r\n }\r\n\r\n private fallback(): void {\r\n this.ready = false;\r\n this.needsFallback = true;\r\n }\r\n\r\n private uploadVideo(): void {\r\n const fi = this.createFileInput();\r\n\r\n fi.onchange = () => {\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'File value changed', fi.files);\r\n\r\n if (fi.files!.length) {\r\n const file = fi.files![0];\r\n\r\n if(file.size > this.def.MaxFileSize) {\r\n alert(`The selected file excedes the maximum allowable file size of ${this.def.FormattedMaxFileSize}. Please select a different video to continue.`);\r\n } else {\r\n this.videoBlob = fi.files![0];\r\n\r\n this.doneRecording();\r\n }\r\n \r\n fi.remove();\r\n }\r\n };\r\n\r\n fi.onblur = () => {\r\n setTimeout(() => {\r\n \r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'Removing file input node');\r\n\r\n fi.remove();\r\n }, 100);\r\n }\r\n\r\n document.body.appendChild(fi);\r\n\r\n fi.click();\r\n }\r\n\r\n private hideRecorder(): void {\r\n if (this.videoStream !== null) {\r\n this.videoStream!.getTracks().forEach(function(track) {\r\n track.stop();\r\n });\r\n\r\n this.videoStream = null;\r\n this.mediaRecorder = null;\r\n }\r\n\r\n this.isActive = false;\r\n }\r\n\r\n private showRecorder(): void {\r\n this.initVideoStream().then(() => {\r\n this.isActive = true;\r\n }).catch(() => {\r\n this.needsFallback = true;\r\n });\r\n }\r\n\r\n private initVideoStream(): Promise {\r\n return new Promise((resolve, reject) => {\r\n if (this.videoStream !== null) {\r\n this.needsPermissions = false;\r\n resolve();\r\n return;\r\n }\r\n\r\n const constraints = { audio: true, video: { width: 1280, height: 720 } }; \r\n\r\n navigator.mediaDevices.getUserMedia(constraints).then((mediaStream) => {\r\n\r\n Logger.Log(LogLevel.Debug, '[Video Recorder]', 'Successfully obtained MediaStream');\r\n\r\n this.ready = true;\r\n\r\n this.videoStream = mediaStream;\r\n\r\n this.needsPermissions = false;\r\n\r\n (this.$refs.preview as HTMLVideoElement).srcObject = this.videoStream;\r\n\r\n resolve();\r\n\r\n }).catch((ex) => {\r\n\r\n Logger.Log(LogLevel.Error, '[Video Recorder]', 'Failed to obtain MediaStream', ex.name, ex.message);\r\n\r\n switch (ex.name) {\r\n case \"NotFoundError\":\r\n\r\n this.hasNoDevices = true;\r\n\r\n // Fall back to requesting a normal upload\r\n this.fallback();\r\n\r\n break;\r\n case \"NotAllowedError\":\r\n\r\n this.permissionDenied = true;\r\n\r\n break;\r\n }\r\n\r\n reject();\r\n });\r\n });\r\n }\r\n\r\n requestRecording(): void {\r\n if (this.needsFallback) {\r\n this.uploadVideo();\r\n } else {\r\n this.showRecorder();\r\n }\r\n }\r\n}\r\n","import mod from \"-!../../cache-loader/dist/cjs.js??ref--14-0!../../thread-loader/dist/cjs.js!../../babel-loader/lib/index.js!../../ts-loader/index.js??ref--14-3!../../cache-loader/dist/cjs.js??ref--0-0!../../vue-loader/lib/index.js??vue-loader-options!./VideoRecorder.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../cache-loader/dist/cjs.js??ref--14-0!../../thread-loader/dist/cjs.js!../../babel-loader/lib/index.js!../../ts-loader/index.js??ref--14-3!../../cache-loader/dist/cjs.js??ref--0-0!../../vue-loader/lib/index.js??vue-loader-options!./VideoRecorder.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./VideoRecorder.vue?vue&type=template&id=52ca9bb4&scoped=true&\"\nimport script from \"./VideoRecorder.vue?vue&type=script&lang=ts&\"\nexport * from \"./VideoRecorder.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./VideoRecorder.vue?vue&type=style&index=0&id=52ca9bb4&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"52ca9bb4\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../vue-loader/lib/loaders/stylePostLoader.js!../../postcss-loader/src/index.js??ref--6-oneOf-1-2!../../cache-loader/dist/cjs.js??ref--0-0!../../vue-loader/lib/index.js??vue-loader-options!./VideoRecorder.vue?vue&type=style&index=0&id=52ca9bb4&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"map\"},[(_vm.settings)?[(_vm.config.MapProvider == 2)?_c('MapBoxMap',{ref:\"map\",attrs:{\"map-settings\":_vm.settings},on:{\"moved\":function($event){return _vm.$emit('moved', $event)}}}):_vm._e()]:_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\r\nimport { Component, Vue, Prop } from \"vue-property-decorator\";\r\nimport { Coordinate, MapSettings } from \"../../types\";\r\nimport { Config } from \"../../services/Config\";\r\n\r\n\r\nconst MapBoxMap = () => import(\"./Providers/MapBoxMap.vue\");\r\n\r\n@Component({\r\n components: {\r\n MapBoxMap,\r\n },\r\n})\r\nexport default class Map extends Vue {\r\n @Prop()\r\n private readonly settings!: MapSettings;\r\n\r\n private config = Config.Website.Settings!.MapProvider;\r\n\r\n public SetCenter(center: Coordinate, zoom: number) {\r\n (this.$refs.map as any).SetCenter(center, zoom);\r\n }\r\n\r\n public GetZoom(): number {\r\n return (this.$refs.map as any).GetZoom();\r\n }\r\n}\r\n","import mod from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../ts-loader/index.js??ref--14-3!../../../cache-loader/dist/cjs.js??ref--0-0!../../../vue-loader/lib/index.js??vue-loader-options!./Map.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../ts-loader/index.js??ref--14-3!../../../cache-loader/dist/cjs.js??ref--0-0!../../../vue-loader/lib/index.js??vue-loader-options!./Map.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Map.vue?vue&type=template&id=5d1f1668&scoped=true&\"\nimport script from \"./Map.vue?vue&type=script&lang=ts&\"\nexport * from \"./Map.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Map.vue?vue&type=style&index=0&id=5d1f1668&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5d1f1668\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../vue-loader/lib/loaders/stylePostLoader.js!../../../postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../cache-loader/dist/cjs.js??ref--0-0!../../../vue-loader/lib/index.js??vue-loader-options!./Map.vue?vue&type=style&index=0&id=5d1f1668&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-field\",class:[{'has-errors': _vm.hasErrors}, 'form-field--' + _vm.def.TypeName]},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.videoBlob === null),expression:\"videoBlob === null\"}],staticClass:\"form-field__panel\"},[_c('VideoRecorder',{ref:\"recorder\",attrs:{\"def\":_vm.def},on:{\"done\":_vm.handleDone}})],1),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.videoBlob !== null),expression:\"videoBlob !== null\"}],staticClass:\"form-field__panel\"},[_c('div',{staticClass:\"video-preview\"},[_c('video',{ref:\"preview\",staticClass:\"video-preview__video\",attrs:{\"autoplay\":\"\",\"controls\":\"\"}})]),_c('div',{staticClass:\"center-text\"},[_c('Button',{staticClass:\"video-field__swap-buttons\",on:{\"click\":_vm.deleteVideo}},[_vm._v(_vm._s(_vm.def.Labels.Delete))]),_c('Button',{staticClass:\"video-field__swap-buttons\",on:{\"click\":_vm.recordNewVideo}},[_vm._v(_vm._s(_vm.def.Labels.Replace))])],1)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue, Prop } from 'vue-property-decorator';\nimport { VideoRecorderField, IFormField } from 'client-website-ts-library/types/Forms/FieldTypes';\nimport { FormSubmissionValidationError, FormValue } from 'client-website-ts-library/types/Forms';\n\nimport { VideoRecorder } from 'client-website-ts-library/components';\n\n@Component({\n components: {\n VideoRecorder,\n },\n})\nexport default class FormVideoUploadField extends Vue implements IFormField {\n @Prop()\n private readonly def!: VideoRecorderField;\n\n @Prop()\n private readonly errors!: FormSubmissionValidationError[];\n\n private videoBlob: Blob | null = null;\n\n private videoBlobUrl: string | null = null;\n\n get hasErrors(): boolean {\n return this.errors.length > 0;\n }\n\n private handleDone(videoBlob: Blob | null) {\n this.videoBlob = videoBlob;\n\n if (this.videoBlobUrl !== null) {\n URL.revokeObjectURL(this.videoBlobUrl!);\n this.videoBlobUrl = null;\n }\n\n if (this.videoBlob !== null) {\n this.videoBlobUrl = URL.createObjectURL(this.videoBlob);\n }\n\n (this.$refs.preview as HTMLVideoElement).src = this.videoBlobUrl ?? '';\n }\n\n private recordNewVideo() {\n (this.$refs.recorder as unknown as VideoRecorder).requestRecording();\n }\n\n private deleteVideo(): void {\n this.handleDone(null);\n }\n\n getValue(): FormValue {\n return {\n Key: this.def.Key,\n Value: this.videoBlob,\n };\n }\n\n setValue(value: FormValue) {\n if (value.Value instanceof Blob || value.Value === null) {\n this.videoBlob = value.Value;\n }\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FormVideoUploadField.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FormVideoUploadField.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./FormVideoUploadField.vue?vue&type=template&id=6832a9d6&scoped=true&\"\nimport script from \"./FormVideoUploadField.vue?vue&type=script&lang=ts&\"\nexport * from \"./FormVideoUploadField.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./FormVideoUploadField.vue?vue&type=style&index=0&id=6832a9d6&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6832a9d6\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../vue-loader/lib/loaders/stylePostLoader.js!../../postcss-loader/src/index.js??ref--6-oneOf-1-2!../../cache-loader/dist/cjs.js??ref--0-0!../../vue-loader/lib/index.js??vue-loader-options!./ReCaptcha.vue?vue&type=style&index=0&id=95eda1a8&scoped=true&lang=css&\""],"sourceRoot":""}