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E7B,MAAO,GAAGqC,GAAsB,KAAMoB,WAAmC,IAAvBpB,EAA2B,SAAW,uBAA0B","sources":["webpack:///./node_modules/classnames/index.js","webpack:///./node_modules/prop-types/factoryWithThrowingShims.js","webpack:///./node_modules/prop-types/index.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./assets/common/src/components/utils/ThronVideo.tsx","webpack:///./assets/common/src/utils/useBreakpoint.ts","webpack:///./assets/moncler/src/components/experience/StandaloneFullVideo.tsx","webpack:///./assets/moncler/src/components/experience/VideoProgressBar.tsx"],"sourcesContent":["/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","import classNames from 'classnames';\nimport React, { useEffect, useRef, useState } from 'react';\nimport ThronIntegrationComponent from './../../scripts/components/thronIntegrationComponent';\nconst ThronVideo = (props) => {\n const videoRef = useRef();\n const [thronComponent, setThronComponent] = useState(null);\n useEffect(() => {\n if (videoRef.current) {\n if (thronComponent) {\n thronComponent.changeContent(props.thronID);\n }\n else {\n const options = {};\n props.onPauseCallback && (options.onPauseCallback = props.onPauseCallback);\n props.onPlayCallback && (options.onPlayCallback = props.onPlayCallback);\n props.onCompleteCallback && (options.onCompleteCallback = props.onCompleteCallback);\n props.onInitCallback && (options.onInitCallback = props.onInitCallback);\n props.onTimeUpdate && (options.onTimeUpdate = props.onTimeUpdate);\n typeof props.loopTimes === 'number' && (options.loopTimes = props.loopTimes);\n const newThronComponent = new ThronIntegrationComponent(videoRef.current, options);\n setThronComponent(newThronComponent);\n }\n }\n }, [props.thronID]);\n return (React.createElement(\"div\", { ref: videoRef, \"aria-hidden\": \"true\", className: classNames('video-wrapper', props.className), \"data-option-id\": props.thronID, \"data-option-mobile-id\": props === null || props === void 0 ? void 0 : props.thronMobileID, \"data-option-muted\": props.muted, \"data-option-autoplay\": props.autoplay, \"data-option-loop\": props.loop, \"data-option-lock-bitrate\": props.lockBitrate, \"data-option-no-skin\": props.noskin, \"data-option-sess-id\": props.sessionId }));\n};\nexport default ThronVideo;\n","import { useEffect, useState } from 'react';\nconst getInitialBreakpointValue = () => {\n var _a;\n // get initial breakpoint is called before the page is fully loaded and innerWith may be 0. windows.mqObj may not be set\n const mediaQueries = window.mqObj;\n const documentWidth = window.innerWidth || ((_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.width);\n if (documentWidth == 0 || !mediaQueries) {\n return;\n }\n const filtered = Object.keys(mediaQueries).filter((key) => mediaQueries[key] <= documentWidth);\n const initalBr = filtered.length ? mediaQueries[filtered[filtered.length - 1]] : mediaQueries['xs'];\n // console.info('[getInitialBreakpointValue]: ', documentWidth, initalBr);\n return initalBr;\n};\nconst mediaQueries = Object.assign({ ' {\n const [currentBreakpoint, setCurrentBreakpoint] = useState(getInitialBreakpointValue());\n const getCurrentBreakpoint = () => {\n var _a;\n const documentWidth = window.innerWidth || ((_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.width);\n if (documentWidth == 0) {\n return;\n }\n const filtered = Object.keys(mediaQueries).filter((key) => mediaQueries[key] <= documentWidth);\n return mediaQueries[filtered[filtered.length - 1]];\n };\n const handleResize = () => {\n const currentBr = getCurrentBreakpoint();\n if (currentBr && currentBr !== currentBreakpoint) {\n // console.info('%c[React - Breakpoint change] ', 'color: green;font-weight: bold;', currentBr);\n setCurrentBreakpoint(currentBr);\n }\n };\n // const debounceResize = () => {\n // handleResize();\n // };\n useEffect(() => {\n window.addEventListener('resize', handleResize);\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n });\n return currentBreakpoint;\n};\nexport default useBreakpoint;\n","import React, { useEffect, useState, useRef } from 'react';\nimport VideoProgressBar from './VideoProgressBar';\nimport ThronVideo from '@components/utils/ThronVideo';\nimport '@moncler/scss/components/editorial-video-simplified/component-editorial-video-simplified.scss';\nimport useBreakpoint from '@utils/useBreakpoint';\nimport FocusTrap from 'focus-trap-react';\nconst StandaloneFullVideo = (props) => {\n const currentBreakpoint = useBreakpoint();\n const { eventName, thronid, mobileThronid } = props;\n const [activeThronID, setActiveThronID] = useState(thronid);\n const [active, setActive] = useState(false);\n const activeRef = useRef(false);\n const [playerStatus, setPlayerStatus] = useState(false);\n const videoRef = useRef();\n useEffect(() => {\n window.addEventListener(eventName, activateComponent);\n return () => {\n window.removeEventListener(eventName, activateComponent);\n };\n }, []);\n useEffect(() => {\n setActiveThronID(currentBreakpoint <= window.mqObj.sm && mobileThronid ? mobileThronid : thronid);\n }, [currentBreakpoint]);\n useEffect(() => {\n activeRef.current = active; // Ugly workaround, but thron's TS component callbacks are closured\n if (!active) {\n setPlayerStatus(null);\n }\n }, [active]);\n const activateComponent = () => {\n var _a, _b, _c;\n setActive(true);\n (_a = document.querySelector('header')) === null || _a === void 0 ? void 0 : _a.classList.add('video-full-screen');\n document.body.style.overflowY = 'hidden';\n (_c = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.closest('.video-module')) === null || _c === void 0 ? void 0 : _c.classList.add('full-screen');\n };\n const deactivateComponent = () => {\n var _a, _b;\n setActive(false);\n (_a = document.querySelector('header')) === null || _a === void 0 ? void 0 : _a.classList.remove('video-full-screen');\n document.body.style.overflowY = 'scroll';\n (_b = videoRef.current.closest('.video-module')) === null || _b === void 0 ? void 0 : _b.classList.remove('full-screen');\n };\n if (!active) {\n return React.createElement(React.Fragment, null);\n }\n return (React.createElement(FocusTrap, null,\n React.createElement(\"div\", { ref: videoRef, className: \"video-module__inner-container video-container video-opened\" },\n activeThronID && (React.createElement(ThronVideo, { thronID: activeThronID, onTimeUpdate: (playerInstance) => {\n if (activeRef.current) {\n setPlayerStatus(playerInstance.status());\n }\n } })),\n React.createElement(\"button\", { className: \"close-icon\", onClick: deactivateComponent }),\n React.createElement(VideoProgressBar, { playerStatus: playerStatus, videoRef: videoRef.current, hidden: !active }))));\n};\nexport default StandaloneFullVideo;\n","import React, { useState, useEffect } from 'react';\nimport classNames from 'classnames';\nconst VideoProgressBar = (props) => {\n const { playerStatus, videoRef, hidden } = props;\n const [progressPercentage, setProgressPercentage] = useState(0);\n useEffect(() => {\n if (playerStatus) {\n setProgressPercentage((playerStatus.currentTime / playerStatus.duration) * 100);\n if (playerStatus.playing) {\n videoRef.querySelector('.play-pause-button').setAttribute('aria-pressed', 'false');\n }\n }\n else {\n setProgressPercentage(0);\n }\n }, [playerStatus]);\n useEffect(() => {\n if (hidden) {\n setProgressPercentage(0);\n }\n }, [hidden]);\n const handleClickProgressBar = (e) => {\n let rect = e.target.getBoundingClientRect();\n let x = e.clientX - rect.left;\n let progressBarPercentage = (x / e.target.clientWidth) * 100;\n let timeToSet = (progressBarPercentage / 100) * playerStatus.duration;\n videoRef.querySelector('.th-video-element video').currentTime = timeToSet;\n setProgressPercentage(progressBarPercentage);\n };\n const handleDragProgressbar = (e) => {\n let rect = e.target.getBoundingClientRect();\n let x = e.changedTouches[0].clientX - rect.left;\n let progressBarPercentage = (x / e.target.clientWidth) * 100;\n let timeToSet = (progressBarPercentage / 100) * playerStatus.duration;\n videoRef.querySelector('.th-video-element video').currentTime = timeToSet;\n setProgressPercentage(progressBarPercentage);\n };\n return (React.createElement(\"div\", { className: classNames('video-module__controls', { hidden: hidden }) },\n React.createElement(\"button\", { \"data-pause\": true, \"aria-pressed\": \"false\", type: \"button\", \"aria-label\": \"play-pause\", className: classNames('play-pause-button') }),\n React.createElement(\"button\", { \"data-mute\": true, \"aria-pressed\": \"false\", type: \"button\", \"aria-label\": \"volume\", className: classNames('volume-button') }),\n React.createElement(\"button\", { className: \"progress-bar-wrapper\", onClick: (e) => handleClickProgressBar(e), onTouchEnd: (e) => handleDragProgressbar(e) },\n React.createElement(\"div\", { className: \"progress-bar\" }, !hidden && React.createElement(\"span\", { className: \"progress\", style: { width: `${progressPercentage || 0}%`, transition: progressPercentage === 0 ? 'all 0s' : 'all 0.2s linear' } })))));\n};\nexport default VideoProgressBar;\n"],"names":["hasOwn","hasOwnProperty","classNames","classes","i","arguments","length","arg","argType","push","Array","isArray","inner","apply","toString","Object","prototype","key","call","join","module","exports","default","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","name","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","videoRef","useRef","thronComponent","setThronComponent","useState","useEffect","current","changeContent","thronID","options","onPauseCallback","onPlayCallback","onCompleteCallback","onInitCallback","onTimeUpdate","loopTimes","newThronComponent","ref","className","thronMobileID","muted","autoplay","loop","lockBitrate","noskin","sessionId","mediaQueries","assign","window","mqObj","currentBreakpoint","setCurrentBreakpoint","_a","documentWidth","innerWidth","visualViewport","width","filtered","keys","filter","getInitialBreakpointValue","handleResize","currentBr","getCurrentBreakpoint","addEventListener","removeEventListener","eventName","thronid","mobileThronid","activeThronID","setActiveThronID","active","setActive","activeRef","playerStatus","setPlayerStatus","activateComponent","sm","_b","_c","document","querySelector","classList","add","body","style","overflowY","closest","playerInstance","status","onClick","remove","hidden","progressPercentage","setProgressPercentage","currentTime","duration","playing","setAttribute","type","e","rect","target","getBoundingClientRect","progressBarPercentage","clientX","left","clientWidth","timeToSet","handleClickProgressBar","onTouchEnd","changedTouches","handleDragProgressbar","transition"],"sourceRoot":""}