mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-28 19:10:30 +00:00
1 line
No EOL
1.2 MiB
1 line
No EOL
1.2 MiB
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/api.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/relative_timestamp.js","webpack:///./node_modules/react-redux-loading-bar/build/loading_bar_ducks.js","webpack:///./node_modules/react-swipeable-views-core/node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./node_modules/react-motion/lib/Motion.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/actions/importer/normalizer.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/api.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/locales/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/is_mobile.js","webpack:///./node_modules/classnames/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/containers/media_container.js","webpack:///./node_modules/react-redux/es/components/Context.js","webpack:///./node_modules/react-redux/es/utils/batch.js","webpack:///./node_modules/react-redux/es/utils/Subscription.js","webpack:///./node_modules/react-redux/es/components/Provider.js","webpack:///./node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js","webpack:///./node_modules/react-redux/es/components/connectAdvanced.js","webpack:///./node_modules/react-redux/es/utils/shallowEqual.js","webpack:///./node_modules/react-redux/es/connect/wrapMapToProps.js","webpack:///./node_modules/react-redux/es/connect/mapDispatchToProps.js","webpack:///./node_modules/react-redux/es/connect/mapStateToProps.js","webpack:///./node_modules/react-redux/es/connect/mergeProps.js","webpack:///./node_modules/react-redux/es/connect/selectorFactory.js","webpack:///./node_modules/react-redux/es/connect/connect.js","webpack:///./node_modules/react-redux/es/hooks/useReduxContext.js","webpack:///./node_modules/react-redux/es/hooks/useStore.js","webpack:///./node_modules/react-redux/es/hooks/useDispatch.js","webpack:///./node_modules/react-redux/es/hooks/useSelector.js","webpack:///./node_modules/react-redux/es/index.js","webpack:///./node_modules/react-immutable-proptypes/dist/ImmutablePropTypes.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/is_mobile.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/actions/importer/index.js","webpack:///./node_modules/lodash/_baseGetTag.js","webpack:///./node_modules/lodash/isObjectLike.js","webpack:///./node_modules/lodash/_Symbol.js","webpack:///./node_modules/blurhash/dist/error.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/initial_state.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/actions/importer/index.js","webpack:///./node_modules/react-immutable-pure-component/lib/react-immutable-pure-component.es.js","webpack:///./node_modules/http-link-header/lib/link.js","webpack:///./node_modules/symbol-observable/es/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/html.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/actions/importer/normalizer.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/initial_state.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/components/permalink.js","webpack:///./node_modules/blurhash/dist/index.js","webpack:///./node_modules/react-swipeable-views/lib/index.js","webpack:///./node_modules/lodash/isSymbol.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/utils/html.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/audio/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/audio/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/components/icon.js","webpack:///./node_modules/dom-helpers/events/on.js","webpack:///./node_modules/dom-helpers/events/off.js","webpack:///./node_modules/axios/lib/helpers/bind.js","webpack:///./node_modules/axios/lib/helpers/buildURL.js","webpack:///./node_modules/axios/lib/cancel/isCancel.js","webpack:///./node_modules/axios/lib/defaults.js","webpack:///./node_modules/axios/lib/adapters/xhr.js","webpack:///./node_modules/axios/lib/core/createError.js","webpack:///./node_modules/axios/lib/core/mergeConfig.js","webpack:///./node_modules/axios/lib/cancel/Cancel.js","webpack:///./node_modules/react-redux-loading-bar/build/loading_bar.js","webpack:///./node_modules/blurhash/dist/base83.js","webpack:///./node_modules/blurhash/dist/utils.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./node_modules/react-swipeable-views-core/lib/constant.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/emoji/unicode_to_filename.js","webpack:///./node_modules/wavesurfer.js/dist/wavesurfer.js","webpack:///./node_modules/symbol-observable/es/ponyfill.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/fullscreen.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/ui/util/fullscreen.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/icon.js","webpack:///./node_modules/dom-helpers/transition/properties.js","webpack:///./node_modules/lodash/_freeGlobal.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/components/gifv.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/gifv.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/permalink.js","webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/idna.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/ui/components/zoomable_image.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/ui/components/image_loader.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/ui/components/media_modal.js","webpack:///./node_modules/wicg-inert/src/inert.js","webpack:///(webpack)/buildin/harmony-module.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/emoji/unicode_to_filename.js","webpack:///./node_modules/axios/lib/axios.js","webpack:///./node_modules/axios/lib/core/Axios.js","webpack:///./node_modules/axios/lib/core/InterceptorManager.js","webpack:///./node_modules/axios/lib/core/dispatchRequest.js","webpack:///./node_modules/axios/lib/core/transformData.js","webpack:///./node_modules/axios/lib/helpers/normalizeHeaderName.js","webpack:///./node_modules/axios/lib/core/settle.js","webpack:///./node_modules/axios/lib/core/enhanceError.js","webpack:///./node_modules/axios/lib/core/buildFullPath.js","webpack:///./node_modules/react-motion/lib/spring.js","webpack:///./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack:///./node_modules/axios/lib/helpers/combineURLs.js","webpack:///./node_modules/axios/lib/helpers/parseHeaders.js","webpack:///./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack:///./node_modules/axios/lib/helpers/isValidXss.js","webpack:///./node_modules/axios/lib/helpers/cookies.js","webpack:///./node_modules/axios/lib/cancel/CancelToken.js","webpack:///./node_modules/axios/lib/helpers/spread.js","webpack:///./node_modules/lodash/now.js","webpack:///./node_modules/lodash/toNumber.js","webpack:///./node_modules/lodash/_getRawTag.js","webpack:///./node_modules/lodash/_objectToString.js","webpack:///./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js","webpack:///./node_modules/react-redux-loading-bar/build/loading_bar_middleware.js","webpack:///./node_modules/react-redux-loading-bar/build/immutable.js","webpack:///./node_modules/react-motion/lib/mapToZero.js","webpack:///./node_modules/react-motion/lib/stripStyle.js","webpack:///./node_modules/react-motion/lib/stepper.js","webpack:///./node_modules/react-motion/node_modules/performance-now/lib/performance-now.js","webpack:///./node_modules/raf/index.js","webpack:///./node_modules/performance-now/lib/performance-now.js","webpack:///./node_modules/react-motion/lib/shouldStopAnimation.js","webpack:///./node_modules/react-motion/lib/presets.js","webpack:///./node_modules/blurhash/dist/decode.js","webpack:///./node_modules/blurhash/dist/encode.js","webpack:///./node_modules/react-swipeable-views/lib/SwipeableViews.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/objectWithoutProperties.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/classCallCheck.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/createClass.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/typeof.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/inherits.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:///./node_modules/react-swipeable-views-core/lib/index.js","webpack:///./node_modules/react-swipeable-views-core/lib/checkIndexBounds.js","webpack:///./node_modules/react-swipeable-views-core/lib/computeIndex.js","webpack:///./node_modules/axios/lib/utils.js","webpack:///./node_modules/react-swipeable-views-core/lib/getDisplaySameSlide.js","webpack:///./node_modules/react-swipeable-views-core/lib/mod.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/components/icon_button.js","webpack:///./node_modules/history/es/warnAboutDeprecatedESMImport.js","webpack:///./node_modules/history/es/createBrowserHistory.js","webpack:///./node_modules/immutable/dist/immutable.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/scrollbar.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/components/modal_root.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/utils/scrollbar.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/modal_root.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/ui/components/zoomable_image.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/ui/components/image_loader.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/ui/components/media_modal.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/actions/polls.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/poll.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./node_modules/escape-html/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/icon_button.js","webpack:///./node_modules/lodash/throttle.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/emoji/emoji.js","webpack:///./node_modules/react-redux-loading-bar/build/index.js","webpack:///./node_modules/axios/index.js","webpack:///./node_modules/lodash/debounce.js","webpack:///./node_modules/detect-passive-events/lib/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/emoji/index.js","webpack:///./node_modules/warning/warning.js","webpack:///./node_modules/lodash/_root.js","webpack:///./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/containers/media_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.js","webpack:///./node_modules/redux/es/redux.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/video/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/video/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/reduced_motion.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/optional_motion.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/emoji/emoji_unicode_mapping_light.js","webpack:///./node_modules/dom-helpers/util/inDOM.js","webpack:///./node_modules/lodash/isObject.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/ui/util/reduced_motion.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/ui/util/optional_motion.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/components/relative_timestamp.js"],"names":["getLinks","response","value","headers","link","LinkHeader","parse","refs","getState","axios","create","getIn","transformResponse","data","JSON","Exception","messages","defineMessages","just_now","seconds","minutes","hours","days","moments_remaining","seconds_remaining","minutes_remaining","hours_remaining","days_remaining","dateFormatOptions","hour12","year","month","day","hour","minute","shortDateFormatOptions","DAY","timeAgoString","intl","date","now","delta","getTime","formatMessage","number","Math","floor","getFullYear","formatDate","RelativeTimestamp","injectIntl","props","shouldComponentUpdate","nextProps","nextState","this","timestamp","locale","state","componentWillReceiveProps","setState","componentDidMount","_scheduleNextUpdate","componentWillUpdate","componentWillUnmount","clearTimeout","_timer","Date","unitDelay","units","getUnitDelay","absDelta","abs","selectUnits","unitRemainder","delay","max","setTimeout","render","futureDate","relativeTime","timeRemainingString","dateTime","title","React","Component","Object","defineProperty","exports","_extends","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","_defineProperty","obj","enumerable","configurable","writable","showLoading","scope","undefined","DEFAULT_SCOPE","type","SHOW","payload","hideLoading","HIDE","resetLoading","RESET","loadingBarReducer","action","_ref$scope","module","__esModule","default","_createClass","defineProperties","descriptor","Constructor","protoProps","staticProps","_interopRequireDefault","_mapToZero2","_stripStyle2","_stepper4","_performanceNow2","_raf2","_shouldStopAnimation2","_react2","_propTypes2","msPerFrame","Motion","_React$Component","_this","instance","TypeError","_classCallCheck","wasAnimating","animationID","prevTime","accumulatedTime","unreadPropStyle","clearUnreadPropStyle","destStyle","dirty","_state","currentStyle","currentVelocity","lastIdealStyle","lastIdealVelocity","styleValue","startAnimationIfNecessary","propsStyle","style","onRest","currentTime","timeDelta","currentFrameCompletion","framesToCatchUp","newLastIdealStyle","newLastIdealVelocity","newCurrentStyle","newCurrentVelocity","newLastIdealStyleValue","newLastIdealVelocityValue","_stepper","val","stiffness","damping","precision","_stepper2","nextIdealX","nextIdealV","defaultState","subClass","superClass","constructor","setPrototypeOf","__proto__","_inherits","defaultStyle","objectOf","oneOfType","object","isRequired","children","func","_props","cancel","renderedChildren","Children","only","domParser","DOMParser","makeEmojiMap","record","emojis","reduce","emoji","shortcode","searchTextFromRawStatus","status","searchContent","spoiler_text","content","concat","poll","options","map","option","join","replace","parseFromString","documentElement","textContent","normalizeAccount","account","emojiMap","displayName","display_name","trim","username","display_name_html","emojify","escapeTextContentForBrowser","note_emojified","note","fields","pair","name_emojified","name","value_emojified","value_plain","unescapeHTML","moved","id","normalizeStatus","normalOldStatus","normalStatus","reblog","search_index","get","contentHtml","spoilerHtml","spoilerText","normalizePoll","normalPoll","index","voted","own_votes","includes","title_emojified","LAYOUT_BREAKPOINT","isMobile","width","iOS","test","navigator","userAgent","window","MSStream","userTouching","listenerOptions","detectPassiveEvents","hasSupport","passive","isUserTouching","isIOS","addEventListener","touchListener","removeEventListener","hasOwn","classNames","classes","arg","argType","push","Array","isArray","inner","apply","getLocale","localeData","addLocaleData","MEDIA_COMPONENTS","MediaGallery","Video","Card","Poll","Hashtag","Audio","MediaContainer","media","time","document","body","classList","add","marginRight","getScrollbarWidth","video","ImmutableList","remove","components","component","componentName","getAttribute","card","hashtag","fromJS","onOpenVideo","handleOpenVideo","onOpenMedia","handleOpenMedia","ReactDOM","createPortal","onClose","handleCloseMedia","PureComponent","ReactReduxContext","createContext","callback","getBatch","CLEARED","nullListeners","notify","Subscription","store","parentSub","unsubscribe","listeners","handleChangeWrapper","bind","_proto","addNestedSub","listener","trySubscribe","subscribe","notifyNestedSubs","onStateChange","isSubscribed","Boolean","batch","current","next","clear","slice","splice","indexOf","tryUnsubscribe","_ref","context","contextValue","subscription","previousState","Context","createElement","Provider","useIsomorphicLayoutEffect","EMPTY_ARRAY","NO_SUBSCRIPTION_ARRAY","storeStateUpdatesReducer","updateCount","initStateUpdates","connectAdvanced","selectorFactory","_ref2","_ref2$getDisplayName","getDisplayName","_ref2$methodName","methodName","_ref2$renderCountProp","renderCountProp","_ref2$shouldHandleSta","shouldHandleStateChanges","_ref2$storeKey","storeKey","_ref2$withRef","withRef","_ref2$forwardRef","forwardRef","_ref2$context","connectOptions","WrappedComponent","wrappedComponentName","selectorFactoryOptions","pure","usePureOnlyMemo","ConnectFunction","_useMemo","forwardedRef","wrapperProps","propsContext","ContextToUse","Consumer","didStoreComeFromProps","dispatch","didStoreComeFromContext","childPropsSelector","createChildSelector","_useMemo2","overriddenContextValue","_useReducer","previousStateUpdateResult","forceComponentUpdateDispatch","error","lastChildProps","lastWrapperProps","childPropsFromStoreUpdate","renderIsScheduled","actualChildProps","didUnsubscribe","lastThrownError","checkForUpdates","newChildProps","latestStoreState","e","renderedWrappedComponent","ref","Connect","memo","forwarded","is","x","y","shallowEqual","objA","objB","keysA","keys","keysB","wrapMapToPropsConstant","getConstant","constant","constantSelector","dependsOnOwnProps","getDependsOnOwnProps","mapToProps","wrapMapToPropsFunc","proxy","stateOrDispatch","ownProps","mapDispatchToProps","mapStateToProps","defaultMergeProps","stateProps","dispatchProps","mergeProps","mergedProps","areMergedPropsEqual","hasRunOnce","nextMergedProps","wrapMergePropsFunc","impureFinalPropsSelectorFactory","pureFinalPropsSelectorFactory","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","hasRunAtLeastOnce","handleSubsequentCalls","nextOwnProps","nextStateProps","statePropsChanged","propsChanged","stateChanged","finalPropsSelectorFactory","initMapStateToProps","initMapDispatchToProps","initMergeProps","match","factories","result","Error","strictEqual","a","b","_temp","_ref$connectHOC","connectHOC","_ref$mapStateToPropsF","mapStateToPropsFactories","_ref$mapDispatchToPro","mapDispatchToPropsFactories","_ref$mergePropsFactor","mergePropsFactories","_ref$selectorFactory","_ref3","_ref3$pure","_ref3$areStatesEqual","_ref3$areOwnPropsEqua","_ref3$areStatePropsEq","_ref3$areMergedPropsE","extraOptions","createStoreHook","useReduxContext","createDispatchHook","useStore","useDispatch","refEquality","createSelectorHook","selector","equalityFn","_useReduxContext","contextSub","selectedState","forceRender","s","latestSubscriptionCallbackError","latestSelector","latestSelectedState","err","errorMessage","message","stack","newSelectedState","useSelectorWithStoreAndSubscription","newBatch","Immutable","ANONYMOUS","ImmutablePropTypes","listOf","typeChecker","createIterableTypeChecker","List","isList","mapOf","valuesTypeChecker","keysTypeChecker","createMapOfTypeCheckerFactory","Map","isMap","orderedMapOf","OrderedMap","isOrderedMap","setOf","Set","isSet","orderedSetOf","OrderedSet","isOrderedSet","stackOf","Stack","isStack","iterableOf","Iterable","isIterable","recordOf","recordKeys","createChainableTypeChecker","propName","location","propFullName","_len","rest","_key","propValue","Record","propType","getPropType","checker","mutablePropValue","toObject","shape","createShapeChecker","contains","mapContains","shapeTypes","createShapeTypeChecker","list","createImmutableTypeChecker","orderedMap","set","orderedSet","seq","Seq","isSeq","isRecord","iterable","RegExp","toSource","split","validate","checkType","chainedCheckType","immutableClassName","immutableClassTypeValidator","locationName","propValues","toArray","len","args","keySeq","columns","forceSingleColumn","ACCOUNT_IMPORT","ACCOUNTS_IMPORT","STATUS_IMPORT","STATUSES_IMPORT","POLLS_IMPORT","pushUnique","array","every","element","importAccount","importStatus","importPolls","polls","importFetchedAccount","importFetchedAccounts","accounts","normalAccounts","forEach","processAccount","importAccounts","importFetchedStatus","importFetchedStatuses","statuses","normalStatuses","processStatus","importStatuses","importFetchedPoll","Symbol","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","toStringTag","_extendStatics","__extends","d","p","__","ValidationError","_super","prop","getElementById","initialState","local_settings","localStorage","getItem","getMeta","meta","reduceMotion","autoPlayGif","displayMedia","unfollowModal","boostModal","favouriteModal","deleteModal","me","searchEnabled","maxChars","pollLimits","poll_limits","mascot","profile_directory","isStaff","defaultContentType","useBlurhash","usePendingItems","useSystemEmojiFont","showTrends","deleteOthersNotice","rights","ImmutablePureComponent","self","ReferenceError","_possibleConstructorReturn","getPrototypeOf","_this2","updateOnProps","updateOnStates","COMPATIBLE_ENCODING_PATTERN","WS_TRIM_PATTERN","WS_CHAR_PATTERN","WS_FOLD_PATTERN","DELIMITER_PATTERN","WS_DELIMITER_PATTERN","STATE","hasWhitespace","skipWhitespace","offset","needsQuotes","Link","rel","links","attr","toLowerCase","has","end","uri","attrValue","isSingleOccurenceAttr","parseExtendedValue","toString","formatAttribute","isCompatibleEncoding","isTokenAttr","escapeQuotes","parts","exec","language","encoding","decodeURIComponent","formatExtendedAttribute","toUpperCase","Buffer","isBuffer","encodeURIComponent","item","root","global","html","wrapper","innerHTML","hidden","expandSpoilers","sensitive","invitesEnabled","repository","source_url","version","cropImages","Permalink","button","ctrlKey","metaKey","onInterceptClick","preventDefault","router","history","mastodonBackSteps","to","className","href","other","onClick","handleClick","PropTypes","decode_1","decode","isBlurhashValid","encode_1","encode","m","__export","_default","baseGetTag","isObjectLike","symbolTag","play","pause","mute","unmute","download","duration","paused","muted","volume","v","volWidth","volOffset","c","waveform","preload","loaded","wavesurfer","createBackend","createPeakCache","load","src","toggleInteraction","setMute","handleMouseVolSlide","handleVolumeMouseUp","stopPropagation","rect","getBoundingClientRect","clientX","left","isNaN","slideamt","setVolume","_updateWaveform","componentDidUpdate","prevProps","destroy","height","peaks","progressColor","getComputedStyle","querySelector","getPropertyValue","waveColor","WaveSurfer","container","barWidth","cursorWidth","backend","interact","on","getDuration","getCurrentTime","alt","editable","volumeWidth","volumeHandleLoc","volHandleOffset","display","aria-label","setWaveformRef","togglePlay","fixedWidth","toggleMute","onMouseDown","handleVolumeMouseDown","setVolumeRef","tabIndex","formatTime","top","inView","innerHeight","clientHeight","trailing","handleScroll","Icon","role","node","eventName","handler","capture","attachEvent","event","srcElement","currentTarget","off","detachEvent","fn","thisArg","utils","url","params","paramsSerializer","serializedParams","isURLSearchParams","isDate","toISOString","isObject","stringify","hashmarkIndex","__CANCEL__","normalizeHeaderName","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","isUndefined","adapter","defaults","XMLHttpRequest","process","transformRequest","isFormData","isArrayBuffer","isStream","isFile","isBlob","isArrayBufferView","buffer","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","validateStatus","common","method","merge","settle","buildURL","buildFullPath","parseHeaders","isURLSameOrigin","createError","config","Promise","resolve","reject","requestData","requestHeaders","request","auth","password","Authorization","btoa","fullPath","baseURL","open","onreadystatechange","readyState","responseURL","responseHeaders","getAllResponseHeaders","responseType","responseText","statusText","onabort","onerror","ontimeout","timeoutErrorMessage","isStandardBrowserEnv","cookies","xsrfValue","withCredentials","read","setRequestHeader","onDownloadProgress","onUploadProgress","upload","cancelToken","promise","then","abort","send","enhanceError","code","config1","config2","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","deepMerge","axiosKeys","otherKeys","filter","Cancel","LoadingBar","TERMINATING_ANIMATION_DURATION","ANIMATION_DURATION","PROGRESS_INCREASE","MAX_PROGRESS","UPDATE_TIME","_react","_reactLifecyclesCompat","_propTypes","_reactRedux","_loading_bar_ducks","percent","_Component","reset","terminatingAnimationTimeoutId","newPercent","progressIncrease","cos","PI","simulateProgress","prevState","maxProgress","start","stop","clearInterval","progressIntervalId","setInterval","updateTime","terminatingAnimationDuration","isShown","showFastActions","animationDuration","opacity","transform","msTransform","WebkitTransform","MozTransform","OTransform","transformOrigin","msTransformOrigin","WebkitTransformOrigin","MozTransformOrigin","OTransformOrigin","transition","msTransition","WebkitTransition","MozTransition","OTransition","willChange","backgroundColor","position","buildStyle","loading","shouldStart","shouldStop","propTypes","string","bool","defaultProps","polyfill","ConnectedLoadingBar","connect","loadingBar","digitCharacters","decode83","str","encode83","n","digit","pow","sRGBToLinear","linearTosRGB","min","round","sign","signPow","exp","RESISTANCE_COEF","UNCERTAINTY_THRESHOLD","unicodeToFilename","charCode","charCodeAt","factory","modules","installedModules","__webpack_require__","moduleId","l","getter","o","r","t","mode","ns","property","debounce","wait","immediate","later","last","debounced","callNow","flush","_style","_getId","_defineProperties","CanvasEntry","wave","waveCtx","progress","progressCtx","canvasContextAttributes","getContext","elementWidth","totalWidth","offsetLeft","elementSize","hasProgressCanvas","clearRect","canvas","fillStyle","radius","fillRectToContext","ctx","drawRoundedRect","fillRect","beginPath","moveTo","lineTo","quadraticCurveTo","closePath","fill","absmax","halfH","offsetY","drawLineToContext","peak","h","first","canvasStart","canvasEnd","scale","halfOffset","absmaxHalf","halfPixel","j","format","quality","toBlob","toDataURL","util","_typeof","cache","_getRequireWildcardCache","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","_interopRequireWildcard","WeakMap","iterator","_assertThisInitialized","_getPrototypeOf","_setPrototypeOf","Drawer","_util$Observer","pixelRatio","lastPos","el","styles","appendChild","userSelect","webkitUserSelect","fillParent","scrollParent","overflowX","hideScrollbar","overflowY","setupWrapperEvents","noPrevent","targetTouches","bbox","nominalWidth","parentWidth","getWidth","rtl","right","scrollLeft","scrollWidth","scrollbarHeight","offsetHeight","clientY","bottom","fireEvent","handleEvent","setWidth","clearWave","drawBars","drawWave","recenterOnPosition","half","clientWidth","maxScroll","rate","autoCenterRate","updateSize","_progress","minPxDelta","pos","autoCenter","newPos","autoCenterImmediately","updateProgress","unAll","parentNode","removeChild","channelIndex","Observer","_drawer","_drawer2","MultiCanvas","_Drawer","maxCanvasWidth","maxCanvasElementWidth","canvases","progressWave","EntryClass","drawingContextAttributes","overlap","ceil","barRadius","createWrapper","createElements","zIndex","overflow","boxSizing","borderRightStyle","pointerEvents","addCanvas","updateCursor","borderRightWidth","borderRightColor","cursorColor","requiredCanvases","removeCanvas","canvasWidth","lastCanvas","entry","updateDimensions","leftOffset","initWave","initProgress","lastEntry","parentElement","pop","_this3","prepareDraw","hasMinVals","peakIndexScale","bar","step","barGap","barMinHeight","_this4","reflectedPeaks","drawLine","_this5","setFillStyles","drawLines","startCanvas","endCanvas","intersection","x1","y1","x2","y2","fillRects","_this6","frame","channels","splitChannels","setHeight","channelPeaks","barHeight","normalize","some","all","getImage","images","_get","receiver","Reflect","base","_superPropBase","MediaElementWebAudio","_MediaElement","sourceMediaElement","setPlaybackRate","audioRate","createTimer","createVolumeNode","createScriptNode","createAnalyserNode","createMediaElementSource","mediaElement","ac","analyser","_webaudio","MediaElement","_WebAudio","playbackRate","mediaType","elementPosition","isMuted","onPlayEnd","mediaListeners","canplay","ended","seeked","volumechange","onAudioProcess","isPaused","controls","mediaControls","autoplay","prevMedia","_load","elt","HTMLMediaElement","_setupMediaListeners","explicitDuration","Infinity","seekable","clearPlayEnd","seekTo","setPlayEnd","_onPlayEnd","un","deviceId","setSinkId","destroyed","removeMediaElementOnDestroy","PeakCache","clearPeakCache","peakCacheRanges","peakCacheLength","uncachedRanges","arr","sort","uncachedRangePairs","peakCacheRangePairs","_observer","xhr","fired100","header","lengthComputable","total","dest","console","warn","sources","fetchHeaders","Headers","fetchRequest","Request","controller","AbortController","append","fetchOptions","credentials","redirect","referrer","signal","fetch","progressAvailable","contentLength","onProgress","Response","ReadableStream","ProgressHandler","errMsg","ok","arrayBuffer","json","blob","text","catch","_reader","getReader","parseInt","done","close","byteLength","enqueue","_requestAnimationFrame","prefix","random","substring","_ajax","_max","_min","_extend","_frame","_debounce","_preventClick","_fetch","values","largest","smallest","Number","handlers","_len2","_key2","preventClickHandler","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","_mediaelement","_peakcache","_mediaelementWebaudio","defaultParams","audioContext","audioScriptProcessor","dragSelection","desynchronized","forceDecode","loopSelection","mediaContainer","minPxPerSec","partialRender","devicePixelRatio","screen","deviceXDPI","logicalXDPI","plugins","renderer","responsive","skipLength","backends","WebAudio","setBackgroundColor","savedVolume","tmpEvents","currentRequest","arraybuffer","drawer","peakCache","supportsWebAudio","Backend","initialisedPluginList","isDestroyed","isReady","prevWidth","_onResize","init","registerPlugins","createDrawer","plugin","addPlugin","deferInit","initPlugin","pluginStaticProp","Instance","getOwnPropertyNames","destroyPlugin","drawBuffer","getPlayedPercents","newVolume","getVolume","_this7","skip","seekAndCenter","recenter","_this8","isFinite","oldScrollParent","getPlaybackRate","filters","color","background","newRanges","addRangeToPeakCache","getPeaks","drawPeaks","pxPerSec","_this9","decodeArrayBuffer","loadDecodedBuffer","_this10","reader","FileReader","loadArrayBuffer","readAsArrayBuffer","empty","preloadIgnoreReasons","activeReasons","reason","loadBuffer","loadMediaElement","_this11","once","getArrayBuffer","setPeaks","urlOrElt","_this12","loadElt","_this13","_this14","fetchFile","percentComplete","accuracy","noWindow","disconnectSource","cancelAjax","clearTmpEvents","destroyAllPlugins","VERSION","PLAYING","PAUSED","FINISHED","_this$stateBehaviors","_this$states","offlineAudioContext","stateBehaviors","addOnAudioProcess","startPosition","getPlayedTime","removeOnAudioProcess","getAudioContext","lastPlay","scheduledPause","states","gainNode","mergedPeaks","offlineAc","scriptNode","splitPeaks","AudioContext","webkitAudioContext","WaveSurferAudioContext","sampleRate","WaveSurferOfflineAudioContext","OfflineAudioContext","webkitOfflineAudioContext","setLength","disconnect","setFilters","disconnectFilters","prev","curr","createScriptProcessor","scriptBufferSize","createJavaScriptNode","destination","onaudioprocess","createAnalyser","createGain","createGainNode","audio","createMediaStreamDestination","srcObject","stream","gain","setValueAtTime","errback","getOfflineAudioContext","decodeAudioData","numberOfChannels","newBuffer","createBuffer","sampleSize","sampleStep","chan","getChannelData","closeAudioContext","createSource","createBufferSource","noteGrainOn","noteOff","adjustedTime","resume","symbolObservablePonyfill","observable","isFullscreen","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","attachFullscreenListener","detachFullscreenListener","animationEnd","animationDelay","animationTiming","animationName","transitionEnd","transitionDuration","transitionDelay","transitionTiming","transitionProperty","_inDOM","_getTransitionPropert","vendorMap","O","Moz","Webkit","ms","vendors","vendor","getTransitionProperties","timing","freeGlobal","GIFV","loop","autoPlay","playsInline","onLoadedData","handleLoadedData","_objectWithoutPropertiesLoose","excluded","sourceKeys","domain","part","punycode","MIN_SCALE","MAX_SCALE","getMidpoint","p1","p2","getDistance","sqrt","clamp","ZoomableImage","touches","lastDistance","scrollTop","scrollHeight","distance","midpoint","zoom","lastMidpoint","image","handleTouchStart","removers","handleTouchMove","removeEventListeners","nextScale","nextScrollLeft","nextScrollTop","setContainerRef","setImageRef","ImageLoader","previewSrc","Image","handleError","handleLoad","canvasContext","drawImage","offsetWidth","loadImage","loadPreviewCanvas","hasSize","loadOriginalImage","clearPreviewCanvas","setCanvasRef","_canvasContext","previous","previewState","MediaModal","navigationHidden","size","getIndex","handlePrevClick","handleNextClick","handleKeyDown","pathname","unlistenHistory","listen","goBack","pagination","leftNav","rightNav","handleChangeIndex","data-index","toggleNavigation","preview","blurhash","startTime","onCloseVideo","detailed","navigationClassName","containerStyle","alignItems","onChangeIndex","handleSwipe","onSwitching","handleSwitching","icon","handleStatusClick","defaultMessage","matches","Element","msMatchesSelector","_focusableElementsString","InertRoot","rootElement","inertManager","_inertManager","_rootElement","_managedNodes","hasAttribute","_savedAriaHidden","setAttribute","_makeSubtreeUnfocusable","MutationObserver","_onMutation","observe","attributes","childList","subtree","destructor","removeAttribute","inertNode","_unmanageNode","startNode","composedTreeWalk","_visitNode","activeElement","nodeType","Node","DOCUMENT_FRAGMENT_NODE","blur","focus","ELEMENT_NODE","_adoptInertRoot","_manageNode","register","deregister","delete","_unmanageSubtree","inertSubroot","getInertRoot","setInert","managedNodes","savedInertNode","records","addedNodes","removedNodes","attributeName","managedNode","ariaHidden","InertNode","inertRoot","_node","_overrodeFocusMethod","_inertRoots","_savedTabIndex","_destroyed","ensureUntabbable","_proto2","_throwIfDestroyed","hasSavedTabIndex","addInertRoot","removeInertRoot","shadowRootAncestor","shadowRoot","localName","distributedNodes","getDistributedNodes","slot","_distributedNodes","assignedNodes","flatten","_i","child","firstChild","nextSibling","addInertStyle","InertManager","_document","_watchForInert","head","_onDocumentLoaded","_proto3","inert","parent","querySelectorAll","inertElement","inertElements","unshift","originalModule","webpackPolyfill","Axios","mergeConfig","createInstance","defaultConfig","extend","instanceConfig","CancelToken","isCancel","promises","spread","InterceptorManager","dispatchRequest","interceptors","chain","interceptor","fulfilled","rejected","shift","getUri","use","eject","transformData","throwIfCancellationRequested","throwIfRequested","fns","normalizedName","isAxiosError","toJSON","description","fileName","lineNumber","columnNumber","isAbsoluteURL","combineURLs","requestedURL","_presets","_presets2","noWobble","relativeURL","ignoreDuplicateOf","parsed","line","substr","isValidXss","originURL","msie","urlParsingNode","resolveURL","protocol","host","search","hash","hostname","port","charAt","requestURL","isString","write","expires","path","secure","cookie","isNumber","toGMTString","executor","resolvePromise","token","isSymbol","NAN","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","valueOf","isBinary","objectProto","nativeObjectToString","isOwn","tag","unmasked","componentWillMount","getDerivedStateFromProps","__reactInternalSnapshotFlag","__reactInternalSnapshot","getSnapshotBeforeUpdate","isReactComponent","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate","newApiName","maybeSnapshot","snapshot","__suppressDeprecationWarning","_slicedToArray","_arr","_n","_d","_e","_s","sliceIterator","promiseTypeSuffixes","defaultTypeSuffixes","_promiseTypeSuffixes","PENDING","FULFILLED","REJECTED","isPending","isFulfilled","isRejected","actionScope","_loading_bar","ret","secondPerFrame","destX","k","newV","newX","reusedTuple","getNanoSeconds","hrtime","loadTime","performance","hr","suffix","raf","caf","queue","_now","cp","cancelled","handle","cancelAnimationFrame","moduleLoadTime","nodeLoadTime","upTime","uptime","gentle","wobbly","stiff","base83_1","utils_1","error_1","validateBlurhash","sizeFlag","numY","numX","errorReason","decodeDC","intR","intG","intB","decodeAC","maximumValue","quantR","quantG","quantB","punch","colors","bytesPerRow","pixels","Uint8ClampedArray","g","basis","componentX","componentY","factors","_loop_1","_loop_2","normalisation","factor","basisFunction","multiplyBasisFunction","dc","actualMaximumValue","quantisedMaximumValue","encodeAC","getDomTreeShapes","findNativeHandler","_extends2","_objectWithoutProperties2","_classCallCheck2","_createClass2","_possibleConstructorReturn2","_getPrototypeOf2","_inherits2","_properties","_on","_off","_reactSwipeableViewsCore","addEventListenerEnhanced","direction","WebkitFlexShrink","flexShrink","axisProperties","flexDirection","translate","rotationMatrix","scrollPosition","scrollLength","clientLength","createTransition","easeFunction","applyRotationMatrix","touch","axis","pageX","pageY","adaptMouse","rootNode","domTreeShapes","nodeWhoClaimedTheScroll","startX","goingForward","areNotAtStart","areNotAtEnd","SwipeableViews","containerNode","ignoreNextScrollEvents","viewLength","lastX","vx","startY","isSwiping","started","startIndex","resizeListener","transitionListener","touchMoveListener","activeSlide","indexCurrent","firstRenderTimeout","setRootNode","setContainerNode","setActiveSlide","updateHeight","handleSwipeStart","rootStyle","paddingLeft","paddingRight","computedStyle","transformValues","tranformNormalized","handleSwipeMove","_this$props","ignoreNativeScroll","resistance","dx","dy","count","cancelable","_computeIndex","computeIndex","setIndexCurrent","displaySameSlide","isDragging","handleSwipeEnd","indexNew","indexLatest","threshold","hysteresis","indexMax","handleTransitionEnd","onTouchStart","handleTouchEnd","onTouchEnd","handleMouseDown","persist","handleMouseUp","onMouseUp","handleMouseLeave","onMouseLeave","handleMouseMove","onMouseMove","onScroll","heightLatest","renderOnlyActive","disableLazyLoading","swipeableViews","slideUpdateHeight","animateHeight","disabled","getDisplaySameSlide","_this$props2","animateTransitions","onTransitionEnd","_this$props3","containerStyleProp","enableMouseEvents","slideStyleProp","slideStyle","slideClassName","springConfig","_this$state","touchEvents","mouseEvents","additionalTranstion","WebkitFlexDirection","indexChild","childContextTypes","objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","assertThisInitialized","_typeof2","_checkIndexBounds","_constant","_getDisplaySameSlide","_mod","newStartX","isFunction","FormData","ArrayBuffer","isView","pipe","URLSearchParams","product","assignValue","getChildrenKey","oldKey","q","IconButton","activate","deactivate","onKeyPress","onKeyDown","animate","active","fontSize","lineHeight","activeStyle","label","textAlign","expanded","inverted","overlay","pressed","overlayed","aria-pressed","aria-expanded","handleKeyPress","aria-hidden","SLICE$0","createClass","ctor","KeyedIterable","isKeyed","KeyedSeq","IndexedIterable","isIndexed","IndexedSeq","SetIterable","isAssociative","SetSeq","maybeIterable","IS_ITERABLE_SENTINEL","maybeKeyed","IS_KEYED_SENTINEL","maybeIndexed","IS_INDEXED_SENTINEL","maybeAssociative","isOrdered","maybeOrdered","IS_ORDERED_SENTINEL","Keyed","Indexed","SHIFT","SIZE","MASK","NOT_SET","CHANGE_LENGTH","DID_ALTER","MakeRef","SetRef","OwnerID","arrCopy","newArr","ii","ensureSize","iter","__iterate","returnTrue","wrapIndex","uint32Index","NaN","wholeSlice","begin","resolveBegin","resolveIndex","resolveEnd","defaultIndex","ITERATE_KEYS","ITERATE_VALUES","ITERATE_ENTRIES","REAL_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","ITERATOR_SYMBOL","Iterator","iteratorValue","iteratorResult","iteratorDone","hasIterator","getIteratorFn","isIterator","maybeIterator","getIterator","iteratorFn","isArrayLike","emptySequence","toSeq","maybeIndexedSeqFromValue","ObjectSeq","seqFromValue","toKeyedSeq","fromEntrySeq","keyedSeqFromValue","entrySeq","toIndexedSeq","indexedSeqFromValue","toSetSeq","KEYS","VALUES","ENTRIES","inspect","of","__toString","cacheResult","_cache","__iterateUncached","reverse","seqIterate","__iterator","seqIterator","EMPTY_SEQ","EMPTY_REPEAT","EMPTY_RANGE","IS_SEQ_SENTINEL","ArraySeq","_array","_object","_keys","IterableSeq","_iterable","IteratorSeq","_iterator","_iteratorCache","maybeSeq","useKeys","maxIndex","__iteratorUncached","converter","fromJSWith","parentJSON","isPlainObj","fromJSDefault","toList","toMap","valueA","valueB","equals","deepEqual","__hash","notAssociative","entries","flipped","_","allEqual","bSize","Repeat","times","_value","invariant","condition","Range","_start","_end","_step","Collection","KeyedCollection","IndexedCollection","SetCollection","notSetValue","iterations","searchValue","lastIndexOf","this$0","possibleIndex","offsetValue","imul","smi","i32","STRING_HASH_CACHE_MIN_STRLEN","stringHashCache","hashString","STRING_HASH_CACHE_SIZE","STRING_HASH_CACHE_MAX_SIZE","cachedHashString","hashCode","usingWeakMap","weakMap","UID_HASH_KEY","canDefineProperty","uniqueID","getIENodeHash","objHashUID","isExtensible","hashJSObj","assertNotInfinite","emptyMap","withMutations","maybeMap","IS_MAP_SENTINEL","keyValues","_root","updateMap","setIn","keyPath","updateIn","deleteIn","update","updater","updatedValue","updateInDeepMap","existing","keyPathIter","isNotSet","existingValue","newValue","nextExisting","nextUpdated","forceIterator","__ownerID","__altered","mergeIntoMapWith","mergeWith","merger","iters","mergeIn","mergeDeep","deepMerger","mergeDeepWith","deepMergerWith","mergeDeepIn","comparator","sortFactory","sortBy","mapper","mutable","asMutable","wasAltered","__ensureOwner","asImmutable","MapIterator","iterate","ownerID","makeMap","EMPTY_MAP","MapPrototype","ArrayMapNode","BitmapIndexedNode","bitmap","nodes","HashArrayMapNode","HashCollisionNode","keyHash","ValueNode","_type","_reverse","_stack","mapIteratorFrame","mapIteratorValue","__prev","newRoot","newSize","didChangeSize","didAlter","updateNode","isLeafNode","mergeIntoNode","newNode","idx1","idx2","iterables","mergeIntoCollectionWith","nextValue","collection","mergeIntoMap","popCount","idx","canEdit","newArray","removeIn","removed","exists","MAX_ARRAY_MAP_SIZE","createNodes","isEditable","newEntries","bit","keyHashFrag","MAX_BITMAP_INDEXED_SIZE","including","expandedNodes","expandNodes","newBitmap","newNodes","newLen","after","spliceOut","spliceIn","newCount","MIN_HASH_ARRAY_MAP_SIZE","excluding","packedII","packedNodes","packNodes","keyMatch","subNode","emptyList","makeList","VNode","setSize","maybeList","IS_LIST_SENTINEL","listNodeFor","_origin","setListBounds","newTail","_tail","getTailOffset","_capacity","updateVNode","_level","updateList","insert","oldSize","mergeIntoListWith","iterateList","DONE","ListPrototype","removeBefore","level","originIndex","newChild","removingFirst","oldChild","editableVNode","removeAfter","sizeIndex","EMPTY_LIST","EMPTY_ORDERED_MAP","tailPos","tail","iterateNodeOrLeaf","from","iterateLeaf","iterateNode","origin","capacity","nodeHas","lowerNode","newLowerNode","rawIndex","owner","oldOrigin","oldCapacity","newOrigin","newCapacity","newLevel","offsetShift","oldTailOffset","newTailOffset","oldTail","beginIndex","maxSize","emptyOrderedMap","maybeOrderedMap","makeOrderedMap","omap","_map","_list","updateOrderedMap","newMap","newList","flip","ToKeyedSequence","indexed","_iter","_useKeys","ToIndexedSequence","ToSetSequence","FromEntriesSequence","flipFactory","flipSequence","makeSequence","reversedSequence","cacheResultThrough","mapFactory","mappedSequence","reverseFactory","filterFactory","predicate","filterSequence","sliceFactory","originalSize","resolvedBegin","resolvedEnd","sliceSize","resolvedSize","sliceSeq","skipped","isSkipping","skipWhileFactory","skipSequence","skipping","concatFactory","isKeyedIterable","singleton","concatSeq","sum","flattenFactory","depth","flatSequence","stopped","flatDeep","currentDepth","defaultComparator","maxFactory","maxCompare","comp","zipWithFactory","keyIter","zipper","zipSequence","iterators","isDone","steps","reify","validateEntry","resolveSize","iterableClass","defaultValues","hasInitialized","RecordType","names","setProp","setProps","RecordTypePrototype","_name","_defaultValues","RecordPrototype","valueSeq","indexedIterable","recordName","defaultVal","_empty","makeRecord","likeRecord","emptySet","maybeSet","IS_SET_SENTINEL","fromKeys","updateSet","union","intersect","originalSet","subtract","__make","EMPTY_SET","SetPrototype","__empty","makeSet","emptyOrderedSet","maybeOrderedSet","EMPTY_ORDERED_SET","OrderedSetPrototype","makeOrderedSet","emptyStack","unshiftAll","maybeStack","IS_STACK_SENTINEL","_head","peek","makeStack","pushAll","EMPTY_STACK","StackPrototype","mixin","methods","keyCopier","toJS","__toJS","toOrderedMap","toOrderedSet","toSet","toStack","__toStringMapper","returnValue","find","findEntry","sideEffect","separator","joined","isFirst","reducer","initialReduction","reduction","useFirst","reduceRight","reversed","not","butLast","isEmpty","countBy","grouper","groups","countByFactory","entriesSequence","entryMapper","filterNot","found","findKey","findLast","findLastEntry","findLastKey","flatMap","coerce","flatMapFactory","searchKey","searchKeyPath","nested","groupBy","isKeyedIter","groupByFactory","hasIn","isSubset","isSuperset","keyOf","keyMapper","lastKeyOf","maxBy","neg","defaultNegComparator","minBy","amount","skipLast","skipWhile","skipUntil","take","takeLast","takeWhile","takeSequence","iterating","takeWhileFactory","takeUntil","ordered","keyed","murmurHashOfSize","hashMerge","hashIterable","IterablePrototype","quoteString","mapEntries","mapKeys","KeyedIterablePrototype","String","defaultZipper","findIndex","removeNum","numArgs","spliced","findLastIndex","interpose","interposedSequence","interposeFactory","interleave","zipped","interleaved","zip","zipWith","cachedScrollbarWidth","scrollbarWidth","outer","visibility","getActualScrollbarWidth","ModalRoot","revealed","keyCode","noEsc","focusable","shiftKey","childNodes","handleKeyUp","createHistory","getSiblings","sibling","preventScroll","handleModalClose","handleModalOpen","mastodonModalOpen","visible","setRef","innerWidth","vote","pollId","choices","voteRequest","api","post","voteSuccess","voteFail","fetchPoll","fetchPollRequest","fetchPollSuccess","fetchPollFail","closed","selected","expired","tmp","_toggleOption","expires_at","_setupTimer","renderOption","optionIndex","showResults","pollVotesCount","leading","titleEmojified","spring","selectable","checked","onChange","handleOptionChange","checkbox","handleOptionKeyPress","aria-checked","dangerouslySetInnerHTML","__html","timeRemaining","votesCount","handleVote","handleRefresh","matchHtmlRegExp","escape","lastIndex","FUNC_ERROR_TEXT","trie","Trie","unicodeMapping","assetHost","env","CDN_HOST","customEmojis","tagCharsWithEmojis","rtn","tagChars","invisible","codePointAt","rend","replacement","lt","shortname","filename","static_url","startsWith","shortCode","buildCustomEmojis","short_names","emoticons","keywords","imageUrl","custom","customCategory","categoriesFromEmojis","loadingBarMiddleware","ImmutableLoadingBar","_loading_bar2","_loading_bar_middleware2","_immutable2","toNumber","nativeMax","nativeMin","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","maxing","invokeFunc","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","timeWaiting","remainingWait","isInvoking","leadingEdge","noop","warning","freeSelf","Function","require","shortCodesToEmojiData","emojisWithoutShortCodes","processEmojiMapData","emojiMapData","native","randomString","ActionTypes","INIT","REPLACE","PROBE_UNKNOWN_ACTION","isPlainObject","proto","createStore","preloadedState","enhancer","currentReducer","currentState","currentListeners","nextListeners","isDispatching","ensureCanMutateNextListeners","replaceReducer","nextReducer","outerSubscribe","observer","observeState","bindActionCreator","actionCreator","bindActionCreators","actionCreators","boundActionCreators","ownKeys","enumerableOnly","sym","_objectSpread2","getOwnPropertyDescriptors","compose","funcs","applyMiddleware","middlewares","_dispatch","middlewareAPI","middleware","hide","expand","fullscreen","exit_fullscreen","secondsNum","findElementPosition","box","docEl","clientLeft","pageXOffset","clientTop","pageYOffset","getPointerPosition","boxW","boxH","boxY","boxX","changedTouches","dragging","containerWidth","hovered","player","cacheWidth","seek","_decode","onToggleVisibility","buffered","preview_url","handleFullscreenChange","preventPlayback","imageData","ImageData","putImageData","inline","letterbox","fullwidth","playerStyle","computedClass","inactive","setPlayerRef","tabindex","onMouseEnter","handleMouseEnter","handleMouseDownRoot","setVideoRef","poster","onPlay","handlePlay","onPause","handlePause","onTimeUpdate","handleTimeUpdate","handleProgress","onVolumeChange","handleVolumeChange","toggleReveal","setSeekRef","autoFocus","handleCloseVideo","toggleFullscreen","handleClickRoot","stylesToKeep","ReducedMotion"],"mappings":";yFAAA,yEAGaA,EAAW,SAAAC,GACtB,IAAMC,EAAQD,EAASE,QAAQC,KAE/B,OAAKF,EAIEG,IAAWC,MAAMJ,GAHf,CAAEK,KAAM,KAMJ,aAAAC,GAAQ,OAAIC,IAAMC,OAAO,CACtCP,QAASK,EAAW,CAClB,cAAgB,UAAWA,IAAWG,MAAM,CAAC,OAAQ,gBAAiB,KACpE,GAEJC,kBAAmB,CAAC,SAAUC,GAC5B,IACE,OAAOC,KAAKR,MAAMO,GAClB,MAAME,GACN,OAAOF,S,kMClBPG,EAAWC,YAAe,CAC9BC,SAAS,CAAD,kDACRC,QAAQ,CAAD,uDACPC,QAAQ,CAAD,uDACPC,MAAM,CAAD,qDACLC,KAAK,CAAD,oDACJC,kBAAkB,CAAD,gEACjBC,kBAAkB,CAAD,sGACjBC,kBAAkB,CAAD,sGACjBC,gBAAgB,CAAD,gGACfC,eAAe,CAAD,+FAGVC,EAAoB,CACxBC,QAAQ,EACRC,KAAM,UACNC,MAAO,QACPC,IAAK,UACLC,KAAM,UACNC,OAAQ,WAGJC,EAAyB,CAC7BJ,MAAO,QACPC,IAAK,WAMDI,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H+BqC,CAAYhC,IAC1CiC,EAAiB7B,KAAK2B,IAAI/B,EAAQ2B,GAElCO,EAAiBlC,EAAQ,EAAII,KAAK+B,IADjB,IACqCR,EAAYM,GAAiB7B,KAAK+B,IADvE,IAC2FF,GAElHnB,KAAKW,OAASW,YAAW,WACvB,EAAKjB,SAAS,CAAEpB,IAAK,EAAKW,MAAMb,KAAKE,UACpCmC,I,EAGLG,OAAA,WAAW,IAAD,EACsCvB,KAAKJ,MAA3CK,EADA,EACAA,UAAWlB,EADX,EACWA,KAAMR,EADjB,EACiBA,KAAMiD,EADvB,EACuBA,WAEzBxC,EAAe,IAAI4B,KAAKX,GACxBwB,EAAeD,EAnFG,SAACzC,EAAMC,EAAMC,GACvC,IAAMC,EAAQF,EAAKG,UAAYF,EAgB/B,OAZIC,EAAQ,IACKH,EAAKK,cAAc3B,EAASO,mBAClCkB,EApEE,IAqEIH,EAAKK,cAAc3B,EAASQ,kBAAmB,CAAEoB,OAAQC,KAAKC,MAAML,EAtExE,OAuEFA,EArEE,KAsEIH,EAAKK,cAAc3B,EAASS,kBAAmB,CAAEmB,OAAQC,KAAKC,MAAML,EAvExE,OAwEFA,EAAQL,EACFE,EAAKK,cAAc3B,EAASU,gBAAiB,CAAEkB,OAAQC,KAAKC,MAAML,EAxEtE,QA0EIH,EAAKK,cAAc3B,EAASW,eAAgB,CAAEiB,OAAQC,KAAKC,MAAML,EAAQL,KAqEtD6C,CAAoB3C,EAAMC,EAAMgB,KAAKG,MAAMlB,KAAOH,EAAcC,EAAMC,EAAMgB,KAAKG,MAAMlB,IAAKV,GAE9H,OACE,oBAAMoD,SAAU1B,EAAW2B,MAAO7C,EAAKU,WAAWT,EAAMX,SAAxD,EACGoD,I,GAlEuBI,IAAMC,W,6BAad,CACpBvD,MAAO,IAAIqC,MAAQpB,gB","file":"containers/media_container.js","sourcesContent":["import axios from 'axios';\nimport LinkHeader from 'http-link-header';\n\nexport const getLinks = response => {\n const value = response.headers.link;\n\n if (!value) {\n return { refs: [] };\n }\n\n return LinkHeader.parse(value);\n};\n\nexport default getState => axios.create({\n headers: getState ? {\n 'Authorization': `Bearer ${getState().getIn(['meta', 'access_token'], '')}`,\n } : {},\n\n transformResponse: [function (data) {\n try {\n return JSON.parse(data);\n } catch(Exception) {\n return data;\n }\n }],\n});\n","import React from 'react';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport PropTypes from 'prop-types';\n\nconst messages = defineMessages({\n just_now: { id: 'relative_time.just_now', defaultMessage: 'now' },\n seconds: { id: 'relative_time.seconds', defaultMessage: '{number}s' },\n minutes: { id: 'relative_time.minutes', defaultMessage: '{number}m' },\n hours: { id: 'relative_time.hours', defaultMessage: '{number}h' },\n days: { id: 'relative_time.days', defaultMessage: '{number}d' },\n moments_remaining: { id: 'time_remaining.moments', defaultMessage: 'Moments remaining' },\n seconds_remaining: { id: 'time_remaining.seconds', defaultMessage: '{number, plural, one {# second} other {# seconds}} left' },\n minutes_remaining: { id: 'time_remaining.minutes', defaultMessage: '{number, plural, one {# minute} other {# minutes}} left' },\n hours_remaining: { id: 'time_remaining.hours', defaultMessage: '{number, plural, one {# hour} other {# hours}} left' },\n days_remaining: { id: 'time_remaining.days', defaultMessage: '{number, plural, one {# day} other {# days}} left' },\n});\n\nconst dateFormatOptions = {\n hour12: false,\n year: 'numeric',\n month: 'short',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n};\n\nconst shortDateFormatOptions = {\n month: 'short',\n day: 'numeric',\n};\n\nconst SECOND = 1000;\nconst MINUTE = 1000 * 60;\nconst HOUR = 1000 * 60 * 60;\nconst DAY = 1000 * 60 * 60 * 24;\n\nconst MAX_DELAY = 2147483647;\n\nconst selectUnits = delta => {\n const absDelta = Math.abs(delta);\n\n if (absDelta < MINUTE) {\n return 'second';\n } else if (absDelta < HOUR) {\n return 'minute';\n } else if (absDelta < DAY) {\n return 'hour';\n }\n\n return 'day';\n};\n\nconst getUnitDelay = units => {\n switch (units) {\n case 'second':\n return SECOND;\n case 'minute':\n return MINUTE;\n case 'hour':\n return HOUR;\n case 'day':\n return DAY;\n default:\n return MAX_DELAY;\n }\n};\n\nexport const timeAgoString = (intl, date, now, year) => {\n const delta = now - date.getTime();\n\n let relativeTime;\n\n if (delta < 10 * SECOND) {\n relativeTime = intl.formatMessage(messages.just_now);\n } else if (delta < 7 * DAY) {\n if (delta < MINUTE) {\n relativeTime = intl.formatMessage(messages.seconds, { number: Math.floor(delta / SECOND) });\n } else if (delta < HOUR) {\n relativeTime = intl.formatMessage(messages.minutes, { number: Math.floor(delta / MINUTE) });\n } else if (delta < DAY) {\n relativeTime = intl.formatMessage(messages.hours, { number: Math.floor(delta / HOUR) });\n } else {\n relativeTime = intl.formatMessage(messages.days, { number: Math.floor(delta / DAY) });\n }\n } else if (date.getFullYear() === year) {\n relativeTime = intl.formatDate(date, shortDateFormatOptions);\n } else {\n relativeTime = intl.formatDate(date, { ...shortDateFormatOptions, year: 'numeric' });\n }\n\n return relativeTime;\n};\n\nconst timeRemainingString = (intl, date, now) => {\n const delta = date.getTime() - now;\n\n let relativeTime;\n\n if (delta < 10 * SECOND) {\n relativeTime = intl.formatMessage(messages.moments_remaining);\n } else if (delta < MINUTE) {\n relativeTime = intl.formatMessage(messages.seconds_remaining, { number: Math.floor(delta / SECOND) });\n } else if (delta < HOUR) {\n relativeTime = intl.formatMessage(messages.minutes_remaining, { number: Math.floor(delta / MINUTE) });\n } else if (delta < DAY) {\n relativeTime = intl.formatMessage(messages.hours_remaining, { number: Math.floor(delta / HOUR) });\n } else {\n relativeTime = intl.formatMessage(messages.days_remaining, { number: Math.floor(delta / DAY) });\n }\n\n return relativeTime;\n};\n\nexport default @injectIntl\nclass RelativeTimestamp extends React.Component {\n\n static propTypes = {\n intl: PropTypes.object.isRequired,\n timestamp: PropTypes.string.isRequired,\n year: PropTypes.number.isRequired,\n futureDate: PropTypes.bool,\n };\n\n state = {\n now: this.props.intl.now(),\n };\n\n static defaultProps = {\n year: (new Date()).getFullYear(),\n };\n\n shouldComponentUpdate (nextProps, nextState) {\n // As of right now the locale doesn't change without a new page load,\n // but we might as well check in case that ever changes.\n return this.props.timestamp !== nextProps.timestamp ||\n this.props.intl.locale !== nextProps.intl.locale ||\n this.state.now !== nextState.now;\n }\n\n componentWillReceiveProps (nextProps) {\n if (this.props.timestamp !== nextProps.timestamp) {\n this.setState({ now: this.props.intl.now() });\n }\n }\n\n componentDidMount () {\n this._scheduleNextUpdate(this.props, this.state);\n }\n\n componentWillUpdate (nextProps, nextState) {\n this._scheduleNextUpdate(nextProps, nextState);\n }\n\n componentWillUnmount () {\n clearTimeout(this._timer);\n }\n\n _scheduleNextUpdate (props, state) {\n clearTimeout(this._timer);\n\n const { timestamp } = props;\n const delta = (new Date(timestamp)).getTime() - state.now;\n const unitDelay = getUnitDelay(selectUnits(delta));\n const unitRemainder = Math.abs(delta % unitDelay);\n const updateInterval = 1000 * 10;\n const delay = delta < 0 ? Math.max(updateInterval, unitDelay - unitRemainder) : Math.max(updateInterval, unitRemainder);\n\n this._timer = setTimeout(() => {\n this.setState({ now: this.props.intl.now() });\n }, delay);\n }\n\n render () {\n const { timestamp, intl, year, futureDate } = this.props;\n\n const date = new Date(timestamp);\n const relativeTime = futureDate ? timeRemainingString(intl, date, this.state.now) : timeAgoString(intl, date, this.state.now, year);\n\n return (\n <time dateTime={timestamp} title={intl.formatDate(date, dateFormatOptions)}>\n {relativeTime}\n </time>\n );\n }\n\n}\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nexports.showLoading = showLoading;\nexports.hideLoading = hideLoading;\nexports.resetLoading = resetLoading;\nexports.loadingBarReducer = loadingBarReducer;\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nvar SHOW = exports.SHOW = 'loading-bar/SHOW';\nvar HIDE = exports.HIDE = 'loading-bar/HIDE';\nvar RESET = exports.RESET = 'loading-bar/RESET';\nvar DEFAULT_SCOPE = exports.DEFAULT_SCOPE = 'default';\n\nfunction showLoading() {\n var scope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_SCOPE;\n return {\n type: SHOW,\n payload: {\n scope: scope\n }\n };\n}\n\nfunction hideLoading() {\n var scope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_SCOPE;\n return {\n type: HIDE,\n payload: {\n scope: scope\n }\n };\n}\n\nfunction resetLoading() {\n var scope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_SCOPE;\n return {\n type: RESET,\n payload: {\n scope: scope\n }\n };\n}\n\nfunction loadingBarReducer() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var _ref = action.payload || {},\n _ref$scope = _ref.scope,\n scope = _ref$scope === undefined ? DEFAULT_SCOPE : _ref$scope;\n\n switch (action.type) {\n case SHOW:\n return _extends({}, state, _defineProperty({}, scope, (state[scope] || 0) + 1));\n\n case HIDE:\n return _extends({}, state, _defineProperty({}, scope, Math.max(0, (state[scope] || 1) - 1)));\n\n case RESET:\n return _extends({}, state, _defineProperty({}, scope, 0));\n\n default:\n return state;\n }\n}","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== 'function' && superClass !== null) {\n throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar _mapToZero = require('./mapToZero');\n\nvar _mapToZero2 = _interopRequireDefault(_mapToZero);\n\nvar _stripStyle = require('./stripStyle');\n\nvar _stripStyle2 = _interopRequireDefault(_stripStyle);\n\nvar _stepper3 = require('./stepper');\n\nvar _stepper4 = _interopRequireDefault(_stepper3);\n\nvar _performanceNow = require('performance-now');\n\nvar _performanceNow2 = _interopRequireDefault(_performanceNow);\n\nvar _raf = require('raf');\n\nvar _raf2 = _interopRequireDefault(_raf);\n\nvar _shouldStopAnimation = require('./shouldStopAnimation');\n\nvar _shouldStopAnimation2 = _interopRequireDefault(_shouldStopAnimation);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar msPerFrame = 1000 / 60;\n\nvar Motion = function (_React$Component) {\n _inherits(Motion, _React$Component);\n\n _createClass(Motion, null, [{\n key: 'propTypes',\n value: {\n // TOOD: warn against putting a config in here\n defaultStyle: _propTypes2['default'].objectOf(_propTypes2['default'].number),\n style: _propTypes2['default'].objectOf(_propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].object])).isRequired,\n children: _propTypes2['default'].func.isRequired,\n onRest: _propTypes2['default'].func\n },\n enumerable: true\n }]);\n\n function Motion(props) {\n var _this = this;\n\n _classCallCheck(this, Motion);\n\n _React$Component.call(this, props);\n\n this.wasAnimating = false;\n this.animationID = null;\n this.prevTime = 0;\n this.accumulatedTime = 0;\n this.unreadPropStyle = null;\n\n this.clearUnreadPropStyle = function (destStyle) {\n var dirty = false;\n var _state = _this.state;\n var currentStyle = _state.currentStyle;\n var currentVelocity = _state.currentVelocity;\n var lastIdealStyle = _state.lastIdealStyle;\n var lastIdealVelocity = _state.lastIdealVelocity;\n\n for (var key in destStyle) {\n if (!Object.prototype.hasOwnProperty.call(destStyle, key)) {\n continue;\n }\n\n var styleValue = destStyle[key];\n\n if (typeof styleValue === 'number') {\n if (!dirty) {\n dirty = true;\n currentStyle = _extends({}, currentStyle);\n currentVelocity = _extends({}, currentVelocity);\n lastIdealStyle = _extends({}, lastIdealStyle);\n lastIdealVelocity = _extends({}, lastIdealVelocity);\n }\n\n currentStyle[key] = styleValue;\n currentVelocity[key] = 0;\n lastIdealStyle[key] = styleValue;\n lastIdealVelocity[key] = 0;\n }\n }\n\n if (dirty) {\n _this.setState({\n currentStyle: currentStyle,\n currentVelocity: currentVelocity,\n lastIdealStyle: lastIdealStyle,\n lastIdealVelocity: lastIdealVelocity\n });\n }\n };\n\n this.startAnimationIfNecessary = function () {\n // TODO: when config is {a: 10} and dest is {a: 10} do we raf once and\n // call cb? No, otherwise accidental parent rerender causes cb trigger\n _this.animationID = _raf2['default'](function (timestamp) {\n // check if we need to animate in the first place\n var propsStyle = _this.props.style;\n\n if (_shouldStopAnimation2['default'](_this.state.currentStyle, propsStyle, _this.state.currentVelocity)) {\n if (_this.wasAnimating && _this.props.onRest) {\n _this.props.onRest();\n } // no need to cancel animationID here; shouldn't have any in flight\n\n\n _this.animationID = null;\n _this.wasAnimating = false;\n _this.accumulatedTime = 0;\n return;\n }\n\n _this.wasAnimating = true;\n\n var currentTime = timestamp || _performanceNow2['default']();\n\n var timeDelta = currentTime - _this.prevTime;\n _this.prevTime = currentTime;\n _this.accumulatedTime = _this.accumulatedTime + timeDelta; // more than 10 frames? prolly switched browser tab. Restart\n\n if (_this.accumulatedTime > msPerFrame * 10) {\n _this.accumulatedTime = 0;\n }\n\n if (_this.accumulatedTime === 0) {\n // no need to cancel animationID here; shouldn't have any in flight\n _this.animationID = null;\n\n _this.startAnimationIfNecessary();\n\n return;\n }\n\n var currentFrameCompletion = (_this.accumulatedTime - Math.floor(_this.accumulatedTime / msPerFrame) * msPerFrame) / msPerFrame;\n var framesToCatchUp = Math.floor(_this.accumulatedTime / msPerFrame);\n var newLastIdealStyle = {};\n var newLastIdealVelocity = {};\n var newCurrentStyle = {};\n var newCurrentVelocity = {};\n\n for (var key in propsStyle) {\n if (!Object.prototype.hasOwnProperty.call(propsStyle, key)) {\n continue;\n }\n\n var styleValue = propsStyle[key];\n\n if (typeof styleValue === 'number') {\n newCurrentStyle[key] = styleValue;\n newCurrentVelocity[key] = 0;\n newLastIdealStyle[key] = styleValue;\n newLastIdealVelocity[key] = 0;\n } else {\n var newLastIdealStyleValue = _this.state.lastIdealStyle[key];\n var newLastIdealVelocityValue = _this.state.lastIdealVelocity[key];\n\n for (var i = 0; i < framesToCatchUp; i++) {\n var _stepper = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n newLastIdealStyleValue = _stepper[0];\n newLastIdealVelocityValue = _stepper[1];\n }\n\n var _stepper2 = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n var nextIdealX = _stepper2[0];\n var nextIdealV = _stepper2[1];\n newCurrentStyle[key] = newLastIdealStyleValue + (nextIdealX - newLastIdealStyleValue) * currentFrameCompletion;\n newCurrentVelocity[key] = newLastIdealVelocityValue + (nextIdealV - newLastIdealVelocityValue) * currentFrameCompletion;\n newLastIdealStyle[key] = newLastIdealStyleValue;\n newLastIdealVelocity[key] = newLastIdealVelocityValue;\n }\n }\n\n _this.animationID = null; // the amount we're looped over above\n\n _this.accumulatedTime -= framesToCatchUp * msPerFrame;\n\n _this.setState({\n currentStyle: newCurrentStyle,\n currentVelocity: newCurrentVelocity,\n lastIdealStyle: newLastIdealStyle,\n lastIdealVelocity: newLastIdealVelocity\n });\n\n _this.unreadPropStyle = null;\n\n _this.startAnimationIfNecessary();\n });\n };\n\n this.state = this.defaultState();\n }\n\n Motion.prototype.defaultState = function defaultState() {\n var _props = this.props;\n var defaultStyle = _props.defaultStyle;\n var style = _props.style;\n\n var currentStyle = defaultStyle || _stripStyle2['default'](style);\n\n var currentVelocity = _mapToZero2['default'](currentStyle);\n\n return {\n currentStyle: currentStyle,\n currentVelocity: currentVelocity,\n lastIdealStyle: currentStyle,\n lastIdealVelocity: currentVelocity\n };\n }; // it's possible that currentStyle's value is stale: if props is immediately\n // changed from 0 to 400 to spring(0) again, the async currentStyle is still\n // at 0 (didn't have time to tick and interpolate even once). If we naively\n // compare currentStyle with destVal it'll be 0 === 0 (no animation, stop).\n // In reality currentStyle should be 400\n\n\n Motion.prototype.componentDidMount = function componentDidMount() {\n this.prevTime = _performanceNow2['default']();\n this.startAnimationIfNecessary();\n };\n\n Motion.prototype.componentWillReceiveProps = function componentWillReceiveProps(props) {\n if (this.unreadPropStyle != null) {\n // previous props haven't had the chance to be set yet; set them here\n this.clearUnreadPropStyle(this.unreadPropStyle);\n }\n\n this.unreadPropStyle = props.style;\n\n if (this.animationID == null) {\n this.prevTime = _performanceNow2['default']();\n this.startAnimationIfNecessary();\n }\n };\n\n Motion.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.animationID != null) {\n _raf2['default'].cancel(this.animationID);\n\n this.animationID = null;\n }\n };\n\n Motion.prototype.render = function render() {\n var renderedChildren = this.props.children(this.state.currentStyle);\n return renderedChildren && _react2['default'].Children.only(renderedChildren);\n };\n\n return Motion;\n}(_react2['default'].Component);\n\nexports['default'] = Motion;\nmodule.exports = exports['default']; // after checking for unreadPropStyle != null, we manually go set the\n// non-interpolating values (those that are a number, without a spring\n// config)","import escapeTextContentForBrowser from 'escape-html';\nimport emojify from 'flavours/glitch/util/emoji';\nimport { unescapeHTML } from 'flavours/glitch/util/html';\nimport { expandSpoilers } from 'flavours/glitch/util/initial_state';\n\nconst domParser = new DOMParser();\n\nconst makeEmojiMap = record => record.emojis.reduce((obj, emoji) => {\n obj[`:${emoji.shortcode}:`] = emoji;\n return obj;\n}, {});\n\nexport function searchTextFromRawStatus (status) {\n const spoilerText = status.spoiler_text || '';\n const searchContent = ([spoilerText, status.content].concat((status.poll && status.poll.options) ? status.poll.options.map(option => option.title) : [])).join('\\n\\n').replace(/<br\\s*\\/?>/g, '\\n').replace(/<\\/p><p>/g, '\\n\\n');\n return domParser.parseFromString(searchContent, 'text/html').documentElement.textContent;\n}\n\nexport function normalizeAccount(account) {\n account = { ...account };\n\n const emojiMap = makeEmojiMap(account);\n const displayName = account.display_name.trim().length === 0 ? account.username : account.display_name;\n\n account.display_name_html = emojify(escapeTextContentForBrowser(displayName), emojiMap);\n account.note_emojified = emojify(account.note, emojiMap);\n\n if (account.fields) {\n account.fields = account.fields.map(pair => ({\n ...pair,\n name_emojified: emojify(escapeTextContentForBrowser(pair.name), emojiMap),\n value_emojified: emojify(pair.value, emojiMap),\n value_plain: unescapeHTML(pair.value),\n }));\n }\n\n if (account.moved) {\n account.moved = account.moved.id;\n }\n\n return account;\n}\n\nexport function normalizeStatus(status, normalOldStatus) {\n const normalStatus = { ...status };\n normalStatus.account = status.account.id;\n\n if (status.reblog && status.reblog.id) {\n normalStatus.reblog = status.reblog.id;\n }\n\n if (status.poll && status.poll.id) {\n normalStatus.poll = status.poll.id;\n }\n\n // Only calculate these values when status first encountered\n // Otherwise keep the ones already in the reducer\n if (normalOldStatus) {\n normalStatus.search_index = normalOldStatus.get('search_index');\n normalStatus.contentHtml = normalOldStatus.get('contentHtml');\n normalStatus.spoilerHtml = normalOldStatus.get('spoilerHtml');\n } else {\n const spoilerText = normalStatus.spoiler_text || '';\n const searchContent = ([spoilerText, status.content].concat((status.poll && status.poll.options) ? status.poll.options.map(option => option.title) : [])).join('\\n\\n').replace(/<br\\s*\\/?>/g, '\\n').replace(/<\\/p><p>/g, '\\n\\n');\n const emojiMap = makeEmojiMap(normalStatus);\n\n normalStatus.search_index = domParser.parseFromString(searchContent, 'text/html').documentElement.textContent;\n normalStatus.contentHtml = emojify(normalStatus.content, emojiMap);\n normalStatus.spoilerHtml = emojify(escapeTextContentForBrowser(spoilerText), emojiMap);\n }\n\n return normalStatus;\n}\n\nexport function normalizePoll(poll) {\n const normalPoll = { ...poll };\n\n const emojiMap = makeEmojiMap(normalPoll);\n\n normalPoll.options = poll.options.map((option, index) => ({\n ...option,\n voted: poll.own_votes && poll.own_votes.includes(index),\n title_emojified: emojify(escapeTextContentForBrowser(option.title), emojiMap),\n }));\n\n return normalPoll;\n}\n","import axios from 'axios';\nimport LinkHeader from 'http-link-header';\n\nexport const getLinks = response => {\n const value = response.headers.link;\n\n if (!value) {\n return { refs: [] };\n }\n\n return LinkHeader.parse(value);\n};\n\nexport default getState => axios.create({\n headers: getState ? {\n 'Authorization': `Bearer ${getState().getIn(['meta', 'access_token'], '')}`,\n } : {},\n\n transformResponse: [function (data) {\n try {\n return JSON.parse(data);\n } catch(Exception) {\n return data;\n }\n }],\n});\n","export * from 'locales';\n","import detectPassiveEvents from 'detect-passive-events';\n\nconst LAYOUT_BREAKPOINT = 630;\n\nexport function isMobile(width) {\n return width <= LAYOUT_BREAKPOINT;\n};\n\nconst iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n\nlet userTouching = false;\nlet listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false;\n\nfunction touchListener() {\n userTouching = true;\n window.removeEventListener('touchstart', touchListener, listenerOptions);\n}\n\nwindow.addEventListener('touchstart', touchListener, listenerOptions);\n\nexport function isUserTouching() {\n return userTouching;\n}\n\nexport function isIOS() {\n return iOS;\n};\n","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n\n/* global define */\n(function () {\n 'use strict';\n\n var hasOwn = {}.hasOwnProperty;\n\n function classNames() {\n var classes = [];\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i];\n if (!arg) continue;\n var argType = typeof arg;\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg);\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg);\n\n if (inner) {\n classes.push(inner);\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key);\n }\n }\n }\n }\n\n return classes.join(' ');\n }\n\n if (typeof module !== 'undefined' && module.exports) {\n classNames.default = classNames;\n module.exports = classNames;\n } else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n // register as 'classnames', consistent with npm package name\n define('classnames', [], function () {\n return classNames;\n });\n } else {\n window.classNames = classNames;\n }\n})();","import React, { PureComponent, Fragment } from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { IntlProvider, addLocaleData } from 'react-intl';\nimport { List as ImmutableList, fromJS } from 'immutable';\nimport { getLocale } from 'mastodon/locales';\nimport { getScrollbarWidth } from 'mastodon/utils/scrollbar';\nimport MediaGallery from 'mastodon/components/media_gallery';\nimport Poll from 'mastodon/components/poll';\nimport Hashtag from 'mastodon/components/hashtag';\nimport ModalRoot from 'mastodon/components/modal_root';\nimport MediaModal from 'mastodon/features/ui/components/media_modal';\nimport Video from 'mastodon/features/video';\nimport Card from 'mastodon/features/status/components/card';\nimport Audio from 'mastodon/features/audio';\n\nconst { localeData, messages } = getLocale();\naddLocaleData(localeData);\n\nconst MEDIA_COMPONENTS = { MediaGallery, Video, Card, Poll, Hashtag, Audio };\n\nexport default class MediaContainer extends PureComponent {\n\n static propTypes = {\n locale: PropTypes.string.isRequired,\n components: PropTypes.object.isRequired,\n };\n\n state = {\n media: null,\n index: null,\n time: null,\n };\n\n handleOpenMedia = (media, index) => {\n document.body.classList.add('with-modals--active');\n document.documentElement.style.marginRight = `${getScrollbarWidth()}px`;\n\n this.setState({ media, index });\n }\n\n handleOpenVideo = (video, time) => {\n const media = ImmutableList([video]);\n\n document.body.classList.add('with-modals--active');\n document.documentElement.style.marginRight = `${getScrollbarWidth()}px`;\n\n this.setState({ media, time });\n }\n\n handleCloseMedia = () => {\n document.body.classList.remove('with-modals--active');\n document.documentElement.style.marginRight = 0;\n\n this.setState({ media: null, index: null, time: null });\n }\n\n render () {\n const { locale, components } = this.props;\n\n return (\n <IntlProvider locale={locale} messages={messages}>\n <Fragment>\n {[].map.call(components, (component, i) => {\n const componentName = component.getAttribute('data-component');\n const Component = MEDIA_COMPONENTS[componentName];\n const { media, card, poll, hashtag, ...props } = JSON.parse(component.getAttribute('data-props'));\n\n Object.assign(props, {\n ...(media ? { media: fromJS(media) } : {}),\n ...(card ? { card: fromJS(card) } : {}),\n ...(poll ? { poll: fromJS(poll) } : {}),\n ...(hashtag ? { hashtag: fromJS(hashtag) } : {}),\n\n ...(componentName === 'Video' ? {\n onOpenVideo: this.handleOpenVideo,\n } : {\n onOpenMedia: this.handleOpenMedia,\n }),\n });\n\n return ReactDOM.createPortal(\n <Component {...props} key={`media-${i}`} />,\n component,\n );\n })}\n\n <ModalRoot onClose={this.handleCloseMedia}>\n {this.state.media && (\n <MediaModal\n media={this.state.media}\n index={this.state.index || 0}\n time={this.state.time}\n onClose={this.handleCloseMedia}\n />\n )}\n </ModalRoot>\n </Fragment>\n </IntlProvider>\n );\n }\n\n}\n","import React from 'react';\nexport var ReactReduxContext = React.createContext(null);\nexport default ReactReduxContext;","// Default to a dummy \"batch\" implementation that just runs the callback\nfunction defaultNoopBatch(callback) {\n callback();\n}\n\nvar batch = defaultNoopBatch; // Allow injecting another batching function later\n\nexport var setBatch = function setBatch(newBatch) {\n return batch = newBatch;\n}; // Supply a getter just to skip dealing with ESM bindings\n\nexport var getBatch = function getBatch() {\n return batch;\n};","import { getBatch } from './batch'; // encapsulates the subscription logic for connecting a component to the redux store, as\n// well as nesting subscriptions of descendant components, so that we can ensure the\n// ancestor components re-render before descendants\n\nvar CLEARED = null;\nvar nullListeners = {\n notify: function notify() {}\n};\n\nfunction createListenerCollection() {\n var batch = getBatch(); // the current/next pattern is copied from redux's createStore code.\n // TODO: refactor+expose that code to be reusable here?\n\n var current = [];\n var next = [];\n return {\n clear: function clear() {\n next = CLEARED;\n current = CLEARED;\n },\n notify: function notify() {\n var listeners = current = next;\n batch(function () {\n for (var i = 0; i < listeners.length; i++) {\n listeners[i]();\n }\n });\n },\n get: function get() {\n return next;\n },\n subscribe: function subscribe(listener) {\n var isSubscribed = true;\n if (next === current) next = current.slice();\n next.push(listener);\n return function unsubscribe() {\n if (!isSubscribed || current === CLEARED) return;\n isSubscribed = false;\n if (next === current) next = current.slice();\n next.splice(next.indexOf(listener), 1);\n };\n }\n };\n}\n\nvar Subscription =\n/*#__PURE__*/\nfunction () {\n function Subscription(store, parentSub) {\n this.store = store;\n this.parentSub = parentSub;\n this.unsubscribe = null;\n this.listeners = nullListeners;\n this.handleChangeWrapper = this.handleChangeWrapper.bind(this);\n }\n\n var _proto = Subscription.prototype;\n\n _proto.addNestedSub = function addNestedSub(listener) {\n this.trySubscribe();\n return this.listeners.subscribe(listener);\n };\n\n _proto.notifyNestedSubs = function notifyNestedSubs() {\n this.listeners.notify();\n };\n\n _proto.handleChangeWrapper = function handleChangeWrapper() {\n if (this.onStateChange) {\n this.onStateChange();\n }\n };\n\n _proto.isSubscribed = function isSubscribed() {\n return Boolean(this.unsubscribe);\n };\n\n _proto.trySubscribe = function trySubscribe() {\n if (!this.unsubscribe) {\n this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.handleChangeWrapper) : this.store.subscribe(this.handleChangeWrapper);\n this.listeners = createListenerCollection();\n }\n };\n\n _proto.tryUnsubscribe = function tryUnsubscribe() {\n if (this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = null;\n this.listeners.clear();\n this.listeners = nullListeners;\n }\n };\n\n return Subscription;\n}();\n\nexport { Subscription as default };","import React, { useMemo, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { ReactReduxContext } from './Context';\nimport Subscription from '../utils/Subscription';\n\nfunction Provider(_ref) {\n var store = _ref.store,\n context = _ref.context,\n children = _ref.children;\n var contextValue = useMemo(function () {\n var subscription = new Subscription(store);\n subscription.onStateChange = subscription.notifyNestedSubs;\n return {\n store: store,\n subscription: subscription\n };\n }, [store]);\n var previousState = useMemo(function () {\n return store.getState();\n }, [store]);\n useEffect(function () {\n var subscription = contextValue.subscription;\n subscription.trySubscribe();\n\n if (previousState !== store.getState()) {\n subscription.notifyNestedSubs();\n }\n\n return function () {\n subscription.tryUnsubscribe();\n subscription.onStateChange = null;\n };\n }, [contextValue, previousState]);\n var Context = context || ReactReduxContext;\n return React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nexport default Provider;","import { useEffect, useLayoutEffect } from 'react'; // React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store\n// subscription callback always has the selector from the latest render commit\n// available, otherwise a store update may happen between render and the effect,\n// which may cause missed updates; we also must ensure the store subscription\n// is created synchronously, otherwise a store update may occur before the\n// subscription is created and an inconsistent state may be observed\n\nvar isHopefullyDomEnvironment = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\nexport var useIsomorphicLayoutEffect = isHopefullyDomEnvironment ? useLayoutEffect : useEffect;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport hoistStatics from 'hoist-non-react-statics';\nimport invariant from 'invariant';\nimport React, { useContext, useMemo, useRef, useReducer } from 'react';\nimport { isValidElementType, isContextConsumer } from 'react-is';\nimport Subscription from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\nimport { ReactReduxContext } from './Context'; // Define some constant arrays just to avoid re-creating these\n\nvar EMPTY_ARRAY = [];\nvar NO_SUBSCRIPTION_ARRAY = [null, null];\n\nvar stringifyComponent = function stringifyComponent(Comp) {\n try {\n return JSON.stringify(Comp);\n } catch (err) {\n return String(Comp);\n }\n};\n\nfunction storeStateUpdatesReducer(state, action) {\n var updateCount = state[1];\n return [action.payload, updateCount + 1];\n}\n\nvar initStateUpdates = function initStateUpdates() {\n return [null, 0];\n};\n\nexport default function connectAdvanced(\n/*\r\n selectorFactory is a func that is responsible for returning the selector function used to\r\n compute new props from state, props, and dispatch. For example:\r\n export default connectAdvanced((dispatch, options) => (state, props) => ({\r\n thing: state.things[props.thingId],\r\n saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),\r\n }))(YourComponent)\r\n Access to dispatch is provided to the factory so selectorFactories can bind actionCreators\r\n outside of their selector as an optimization. Options passed to connectAdvanced are passed to\r\n the selectorFactory, along with displayName and WrappedComponent, as the second argument.\r\n Note that selectorFactory is responsible for all caching/memoization of inbound and outbound\r\n props. Do not use connectAdvanced directly without memoizing results between calls to your\r\n selector, otherwise the Connect component will re-render on every state or props change.\r\n*/\nselectorFactory, // options object:\n_ref) {\n if (_ref === void 0) {\n _ref = {};\n }\n\n var _ref2 = _ref,\n _ref2$getDisplayName = _ref2.getDisplayName,\n getDisplayName = _ref2$getDisplayName === void 0 ? function (name) {\n return \"ConnectAdvanced(\" + name + \")\";\n } : _ref2$getDisplayName,\n _ref2$methodName = _ref2.methodName,\n methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName,\n _ref2$renderCountProp = _ref2.renderCountProp,\n renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp,\n _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges,\n shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta,\n _ref2$storeKey = _ref2.storeKey,\n storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey,\n _ref2$withRef = _ref2.withRef,\n withRef = _ref2$withRef === void 0 ? false : _ref2$withRef,\n _ref2$forwardRef = _ref2.forwardRef,\n forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef,\n _ref2$context = _ref2.context,\n context = _ref2$context === void 0 ? ReactReduxContext : _ref2$context,\n connectOptions = _objectWithoutPropertiesLoose(_ref2, [\"getDisplayName\", \"methodName\", \"renderCountProp\", \"shouldHandleStateChanges\", \"storeKey\", \"withRef\", \"forwardRef\", \"context\"]);\n\n invariant(renderCountProp === undefined, \"renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension\");\n invariant(!withRef, 'withRef is removed. To access the wrapped instance, use a ref on the connected component');\n var customStoreWarningMessage = 'To use a custom Redux store for specific components, create a custom React context with ' + \"React.createContext(), and pass the context object to React Redux's Provider and specific components\" + ' like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. ' + 'You may also pass a {context : MyContext} option to connect';\n invariant(storeKey === 'store', 'storeKey has been removed and does not do anything. ' + customStoreWarningMessage);\n var Context = context;\n return function wrapWithConnect(WrappedComponent) {\n if (process.env.NODE_ENV !== 'production') {\n invariant(isValidElementType(WrappedComponent), \"You must pass a component to the function returned by \" + (methodName + \". Instead received \" + stringifyComponent(WrappedComponent)));\n }\n\n var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n var displayName = getDisplayName(wrappedComponentName);\n\n var selectorFactoryOptions = _extends({}, connectOptions, {\n getDisplayName: getDisplayName,\n methodName: methodName,\n renderCountProp: renderCountProp,\n shouldHandleStateChanges: shouldHandleStateChanges,\n storeKey: storeKey,\n displayName: displayName,\n wrappedComponentName: wrappedComponentName,\n WrappedComponent: WrappedComponent\n });\n\n var pure = connectOptions.pure;\n\n function createChildSelector(store) {\n return selectorFactory(store.dispatch, selectorFactoryOptions);\n } // If we aren't running in \"pure\" mode, we don't want to memoize values.\n // To avoid conditionally calling hooks, we fall back to a tiny wrapper\n // that just executes the given callback immediately.\n\n\n var usePureOnlyMemo = pure ? useMemo : function (callback) {\n return callback();\n };\n\n function ConnectFunction(props) {\n var _useMemo = useMemo(function () {\n // Distinguish between actual \"data\" props that were passed to the wrapper component,\n // and values needed to control behavior (forwarded refs, alternate context instances).\n // To maintain the wrapperProps object reference, memoize this destructuring.\n var forwardedRef = props.forwardedRef,\n wrapperProps = _objectWithoutPropertiesLoose(props, [\"forwardedRef\"]);\n\n return [props.context, forwardedRef, wrapperProps];\n }, [props]),\n propsContext = _useMemo[0],\n forwardedRef = _useMemo[1],\n wrapperProps = _useMemo[2];\n\n var ContextToUse = useMemo(function () {\n // Users may optionally pass in a custom context instance to use instead of our ReactReduxContext.\n // Memoize the check that determines which context instance we should use.\n return propsContext && propsContext.Consumer && isContextConsumer(React.createElement(propsContext.Consumer, null)) ? propsContext : Context;\n }, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available\n\n var contextValue = useContext(ContextToUse); // The store _must_ exist as either a prop or in context.\n // We'll check to see if it _looks_ like a Redux store first.\n // This allows us to pass through a `store` prop that is just a plain value.\n\n var didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch);\n var didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store);\n invariant(didStoreComeFromProps || didStoreComeFromContext, \"Could not find \\\"store\\\" in the context of \" + (\"\\\"\" + displayName + \"\\\". Either wrap the root component in a <Provider>, \") + \"or pass a custom React context provider to <Provider> and the corresponding \" + (\"React context consumer to \" + displayName + \" in connect options.\")); // Based on the previous check, one of these must be true\n\n var store = didStoreComeFromProps ? props.store : contextValue.store;\n var childPropsSelector = useMemo(function () {\n // The child props selector needs the store reference as an input.\n // Re-create this selector whenever the store changes.\n return createChildSelector(store);\n }, [store]);\n\n var _useMemo2 = useMemo(function () {\n if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component\n // connected to the store via props shouldn't use subscription from context, or vice versa.\n\n var subscription = new Subscription(store, didStoreComeFromProps ? null : contextValue.subscription); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in\n // the middle of the notification loop, where `subscription` will then be null. This can\n // probably be avoided if Subscription's listeners logic is changed to not call listeners\n // that have been unsubscribed in the middle of the notification loop.\n\n var notifyNestedSubs = subscription.notifyNestedSubs.bind(subscription);\n return [subscription, notifyNestedSubs];\n }, [store, didStoreComeFromProps, contextValue]),\n subscription = _useMemo2[0],\n notifyNestedSubs = _useMemo2[1]; // Determine what {store, subscription} value should be put into nested context, if necessary,\n // and memoize that value to avoid unnecessary context updates.\n\n\n var overriddenContextValue = useMemo(function () {\n if (didStoreComeFromProps) {\n // This component is directly subscribed to a store from props.\n // We don't want descendants reading from this store - pass down whatever\n // the existing context value is from the nearest connected ancestor.\n return contextValue;\n } // Otherwise, put this component's subscription instance into context, so that\n // connected descendants won't update until after this component is done\n\n\n return _extends({}, contextValue, {\n subscription: subscription\n });\n }, [didStoreComeFromProps, contextValue, subscription]); // We need to force this wrapper component to re-render whenever a Redux store update\n // causes a change to the calculated child component props (or we caught an error in mapState)\n\n var _useReducer = useReducer(storeStateUpdatesReducer, EMPTY_ARRAY, initStateUpdates),\n _useReducer$ = _useReducer[0],\n previousStateUpdateResult = _useReducer$[0],\n forceComponentUpdateDispatch = _useReducer[1]; // Propagate any mapState/mapDispatch errors upwards\n\n\n if (previousStateUpdateResult && previousStateUpdateResult.error) {\n throw previousStateUpdateResult.error;\n } // Set up refs to coordinate values between the subscription effect and the render logic\n\n\n var lastChildProps = useRef();\n var lastWrapperProps = useRef(wrapperProps);\n var childPropsFromStoreUpdate = useRef();\n var renderIsScheduled = useRef(false);\n var actualChildProps = usePureOnlyMemo(function () {\n // Tricky logic here:\n // - This render may have been triggered by a Redux store update that produced new child props\n // - However, we may have gotten new wrapper props after that\n // If we have new child props, and the same wrapper props, we know we should use the new child props as-is.\n // But, if we have new wrapper props, those might change the child props, so we have to recalculate things.\n // So, we'll use the child props from store update only if the wrapper props are the same as last time.\n if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) {\n return childPropsFromStoreUpdate.current;\n } // TODO We're reading the store directly in render() here. Bad idea?\n // This will likely cause Bad Things (TM) to happen in Concurrent Mode.\n // Note that we do this because on renders _not_ caused by store updates, we need the latest store state\n // to determine what the child props should be.\n\n\n return childPropsSelector(store.getState(), wrapperProps);\n }, [store, previousStateUpdateResult, wrapperProps]); // We need this to execute synchronously every time we re-render. However, React warns\n // about useLayoutEffect in SSR, so we try to detect environment and fall back to\n // just useEffect instead to avoid the warning, since neither will run anyway.\n\n useIsomorphicLayoutEffect(function () {\n // We want to capture the wrapper props and child props we used for later comparisons\n lastWrapperProps.current = wrapperProps;\n lastChildProps.current = actualChildProps;\n renderIsScheduled.current = false; // If the render was from a store update, clear out that reference and cascade the subscriber update\n\n if (childPropsFromStoreUpdate.current) {\n childPropsFromStoreUpdate.current = null;\n notifyNestedSubs();\n }\n }); // Our re-subscribe logic only runs when the store/subscription setup changes\n\n useIsomorphicLayoutEffect(function () {\n // If we're not subscribed to the store, nothing to do here\n if (!shouldHandleStateChanges) return; // Capture values for checking if and when this component unmounts\n\n var didUnsubscribe = false;\n var lastThrownError = null; // We'll run this callback every time a store subscription update propagates to this component\n\n var checkForUpdates = function checkForUpdates() {\n if (didUnsubscribe) {\n // Don't run stale listeners.\n // Redux doesn't guarantee unsubscriptions happen until next dispatch.\n return;\n }\n\n var latestStoreState = store.getState();\n var newChildProps, error;\n\n try {\n // Actually run the selector with the most recent store state and wrapper props\n // to determine what the child props should be\n newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current);\n } catch (e) {\n error = e;\n lastThrownError = e;\n }\n\n if (!error) {\n lastThrownError = null;\n } // If the child props haven't changed, nothing to do here - cascade the subscription update\n\n\n if (newChildProps === lastChildProps.current) {\n if (!renderIsScheduled.current) {\n notifyNestedSubs();\n }\n } else {\n // Save references to the new child props. Note that we track the \"child props from store update\"\n // as a ref instead of a useState/useReducer because we need a way to determine if that value has\n // been processed. If this went into useState/useReducer, we couldn't clear out the value without\n // forcing another re-render, which we don't want.\n lastChildProps.current = newChildProps;\n childPropsFromStoreUpdate.current = newChildProps;\n renderIsScheduled.current = true; // If the child props _did_ change (or we caught an error), this wrapper component needs to re-render\n\n forceComponentUpdateDispatch({\n type: 'STORE_UPDATED',\n payload: {\n error: error\n }\n });\n }\n }; // Actually subscribe to the nearest connected ancestor (or store)\n\n\n subscription.onStateChange = checkForUpdates;\n subscription.trySubscribe(); // Pull data from the store after first render in case the store has\n // changed since we began.\n\n checkForUpdates();\n\n var unsubscribeWrapper = function unsubscribeWrapper() {\n didUnsubscribe = true;\n subscription.tryUnsubscribe();\n subscription.onStateChange = null;\n\n if (lastThrownError) {\n // It's possible that we caught an error due to a bad mapState function, but the\n // parent re-rendered without this component and we're about to unmount.\n // This shouldn't happen as long as we do top-down subscriptions correctly, but\n // if we ever do those wrong, this throw will surface the error in our tests.\n // In that case, throw the error from here so it doesn't get lost.\n throw lastThrownError;\n }\n };\n\n return unsubscribeWrapper;\n }, [store, subscription, childPropsSelector]); // Now that all that's done, we can finally try to actually render the child component.\n // We memoize the elements for the rendered child component as an optimization.\n\n var renderedWrappedComponent = useMemo(function () {\n return React.createElement(WrappedComponent, _extends({}, actualChildProps, {\n ref: forwardedRef\n }));\n }, [forwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering\n // that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate.\n\n var renderedChild = useMemo(function () {\n if (shouldHandleStateChanges) {\n // If this component is subscribed to store updates, we need to pass its own\n // subscription instance down to our descendants. That means rendering the same\n // Context instance, and putting a different value into the context.\n return React.createElement(ContextToUse.Provider, {\n value: overriddenContextValue\n }, renderedWrappedComponent);\n }\n\n return renderedWrappedComponent;\n }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]);\n return renderedChild;\n } // If we're in \"pure\" mode, ensure our wrapper component only re-renders when incoming props have changed.\n\n\n var Connect = pure ? React.memo(ConnectFunction) : ConnectFunction;\n Connect.WrappedComponent = WrappedComponent;\n Connect.displayName = displayName;\n\n if (forwardRef) {\n var forwarded = React.forwardRef(function forwardConnectRef(props, ref) {\n return React.createElement(Connect, _extends({}, props, {\n forwardedRef: ref\n }));\n });\n forwarded.displayName = displayName;\n forwarded.WrappedComponent = WrappedComponent;\n return hoistStatics(forwarded, WrappedComponent);\n }\n\n return hoistStatics(Connect, WrappedComponent);\n };\n}","var hasOwn = Object.prototype.hasOwnProperty;\n\nfunction is(x, y) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\nexport default function shallowEqual(objA, objB) {\n if (is(objA, objB)) return true;\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}","import verifyPlainObject from '../utils/verifyPlainObject';\nexport function wrapMapToPropsConstant(getConstant) {\n return function initConstantSelector(dispatch, options) {\n var constant = getConstant(dispatch, options);\n\n function constantSelector() {\n return constant;\n }\n\n constantSelector.dependsOnOwnProps = false;\n return constantSelector;\n };\n} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args\n// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine\n// whether mapToProps needs to be invoked when props have changed.\n//\n// A length of one signals that mapToProps does not depend on props from the parent component.\n// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and\n// therefore not reporting its length accurately..\n\nexport function getDependsOnOwnProps(mapToProps) {\n return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,\n// this function wraps mapToProps in a proxy function which does several things:\n//\n// * Detects whether the mapToProps function being called depends on props, which\n// is used by selectorFactory to decide if it should reinvoke on props changes.\n//\n// * On first call, handles mapToProps if returns another function, and treats that\n// new function as the true mapToProps for subsequent calls.\n//\n// * On first call, verifies the first result is a plain object, in order to warn\n// the developer that their mapToProps function is not returning a valid result.\n//\n\nexport function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}","import { bindActionCreators } from 'redux';\nimport { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\nexport function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {\n return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined;\n}\nexport function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {\n return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) {\n return {\n dispatch: dispatch\n };\n }) : undefined;\n}\nexport function whenMapDispatchToPropsIsObject(mapDispatchToProps) {\n return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) {\n return bindActionCreators(mapDispatchToProps, dispatch);\n }) : undefined;\n}\nexport default [whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject];","import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\nexport function whenMapStateToPropsIsFunction(mapStateToProps) {\n return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined;\n}\nexport function whenMapStateToPropsIsMissing(mapStateToProps) {\n return !mapStateToProps ? wrapMapToPropsConstant(function () {\n return {};\n }) : undefined;\n}\nexport default [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport verifyPlainObject from '../utils/verifyPlainObject';\nexport function defaultMergeProps(stateProps, dispatchProps, ownProps) {\n return _extends({}, ownProps, {}, stateProps, {}, dispatchProps);\n}\nexport function wrapMergePropsFunc(mergeProps) {\n return function initMergePropsProxy(dispatch, _ref) {\n var displayName = _ref.displayName,\n pure = _ref.pure,\n areMergedPropsEqual = _ref.areMergedPropsEqual;\n var hasRunOnce = false;\n var mergedProps;\n return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n if (hasRunOnce) {\n if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;\n } else {\n hasRunOnce = true;\n mergedProps = nextMergedProps;\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(mergedProps, displayName, 'mergeProps');\n }\n\n return mergedProps;\n };\n };\n}\nexport function whenMergePropsIsFunction(mergeProps) {\n return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;\n}\nexport function whenMergePropsIsOmitted(mergeProps) {\n return !mergeProps ? function () {\n return defaultMergeProps;\n } : undefined;\n}\nexport default [whenMergePropsIsFunction, whenMergePropsIsOmitted];","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport verifySubselectors from './verifySubselectors';\nexport function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {\n return function impureFinalPropsSelector(state, ownProps) {\n return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);\n };\n}\nexport function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {\n var areStatesEqual = _ref.areStatesEqual,\n areOwnPropsEqual = _ref.areOwnPropsEqual,\n areStatePropsEqual = _ref.areStatePropsEqual;\n var hasRunAtLeastOnce = false;\n var state;\n var ownProps;\n var stateProps;\n var dispatchProps;\n var mergedProps;\n\n function handleFirstCall(firstState, firstOwnProps) {\n state = firstState;\n ownProps = firstOwnProps;\n stateProps = mapStateToProps(state, ownProps);\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n hasRunAtLeastOnce = true;\n return mergedProps;\n }\n\n function handleNewPropsAndNewState() {\n stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewProps() {\n if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewState() {\n var nextStateProps = mapStateToProps(state, ownProps);\n var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n stateProps = nextStateProps;\n if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleSubsequentCalls(nextState, nextOwnProps) {\n var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n var stateChanged = !areStatesEqual(nextState, state);\n state = nextState;\n ownProps = nextOwnProps;\n if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n if (propsChanged) return handleNewProps();\n if (stateChanged) return handleNewState();\n return mergedProps;\n }\n\n return function pureFinalPropsSelector(nextState, nextOwnProps) {\n return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n };\n} // TODO: Add more comments\n// If pure is true, the selector returned by selectorFactory will memoize its results,\n// allowing connectAdvanced's shouldComponentUpdate to return false if final\n// props have not changed. If false, the selector will always return a new\n// object and shouldComponentUpdate will always return true.\n\nexport default function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutPropertiesLoose(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport connectAdvanced from '../components/connectAdvanced';\nimport shallowEqual from '../utils/shallowEqual';\nimport defaultMapDispatchToPropsFactories from './mapDispatchToProps';\nimport defaultMapStateToPropsFactories from './mapStateToProps';\nimport defaultMergePropsFactories from './mergeProps';\nimport defaultSelectorFactory from './selectorFactory';\n/*\r\n connect is a facade over connectAdvanced. It turns its args into a compatible\r\n selectorFactory, which has the signature:\r\n\r\n (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps\r\n \r\n connect passes its args to connectAdvanced as options, which will in turn pass them to\r\n selectorFactory each time a Connect component instance is instantiated or hot reloaded.\r\n\r\n selectorFactory returns a final props selector from its mapStateToProps,\r\n mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,\r\n mergePropsFactories, and pure args.\r\n\r\n The resulting final props selector is called by the Connect component instance whenever\r\n it receives new props or store state.\r\n */\n\nfunction match(arg, factories, name) {\n for (var i = factories.length - 1; i >= 0; i--) {\n var result = factories[i](arg);\n if (result) return result;\n }\n\n return function (dispatch, options) {\n throw new Error(\"Invalid value of type \" + typeof arg + \" for \" + name + \" argument when connecting component \" + options.wrappedComponentName + \".\");\n };\n}\n\nfunction strictEqual(a, b) {\n return a === b;\n} // createConnect with default args builds the 'official' connect behavior. Calling it with\n// different options opens up some testing and extensibility scenarios\n\n\nexport function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? defaultSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n extraOptions = _objectWithoutPropertiesLoose(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}\nexport default createConnect();","import { useContext } from 'react';\nimport invariant from 'invariant';\nimport { ReactReduxContext } from '../components/Context';\n/**\r\n * A hook to access the value of the `ReactReduxContext`. This is a low-level\r\n * hook that you should usually not need to call directly.\r\n *\r\n * @returns {any} the value of the `ReactReduxContext`\r\n *\r\n * @example\r\n *\r\n * import React from 'react'\r\n * import { useReduxContext } from 'react-redux'\r\n *\r\n * export const CounterComponent = ({ value }) => {\r\n * const { store } = useReduxContext()\r\n * return <div>{store.getState()}</div>\r\n * }\r\n */\n\nexport function useReduxContext() {\n var contextValue = useContext(ReactReduxContext);\n invariant(contextValue, 'could not find react-redux context value; please ensure the component is wrapped in a <Provider>');\n return contextValue;\n}","import { useContext } from 'react';\nimport { ReactReduxContext } from '../components/Context';\nimport { useReduxContext as useDefaultReduxContext } from './useReduxContext';\n/**\r\n * Hook factory, which creates a `useStore` hook bound to a given context.\r\n *\r\n * @param {Function} [context=ReactReduxContext] Context passed to your `<Provider>`.\r\n * @returns {Function} A `useStore` hook bound to the specified context.\r\n */\n\nexport function createStoreHook(context) {\n if (context === void 0) {\n context = ReactReduxContext;\n }\n\n var useReduxContext = context === ReactReduxContext ? useDefaultReduxContext : function () {\n return useContext(context);\n };\n return function useStore() {\n var _useReduxContext = useReduxContext(),\n store = _useReduxContext.store;\n\n return store;\n };\n}\n/**\r\n * A hook to access the redux store.\r\n *\r\n * @returns {any} the redux store\r\n *\r\n * @example\r\n *\r\n * import React from 'react'\r\n * import { useStore } from 'react-redux'\r\n *\r\n * export const ExampleComponent = () => {\r\n * const store = useStore()\r\n * return <div>{store.getState()}</div>\r\n * }\r\n */\n\nexport var useStore = createStoreHook();","import { ReactReduxContext } from '../components/Context';\nimport { useStore as useDefaultStore, createStoreHook } from './useStore';\n/**\r\n * Hook factory, which creates a `useDispatch` hook bound to a given context.\r\n *\r\n * @param {Function} [context=ReactReduxContext] Context passed to your `<Provider>`.\r\n * @returns {Function} A `useDispatch` hook bound to the specified context.\r\n */\n\nexport function createDispatchHook(context) {\n if (context === void 0) {\n context = ReactReduxContext;\n }\n\n var useStore = context === ReactReduxContext ? useDefaultStore : createStoreHook(context);\n return function useDispatch() {\n var store = useStore();\n return store.dispatch;\n };\n}\n/**\r\n * A hook to access the redux `dispatch` function.\r\n *\r\n * @returns {any|function} redux store's `dispatch` function\r\n *\r\n * @example\r\n *\r\n * import React, { useCallback } from 'react'\r\n * import { useDispatch } from 'react-redux'\r\n *\r\n * export const CounterComponent = ({ value }) => {\r\n * const dispatch = useDispatch()\r\n * const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), [])\r\n * return (\r\n * <div>\r\n * <span>{value}</span>\r\n * <button onClick={increaseCounter}>Increase counter</button>\r\n * </div>\r\n * )\r\n * }\r\n */\n\nexport var useDispatch = createDispatchHook();","import { useReducer, useRef, useMemo, useContext } from 'react';\nimport invariant from 'invariant';\nimport { useReduxContext as useDefaultReduxContext } from './useReduxContext';\nimport Subscription from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\nimport { ReactReduxContext } from '../components/Context';\n\nvar refEquality = function refEquality(a, b) {\n return a === b;\n};\n\nfunction useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub) {\n var _useReducer = useReducer(function (s) {\n return s + 1;\n }, 0),\n forceRender = _useReducer[1];\n\n var subscription = useMemo(function () {\n return new Subscription(store, contextSub);\n }, [store, contextSub]);\n var latestSubscriptionCallbackError = useRef();\n var latestSelector = useRef();\n var latestSelectedState = useRef();\n var selectedState;\n\n try {\n if (selector !== latestSelector.current || latestSubscriptionCallbackError.current) {\n selectedState = selector(store.getState());\n } else {\n selectedState = latestSelectedState.current;\n }\n } catch (err) {\n var errorMessage = \"An error occurred while selecting the store state: \" + err.message + \".\";\n\n if (latestSubscriptionCallbackError.current) {\n errorMessage += \"\\nThe error may be correlated with this previous error:\\n\" + latestSubscriptionCallbackError.current.stack + \"\\n\\nOriginal stack trace:\";\n }\n\n throw new Error(errorMessage);\n }\n\n useIsomorphicLayoutEffect(function () {\n latestSelector.current = selector;\n latestSelectedState.current = selectedState;\n latestSubscriptionCallbackError.current = undefined;\n });\n useIsomorphicLayoutEffect(function () {\n function checkForUpdates() {\n try {\n var newSelectedState = latestSelector.current(store.getState());\n\n if (equalityFn(newSelectedState, latestSelectedState.current)) {\n return;\n }\n\n latestSelectedState.current = newSelectedState;\n } catch (err) {\n // we ignore all errors here, since when the component\n // is re-rendered, the selectors are called again, and\n // will throw again, if neither props nor store state\n // changed\n latestSubscriptionCallbackError.current = err;\n }\n\n forceRender({});\n }\n\n subscription.onStateChange = checkForUpdates;\n subscription.trySubscribe();\n checkForUpdates();\n return function () {\n return subscription.tryUnsubscribe();\n };\n }, [store, subscription]);\n return selectedState;\n}\n/**\r\n * Hook factory, which creates a `useSelector` hook bound to a given context.\r\n *\r\n * @param {Function} [context=ReactReduxContext] Context passed to your `<Provider>`.\r\n * @returns {Function} A `useSelector` hook bound to the specified context.\r\n */\n\n\nexport function createSelectorHook(context) {\n if (context === void 0) {\n context = ReactReduxContext;\n }\n\n var useReduxContext = context === ReactReduxContext ? useDefaultReduxContext : function () {\n return useContext(context);\n };\n return function useSelector(selector, equalityFn) {\n if (equalityFn === void 0) {\n equalityFn = refEquality;\n }\n\n invariant(selector, \"You must pass a selector to useSelectors\");\n\n var _useReduxContext = useReduxContext(),\n store = _useReduxContext.store,\n contextSub = _useReduxContext.subscription;\n\n return useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub);\n };\n}\n/**\r\n * A hook to access the redux store's state. This hook takes a selector function\r\n * as an argument. The selector is called with the store state.\r\n *\r\n * This hook takes an optional equality comparison function as the second parameter\r\n * that allows you to customize the way the selected state is compared to determine\r\n * whether the component needs to be re-rendered.\r\n *\r\n * @param {Function} selector the selector function\r\n * @param {Function=} equalityFn the function that will be used to determine equality\r\n *\r\n * @returns {any} the selected state\r\n *\r\n * @example\r\n *\r\n * import React from 'react'\r\n * import { useSelector } from 'react-redux'\r\n *\r\n * export const CounterComponent = () => {\r\n * const counter = useSelector(state => state.counter)\r\n * return <div>{counter}</div>\r\n * }\r\n */\n\nexport var useSelector = createSelectorHook();","import Provider from './components/Provider';\nimport connectAdvanced from './components/connectAdvanced';\nimport { ReactReduxContext } from './components/Context';\nimport connect from './connect/connect';\nimport { useDispatch, createDispatchHook } from './hooks/useDispatch';\nimport { useSelector, createSelectorHook } from './hooks/useSelector';\nimport { useStore, createStoreHook } from './hooks/useStore';\nimport { setBatch } from './utils/batch';\nimport { unstable_batchedUpdates as batch } from './utils/reactBatchedUpdates';\nimport shallowEqual from './utils/shallowEqual';\nsetBatch(batch);\nexport { Provider, connectAdvanced, ReactReduxContext, connect, batch, useDispatch, createDispatchHook, useSelector, createSelectorHook, useStore, createStoreHook, shallowEqual };","/**\n * This is a straight rip-off of the React.js ReactPropTypes.js proptype validators,\n * modified to make it possible to validate Immutable.js data.\n * ImmutableTypes.listOf is patterned after React.PropTypes.arrayOf, but for Immutable.List\n * ImmutableTypes.shape is based on React.PropTypes.shape, but for any Immutable.Iterable\n */\n\"use strict\";\n\nvar Immutable = require(\"immutable\");\n\nvar ANONYMOUS = \"<<anonymous>>\";\nvar ImmutablePropTypes = {\n listOf: createListOfTypeChecker,\n mapOf: createMapOfTypeChecker,\n orderedMapOf: createOrderedMapOfTypeChecker,\n setOf: createSetOfTypeChecker,\n orderedSetOf: createOrderedSetOfTypeChecker,\n stackOf: createStackOfTypeChecker,\n iterableOf: createIterableOfTypeChecker,\n recordOf: createRecordOfTypeChecker,\n shape: createShapeChecker,\n contains: createShapeChecker,\n mapContains: createMapContainsChecker,\n // Primitive Types\n list: createImmutableTypeChecker(\"List\", Immutable.List.isList),\n map: createImmutableTypeChecker(\"Map\", Immutable.Map.isMap),\n orderedMap: createImmutableTypeChecker(\"OrderedMap\", Immutable.OrderedMap.isOrderedMap),\n set: createImmutableTypeChecker(\"Set\", Immutable.Set.isSet),\n orderedSet: createImmutableTypeChecker(\"OrderedSet\", Immutable.OrderedSet.isOrderedSet),\n stack: createImmutableTypeChecker(\"Stack\", Immutable.Stack.isStack),\n seq: createImmutableTypeChecker(\"Seq\", Immutable.Seq.isSeq),\n record: createImmutableTypeChecker(\"Record\", function (isRecord) {\n return isRecord instanceof Immutable.Record;\n }),\n iterable: createImmutableTypeChecker(\"Iterable\", Immutable.Iterable.isIterable)\n};\n\nfunction getPropType(propValue) {\n var propType = typeof propValue;\n\n if (Array.isArray(propValue)) {\n return \"array\";\n }\n\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return \"object\";\n }\n\n if (propValue instanceof Immutable.Iterable) {\n return \"Immutable.\" + propValue.toSource().split(\" \")[0];\n }\n\n return propType;\n}\n\nfunction createChainableTypeChecker(validate) {\n function checkType(isRequired, props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {\n rest[_key - 6] = arguments[_key];\n }\n\n propFullName = propFullName || propName;\n componentName = componentName || ANONYMOUS;\n\n if (props[propName] == null) {\n var locationName = location;\n\n if (isRequired) {\n return new Error(\"Required \" + locationName + \" `\" + propFullName + \"` was not specified in \" + (\"`\" + componentName + \"`.\"));\n }\n } else {\n return validate.apply(undefined, [props, propName, componentName, location, propFullName].concat(rest));\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n return chainedCheckType;\n}\n\nfunction createImmutableTypeChecker(immutableClassName, immutableClassTypeValidator) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n\n if (!immutableClassTypeValidator(propValue)) {\n var propType = getPropType(propValue);\n return new Error(\"Invalid \" + location + \" `\" + propFullName + \"` of type `\" + propType + \"` \" + (\"supplied to `\" + componentName + \"`, expected `\" + immutableClassName + \"`.\"));\n }\n\n return null;\n }\n\n return createChainableTypeChecker(validate);\n}\n\nfunction createIterableTypeChecker(typeChecker, immutableClassName, immutableClassTypeValidator) {\n function validate(props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = arguments[_key];\n }\n\n var propValue = props[propName];\n\n if (!immutableClassTypeValidator(propValue)) {\n var locationName = location;\n var propType = getPropType(propValue);\n return new Error(\"Invalid \" + locationName + \" `\" + propFullName + \"` of type \" + (\"`\" + propType + \"` supplied to `\" + componentName + \"`, expected an Immutable.js \" + immutableClassName + \".\"));\n }\n\n if (typeof typeChecker !== \"function\") {\n return new Error(\"Invalid typeChecker supplied to `\" + componentName + \"` \" + (\"for propType `\" + propFullName + \"`, expected a function.\"));\n }\n\n var propValues = propValue.toArray();\n\n for (var i = 0, len = propValues.length; i < len; i++) {\n var error = typeChecker.apply(undefined, [propValues, i, componentName, location, \"\" + propFullName + \"[\" + i + \"]\"].concat(rest));\n\n if (error instanceof Error) {\n return error;\n }\n }\n }\n\n return createChainableTypeChecker(validate);\n}\n\nfunction createKeysTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = arguments[_key];\n }\n\n var propValue = props[propName];\n\n if (typeof typeChecker !== \"function\") {\n return new Error(\"Invalid keysTypeChecker (optional second argument) supplied to `\" + componentName + \"` \" + (\"for propType `\" + propFullName + \"`, expected a function.\"));\n }\n\n var keys = propValue.keySeq().toArray();\n\n for (var i = 0, len = keys.length; i < len; i++) {\n var error = typeChecker.apply(undefined, [keys, i, componentName, location, \"\" + propFullName + \" -> key(\" + keys[i] + \")\"].concat(rest));\n\n if (error instanceof Error) {\n return error;\n }\n }\n }\n\n return createChainableTypeChecker(validate);\n}\n\nfunction createListOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"List\", Immutable.List.isList);\n}\n\nfunction createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, immutableClassName, immutableClassTypeValidator) {\n function validate() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return createIterableTypeChecker(valuesTypeChecker, immutableClassName, immutableClassTypeValidator).apply(undefined, args) || keysTypeChecker && createKeysTypeChecker(keysTypeChecker).apply(undefined, args);\n }\n\n return createChainableTypeChecker(validate);\n}\n\nfunction createMapOfTypeChecker(valuesTypeChecker, keysTypeChecker) {\n return createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, \"Map\", Immutable.Map.isMap);\n}\n\nfunction createOrderedMapOfTypeChecker(valuesTypeChecker, keysTypeChecker) {\n return createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, \"OrderedMap\", Immutable.OrderedMap.isOrderedMap);\n}\n\nfunction createSetOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"Set\", Immutable.Set.isSet);\n}\n\nfunction createOrderedSetOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"OrderedSet\", Immutable.OrderedSet.isOrderedSet);\n}\n\nfunction createStackOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"Stack\", Immutable.Stack.isStack);\n}\n\nfunction createIterableOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"Iterable\", Immutable.Iterable.isIterable);\n}\n\nfunction createRecordOfTypeChecker(recordKeys) {\n function validate(props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = arguments[_key];\n }\n\n var propValue = props[propName];\n\n if (!(propValue instanceof Immutable.Record)) {\n var propType = getPropType(propValue);\n var locationName = location;\n return new Error(\"Invalid \" + locationName + \" `\" + propFullName + \"` of type `\" + propType + \"` \" + (\"supplied to `\" + componentName + \"`, expected an Immutable.js Record.\"));\n }\n\n for (var key in recordKeys) {\n var checker = recordKeys[key];\n\n if (!checker) {\n continue;\n }\n\n var mutablePropValue = propValue.toObject();\n var error = checker.apply(undefined, [mutablePropValue, key, componentName, location, \"\" + propFullName + \".\" + key].concat(rest));\n\n if (error) {\n return error;\n }\n }\n }\n\n return createChainableTypeChecker(validate);\n} // there is some irony in the fact that shapeTypes is a standard hash and not an immutable collection\n\n\nfunction createShapeTypeChecker(shapeTypes) {\n var immutableClassName = arguments[1] === undefined ? \"Iterable\" : arguments[1];\n var immutableClassTypeValidator = arguments[2] === undefined ? Immutable.Iterable.isIterable : arguments[2];\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = arguments[_key];\n }\n\n var propValue = props[propName];\n\n if (!immutableClassTypeValidator(propValue)) {\n var propType = getPropType(propValue);\n var locationName = location;\n return new Error(\"Invalid \" + locationName + \" `\" + propFullName + \"` of type `\" + propType + \"` \" + (\"supplied to `\" + componentName + \"`, expected an Immutable.js \" + immutableClassName + \".\"));\n }\n\n var mutablePropValue = propValue.toObject();\n\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n\n if (!checker) {\n continue;\n }\n\n var error = checker.apply(undefined, [mutablePropValue, key, componentName, location, \"\" + propFullName + \".\" + key].concat(rest));\n\n if (error) {\n return error;\n }\n }\n }\n\n return createChainableTypeChecker(validate);\n}\n\nfunction createShapeChecker(shapeTypes) {\n return createShapeTypeChecker(shapeTypes);\n}\n\nfunction createMapContainsChecker(shapeTypes) {\n return createShapeTypeChecker(shapeTypes, \"Map\", Immutable.Map.isMap);\n}\n\nmodule.exports = ImmutablePropTypes;","import detectPassiveEvents from 'detect-passive-events';\nimport { forceSingleColumn } from 'flavours/glitch/util/initial_state';\n\nconst LAYOUT_BREAKPOINT = 630;\n\nexport function isMobile(width, columns) {\n switch (columns) {\n case 'multiple':\n return false;\n case 'single':\n return true;\n default:\n return forceSingleColumn || width <= LAYOUT_BREAKPOINT;\n }\n};\n\nconst iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n\nlet userTouching = false;\nlet listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false;\n\nfunction touchListener() {\n userTouching = true;\n window.removeEventListener('touchstart', touchListener, listenerOptions);\n}\n\nwindow.addEventListener('touchstart', touchListener, listenerOptions);\n\nexport function isUserTouching() {\n return userTouching;\n}\n\nexport function isIOS() {\n return iOS;\n};\n","import { normalizeAccount, normalizeStatus, normalizePoll } from './normalizer';\n\nexport const ACCOUNT_IMPORT = 'ACCOUNT_IMPORT';\nexport const ACCOUNTS_IMPORT = 'ACCOUNTS_IMPORT';\nexport const STATUS_IMPORT = 'STATUS_IMPORT';\nexport const STATUSES_IMPORT = 'STATUSES_IMPORT';\nexport const POLLS_IMPORT = 'POLLS_IMPORT';\n\nfunction pushUnique(array, object) {\n if (array.every(element => element.id !== object.id)) {\n array.push(object);\n }\n}\n\nexport function importAccount(account) {\n return { type: ACCOUNT_IMPORT, account };\n}\n\nexport function importAccounts(accounts) {\n return { type: ACCOUNTS_IMPORT, accounts };\n}\n\nexport function importStatus(status) {\n return { type: STATUS_IMPORT, status };\n}\n\nexport function importStatuses(statuses) {\n return { type: STATUSES_IMPORT, statuses };\n}\n\nexport function importPolls(polls) {\n return { type: POLLS_IMPORT, polls };\n}\n\nexport function importFetchedAccount(account) {\n return importFetchedAccounts([account]);\n}\n\nexport function importFetchedAccounts(accounts) {\n const normalAccounts = [];\n\n function processAccount(account) {\n pushUnique(normalAccounts, normalizeAccount(account));\n\n if (account.moved) {\n processAccount(account.moved);\n }\n }\n\n accounts.forEach(processAccount);\n\n return importAccounts(normalAccounts);\n}\n\nexport function importFetchedStatus(status) {\n return importFetchedStatuses([status]);\n}\n\nexport function importFetchedStatuses(statuses) {\n return (dispatch, getState) => {\n const accounts = [];\n const normalStatuses = [];\n const polls = [];\n\n function processStatus(status) {\n pushUnique(normalStatuses, normalizeStatus(status, getState().getIn(['statuses', status.id])));\n pushUnique(accounts, status.account);\n\n if (status.reblog && status.reblog.id) {\n processStatus(status.reblog);\n }\n\n if (status.poll && status.poll.id) {\n pushUnique(polls, normalizePoll(status.poll));\n }\n }\n\n statuses.forEach(processStatus);\n\n dispatch(importPolls(polls));\n dispatch(importFetchedAccounts(accounts));\n dispatch(importStatuses(normalStatuses));\n };\n}\n\nexport function importFetchedPoll(poll) {\n return dispatch => {\n dispatch(importPolls([normalizePoll(poll)]));\n };\n}\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n/** `Object#toString` result references. */\n\n\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n/** Built-in value references. */\n\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n\n return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);\n}\n\nmodule.exports = baseGetTag;","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;","var root = require('./_root');\n/** Built-in value references. */\n\n\nvar Symbol = root.Symbol;\nmodule.exports = Symbol;","\"use strict\";\n\nvar __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n };\n\n return function (d, b) {\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar ValidationError =\n/** @class */\nfunction (_super) {\n __extends(ValidationError, _super);\n\n function ValidationError(message) {\n var _this = _super.call(this, message) || this;\n\n _this.name = \"ValidationError\";\n _this.message = message;\n return _this;\n }\n\n return ValidationError;\n}(Error);\n\nexports.ValidationError = ValidationError;","const element = document.getElementById('initial-state');\nconst initialState = element && function () {\n const result = JSON.parse(element.textContent);\n try {\n result.local_settings = JSON.parse(localStorage.getItem('mastodon-settings'));\n } catch (e) {\n result.local_settings = {};\n }\n return result;\n}();\n\nconst getMeta = (prop) => initialState && initialState.meta && initialState.meta[prop];\nconst getRight = (prop) => initialState && initialState.rights && initialState.rights[prop];\n\nexport const reduceMotion = getMeta('reduce_motion');\nexport const autoPlayGif = getMeta('auto_play_gif');\nexport const displaySensitiveMedia = getMeta('display_sensitive_media');\nexport const displayMedia = getMeta('display_media') || (getMeta('display_sensitive_media') ? 'show_all' : 'default');\nexport const unfollowModal = getMeta('unfollow_modal');\nexport const boostModal = getMeta('boost_modal');\nexport const favouriteModal = getMeta('favourite_modal');\nexport const deleteModal = getMeta('delete_modal');\nexport const me = getMeta('me');\nexport const searchEnabled = getMeta('search_enabled');\nexport const maxChars = getMeta('max_toot_chars') || 500;\nexport const pollLimits = (initialState && initialState.poll_limits);\nexport const invitesEnabled = getMeta('invites_enabled');\nexport const version = getMeta('version');\nexport const mascot = getMeta('mascot');\nexport const profile_directory = getMeta('profile_directory');\nexport const isStaff = getMeta('is_staff');\nexport const defaultContentType = getMeta('default_content_type');\nexport const forceSingleColumn = getMeta('advanced_layout') === false;\nexport const useBlurhash = getMeta('use_blurhash');\nexport const usePendingItems = getMeta('use_pending_items');\nexport const useSystemEmojiFont = getMeta('system_emoji_font');\nexport const showTrends = getMeta('trends');\n\nexport const deleteOthersNotice = getRight('delete_others_notice');\n\nexport default initialState;\n","import { normalizeAccount, normalizeStatus, normalizePoll } from './normalizer';\n\nexport const ACCOUNT_IMPORT = 'ACCOUNT_IMPORT';\nexport const ACCOUNTS_IMPORT = 'ACCOUNTS_IMPORT';\nexport const STATUS_IMPORT = 'STATUS_IMPORT';\nexport const STATUSES_IMPORT = 'STATUSES_IMPORT';\nexport const POLLS_IMPORT = 'POLLS_IMPORT';\n\nfunction pushUnique(array, object) {\n if (array.every(element => element.id !== object.id)) {\n array.push(object);\n }\n}\n\nexport function importAccount(account) {\n return { type: ACCOUNT_IMPORT, account };\n}\n\nexport function importAccounts(accounts) {\n return { type: ACCOUNTS_IMPORT, accounts };\n}\n\nexport function importStatus(status) {\n return { type: STATUS_IMPORT, status };\n}\n\nexport function importStatuses(statuses) {\n return { type: STATUSES_IMPORT, statuses };\n}\n\nexport function importPolls(polls) {\n return { type: POLLS_IMPORT, polls };\n}\n\nexport function importFetchedAccount(account) {\n return importFetchedAccounts([account]);\n}\n\nexport function importFetchedAccounts(accounts) {\n const normalAccounts = [];\n\n function processAccount(account) {\n pushUnique(normalAccounts, normalizeAccount(account));\n\n if (account.moved) {\n processAccount(account.moved);\n }\n }\n\n accounts.forEach(processAccount);\n\n return importAccounts(normalAccounts);\n}\n\nexport function importFetchedStatus(status) {\n return importFetchedStatuses([status]);\n}\n\nexport function importFetchedStatuses(statuses) {\n return (dispatch, getState) => {\n const accounts = [];\n const normalStatuses = [];\n const polls = [];\n\n function processStatus(status) {\n pushUnique(normalStatuses, normalizeStatus(status, getState().getIn(['statuses', status.id])));\n pushUnique(accounts, status.account);\n\n if (status.reblog && status.reblog.id) {\n processStatus(status.reblog);\n }\n\n if (status.poll && status.poll.id) {\n pushUnique(polls, normalizePoll(status.poll));\n }\n }\n\n statuses.forEach(processStatus);\n\n dispatch(importPolls(polls));\n dispatch(importFetchedAccounts(accounts));\n dispatch(importStatuses(normalStatuses));\n };\n}\n\nexport function importFetchedPoll(poll) {\n return dispatch => {\n dispatch(importPolls([normalizePoll(poll)]));\n };\n}\n","import React from 'react';\nimport { is } from 'immutable';\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar ImmutablePureComponent = function (_React$Component) {\n _inherits(ImmutablePureComponent, _React$Component);\n\n function ImmutablePureComponent() {\n _classCallCheck(this, ImmutablePureComponent);\n\n return _possibleConstructorReturn(this, (ImmutablePureComponent.__proto__ || Object.getPrototypeOf(ImmutablePureComponent)).apply(this, arguments));\n }\n\n _createClass(ImmutablePureComponent, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate(nextProps) {\n var _this2 = this;\n\n var nextState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var state = this.state || {};\n return !(this.updateOnProps || Object.keys(_extends({}, nextProps, this.props))).every(function (p) {\n return is(nextProps[p], _this2.props[p]);\n }) || !(this.updateOnStates || Object.keys(_extends({}, nextState, state))).every(function (s) {\n return is(nextState[s], state[s]);\n });\n }\n }]);\n\n return ImmutablePureComponent;\n}(React.Component);\n\nexport { ImmutablePureComponent };\nexport default ImmutablePureComponent;","'use strict';\n\nvar COMPATIBLE_ENCODING_PATTERN = /^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i;\nvar WS_TRIM_PATTERN = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g;\nvar WS_CHAR_PATTERN = /\\s|\\uFEFF|\\xA0/;\nvar WS_FOLD_PATTERN = /\\r?\\n[\\x20\\x09]+/g;\nvar DELIMITER_PATTERN = /[;,\"]/;\nvar WS_DELIMITER_PATTERN = /[;,\"]|\\s/;\nvar STATE = {\n IDLE: 1 << 0,\n URI: 1 << 1,\n ATTR: 1 << 2\n};\n\nfunction trim(value) {\n return value.replace(WS_TRIM_PATTERN, '');\n}\n\nfunction hasWhitespace(value) {\n return WS_CHAR_PATTERN.test(value);\n}\n\nfunction skipWhitespace(value, offset) {\n while (hasWhitespace(value[offset])) {\n offset++;\n }\n\n return offset;\n}\n\nfunction needsQuotes(value) {\n return WS_DELIMITER_PATTERN.test(value);\n}\n\nvar Link =\n/*#__PURE__*/\nfunction () {\n /**\n * Link\n * @constructor\n * @param {String} [value]\n * @returns {Link}\n */\n function Link(value) {\n /** @type {Array} URI references */\n this.refs = [];\n\n if (value) {\n this.parse(value);\n }\n }\n /**\n * Get refs with given relation type\n * @param {String} value\n * @returns {Array<Object>}\n */\n\n\n var _proto = Link.prototype;\n\n _proto.rel = function rel(value) {\n var links = [];\n\n for (var i = 0; i < this.refs.length; i++) {\n if (this.refs[i].rel === value) {\n links.push(this.refs[i]);\n }\n }\n\n return links;\n }\n /**\n * Get refs where given attribute has a given value\n * @param {String} attr\n * @param {String} value\n * @returns {Array<Object>}\n */\n ;\n\n _proto.get = function get(attr, value) {\n attr = attr.toLowerCase();\n var links = [];\n\n for (var i = 0; i < this.refs.length; i++) {\n if (this.refs[i][attr] === value) {\n links.push(this.refs[i]);\n }\n }\n\n return links;\n };\n\n _proto.set = function set(link) {\n this.refs.push(link);\n return this;\n };\n\n _proto.has = function has(attr, value) {\n attr = attr.toLowerCase();\n\n for (var i = 0; i < this.refs.length; i++) {\n if (this.refs[i][attr] === value) {\n return true;\n }\n }\n\n return false;\n };\n\n _proto.parse = function parse(value, offset) {\n offset = offset || 0;\n value = offset ? value.slice(offset) : value; // Trim & unfold folded lines\n\n value = trim(value).replace(WS_FOLD_PATTERN, '');\n var state = STATE.IDLE;\n var length = value.length;\n var offset = 0;\n var ref = null;\n\n while (offset < length) {\n if (state === STATE.IDLE) {\n if (hasWhitespace(value[offset])) {\n offset++;\n continue;\n } else if (value[offset] === '<') {\n var end = value.indexOf('>', offset);\n if (end === -1) throw new Error('Expected end of URI delimiter at offset ' + offset);\n ref = {\n uri: value.slice(offset + 1, end)\n };\n this.refs.push(ref);\n offset = end;\n state = STATE.URI;\n } else {\n throw new Error('Unexpected character \"' + value[offset] + '\" at offset ' + offset);\n }\n\n offset++;\n } else if (state === STATE.URI) {\n if (hasWhitespace(value[offset])) {\n offset++;\n continue;\n } else if (value[offset] === ';') {\n state = STATE.ATTR;\n offset++;\n } else if (value[offset] === ',') {\n state = STATE.IDLE;\n offset++;\n } else {\n throw new Error('Unexpected character \"' + value[offset] + '\" at offset ' + offset);\n }\n } else if (state === STATE.ATTR) {\n if (value[offset] === ';' || hasWhitespace(value[offset])) {\n offset++;\n continue;\n }\n\n var end = value.indexOf('=', offset);\n if (end === -1) throw new Error('Expected attribute delimiter at offset ' + offset);\n var attr = trim(value.slice(offset, end)).toLowerCase();\n var attrValue = '';\n offset = end + 1;\n offset = skipWhitespace(value, offset);\n\n if (value[offset] === '\"') {\n offset++;\n\n while (offset < length) {\n if (value[offset] === '\"') {\n offset++;\n break;\n }\n\n if (value[offset] === '\\\\') {\n offset++;\n }\n\n attrValue += value[offset];\n offset++;\n }\n } else {\n var end = offset + 1;\n\n while (!DELIMITER_PATTERN.test(value[end]) && end < length) {\n end++;\n }\n\n attrValue = value.slice(offset, end);\n offset = end;\n }\n\n if (ref[attr] && Link.isSingleOccurenceAttr(attr)) {// Ignore multiples of attributes which may only appear once\n } else if (attr[attr.length - 1] === '*') {\n ref[attr] = Link.parseExtendedValue(attrValue);\n } else {\n attrValue = attr === 'rel' || attr === 'type' ? attrValue.toLowerCase() : attrValue;\n\n if (ref[attr] != null) {\n if (Array.isArray(ref[attr])) {\n ref[attr].push(attrValue);\n } else {\n ref[attr] = [ref[attr], attrValue];\n }\n } else {\n ref[attr] = attrValue;\n }\n }\n\n switch (value[offset]) {\n case ',':\n state = STATE.IDLE;\n break;\n\n case ';':\n state = STATE.ATTR;\n break;\n }\n\n offset++;\n } else {\n throw new Error('Unknown parser state \"' + state + '\"');\n }\n }\n\n ref = null;\n return this;\n };\n\n _proto.toString = function toString() {\n var refs = [];\n var link = '';\n var ref = null;\n\n for (var i = 0; i < this.refs.length; i++) {\n ref = this.refs[i];\n link = Object.keys(this.refs[i]).reduce(function (link, attr) {\n if (attr === 'uri') return link;\n return link + '; ' + Link.formatAttribute(attr, ref[attr]);\n }, '<' + ref.uri + '>');\n refs.push(link);\n }\n\n return refs.join(', ');\n };\n\n return Link;\n}();\n/**\n * Determines whether an encoding can be\n * natively handled with a `Buffer`\n * @param {String} value\n * @returns {Boolean}\n */\n\n\nLink.isCompatibleEncoding = function (value) {\n return COMPATIBLE_ENCODING_PATTERN.test(value);\n};\n\nLink.parse = function (value, offset) {\n return new Link().parse(value, offset);\n};\n\nLink.isSingleOccurenceAttr = function (attr) {\n return attr === 'rel' || attr === 'type' || attr === 'media' || attr === 'title' || attr === 'title*';\n};\n\nLink.isTokenAttr = function (attr) {\n return attr === 'rel' || attr === 'type' || attr === 'anchor';\n};\n\nLink.escapeQuotes = function (value) {\n return value.replace(/\"/g, '\\\\\"');\n};\n/**\n * Parses an extended value and attempts to decode it\n * @internal\n * @param {String} value\n * @return {Object}\n */\n\n\nLink.parseExtendedValue = function (value) {\n var parts = /([^']+)?(?:'([^']+)')?(.+)/.exec(value);\n return {\n language: parts[2].toLowerCase(),\n encoding: Link.isCompatibleEncoding(parts[1]) ? null : parts[1].toLowerCase(),\n value: Link.isCompatibleEncoding(parts[1]) ? decodeURIComponent(parts[3]) : parts[3]\n };\n};\n/**\n * Format a given extended attribute and it's value\n * @param {String} attr\n * @param {Object} data\n * @return {String}\n */\n\n\nLink.formatExtendedAttribute = function (attr, data) {\n var encoding = (data.encoding || 'utf-8').toUpperCase();\n var language = data.language || 'en';\n var encodedValue = '';\n\n if (Buffer.isBuffer(data.value) && Link.isCompatibleEncoding(encoding)) {\n encodedValue = data.value.toString(encoding);\n } else if (Buffer.isBuffer(data.value)) {\n encodedValue = data.value.toString('hex').replace(/[0-9a-f]{2}/gi, '%$1');\n } else {\n encodedValue = encodeURIComponent(data.value);\n }\n\n return attr + '=' + encoding + '\\'' + language + '\\'' + encodedValue;\n};\n/**\n * Format a given attribute and it's value\n * @param {String} attr\n * @param {String|Object} value\n * @return {String}\n */\n\n\nLink.formatAttribute = function (attr, value) {\n if (Array.isArray(value)) {\n return value.map(function (item) {\n return Link.formatAttribute(attr, item);\n }).join('; ');\n }\n\n if (attr[attr.length - 1] === '*' || typeof value !== 'string') {\n return Link.formatExtendedAttribute(attr, value);\n }\n\n if (Link.isTokenAttr(attr)) {\n value = needsQuotes(value) ? '\"' + Link.escapeQuotes(value) + '\"' : Link.escapeQuotes(value);\n } else if (needsQuotes(value)) {\n value = encodeURIComponent(value); // We don't need to escape <SP> <,> <;> within quotes\n\n value = value.replace(/%20/g, ' ').replace(/%2C/g, ',').replace(/%3B/g, ';');\n value = '\"' + value + '\"';\n }\n\n return attr + '=' + value;\n};\n\nmodule.exports = Link;","/* global window */\nimport ponyfill from './ponyfill.js';\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;","export const unescapeHTML = (html) => {\n const wrapper = document.createElement('div');\n wrapper.innerHTML = html.replace(/<br\\s*\\/?>/g, '\\n').replace(/<\\/p><p>/g, '\\n\\n').replace(/<[^>]*>/g, '');\n return wrapper.textContent;\n};\n","import escapeTextContentForBrowser from 'escape-html';\nimport emojify from '../../features/emoji/emoji';\nimport { unescapeHTML } from '../../utils/html';\nimport { expandSpoilers } from '../../initial_state';\n\nconst domParser = new DOMParser();\n\nconst makeEmojiMap = record => record.emojis.reduce((obj, emoji) => {\n obj[`:${emoji.shortcode}:`] = emoji;\n return obj;\n}, {});\n\nexport function searchTextFromRawStatus (status) {\n const spoilerText = status.spoiler_text || '';\n const searchContent = ([spoilerText, status.content].concat((status.poll && status.poll.options) ? status.poll.options.map(option => option.title) : [])).join('\\n\\n').replace(/<br\\s*\\/?>/g, '\\n').replace(/<\\/p><p>/g, '\\n\\n');\n return domParser.parseFromString(searchContent, 'text/html').documentElement.textContent;\n}\n\nexport function normalizeAccount(account) {\n account = { ...account };\n\n const emojiMap = makeEmojiMap(account);\n const displayName = account.display_name.trim().length === 0 ? account.username : account.display_name;\n\n account.display_name_html = emojify(escapeTextContentForBrowser(displayName), emojiMap);\n account.note_emojified = emojify(account.note, emojiMap);\n\n if (account.fields) {\n account.fields = account.fields.map(pair => ({\n ...pair,\n name_emojified: emojify(escapeTextContentForBrowser(pair.name), emojiMap),\n value_emojified: emojify(pair.value, emojiMap),\n value_plain: unescapeHTML(pair.value),\n }));\n }\n\n if (account.moved) {\n account.moved = account.moved.id;\n }\n\n return account;\n}\n\nexport function normalizeStatus(status, normalOldStatus) {\n const normalStatus = { ...status };\n normalStatus.account = status.account.id;\n\n if (status.reblog && status.reblog.id) {\n normalStatus.reblog = status.reblog.id;\n }\n\n if (status.poll && status.poll.id) {\n normalStatus.poll = status.poll.id;\n }\n\n // Only calculate these values when status first encountered\n // Otherwise keep the ones already in the reducer\n if (normalOldStatus) {\n normalStatus.search_index = normalOldStatus.get('search_index');\n normalStatus.contentHtml = normalOldStatus.get('contentHtml');\n normalStatus.spoilerHtml = normalOldStatus.get('spoilerHtml');\n normalStatus.hidden = normalOldStatus.get('hidden');\n } else {\n const spoilerText = normalStatus.spoiler_text || '';\n const searchContent = ([spoilerText, status.content].concat((status.poll && status.poll.options) ? status.poll.options.map(option => option.title) : [])).join('\\n\\n').replace(/<br\\s*\\/?>/g, '\\n').replace(/<\\/p><p>/g, '\\n\\n');\n const emojiMap = makeEmojiMap(normalStatus);\n\n normalStatus.search_index = domParser.parseFromString(searchContent, 'text/html').documentElement.textContent;\n normalStatus.contentHtml = emojify(normalStatus.content, emojiMap);\n normalStatus.spoilerHtml = emojify(escapeTextContentForBrowser(spoilerText), emojiMap);\n normalStatus.hidden = expandSpoilers ? false : spoilerText.length > 0 || normalStatus.sensitive;\n }\n\n return normalStatus;\n}\n\nexport function normalizePoll(poll) {\n const normalPoll = { ...poll };\n\n const emojiMap = makeEmojiMap(normalPoll);\n\n normalPoll.options = poll.options.map((option, index) => ({\n ...option,\n voted: poll.own_votes && poll.own_votes.includes(index),\n title_emojified: emojify(escapeTextContentForBrowser(option.title), emojiMap),\n }));\n\n return normalPoll;\n}\n","const element = document.getElementById('initial-state');\nconst initialState = element && JSON.parse(element.textContent);\n\nconst getMeta = (prop) => initialState && initialState.meta && initialState.meta[prop];\nconst getRight = (prop) => initialState && initialState.rights && initialState.rights[prop];\n\nexport const reduceMotion = getMeta('reduce_motion');\nexport const autoPlayGif = getMeta('auto_play_gif');\nexport const displayMedia = getMeta('display_media');\nexport const expandSpoilers = getMeta('expand_spoilers');\nexport const unfollowModal = getMeta('unfollow_modal');\nexport const boostModal = getMeta('boost_modal');\nexport const deleteModal = getMeta('delete_modal');\nexport const me = getMeta('me');\nexport const searchEnabled = getMeta('search_enabled');\nexport const maxChars = getMeta('max_toot_chars') || 500;\nexport const invitesEnabled = getMeta('invites_enabled');\nexport const repository = getMeta('repository');\nexport const source_url = getMeta('source_url');\nexport const version = getMeta('version');\nexport const mascot = getMeta('mascot');\nexport const profile_directory = getMeta('profile_directory');\nexport const isStaff = getMeta('is_staff');\nexport const forceSingleColumn = !getMeta('advanced_layout');\nexport const useBlurhash = getMeta('use_blurhash');\nexport const usePendingItems = getMeta('use_pending_items');\nexport const showTrends = getMeta('trends');\nexport const title = getMeta('title');\nexport const cropImages = getMeta('crop_images');\n\nexport const deleteOthersNotice = getRight('delete_others_notice');\n\nexport default initialState;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class Permalink extends React.PureComponent {\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n className: PropTypes.string,\n href: PropTypes.string.isRequired,\n to: PropTypes.string.isRequired,\n children: PropTypes.node,\n onInterceptClick: PropTypes.func,\n };\n\n handleClick = (e) => {\n if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {\n if (this.props.onInterceptClick && this.props.onInterceptClick()) {\n e.preventDefault();\n return;\n }\n\n if (this.context.router) {\n e.preventDefault();\n let state = {...this.context.router.history.location.state};\n state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1;\n this.context.router.history.push(this.props.to, state);\n }\n }\n }\n\n render () {\n const {\n children,\n className,\n href,\n to,\n onInterceptClick,\n ...other\n } = this.props;\n\n return (\n <a target='_blank' href={href} onClick={this.handleClick} {...other} className={`permalink${className ? ' ' + className : ''}`}>\n {children}\n </a>\n );\n }\n\n}\n","\"use strict\";\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar decode_1 = require(\"./decode\");\n\nexports.decode = decode_1.default;\nexports.isBlurhashValid = decode_1.isBlurhashValid;\n\nvar encode_1 = require(\"./encode\");\n\nexports.encode = encode_1.default;\n\n__export(require(\"./error\"));","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _SwipeableViews = _interopRequireDefault(require(\"./SwipeableViews\"));\n\nvar _default = _SwipeableViews.default;\nexports.default = _default;","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n/** `Object#toString` result references. */\n\n\nvar symbolTag = '[object Symbol]';\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n\nfunction isSymbol(value) {\n return typeof value == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;\n}\n\nmodule.exports = isSymbol;","// NB: This function can still return unsafe HTML\nexport const unescapeHTML = (html) => {\n const wrapper = document.createElement('div');\n wrapper.innerHTML = html.replace(/<br\\s*\\/?>/g, '\\n').replace(/<\\/p><p>/g, '\\n\\n').replace(/<[^>]*>/g, '');\n return wrapper.textContent;\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport WaveSurfer from 'wavesurfer.js';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport { formatTime } from 'flavours/glitch/features/video';\nimport Icon from 'flavours/glitch/components/icon';\nimport classNames from 'classnames';\nimport { throttle } from 'lodash';\n\nconst messages = defineMessages({\n play: { id: 'video.play', defaultMessage: 'Play' },\n pause: { id: 'video.pause', defaultMessage: 'Pause' },\n mute: { id: 'video.mute', defaultMessage: 'Mute sound' },\n unmute: { id: 'video.unmute', defaultMessage: 'Unmute sound' },\n download: { id: 'video.download', defaultMessage: 'Download file' },\n});\n\nexport default @injectIntl\nclass Audio extends React.PureComponent {\n\n static propTypes = {\n src: PropTypes.string.isRequired,\n alt: PropTypes.string,\n duration: PropTypes.number,\n peaks: PropTypes.arrayOf(PropTypes.number),\n height: PropTypes.number,\n preload: PropTypes.bool,\n editable: PropTypes.bool,\n intl: PropTypes.object.isRequired,\n };\n\n state = {\n currentTime: 0,\n duration: null,\n paused: true,\n muted: false,\n volume: 0.5,\n };\n\n // hard coded in components.scss\n // any way to get ::before values programatically?\n\n volWidth = 50;\n\n volOffset = 70;\n\n volHandleOffset = v => {\n const offset = v * this.volWidth + this.volOffset;\n return (offset > 110) ? 110 : offset;\n }\n\n setVolumeRef = c => {\n this.volume = c;\n }\n\n setWaveformRef = c => {\n this.waveform = c;\n }\n\n componentDidMount () {\n if (this.waveform) {\n this._updateWaveform();\n }\n }\n\n componentDidUpdate (prevProps) {\n if (this.waveform && prevProps.src !== this.props.src) {\n this._updateWaveform();\n }\n }\n\n componentWillUnmount () {\n if (this.wavesurfer) {\n this.wavesurfer.destroy();\n this.wavesurfer = null;\n }\n }\n\n _updateWaveform () {\n const { src, height, duration, peaks, preload } = this.props;\n\n const progressColor = window.getComputedStyle(document.querySelector('.audio-player__progress-placeholder')).getPropertyValue('background-color');\n const waveColor = window.getComputedStyle(document.querySelector('.audio-player__wave-placeholder')).getPropertyValue('background-color');\n\n if (this.wavesurfer) {\n this.wavesurfer.destroy();\n this.loaded = false;\n }\n\n const wavesurfer = WaveSurfer.create({\n container: this.waveform,\n height,\n barWidth: 3,\n cursorWidth: 0,\n progressColor,\n waveColor,\n backend: 'MediaElement',\n interact: preload,\n });\n\n wavesurfer.setVolume(this.state.volume);\n\n if (preload) {\n wavesurfer.load(src);\n this.loaded = true;\n } else {\n wavesurfer.load(src, peaks, 'none', duration);\n this.loaded = false;\n }\n\n wavesurfer.on('ready', () => this.setState({ duration: Math.floor(wavesurfer.getDuration()) }));\n wavesurfer.on('audioprocess', () => this.setState({ currentTime: Math.floor(wavesurfer.getCurrentTime()) }));\n wavesurfer.on('pause', () => this.setState({ paused: true }));\n wavesurfer.on('play', () => this.setState({ paused: false }));\n wavesurfer.on('volume', volume => this.setState({ volume }));\n wavesurfer.on('mute', muted => this.setState({ muted }));\n\n this.wavesurfer = wavesurfer;\n }\n\n togglePlay = () => {\n if (this.state.paused) {\n if (!this.props.preload && !this.loaded) {\n this.wavesurfer.createBackend();\n this.wavesurfer.createPeakCache();\n this.wavesurfer.load(this.props.src);\n this.wavesurfer.toggleInteraction();\n this.loaded = true;\n }\n\n this.wavesurfer.play();\n this.setState({ paused: false });\n } else {\n this.wavesurfer.pause();\n this.setState({ paused: true });\n }\n }\n\n toggleMute = () => {\n this.wavesurfer.setMute(!this.state.muted);\n }\n\n handleVolumeMouseDown = e => {\n document.addEventListener('mousemove', this.handleMouseVolSlide, true);\n document.addEventListener('mouseup', this.handleVolumeMouseUp, true);\n document.addEventListener('touchmove', this.handleMouseVolSlide, true);\n document.addEventListener('touchend', this.handleVolumeMouseUp, true);\n\n this.handleMouseVolSlide(e);\n\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleVolumeMouseUp = () => {\n document.removeEventListener('mousemove', this.handleMouseVolSlide, true);\n document.removeEventListener('mouseup', this.handleVolumeMouseUp, true);\n document.removeEventListener('touchmove', this.handleMouseVolSlide, true);\n document.removeEventListener('touchend', this.handleVolumeMouseUp, true);\n }\n\n handleMouseVolSlide = throttle(e => {\n const rect = this.volume.getBoundingClientRect();\n const x = (e.clientX - rect.left) / this.volWidth; // x position within the element.\n\n if(!isNaN(x)) {\n let slideamt = x;\n\n if (x > 1) {\n slideamt = 1;\n } else if(x < 0) {\n slideamt = 0;\n }\n\n this.wavesurfer.setVolume(slideamt);\n }\n }, 60);\n\n render () {\n const { height, intl, alt, editable } = this.props;\n const { paused, muted, volume, currentTime } = this.state;\n\n const volumeWidth = muted ? 0 : volume * this.volWidth;\n const volumeHandleLoc = muted ? this.volHandleOffset(0) : this.volHandleOffset(volume);\n\n return (\n <div className={classNames('audio-player', { editable })}>\n <div className='audio-player__progress-placeholder' style={{ display: 'none' }} />\n <div className='audio-player__wave-placeholder' style={{ display: 'none' }} />\n\n <div\n className='audio-player__waveform'\n aria-label={alt}\n title={alt}\n style={{ height }}\n ref={this.setWaveformRef}\n />\n\n <div className='video-player__controls active'>\n <div className='video-player__buttons-bar'>\n <div className='video-player__buttons left'>\n <button type='button' aria-label={intl.formatMessage(paused ? messages.play : messages.pause)} onClick={this.togglePlay}><Icon id={paused ? 'play' : 'pause'} fixedWidth /></button>\n <button type='button' aria-label={intl.formatMessage(muted ? messages.unmute : messages.mute)} onClick={this.toggleMute}><Icon id={muted ? 'volume-off' : 'volume-up'} fixedWidth /></button>\n\n <div className='video-player__volume' onMouseDown={this.handleVolumeMouseDown} ref={this.setVolumeRef}>\n \n <div className='video-player__volume__current' style={{ width: `${volumeWidth}px` }} />\n\n <span\n className={classNames('video-player__volume__handle')}\n tabIndex='0'\n style={{ left: `${volumeHandleLoc}px` }}\n />\n </div>\n\n <span>\n <span className='video-player__time-current'>{formatTime(currentTime)}</span>\n <span className='video-player__time-sep'>/</span>\n <span className='video-player__time-total'>{formatTime(this.state.duration || Math.floor(this.props.duration))}</span>\n </span>\n </div>\n\n <div className='video-player__buttons right'>\n <button type='button' aria-label={intl.formatMessage(messages.download)}>\n <a className='video-player__download__icon' href={this.props.src} download>\n <Icon id={'download'} fixedWidth />\n </a>\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport WaveSurfer from 'wavesurfer.js';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport { formatTime } from 'mastodon/features/video';\nimport Icon from 'mastodon/components/icon';\nimport classNames from 'classnames';\nimport { throttle } from 'lodash';\n\nconst messages = defineMessages({\n play: { id: 'video.play', defaultMessage: 'Play' },\n pause: { id: 'video.pause', defaultMessage: 'Pause' },\n mute: { id: 'video.mute', defaultMessage: 'Mute sound' },\n unmute: { id: 'video.unmute', defaultMessage: 'Unmute sound' },\n download: { id: 'video.download', defaultMessage: 'Download file' },\n});\n\nexport default @injectIntl\nclass Audio extends React.PureComponent {\n\n static propTypes = {\n src: PropTypes.string.isRequired,\n alt: PropTypes.string,\n duration: PropTypes.number,\n peaks: PropTypes.arrayOf(PropTypes.number),\n height: PropTypes.number,\n preload: PropTypes.bool,\n editable: PropTypes.bool,\n intl: PropTypes.object.isRequired,\n };\n\n state = {\n currentTime: 0,\n duration: null,\n paused: true,\n muted: false,\n volume: 0.5,\n };\n\n // Hard coded in components.scss\n // Any way to get ::before values programatically?\n volWidth = 50;\n volOffset = 70;\n\n volHandleOffset = v => {\n const offset = v * this.volWidth + this.volOffset;\n\n return (offset > 110) ? 110 : offset;\n }\n\n setVolumeRef = c => {\n this.volume = c;\n }\n\n setWaveformRef = c => {\n this.waveform = c;\n }\n\n componentDidMount () {\n if (this.waveform) {\n this._updateWaveform();\n }\n\n window.addEventListener('scroll', this.handleScroll);\n }\n\n componentDidUpdate (prevProps) {\n if (this.waveform && prevProps.src !== this.props.src) {\n this._updateWaveform();\n }\n }\n\n componentWillUnmount () {\n window.removeEventListener('scroll', this.handleScroll);\n\n if (this.wavesurfer) {\n this.wavesurfer.destroy();\n this.wavesurfer = null;\n }\n }\n\n _updateWaveform () {\n const { src, height, duration, peaks, preload } = this.props;\n\n const progressColor = window.getComputedStyle(document.querySelector('.audio-player__progress-placeholder')).getPropertyValue('background-color');\n const waveColor = window.getComputedStyle(document.querySelector('.audio-player__wave-placeholder')).getPropertyValue('background-color');\n\n if (this.wavesurfer) {\n this.wavesurfer.destroy();\n this.loaded = false;\n }\n\n const wavesurfer = WaveSurfer.create({\n container: this.waveform,\n height,\n barWidth: 3,\n cursorWidth: 0,\n progressColor,\n waveColor,\n backend: 'MediaElement',\n interact: preload,\n });\n\n wavesurfer.setVolume(this.state.volume);\n\n if (preload) {\n wavesurfer.load(src);\n this.loaded = true;\n } else {\n wavesurfer.load(src, peaks, 'none', duration);\n this.loaded = false;\n }\n\n wavesurfer.on('ready', () => this.setState({ duration: Math.floor(wavesurfer.getDuration()) }));\n wavesurfer.on('audioprocess', () => this.setState({ currentTime: Math.floor(wavesurfer.getCurrentTime()) }));\n wavesurfer.on('pause', () => this.setState({ paused: true }));\n wavesurfer.on('play', () => this.setState({ paused: false }));\n wavesurfer.on('volume', volume => this.setState({ volume }));\n wavesurfer.on('mute', muted => this.setState({ muted }));\n\n this.wavesurfer = wavesurfer;\n }\n\n togglePlay = () => {\n if (this.state.paused) {\n if (!this.props.preload && !this.loaded) {\n this.wavesurfer.createBackend();\n this.wavesurfer.createPeakCache();\n this.wavesurfer.load(this.props.src);\n this.wavesurfer.toggleInteraction();\n this.loaded = true;\n }\n\n this.setState({ paused: false }, () => this.wavesurfer.play());\n } else {\n this.setState({ paused: true }, () => this.wavesurfer.pause());\n }\n }\n\n toggleMute = () => {\n const muted = !this.state.muted;\n this.setState({ muted }, () => this.wavesurfer.setMute(muted));\n }\n\n handleVolumeMouseDown = e => {\n document.addEventListener('mousemove', this.handleMouseVolSlide, true);\n document.addEventListener('mouseup', this.handleVolumeMouseUp, true);\n document.addEventListener('touchmove', this.handleMouseVolSlide, true);\n document.addEventListener('touchend', this.handleVolumeMouseUp, true);\n\n this.handleMouseVolSlide(e);\n\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleVolumeMouseUp = () => {\n document.removeEventListener('mousemove', this.handleMouseVolSlide, true);\n document.removeEventListener('mouseup', this.handleVolumeMouseUp, true);\n document.removeEventListener('touchmove', this.handleMouseVolSlide, true);\n document.removeEventListener('touchend', this.handleVolumeMouseUp, true);\n }\n\n handleMouseVolSlide = throttle(e => {\n const rect = this.volume.getBoundingClientRect();\n const x = (e.clientX - rect.left) / this.volWidth; // x position within the element.\n\n if(!isNaN(x)) {\n let slideamt = x;\n\n if (x > 1) {\n slideamt = 1;\n } else if(x < 0) {\n slideamt = 0;\n }\n\n this.wavesurfer.setVolume(slideamt);\n }\n }, 60);\n\n handleScroll = throttle(() => {\n if (!this.waveform || !this.wavesurfer) {\n return;\n }\n\n const { top, height } = this.waveform.getBoundingClientRect();\n const inView = (top <= (window.innerHeight || document.documentElement.clientHeight)) && (top + height >= 0);\n\n if (!this.state.paused && !inView) {\n this.setState({ paused: true }, () => this.wavesurfer.pause());\n }\n }, 150, { trailing: true })\n\n render () {\n const { height, intl, alt, editable } = this.props;\n const { paused, muted, volume, currentTime } = this.state;\n\n const volumeWidth = muted ? 0 : volume * this.volWidth;\n const volumeHandleLoc = muted ? this.volHandleOffset(0) : this.volHandleOffset(volume);\n\n return (\n <div className={classNames('audio-player', { editable })}>\n <div className='audio-player__progress-placeholder' style={{ display: 'none' }} />\n <div className='audio-player__wave-placeholder' style={{ display: 'none' }} />\n\n <div\n className='audio-player__waveform'\n aria-label={alt}\n title={alt}\n style={{ height }}\n ref={this.setWaveformRef}\n />\n\n <div className='video-player__controls active'>\n <div className='video-player__buttons-bar'>\n <div className='video-player__buttons left'>\n <button type='button' aria-label={intl.formatMessage(paused ? messages.play : messages.pause)} onClick={this.togglePlay}><Icon id={paused ? 'play' : 'pause'} fixedWidth /></button>\n <button type='button' aria-label={intl.formatMessage(muted ? messages.unmute : messages.mute)} onClick={this.toggleMute}><Icon id={muted ? 'volume-off' : 'volume-up'} fixedWidth /></button>\n\n <div className='video-player__volume' onMouseDown={this.handleVolumeMouseDown} ref={this.setVolumeRef}>\n \n <div className='video-player__volume__current' style={{ width: `${volumeWidth}px` }} />\n\n <span\n className={classNames('video-player__volume__handle')}\n tabIndex='0'\n style={{ left: `${volumeHandleLoc}px` }}\n />\n </div>\n\n <span>\n <span className='video-player__time-current'>{formatTime(currentTime)}</span>\n <span className='video-player__time-sep'>/</span>\n <span className='video-player__time-total'>{formatTime(this.state.duration || Math.floor(this.props.duration))}</span>\n </span>\n </div>\n\n <div className='video-player__buttons right'>\n <button type='button' aria-label={intl.formatMessage(messages.download)}>\n <a className='video-player__download__icon' href={this.props.src} download>\n <Icon id={'download'} fixedWidth />\n </a>\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nexport default class Icon extends React.PureComponent {\n\n static propTypes = {\n id: PropTypes.string.isRequired,\n className: PropTypes.string,\n fixedWidth: PropTypes.bool,\n };\n\n render () {\n const { id, className, fixedWidth, ...other } = this.props;\n\n return (\n <i role='img' className={classNames('fa', `fa-${id}`, className, { 'fa-fw': fixedWidth })} {...other} />\n );\n }\n\n}\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _inDOM = _interopRequireDefault(require(\"../util/inDOM\"));\n\nvar on = function on() {};\n\nif (_inDOM.default) {\n on = function () {\n if (document.addEventListener) return function (node, eventName, handler, capture) {\n return node.addEventListener(eventName, handler, capture || false);\n };else if (document.attachEvent) return function (node, eventName, handler) {\n return node.attachEvent('on' + eventName, function (e) {\n e = e || window.event;\n e.target = e.target || e.srcElement;\n e.currentTarget = node;\n handler.call(node, e);\n });\n };\n }();\n}\n\nvar _default = on;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _inDOM = _interopRequireDefault(require(\"../util/inDOM\"));\n\nvar off = function off() {};\n\nif (_inDOM.default) {\n off = function () {\n if (document.addEventListener) return function (node, eventName, handler, capture) {\n return node.removeEventListener(eventName, handler, capture || false);\n };else if (document.attachEvent) return function (node, eventName, handler) {\n return node.detachEvent('on' + eventName, handler);\n };\n }();\n}\n\nvar _default = off;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n return fn.apply(thisArg, args);\n };\n};","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).replace(/%40/gi, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']');\n}\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\n\n\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};","'use strict';\n\nvar utils = require('./utils');\n\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {\n return data;\n }\n\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n\n return data;\n }],\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) {\n /* Ignore */\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n maxContentLength: -1,\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\nmodule.exports = defaults;","'use strict';\n\nvar utils = require('./../utils');\n\nvar settle = require('./../core/settle');\n\nvar buildURL = require('./../helpers/buildURL');\n\nvar buildFullPath = require('../core/buildFullPath');\n\nvar parseHeaders = require('./../helpers/parseHeaders');\n\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\n\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest(); // HTTP basic authentication\n\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); // Set the request timeout in MS\n\n request.timeout = config.timeout; // Listen for ready state\n\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n } // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n\n\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n } // Prepare the response\n\n\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n settle(resolve, reject, response); // Clean up request\n\n request = null;\n }; // Handle browser request cancellation (as opposed to a manual cancellation)\n\n\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request)); // Clean up request\n\n request = null;\n }; // Handle low level network errors\n\n\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request)); // Clean up request\n\n request = null;\n }; // Handle timeout\n\n\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n\n reject(createError(timeoutErrorMessage, config, 'ECONNABORTED', request)); // Clean up request\n\n request = null;\n }; // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies'); // Add xsrf header\n\n\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n } // Add headers to the request\n\n\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n } // Add withCredentials to request if needed\n\n\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n } // Add responseType to request if needed\n\n\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n } // Handle progress if needed\n\n\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n } // Not all browsers support upload events\n\n\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel); // Clean up request\n\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n } // Send the request\n\n\n request.send(requestData);\n });\n};","'use strict';\n\nvar enhanceError = require('./enhanceError');\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\n\n\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};","'use strict';\n\nvar utils = require('../utils');\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\n\n\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n var valueFromConfig2Keys = ['url', 'method', 'params', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy'];\n var defaultToConfig2Keys = ['baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer', 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken', 'socketPath'];\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n }\n });\n utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {\n if (utils.isObject(config2[prop])) {\n config[prop] = utils.deepMerge(config1[prop], config2[prop]);\n } else if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (utils.isObject(config1[prop])) {\n config[prop] = utils.deepMerge(config1[prop]);\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n var axiosKeys = valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys);\n var otherKeys = Object.keys(config2).filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n return config;\n};","'use strict';\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\n\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\nmodule.exports = Cancel;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.LoadingBar = exports.TERMINATING_ANIMATION_DURATION = exports.ANIMATION_DURATION = exports.PROGRESS_INCREASE = exports.MAX_PROGRESS = exports.UPDATE_TIME = undefined;\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactLifecyclesCompat = require('react-lifecycles-compat');\n\nvar _propTypes = require('prop-types');\n\nvar _reactRedux = require('react-redux');\n\nvar _loading_bar_ducks = require('./loading_bar_ducks');\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar UPDATE_TIME = exports.UPDATE_TIME = 200;\nvar MAX_PROGRESS = exports.MAX_PROGRESS = 99;\nvar PROGRESS_INCREASE = exports.PROGRESS_INCREASE = 10;\nvar ANIMATION_DURATION = exports.ANIMATION_DURATION = UPDATE_TIME * 4;\nvar TERMINATING_ANIMATION_DURATION = exports.TERMINATING_ANIMATION_DURATION = UPDATE_TIME / 2;\nvar initialState = {\n percent: 0,\n status: 'hidden'\n};\n\nvar LoadingBar = function (_Component) {\n _inherits(LoadingBar, _Component);\n\n function LoadingBar() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, LoadingBar);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = LoadingBar.__proto__ || Object.getPrototypeOf(LoadingBar)).call.apply(_ref, [this].concat(args))), _this), _this.state = _extends({}, initialState), _this.reset = function () {\n _this.terminatingAnimationTimeoutId = null;\n\n _this.setState(initialState);\n }, _this.newPercent = function (percent, progressIncrease) {\n // Use cosine as a smoothing function\n // It could be any function to slow down progress near the ending 100%\n var smoothedProgressIncrease = progressIncrease * Math.cos(percent * (Math.PI / 2 / 100));\n return percent + smoothedProgressIncrease;\n }, _this.simulateProgress = function () {\n _this.setState(function (prevState, _ref2) {\n var maxProgress = _ref2.maxProgress,\n progressIncrease = _ref2.progressIncrease;\n var percent = prevState.percent;\n\n var newPercent = _this.newPercent(percent, progressIncrease);\n\n if (newPercent <= maxProgress) {\n percent = newPercent;\n }\n\n return {\n percent: percent\n };\n });\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(LoadingBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.state.status === 'starting') {\n this.start();\n }\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps, prevState) {\n if (prevState.status !== this.state.status) {\n if (this.state.status === 'starting') {\n this.start();\n }\n\n if (this.state.status === 'stopping') {\n this.stop();\n }\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n clearInterval(this.progressIntervalId);\n clearTimeout(this.terminatingAnimationTimeoutId);\n }\n }, {\n key: 'start',\n value: function start() {\n this.progressIntervalId = setInterval(this.simulateProgress, this.props.updateTime);\n this.setState({\n status: 'running'\n });\n }\n }, {\n key: 'stop',\n value: function stop() {\n clearInterval(this.progressIntervalId);\n this.progressIntervalId = null;\n var terminatingAnimationDuration = this.isShown() || this.props.showFastActions ? TERMINATING_ANIMATION_DURATION : 0;\n this.terminatingAnimationTimeoutId = setTimeout(this.reset, terminatingAnimationDuration);\n this.setState({\n percent: 100\n });\n }\n }, {\n key: 'isShown',\n value: function isShown() {\n return this.state.percent > 0 && this.state.percent <= 100;\n }\n }, {\n key: 'buildStyle',\n value: function buildStyle() {\n var animationDuration = this.state.status === 'stopping' ? TERMINATING_ANIMATION_DURATION : ANIMATION_DURATION; //\n // browser css3 animation compatibility\n // Style keys are camelCased in order to be\n // consistent with accessing the properties on DOM nodes from JS\n // (e.g. node.style.backgroundImage).\n // Vendor prefixes other than ms should begin with a capital letter.\n // This is why WebkitTransition has an uppercase “W”.\n // https://reactjs.org/docs/dom-elements.html#style\n\n var style = {\n opacity: '1',\n transform: 'scaleX(' + this.state.percent / 100 + ')',\n msTransform: 'scaleX(' + this.state.percent / 100 + ')',\n WebkitTransform: 'scaleX(' + this.state.percent / 100 + ')',\n MozTransform: 'scaleX(' + this.state.percent / 100 + ')',\n OTransform: 'scaleX(' + this.state.percent / 100 + ')',\n transformOrigin: 'left',\n msTransformOrigin: 'left',\n WebkitTransformOrigin: 'left',\n MozTransformOrigin: 'left',\n OTransformOrigin: 'left',\n transition: 'transform ' + animationDuration + 'ms linear',\n msTransition: '-ms-transform ' + animationDuration + 'ms linear',\n WebkitTransition: '-webkit-transform ' + animationDuration + 'ms linear',\n MozTransition: '-moz-transform ' + animationDuration + 'ms linear',\n OTransition: '-o-transform ' + animationDuration + 'ms linear',\n width: '100%',\n willChange: 'transform, opacity' // Use default styling if there's no CSS class applied\n\n };\n\n if (!this.props.className) {\n style.height = '3px';\n style.backgroundColor = 'red';\n style.position = 'absolute';\n }\n\n if (this.isShown()) {\n style.opacity = '1';\n } else {\n style.opacity = '0';\n }\n\n return _extends({}, style, this.props.style);\n }\n }, {\n key: 'render',\n value: function render() {\n if (this.state.status === 'hidden') {\n return _react2.default.createElement('div', null);\n }\n\n return _react2.default.createElement('div', null, _react2.default.createElement('div', {\n style: this.buildStyle(),\n className: this.props.className\n }), _react2.default.createElement('div', {\n style: {\n display: 'table',\n clear: 'both'\n }\n }));\n }\n }], [{\n key: 'shouldStart',\n value: function shouldStart(props, state) {\n return props.loading > 0 && ['hidden', 'stopping'].indexOf(state.status) >= 0;\n }\n }, {\n key: 'shouldStop',\n value: function shouldStop(props, state) {\n return props.loading === 0 && ['starting', 'running'].indexOf(state.status) >= 0;\n }\n }, {\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (LoadingBar.shouldStart(nextProps, prevState)) {\n return {\n status: 'starting'\n };\n }\n\n if (LoadingBar.shouldStop(nextProps, prevState)) {\n return {\n status: 'stopping'\n };\n }\n\n return null;\n }\n }]);\n\n return LoadingBar;\n}(_react.Component);\n\nLoadingBar.propTypes = {\n className: _propTypes.string,\n loading: _propTypes.number,\n maxProgress: _propTypes.number,\n progressIncrease: _propTypes.number,\n showFastActions: _propTypes.bool,\n updateTime: _propTypes.number,\n scope: _propTypes.string,\n style: _propTypes.object\n};\nLoadingBar.defaultProps = {\n className: '',\n loading: 0,\n maxProgress: MAX_PROGRESS,\n progressIncrease: PROGRESS_INCREASE,\n showFastActions: false,\n style: {},\n updateTime: UPDATE_TIME,\n scope: _loading_bar_ducks.DEFAULT_SCOPE\n};\n\nvar mapStateToProps = function mapStateToProps(state, ownProps) {\n return {\n loading: state.loadingBar[ownProps.scope || _loading_bar_ducks.DEFAULT_SCOPE]\n };\n};\n\n(0, _reactLifecyclesCompat.polyfill)(LoadingBar);\nvar ConnectedLoadingBar = (0, _reactRedux.connect)(mapStateToProps)(LoadingBar);\nexports.LoadingBar = LoadingBar;\nexports.default = ConnectedLoadingBar;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar digitCharacters = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\", \"#\", \"$\", \"%\", \"*\", \"+\", \",\", \"-\", \".\", \":\", \";\", \"=\", \"?\", \"@\", \"[\", \"]\", \"^\", \"_\", \"{\", \"|\", \"}\", \"~\"];\n\nexports.decode83 = function (str) {\n var value = 0;\n\n for (var i = 0; i < str.length; i++) {\n var c = str[i];\n var digit = digitCharacters.indexOf(c);\n value = value * 83 + digit;\n }\n\n return value;\n};\n\nexports.encode83 = function (n, length) {\n var result = \"\";\n\n for (var i = 1; i <= length; i++) {\n var digit = Math.floor(n) / Math.pow(83, length - i) % 83;\n result += digitCharacters[Math.floor(digit)];\n }\n\n return result;\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.sRGBToLinear = function (value) {\n var v = value / 255;\n\n if (v <= 0.04045) {\n return v / 12.92;\n } else {\n return Math.pow((v + 0.055) / 1.055, 2.4);\n }\n};\n\nexports.linearTosRGB = function (value) {\n var v = Math.max(0, Math.min(1, value));\n\n if (v <= 0.0031308) {\n return Math.round(v * 12.92 * 255 + 0.5);\n } else {\n return Math.round((1.055 * Math.pow(v, 1 / 2.4) - 0.055) * 255 + 0.5);\n }\n};\n\nexports.sign = function (n) {\n return n < 0 ? -1 : 1;\n};\n\nexports.signPow = function (val, exp) {\n return exports.sign(val) * Math.pow(Math.abs(val), exp);\n};","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = {\n RESISTANCE_COEF: 0.6,\n // This value is closed to what browsers are using internally to\n // trigger a native scroll.\n UNCERTAINTY_THRESHOLD: 3 // px\n\n};\nexports.default = _default;","// taken from:\n// https://github.com/twitter/twemoji/blob/47732c7/twemoji-generator.js#L848-L866\nexports.unicodeToFilename = (str) => {\n let result = '';\n let charCode = 0;\n let p = 0;\n let i = 0;\n while (i < str.length) {\n charCode = str.charCodeAt(i++);\n if (p) {\n if (result.length > 0) {\n result += '-';\n }\n result += (0x10000 + ((p - 0xD800) << 10) + (charCode - 0xDC00)).toString(16);\n p = 0;\n } else if (0xD800 <= charCode && charCode <= 0xDBFF) {\n p = charCode;\n } else {\n if (result.length > 0) {\n result += '-';\n }\n result += charCode.toString(16);\n }\n }\n return result;\n};\n","/*!\n * wavesurfer.js 3.3.1 (2020-01-14)\n * https://github.com/katspaugh/wavesurfer.js\n * @license BSD-3-Clause\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n if (typeof exports === 'object' && typeof module === 'object') module.exports = factory();else if (typeof define === 'function' && define.amd) define(\"WaveSurfer\", [], factory);else if (typeof exports === 'object') exports[\"WaveSurfer\"] = factory();else root[\"WaveSurfer\"] = factory();\n})(window, function () {\n return (\n /******/\n function (modules) {\n // webpackBootstrap\n\n /******/\n // The module cache\n\n /******/\n var installedModules = {};\n /******/\n\n /******/\n // The require function\n\n /******/\n\n function __webpack_require__(moduleId) {\n /******/\n\n /******/\n // Check if module is in cache\n\n /******/\n if (installedModules[moduleId]) {\n /******/\n return installedModules[moduleId].exports;\n /******/\n }\n /******/\n // Create a new module (and put it into the cache)\n\n /******/\n\n\n var module = installedModules[moduleId] = {\n /******/\n i: moduleId,\n\n /******/\n l: false,\n\n /******/\n exports: {}\n /******/\n\n };\n /******/\n\n /******/\n // Execute the module function\n\n /******/\n\n modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n /******/\n\n /******/\n // Flag the module as loaded\n\n /******/\n\n module.l = true;\n /******/\n\n /******/\n // Return the exports of the module\n\n /******/\n\n return module.exports;\n /******/\n }\n /******/\n\n /******/\n\n /******/\n // expose the modules object (__webpack_modules__)\n\n /******/\n\n\n __webpack_require__.m = modules;\n /******/\n\n /******/\n // expose the module cache\n\n /******/\n\n __webpack_require__.c = installedModules;\n /******/\n\n /******/\n // define getter function for harmony exports\n\n /******/\n\n __webpack_require__.d = function (exports, name, getter) {\n /******/\n if (!__webpack_require__.o(exports, name)) {\n /******/\n Object.defineProperty(exports, name, {\n enumerable: true,\n get: getter\n });\n /******/\n }\n /******/\n\n };\n /******/\n\n /******/\n // define __esModule on exports\n\n /******/\n\n\n __webpack_require__.r = function (exports) {\n /******/\n if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n /******/\n Object.defineProperty(exports, Symbol.toStringTag, {\n value: 'Module'\n });\n /******/\n }\n /******/\n\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n /******/\n };\n /******/\n\n /******/\n // create a fake namespace object\n\n /******/\n // mode & 1: value is a module id, require it\n\n /******/\n // mode & 2: merge all properties of value into the ns\n\n /******/\n // mode & 4: return value when already ns object\n\n /******/\n // mode & 8|1: behave like require\n\n /******/\n\n\n __webpack_require__.t = function (value, mode) {\n /******/\n if (mode & 1) value = __webpack_require__(value);\n /******/\n\n if (mode & 8) return value;\n /******/\n\n if (mode & 4 && typeof value === 'object' && value && value.__esModule) return value;\n /******/\n\n var ns = Object.create(null);\n /******/\n\n __webpack_require__.r(ns);\n /******/\n\n\n Object.defineProperty(ns, 'default', {\n enumerable: true,\n value: value\n });\n /******/\n\n if (mode & 2 && typeof value != 'string') for (var key in value) {\n __webpack_require__.d(ns, key, function (key) {\n return value[key];\n }.bind(null, key));\n }\n /******/\n\n return ns;\n /******/\n };\n /******/\n\n /******/\n // getDefaultExport function for compatibility with non-harmony modules\n\n /******/\n\n\n __webpack_require__.n = function (module) {\n /******/\n var getter = module && module.__esModule ?\n /******/\n function getDefault() {\n return module['default'];\n } :\n /******/\n function getModuleExports() {\n return module;\n };\n /******/\n\n __webpack_require__.d(getter, 'a', getter);\n /******/\n\n\n return getter;\n /******/\n };\n /******/\n\n /******/\n // Object.prototype.hasOwnProperty.call\n\n /******/\n\n\n __webpack_require__.o = function (object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n };\n /******/\n\n /******/\n // __webpack_public_path__\n\n /******/\n\n\n __webpack_require__.p = \"\";\n /******/\n\n /******/\n\n /******/\n // Load entry module and return exports\n\n /******/\n\n return __webpack_require__(__webpack_require__.s = \"./src/wavesurfer.js\");\n /******/\n }(\n /************************************************************************/\n\n /******/\n {\n /***/\n \"./node_modules/debounce/index.js\":\n /*!****************************************!*\\\n !*** ./node_modules/debounce/index.js ***!\n \\****************************************/\n\n /*! no static exports found */\n\n /***/\n function node_modulesDebounceIndexJs(module, exports) {\n /**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\n function debounce(func, wait, immediate) {\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n }\n\n ;\n\n var debounced = function debounced() {\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function () {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n debounced.flush = function () {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n }\n\n ; // Adds compatibility for ES modules\n\n debounce.debounce = debounce;\n module.exports = debounce;\n /***/\n },\n\n /***/\n \"./src/drawer.canvasentry.js\":\n /*!***********************************!*\\\n !*** ./src/drawer.canvasentry.js ***!\n \\***********************************/\n\n /*! no static exports found */\n\n /***/\n function srcDrawerCanvasentryJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = void 0;\n\n var _style = _interopRequireDefault(__webpack_require__(\n /*! ./util/style */\n \"./src/util/style.js\"));\n\n var _getId = _interopRequireDefault(__webpack_require__(\n /*! ./util/get-id */\n \"./src/util/get-id.js\"));\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n /**\n * The `CanvasEntry` class represents an element consisting of a wave `canvas`\n * and an (optional) progress wave `canvas`.\n *\n * The `MultiCanvas` renderer uses one or more `CanvasEntry` instances to\n * render a waveform, depending on the zoom level.\n */\n\n\n var CanvasEntry =\n /*#__PURE__*/\n function () {\n function CanvasEntry() {\n _classCallCheck(this, CanvasEntry);\n /**\n * The wave node\n *\n * @type {HTMLCanvasElement}\n */\n\n\n this.wave = null;\n /**\n * The wave canvas rendering context\n *\n * @type {CanvasRenderingContext2D}\n */\n\n this.waveCtx = null;\n /**\n * The (optional) progress wave node\n *\n * @type {HTMLCanvasElement}\n */\n\n this.progress = null;\n /**\n * The (optional) progress wave canvas rendering context\n *\n * @type {CanvasRenderingContext2D}\n */\n\n this.progressCtx = null;\n /**\n * Start of the area the canvas should render, between 0 and 1\n *\n * @type {number}\n * @private\n */\n\n this.start = 0;\n /**\n * End of the area the canvas should render, between 0 and 1\n *\n * @type {number}\n * @private\n */\n\n this.end = 1;\n /**\n * Unique identifier for this entry\n *\n * @type {string}\n */\n\n this.id = (0, _getId.default)(this.constructor.name.toLowerCase() + '_');\n /**\n * Canvas 2d context attributes\n *\n * @type {object}\n */\n\n this.canvasContextAttributes = {};\n }\n /**\n * Store the wave canvas element and create the 2D rendering context\n *\n * @param {HTMLCanvasElement} element The wave `canvas` element.\n */\n\n\n _createClass(CanvasEntry, [{\n key: \"initWave\",\n value: function initWave(element) {\n this.wave = element;\n this.waveCtx = this.wave.getContext('2d', this.canvasContextAttributes);\n }\n /**\n * Store the progress wave canvas element and create the 2D rendering\n * context\n *\n * @param {HTMLCanvasElement} element The progress wave `canvas` element.\n */\n\n }, {\n key: \"initProgress\",\n value: function initProgress(element) {\n this.progress = element;\n this.progressCtx = this.progress.getContext('2d', this.canvasContextAttributes);\n }\n /**\n * Update the dimensions\n *\n * @param {number} elementWidth Width of the entry\n * @param {number} totalWidth Total width of the multi canvas renderer\n * @param {number} width The new width of the element\n * @param {number} height The new height of the element\n */\n\n }, {\n key: \"updateDimensions\",\n value: function updateDimensions(elementWidth, totalWidth, width, height) {\n // where the canvas starts and ends in the waveform, represented as a\n // decimal between 0 and 1\n this.start = this.wave.offsetLeft / totalWidth || 0;\n this.end = this.start + elementWidth / totalWidth; // set wave canvas dimensions\n\n this.wave.width = width;\n this.wave.height = height;\n var elementSize = {\n width: elementWidth + 'px'\n };\n (0, _style.default)(this.wave, elementSize);\n\n if (this.hasProgressCanvas) {\n // set progress canvas dimensions\n this.progress.width = width;\n this.progress.height = height;\n (0, _style.default)(this.progress, elementSize);\n }\n }\n /**\n * Clear the wave and progress rendering contexts\n */\n\n }, {\n key: \"clearWave\",\n value: function clearWave() {\n // wave\n this.waveCtx.clearRect(0, 0, this.waveCtx.canvas.width, this.waveCtx.canvas.height); // progress\n\n if (this.hasProgressCanvas) {\n this.progressCtx.clearRect(0, 0, this.progressCtx.canvas.width, this.progressCtx.canvas.height);\n }\n }\n /**\n * Set the fill styles for wave and progress\n *\n * @param {string} waveColor Fill color for the wave canvas\n * @param {?string} progressColor Fill color for the progress canvas\n */\n\n }, {\n key: \"setFillStyles\",\n value: function setFillStyles(waveColor, progressColor) {\n this.waveCtx.fillStyle = waveColor;\n\n if (this.hasProgressCanvas) {\n this.progressCtx.fillStyle = progressColor;\n }\n }\n /**\n * Draw a rectangle for wave and progress\n *\n * @param {number} x X start position\n * @param {number} y Y start position\n * @param {number} width Width of the rectangle\n * @param {number} height Height of the rectangle\n * @param {number} radius Radius of the rectangle\n */\n\n }, {\n key: \"fillRects\",\n value: function fillRects(x, y, width, height, radius) {\n this.fillRectToContext(this.waveCtx, x, y, width, height, radius);\n\n if (this.hasProgressCanvas) {\n this.fillRectToContext(this.progressCtx, x, y, width, height, radius);\n }\n }\n /**\n * Draw the actual rectangle on a `canvas` element\n *\n * @private\n * @param {CanvasRenderingContext2D} ctx Rendering context of target canvas\n * @param {number} x X start position\n * @param {number} y Y start position\n * @param {number} width Width of the rectangle\n * @param {number} height Height of the rectangle\n * @param {number} radius Radius of the rectangle\n */\n\n }, {\n key: \"fillRectToContext\",\n value: function fillRectToContext(ctx, x, y, width, height, radius) {\n if (!ctx) {\n return;\n }\n\n if (radius) {\n this.drawRoundedRect(ctx, x, y, width, height, radius);\n } else {\n ctx.fillRect(x, y, width, height);\n }\n }\n /**\n * Draw a rounded rectangle on Canvas\n *\n * @private\n * @param {CanvasRenderingContext2D} ctx Canvas context\n * @param {number} x X-position of the rectangle\n * @param {number} y Y-position of the rectangle\n * @param {number} width Width of the rectangle\n * @param {number} height Height of the rectangle\n * @param {number} radius Radius of the rectangle\n *\n * @return {void}\n * @example drawRoundedRect(ctx, 50, 50, 5, 10, 3)\n */\n\n }, {\n key: \"drawRoundedRect\",\n value: function drawRoundedRect(ctx, x, y, width, height, radius) {\n if (height === 0) {\n return;\n } // peaks are float values from -1 to 1. Use absolute height values in\n // order to correctly calculate rounded rectangle coordinates\n\n\n if (height < 0) {\n height *= -1;\n y -= height;\n }\n\n ctx.beginPath();\n ctx.moveTo(x + radius, y);\n ctx.lineTo(x + width - radius, y);\n ctx.quadraticCurveTo(x + width, y, x + width, y + radius);\n ctx.lineTo(x + width, y + height - radius);\n ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);\n ctx.lineTo(x + radius, y + height);\n ctx.quadraticCurveTo(x, y + height, x, y + height - radius);\n ctx.lineTo(x, y + radius);\n ctx.quadraticCurveTo(x, y, x + radius, y);\n ctx.closePath();\n ctx.fill();\n }\n /**\n * Render the actual wave and progress lines\n *\n * @param {number[]} peaks Array with peaks data\n * @param {number} absmax Maximum peak value (absolute)\n * @param {number} halfH Half the height of the waveform\n * @param {number} offsetY Offset to the top\n * @param {number} start The x-offset of the beginning of the area that\n * should be rendered\n * @param {number} end The x-offset of the end of the area that\n * should be rendered\n */\n\n }, {\n key: \"drawLines\",\n value: function drawLines(peaks, absmax, halfH, offsetY, start, end) {\n this.drawLineToContext(this.waveCtx, peaks, absmax, halfH, offsetY, start, end);\n\n if (this.hasProgressCanvas) {\n this.drawLineToContext(this.progressCtx, peaks, absmax, halfH, offsetY, start, end);\n }\n }\n /**\n * Render the actual waveform line on a `canvas` element\n *\n * @private\n * @param {CanvasRenderingContext2D} ctx Rendering context of target canvas\n * @param {number[]} peaks Array with peaks data\n * @param {number} absmax Maximum peak value (absolute)\n * @param {number} halfH Half the height of the waveform\n * @param {number} offsetY Offset to the top\n * @param {number} start The x-offset of the beginning of the area that\n * should be rendered\n * @param {number} end The x-offset of the end of the area that\n * should be rendered\n */\n\n }, {\n key: \"drawLineToContext\",\n value: function drawLineToContext(ctx, peaks, absmax, halfH, offsetY, start, end) {\n if (!ctx) {\n return;\n }\n\n var length = peaks.length / 2;\n var first = Math.round(length * this.start); // use one more peak value to make sure we join peaks at ends -- unless,\n // of course, this is the last canvas\n\n var last = Math.round(length * this.end) + 1;\n var canvasStart = first;\n var canvasEnd = last;\n var scale = this.wave.width / (canvasEnd - canvasStart - 1); // optimization\n\n var halfOffset = halfH + offsetY;\n var absmaxHalf = absmax / halfH;\n ctx.beginPath();\n ctx.moveTo((canvasStart - first) * scale, halfOffset);\n ctx.lineTo((canvasStart - first) * scale, halfOffset - Math.round((peaks[2 * canvasStart] || 0) / absmaxHalf));\n var i, peak, h;\n\n for (i = canvasStart; i < canvasEnd; i++) {\n peak = peaks[2 * i] || 0;\n h = Math.round(peak / absmaxHalf);\n ctx.lineTo((i - first) * scale + this.halfPixel, halfOffset - h);\n } // draw the bottom edge going backwards, to make a single\n // closed hull to fill\n\n\n var j = canvasEnd - 1;\n\n for (j; j >= canvasStart; j--) {\n peak = peaks[2 * j + 1] || 0;\n h = Math.round(peak / absmaxHalf);\n ctx.lineTo((j - first) * scale + this.halfPixel, halfOffset - h);\n }\n\n ctx.lineTo((canvasStart - first) * scale, halfOffset - Math.round((peaks[2 * canvasStart + 1] || 0) / absmaxHalf));\n ctx.closePath();\n ctx.fill();\n }\n /**\n * Destroys this entry\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.waveCtx = null;\n this.wave = null;\n this.progressCtx = null;\n this.progress = null;\n }\n /**\n * Return image data of the wave `canvas` element\n *\n * When using a `type` of `'blob'`, this will return a `Promise` that\n * resolves with a `Blob` instance.\n *\n * @param {string} format='image/png' An optional value of a format type.\n * @param {number} quality=0.92 An optional value between 0 and 1.\n * @param {string} type='dataURL' Either 'dataURL' or 'blob'.\n * @return {string|Promise} When using the default `'dataURL'` `type` this\n * returns a data URL. When using the `'blob'` `type` this returns a\n * `Promise` that resolves with a `Blob` instance.\n */\n\n }, {\n key: \"getImage\",\n value: function getImage(format, quality, type) {\n var _this = this;\n\n if (type === 'blob') {\n return new Promise(function (resolve) {\n _this.wave.toBlob(resolve, format, quality);\n });\n } else if (type === 'dataURL') {\n return this.wave.toDataURL(format, quality);\n }\n }\n }]);\n\n return CanvasEntry;\n }();\n\n exports.default = CanvasEntry;\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/drawer.js\":\n /*!***********************!*\\\n !*** ./src/drawer.js ***!\n \\***********************/\n\n /*! no static exports found */\n\n /***/\n function srcDrawerJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = void 0;\n\n var util = _interopRequireWildcard(__webpack_require__(\n /*! ./util */\n \"./src/util/index.js\"));\n\n function _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n\n return cache;\n }\n\n function _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n\n var cache = _getRequireWildcardCache();\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj.default = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n }\n\n function _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n }\n\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n }\n\n function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n /**\n * Parent class for renderers\n *\n * @extends {Observer}\n */\n\n\n var Drawer =\n /*#__PURE__*/\n function (_util$Observer) {\n _inherits(Drawer, _util$Observer);\n /**\n * @param {HTMLElement} container The container node of the wavesurfer instance\n * @param {WavesurferParams} params The wavesurfer initialisation options\n */\n\n\n function Drawer(container, params) {\n var _this;\n\n _classCallCheck(this, Drawer);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Drawer).call(this));\n /** @private */\n\n _this.container = container;\n /**\n * @type {WavesurferParams}\n * @private\n */\n\n _this.params = params;\n /**\n * The width of the renderer\n * @type {number}\n */\n\n _this.width = 0;\n /**\n * The height of the renderer\n * @type {number}\n */\n\n _this.height = params.height * _this.params.pixelRatio;\n /** @private */\n\n _this.lastPos = 0;\n /**\n * The `<wave>` element which is added to the container\n * @type {HTMLElement}\n */\n\n _this.wrapper = null;\n return _this;\n }\n /**\n * Alias of `util.style`\n *\n * @param {HTMLElement} el The element that the styles will be applied to\n * @param {Object} styles The map of propName: attribute, both are used as-is\n * @return {HTMLElement} el\n */\n\n\n _createClass(Drawer, [{\n key: \"style\",\n value: function style(el, styles) {\n return util.style(el, styles);\n }\n /**\n * Create the wrapper `<wave>` element, style it and set up the events for\n * interaction\n */\n\n }, {\n key: \"createWrapper\",\n value: function createWrapper() {\n this.wrapper = this.container.appendChild(document.createElement('wave'));\n this.style(this.wrapper, {\n display: 'block',\n position: 'relative',\n userSelect: 'none',\n webkitUserSelect: 'none',\n height: this.params.height + 'px'\n });\n\n if (this.params.fillParent || this.params.scrollParent) {\n this.style(this.wrapper, {\n width: '100%',\n overflowX: this.params.hideScrollbar ? 'hidden' : 'auto',\n overflowY: 'hidden'\n });\n }\n\n this.setupWrapperEvents();\n }\n /**\n * Handle click event\n *\n * @param {Event} e Click event\n * @param {?boolean} noPrevent Set to true to not call `e.preventDefault()`\n * @return {number} Playback position from 0 to 1\n */\n\n }, {\n key: \"handleEvent\",\n value: function handleEvent(e, noPrevent) {\n !noPrevent && e.preventDefault();\n var clientX = e.targetTouches ? e.targetTouches[0].clientX : e.clientX;\n var bbox = this.wrapper.getBoundingClientRect();\n var nominalWidth = this.width;\n var parentWidth = this.getWidth();\n var progress;\n\n if (!this.params.fillParent && nominalWidth < parentWidth) {\n progress = (this.params.rtl ? bbox.right - clientX : clientX - bbox.left) * (this.params.pixelRatio / nominalWidth) || 0;\n\n if (progress > 1) {\n progress = 1;\n }\n } else {\n progress = ((this.params.rtl ? bbox.right - clientX : clientX - bbox.left) + this.wrapper.scrollLeft) / this.wrapper.scrollWidth || 0;\n }\n\n return progress;\n }\n /**\n * @private\n */\n\n }, {\n key: \"setupWrapperEvents\",\n value: function setupWrapperEvents() {\n var _this2 = this;\n\n this.wrapper.addEventListener('click', function (e) {\n var scrollbarHeight = _this2.wrapper.offsetHeight - _this2.wrapper.clientHeight;\n\n if (scrollbarHeight !== 0) {\n // scrollbar is visible. Check if click was on it\n var bbox = _this2.wrapper.getBoundingClientRect();\n\n if (e.clientY >= bbox.bottom - scrollbarHeight) {\n // ignore mousedown as it was on the scrollbar\n return;\n }\n }\n\n if (_this2.params.interact) {\n _this2.fireEvent('click', e, _this2.handleEvent(e));\n }\n });\n this.wrapper.addEventListener('dblclick', function (e) {\n if (_this2.params.interact) {\n _this2.fireEvent('dblclick', e, _this2.handleEvent(e));\n }\n });\n this.wrapper.addEventListener('scroll', function (e) {\n return _this2.fireEvent('scroll', e);\n });\n }\n /**\n * Draw peaks on the canvas\n *\n * @param {number[]|Number.<Array[]>} peaks Can also be an array of arrays\n * for split channel rendering\n * @param {number} length The width of the area that should be drawn\n * @param {number} start The x-offset of the beginning of the area that\n * should be rendered\n * @param {number} end The x-offset of the end of the area that should be\n * rendered\n */\n\n }, {\n key: \"drawPeaks\",\n value: function drawPeaks(peaks, length, start, end) {\n if (!this.setWidth(length)) {\n this.clearWave();\n }\n\n this.params.barWidth ? this.drawBars(peaks, 0, start, end) : this.drawWave(peaks, 0, start, end);\n }\n /**\n * Scroll to the beginning\n */\n\n }, {\n key: \"resetScroll\",\n value: function resetScroll() {\n if (this.wrapper !== null) {\n this.wrapper.scrollLeft = 0;\n }\n }\n /**\n * Recenter the view-port at a certain percent of the waveform\n *\n * @param {number} percent Value from 0 to 1 on the waveform\n */\n\n }, {\n key: \"recenter\",\n value: function recenter(percent) {\n var position = this.wrapper.scrollWidth * percent;\n this.recenterOnPosition(position, true);\n }\n /**\n * Recenter the view-port on a position, either scroll there immediately or\n * in steps of 5 pixels\n *\n * @param {number} position X-offset in pixels\n * @param {boolean} immediate Set to true to immediately scroll somewhere\n */\n\n }, {\n key: \"recenterOnPosition\",\n value: function recenterOnPosition(position, immediate) {\n var scrollLeft = this.wrapper.scrollLeft;\n var half = ~~(this.wrapper.clientWidth / 2);\n var maxScroll = this.wrapper.scrollWidth - this.wrapper.clientWidth;\n var target = position - half;\n var offset = target - scrollLeft;\n\n if (maxScroll == 0) {\n // no need to continue if scrollbar is not there\n return;\n } // if the cursor is currently visible...\n\n\n if (!immediate && -half <= offset && offset < half) {\n // set rate at which waveform is centered\n var rate = this.params.autoCenterRate; // make rate depend on width of view and length of waveform\n\n rate /= half;\n rate *= maxScroll;\n offset = Math.max(-rate, Math.min(rate, offset));\n target = scrollLeft + offset;\n } // limit target to valid range (0 to maxScroll)\n\n\n target = Math.max(0, Math.min(maxScroll, target)); // no use attempting to scroll if we're not moving\n\n if (target != scrollLeft) {\n this.wrapper.scrollLeft = target;\n }\n }\n /**\n * Get the current scroll position in pixels\n *\n * @return {number} Horizontal scroll position in pixels\n */\n\n }, {\n key: \"getScrollX\",\n value: function getScrollX() {\n var x = 0;\n\n if (this.wrapper) {\n var pixelRatio = this.params.pixelRatio;\n x = Math.round(this.wrapper.scrollLeft * pixelRatio); // In cases of elastic scroll (safari with mouse wheel) you can\n // scroll beyond the limits of the container\n // Calculate and floor the scrollable extent to make sure an out\n // of bounds value is not returned\n // Ticket #1312\n\n if (this.params.scrollParent) {\n var maxScroll = ~~(this.wrapper.scrollWidth * pixelRatio - this.getWidth());\n x = Math.min(maxScroll, Math.max(0, x));\n }\n }\n\n return x;\n }\n /**\n * Get the width of the container\n *\n * @return {number} The width of the container\n */\n\n }, {\n key: \"getWidth\",\n value: function getWidth() {\n return Math.round(this.container.clientWidth * this.params.pixelRatio);\n }\n /**\n * Set the width of the container\n *\n * @param {number} width The new width of the container\n * @return {boolean} Whether the width of the container was updated or not\n */\n\n }, {\n key: \"setWidth\",\n value: function setWidth(width) {\n if (this.width == width) {\n return false;\n }\n\n this.width = width;\n\n if (this.params.fillParent || this.params.scrollParent) {\n this.style(this.wrapper, {\n width: ''\n });\n } else {\n this.style(this.wrapper, {\n width: ~~(this.width / this.params.pixelRatio) + 'px'\n });\n }\n\n this.updateSize();\n return true;\n }\n /**\n * Set the height of the container\n *\n * @param {number} height The new height of the container.\n * @return {boolean} Whether the height of the container was updated or not\n */\n\n }, {\n key: \"setHeight\",\n value: function setHeight(height) {\n if (height == this.height) {\n return false;\n }\n\n this.height = height;\n this.style(this.wrapper, {\n height: ~~(this.height / this.params.pixelRatio) + 'px'\n });\n this.updateSize();\n return true;\n }\n /**\n * Called by wavesurfer when progress should be rendered\n *\n * @param {number} progress From 0 to 1\n */\n\n }, {\n key: \"progress\",\n value: function progress(_progress) {\n var minPxDelta = 1 / this.params.pixelRatio;\n var pos = Math.round(_progress * this.width) * minPxDelta;\n\n if (pos < this.lastPos || pos - this.lastPos >= minPxDelta) {\n this.lastPos = pos;\n\n if (this.params.scrollParent && this.params.autoCenter) {\n var newPos = ~~(this.wrapper.scrollWidth * _progress);\n this.recenterOnPosition(newPos, this.params.autoCenterImmediately);\n }\n\n this.updateProgress(pos);\n }\n }\n /**\n * This is called when wavesurfer is destroyed\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.unAll();\n\n if (this.wrapper) {\n if (this.wrapper.parentNode == this.container) {\n this.container.removeChild(this.wrapper);\n }\n\n this.wrapper = null;\n }\n }\n /* Renderer-specific methods */\n\n /**\n * Called after cursor related params have changed.\n *\n * @abstract\n */\n\n }, {\n key: \"updateCursor\",\n value: function updateCursor() {}\n /**\n * Called when the size of the container changes so the renderer can adjust\n *\n * @abstract\n */\n\n }, {\n key: \"updateSize\",\n value: function updateSize() {}\n /**\n * Draw a waveform with bars\n *\n * @abstract\n * @param {number[]|Number.<Array[]>} peaks Can also be an array of arrays for split channel\n * rendering\n * @param {number} channelIndex The index of the current channel. Normally\n * should be 0\n * @param {number} start The x-offset of the beginning of the area that\n * should be rendered\n * @param {number} end The x-offset of the end of the area that should be\n * rendered\n */\n\n }, {\n key: \"drawBars\",\n value: function drawBars(peaks, channelIndex, start, end) {}\n /**\n * Draw a waveform\n *\n * @abstract\n * @param {number[]|Number.<Array[]>} peaks Can also be an array of arrays for split channel\n * rendering\n * @param {number} channelIndex The index of the current channel. Normally\n * should be 0\n * @param {number} start The x-offset of the beginning of the area that\n * should be rendered\n * @param {number} end The x-offset of the end of the area that should be\n * rendered\n */\n\n }, {\n key: \"drawWave\",\n value: function drawWave(peaks, channelIndex, start, end) {}\n /**\n * Clear the waveform\n *\n * @abstract\n */\n\n }, {\n key: \"clearWave\",\n value: function clearWave() {}\n /**\n * Render the new progress\n *\n * @abstract\n * @param {number} position X-Offset of progress position in pixels\n */\n\n }, {\n key: \"updateProgress\",\n value: function updateProgress(position) {}\n }]);\n\n return Drawer;\n }(util.Observer);\n\n exports.default = Drawer;\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/drawer.multicanvas.js\":\n /*!***********************************!*\\\n !*** ./src/drawer.multicanvas.js ***!\n \\***********************************/\n\n /*! no static exports found */\n\n /***/\n function srcDrawerMulticanvasJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = void 0;\n\n var _drawer = _interopRequireDefault(__webpack_require__(\n /*! ./drawer */\n \"./src/drawer.js\"));\n\n var util = _interopRequireWildcard(__webpack_require__(\n /*! ./util */\n \"./src/util/index.js\"));\n\n var _drawer2 = _interopRequireDefault(__webpack_require__(\n /*! ./drawer.canvasentry */\n \"./src/drawer.canvasentry.js\"));\n\n function _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n\n return cache;\n }\n\n function _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n\n var cache = _getRequireWildcardCache();\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj.default = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n }\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n function _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n }\n\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n }\n\n function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n /**\n * MultiCanvas renderer for wavesurfer. Is currently the default and sole\n * builtin renderer.\n *\n * A `MultiCanvas` consists of one or more `CanvasEntry` instances, depending\n * on the zoom level.\n */\n\n\n var MultiCanvas =\n /*#__PURE__*/\n function (_Drawer) {\n _inherits(MultiCanvas, _Drawer);\n /**\n * @param {HTMLElement} container The container node of the wavesurfer instance\n * @param {WavesurferParams} params The wavesurfer initialisation options\n */\n\n\n function MultiCanvas(container, params) {\n var _this;\n\n _classCallCheck(this, MultiCanvas);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(MultiCanvas).call(this, container, params));\n /**\n * @type {number}\n * @private\n */\n\n _this.maxCanvasWidth = params.maxCanvasWidth;\n /**\n * @private\n * @type {number}\n */\n\n _this.maxCanvasElementWidth = Math.round(params.maxCanvasWidth / params.pixelRatio);\n /**\n * Whether or not the progress wave is rendered. If the `waveColor`\n * and `progressColor` are the same color it is not.\n *\n * @type {boolean}\n */\n\n _this.hasProgressCanvas = params.waveColor != params.progressColor;\n /**\n * @private\n * @type {number}\n */\n\n _this.halfPixel = 0.5 / params.pixelRatio;\n /**\n * List of `CanvasEntry` instances.\n *\n * @private\n * @type {Array}\n */\n\n _this.canvases = [];\n /**\n * @private\n * @type {HTMLElement}\n */\n\n _this.progressWave = null;\n /**\n * Class used to generate entries.\n *\n * @private\n * @type {function}\n */\n\n _this.EntryClass = _drawer2.default;\n /**\n * Canvas 2d context attributes.\n *\n * @private\n * @type {object}\n */\n\n _this.canvasContextAttributes = params.drawingContextAttributes;\n /**\n * Overlap added between entries to prevent vertical white stripes\n * between `canvas` elements.\n *\n * @type {number}\n */\n\n _this.overlap = 2 * Math.ceil(params.pixelRatio / 2);\n /**\n * The radius of the wave bars. Makes bars rounded\n *\n * @private\n * @type {number}\n */\n\n _this.barRadius = params.barRadius || 0;\n return _this;\n }\n /**\n * Initialize the drawer\n */\n\n\n _createClass(MultiCanvas, [{\n key: \"init\",\n value: function init() {\n this.createWrapper();\n this.createElements();\n }\n /**\n * Create the canvas elements and style them\n *\n * @private\n */\n\n }, {\n key: \"createElements\",\n value: function createElements() {\n this.progressWave = this.wrapper.appendChild(this.style(document.createElement('wave'), {\n position: 'absolute',\n zIndex: 3,\n left: 0,\n top: 0,\n bottom: 0,\n overflow: 'hidden',\n width: '0',\n display: 'none',\n boxSizing: 'border-box',\n borderRightStyle: 'solid',\n pointerEvents: 'none'\n }));\n this.addCanvas();\n this.updateCursor();\n }\n /**\n * Update cursor style\n */\n\n }, {\n key: \"updateCursor\",\n value: function updateCursor() {\n this.style(this.progressWave, {\n borderRightWidth: this.params.cursorWidth + 'px',\n borderRightColor: this.params.cursorColor\n });\n }\n /**\n * Adjust to the updated size by adding or removing canvases\n */\n\n }, {\n key: \"updateSize\",\n value: function updateSize() {\n var _this2 = this;\n\n var totalWidth = Math.round(this.width / this.params.pixelRatio);\n var requiredCanvases = Math.ceil(totalWidth / (this.maxCanvasElementWidth + this.overlap)); // add required canvases\n\n while (this.canvases.length < requiredCanvases) {\n this.addCanvas();\n } // remove older existing canvases, if any\n\n\n while (this.canvases.length > requiredCanvases) {\n this.removeCanvas();\n }\n\n var canvasWidth = this.maxCanvasWidth + this.overlap;\n var lastCanvas = this.canvases.length - 1;\n this.canvases.forEach(function (entry, i) {\n if (i == lastCanvas) {\n canvasWidth = _this2.width - _this2.maxCanvasWidth * lastCanvas;\n }\n\n _this2.updateDimensions(entry, canvasWidth, _this2.height);\n\n entry.clearWave();\n });\n }\n /**\n * Add a canvas to the canvas list\n *\n * @private\n */\n\n }, {\n key: \"addCanvas\",\n value: function addCanvas() {\n var entry = new this.EntryClass();\n entry.canvasContextAttributes = this.canvasContextAttributes;\n entry.hasProgressCanvas = this.hasProgressCanvas;\n entry.halfPixel = this.halfPixel;\n var leftOffset = this.maxCanvasElementWidth * this.canvases.length; // wave\n\n entry.initWave(this.wrapper.appendChild(this.style(document.createElement('canvas'), {\n position: 'absolute',\n zIndex: 2,\n left: leftOffset + 'px',\n top: 0,\n bottom: 0,\n height: '100%',\n pointerEvents: 'none'\n }))); // progress\n\n if (this.hasProgressCanvas) {\n entry.initProgress(this.progressWave.appendChild(this.style(document.createElement('canvas'), {\n position: 'absolute',\n left: leftOffset + 'px',\n top: 0,\n bottom: 0,\n height: '100%'\n })));\n }\n\n this.canvases.push(entry);\n }\n /**\n * Pop single canvas from the list\n *\n * @private\n */\n\n }, {\n key: \"removeCanvas\",\n value: function removeCanvas() {\n var lastEntry = this.canvases[this.canvases.length - 1]; // wave\n\n lastEntry.wave.parentElement.removeChild(lastEntry.wave); // progress\n\n if (this.hasProgressCanvas) {\n lastEntry.progress.parentElement.removeChild(lastEntry.progress);\n } // cleanup\n\n\n if (lastEntry) {\n lastEntry.destroy();\n lastEntry = null;\n }\n\n this.canvases.pop();\n }\n /**\n * Update the dimensions of a canvas element\n *\n * @private\n * @param {CanvasEntry} entry Target entry\n * @param {number} width The new width of the element\n * @param {number} height The new height of the element\n */\n\n }, {\n key: \"updateDimensions\",\n value: function updateDimensions(entry, width, height) {\n var elementWidth = Math.round(width / this.params.pixelRatio);\n var totalWidth = Math.round(this.width / this.params.pixelRatio); // update canvas dimensions\n\n entry.updateDimensions(elementWidth, totalWidth, width, height); // style element\n\n this.style(this.progressWave, {\n display: 'block'\n });\n }\n /**\n * Clear the whole multi-canvas\n */\n\n }, {\n key: \"clearWave\",\n value: function clearWave() {\n this.canvases.forEach(function (entry) {\n return entry.clearWave();\n });\n }\n /**\n * Draw a waveform with bars\n *\n * @param {number[]|Number.<Array[]>} peaks Can also be an array of arrays\n * for split channel rendering\n * @param {number} channelIndex The index of the current channel. Normally\n * should be 0. Must be an integer.\n * @param {number} start The x-offset of the beginning of the area that\n * should be rendered\n * @param {number} end The x-offset of the end of the area that should be\n * rendered\n * @returns {void}\n */\n\n }, {\n key: \"drawBars\",\n value: function drawBars(peaks, channelIndex, start, end) {\n var _this3 = this;\n\n return this.prepareDraw(peaks, channelIndex, start, end, function (_ref) {\n var absmax = _ref.absmax,\n hasMinVals = _ref.hasMinVals,\n height = _ref.height,\n offsetY = _ref.offsetY,\n halfH = _ref.halfH,\n peaks = _ref.peaks; // if drawBars was called within ws.empty we don't pass a start and\n // don't want anything to happen\n\n if (start === undefined) {\n return;\n } // Skip every other value if there are negatives.\n\n\n var peakIndexScale = hasMinVals ? 2 : 1;\n var length = peaks.length / peakIndexScale;\n var bar = _this3.params.barWidth * _this3.params.pixelRatio;\n var gap = _this3.params.barGap === null ? Math.max(_this3.params.pixelRatio, ~~(bar / 2)) : Math.max(_this3.params.pixelRatio, _this3.params.barGap * _this3.params.pixelRatio);\n var step = bar + gap;\n var scale = length / _this3.width;\n var first = start;\n var last = end;\n var i = first;\n\n for (i; i < last; i += step) {\n var peak = peaks[Math.floor(i * scale * peakIndexScale)] || 0;\n var h = Math.round(peak / absmax * halfH);\n /* in case of silences, allow the user to specify that we\n * always draw *something* (normally a 1px high bar) */\n\n if (h == 0 && _this3.params.barMinHeight) h = _this3.params.barMinHeight;\n\n _this3.fillRect(i + _this3.halfPixel, halfH - h + offsetY, bar + _this3.halfPixel, h * 2, _this3.barRadius);\n }\n });\n }\n /**\n * Draw a waveform\n *\n * @param {number[]|Number.<Array[]>} peaks Can also be an array of arrays\n * for split channel rendering\n * @param {number} channelIndex The index of the current channel. Normally\n * should be 0\n * @param {number?} start The x-offset of the beginning of the area that\n * should be rendered (If this isn't set only a flat line is rendered)\n * @param {number?} end The x-offset of the end of the area that should be\n * rendered\n * @returns {void}\n */\n\n }, {\n key: \"drawWave\",\n value: function drawWave(peaks, channelIndex, start, end) {\n var _this4 = this;\n\n return this.prepareDraw(peaks, channelIndex, start, end, function (_ref2) {\n var absmax = _ref2.absmax,\n hasMinVals = _ref2.hasMinVals,\n height = _ref2.height,\n offsetY = _ref2.offsetY,\n halfH = _ref2.halfH,\n peaks = _ref2.peaks;\n\n if (!hasMinVals) {\n var reflectedPeaks = [];\n var len = peaks.length;\n var i = 0;\n\n for (i; i < len; i++) {\n reflectedPeaks[2 * i] = peaks[i];\n reflectedPeaks[2 * i + 1] = -peaks[i];\n }\n\n peaks = reflectedPeaks;\n } // if drawWave was called within ws.empty we don't pass a start and\n // end and simply want a flat line\n\n\n if (start !== undefined) {\n _this4.drawLine(peaks, absmax, halfH, offsetY, start, end);\n } // always draw a median line\n\n\n _this4.fillRect(0, halfH + offsetY - _this4.halfPixel, _this4.width, _this4.halfPixel, _this4.barRadius);\n });\n }\n /**\n * Tell the canvas entries to render their portion of the waveform\n *\n * @private\n * @param {number[]} peaks Peaks data\n * @param {number} absmax Maximum peak value (absolute)\n * @param {number} halfH Half the height of the waveform\n * @param {number} offsetY Offset to the top\n * @param {number} start The x-offset of the beginning of the area that\n * should be rendered\n * @param {number} end The x-offset of the end of the area that\n * should be rendered\n */\n\n }, {\n key: \"drawLine\",\n value: function drawLine(peaks, absmax, halfH, offsetY, start, end) {\n var _this5 = this;\n\n this.canvases.forEach(function (entry) {\n _this5.setFillStyles(entry);\n\n entry.drawLines(peaks, absmax, halfH, offsetY, start, end);\n });\n }\n /**\n * Draw a rectangle on the multi-canvas\n *\n * @param {number} x X-position of the rectangle\n * @param {number} y Y-position of the rectangle\n * @param {number} width Width of the rectangle\n * @param {number} height Height of the rectangle\n * @param {number} radius Radius of the rectangle\n */\n\n }, {\n key: \"fillRect\",\n value: function fillRect(x, y, width, height, radius) {\n var startCanvas = Math.floor(x / this.maxCanvasWidth);\n var endCanvas = Math.min(Math.ceil((x + width) / this.maxCanvasWidth) + 1, this.canvases.length);\n var i = startCanvas;\n\n for (i; i < endCanvas; i++) {\n var entry = this.canvases[i];\n var leftOffset = i * this.maxCanvasWidth;\n var intersection = {\n x1: Math.max(x, i * this.maxCanvasWidth),\n y1: y,\n x2: Math.min(x + width, i * this.maxCanvasWidth + entry.wave.width),\n y2: y + height\n };\n\n if (intersection.x1 < intersection.x2) {\n this.setFillStyles(entry);\n entry.fillRects(intersection.x1 - leftOffset, intersection.y1, intersection.x2 - intersection.x1, intersection.y2 - intersection.y1, radius);\n }\n }\n }\n /**\n * Performs preparation tasks and calculations which are shared by `drawBars`\n * and `drawWave`\n *\n * @private\n * @param {number[]|Number.<Array[]>} peaks Can also be an array of arrays for\n * split channel rendering\n * @param {number} channelIndex The index of the current channel. Normally\n * should be 0\n * @param {number?} start The x-offset of the beginning of the area that\n * should be rendered. If this isn't set only a flat line is rendered\n * @param {number?} end The x-offset of the end of the area that should be\n * rendered\n * @param {function} fn The render function to call, e.g. `drawWave`\n * @returns {void}\n */\n\n }, {\n key: \"prepareDraw\",\n value: function prepareDraw(peaks, channelIndex, start, end, fn) {\n var _this6 = this;\n\n return util.frame(function () {\n // Split channels and call this function with the channelIndex set\n if (peaks[0] instanceof Array) {\n var channels = peaks;\n\n if (_this6.params.splitChannels) {\n _this6.setHeight(channels.length * _this6.params.height * _this6.params.pixelRatio);\n\n return channels.forEach(function (channelPeaks, i) {\n return _this6.prepareDraw(channelPeaks, i, start, end, fn);\n });\n }\n\n peaks = channels[0];\n } // calculate maximum modulation value, either from the barHeight\n // parameter or if normalize=true from the largest value in the peak\n // set\n\n\n var absmax = 1 / _this6.params.barHeight;\n\n if (_this6.params.normalize) {\n var max = util.max(peaks);\n var min = util.min(peaks);\n absmax = -min > max ? -min : max;\n } // Bar wave draws the bottom only as a reflection of the top,\n // so we don't need negative values\n\n\n var hasMinVals = [].some.call(peaks, function (val) {\n return val < 0;\n });\n var height = _this6.params.height * _this6.params.pixelRatio;\n var offsetY = height * channelIndex || 0;\n var halfH = height / 2;\n return fn({\n absmax: absmax,\n hasMinVals: hasMinVals,\n height: height,\n offsetY: offsetY,\n halfH: halfH,\n peaks: peaks\n });\n })();\n }\n /**\n * Set the fill styles for a certain entry (wave and progress)\n *\n * @private\n * @param {CanvasEntry} entry Target entry\n */\n\n }, {\n key: \"setFillStyles\",\n value: function setFillStyles(entry) {\n entry.setFillStyles(this.params.waveColor, this.params.progressColor);\n }\n /**\n * Return image data of the multi-canvas\n *\n * When using a `type` of `'blob'`, this will return a `Promise`.\n *\n * @param {string} format='image/png' An optional value of a format type.\n * @param {number} quality=0.92 An optional value between 0 and 1.\n * @param {string} type='dataURL' Either 'dataURL' or 'blob'.\n * @return {string|string[]|Promise} When using the default `'dataURL'`\n * `type` this returns a single data URL or an array of data URLs,\n * one for each canvas. When using the `'blob'` `type` this returns a\n * `Promise` that resolves with an array of `Blob` instances, one for each\n * canvas.\n */\n\n }, {\n key: \"getImage\",\n value: function getImage(format, quality, type) {\n if (type === 'blob') {\n return Promise.all(this.canvases.map(function (entry) {\n return entry.getImage(format, quality, type);\n }));\n } else if (type === 'dataURL') {\n var images = this.canvases.map(function (entry) {\n return entry.getImage(format, quality, type);\n });\n return images.length > 1 ? images : images[0];\n }\n }\n /**\n * Render the new progress\n *\n * @param {number} position X-offset of progress position in pixels\n */\n\n }, {\n key: \"updateProgress\",\n value: function updateProgress(position) {\n this.style(this.progressWave, {\n width: position + 'px'\n });\n }\n }]);\n\n return MultiCanvas;\n }(_drawer.default);\n\n exports.default = MultiCanvas;\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/mediaelement-webaudio.js\":\n /*!**************************************!*\\\n !*** ./src/mediaelement-webaudio.js ***!\n \\**************************************/\n\n /*! no static exports found */\n\n /***/\n function srcMediaelementWebaudioJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = void 0;\n\n var _mediaelement = _interopRequireDefault(__webpack_require__(\n /*! ./mediaelement */\n \"./src/mediaelement.js\"));\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n function _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n }\n\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n }\n\n function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n }\n\n function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n }\n\n function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n /**\n * MediaElementWebAudio backend: allows to load audio as HTML5 audio tag and use it with WebAudio API.\n * Setting the MediaElementWebAudio backend, there is the possibility to load audio of big dimensions, using the WebAudio API features.\n * The audio to load is an HTML5 audio tag, so you have to use the same methods of MediaElement backend for loading and playback.\n * In this way, the audio resource is not loaded entirely from server, but in ranges, since you load an HTML5 audio tag.\n * In this way, filters and other functionalities can be performed like with WebAudio backend, but without decoding\n * internally audio data, that caused crashing of the browser. You have to give also peaks, so the audio data are not decoded.\n *\n * @since 3.2.0\n */\n\n\n var MediaElementWebAudio =\n /*#__PURE__*/\n function (_MediaElement) {\n _inherits(MediaElementWebAudio, _MediaElement);\n /**\n * Construct the backend\n *\n * @param {WavesurferParams} params Wavesurfer parameters\n */\n\n\n function MediaElementWebAudio(params) {\n var _this;\n\n _classCallCheck(this, MediaElementWebAudio);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(MediaElementWebAudio).call(this, params));\n /** @private */\n\n _this.params = params;\n /** @private */\n\n _this.sourceMediaElement = null;\n return _this;\n }\n /**\n * Initialise the backend, called in `wavesurfer.createBackend()`\n */\n\n\n _createClass(MediaElementWebAudio, [{\n key: \"init\",\n value: function init() {\n this.setPlaybackRate(this.params.audioRate);\n this.createTimer();\n this.createVolumeNode();\n this.createScriptNode();\n this.createAnalyserNode();\n }\n /**\n * Private method called by both `load` (from url)\n * and `loadElt` (existing media element) methods.\n *\n * @param {HTMLMediaElement} media HTML5 Audio or Video element\n * @param {number[]|Number.<Array[]>} peaks Array of peak data\n * @private\n */\n\n }, {\n key: \"_load\",\n value: function _load(media, peaks) {\n _get(_getPrototypeOf(MediaElementWebAudio.prototype), \"_load\", this).call(this, media, peaks);\n\n this.createMediaElementSource(media);\n }\n /**\n * Create MediaElementSource node\n *\n * @since 3.2.0\n * @param {HTMLMediaElement} mediaElement HTML5 Audio to load\n */\n\n }, {\n key: \"createMediaElementSource\",\n value: function createMediaElementSource(mediaElement) {\n this.sourceMediaElement = this.ac.createMediaElementSource(mediaElement);\n this.sourceMediaElement.connect(this.analyser);\n }\n }]);\n\n return MediaElementWebAudio;\n }(_mediaelement.default);\n\n exports.default = MediaElementWebAudio;\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/mediaelement.js\":\n /*!*****************************!*\\\n !*** ./src/mediaelement.js ***!\n \\*****************************/\n\n /*! no static exports found */\n\n /***/\n function srcMediaelementJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = void 0;\n\n var _webaudio = _interopRequireDefault(__webpack_require__(\n /*! ./webaudio */\n \"./src/webaudio.js\"));\n\n var util = _interopRequireWildcard(__webpack_require__(\n /*! ./util */\n \"./src/util/index.js\"));\n\n function _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n\n return cache;\n }\n\n function _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n\n var cache = _getRequireWildcardCache();\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj.default = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n }\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n function _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n }\n\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n }\n\n function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n }\n\n function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n }\n\n function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n /**\n * MediaElement backend\n */\n\n\n var MediaElement =\n /*#__PURE__*/\n function (_WebAudio) {\n _inherits(MediaElement, _WebAudio);\n /**\n * Construct the backend\n *\n * @param {WavesurferParams} params Wavesurfer parameters\n */\n\n\n function MediaElement(params) {\n var _this;\n\n _classCallCheck(this, MediaElement);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(MediaElement).call(this, params));\n /** @private */\n\n _this.params = params;\n /**\n * Initially a dummy media element to catch errors. Once `_load` is\n * called, this will contain the actual `HTMLMediaElement`.\n * @private\n */\n\n _this.media = {\n currentTime: 0,\n duration: 0,\n paused: true,\n playbackRate: 1,\n play: function play() {},\n pause: function pause() {},\n volume: 0\n };\n /** @private */\n\n _this.mediaType = params.mediaType.toLowerCase();\n /** @private */\n\n _this.elementPosition = params.elementPosition;\n /** @private */\n\n _this.peaks = null;\n /** @private */\n\n _this.playbackRate = 1;\n /** @private */\n\n _this.volume = 1;\n /** @private */\n\n _this.isMuted = false;\n /** @private */\n\n _this.buffer = null;\n /** @private */\n\n _this.onPlayEnd = null;\n /** @private */\n\n _this.mediaListeners = {};\n return _this;\n }\n /**\n * Initialise the backend, called in `wavesurfer.createBackend()`\n */\n\n\n _createClass(MediaElement, [{\n key: \"init\",\n value: function init() {\n this.setPlaybackRate(this.params.audioRate);\n this.createTimer();\n }\n /**\n * Attach event listeners to media element.\n */\n\n }, {\n key: \"_setupMediaListeners\",\n value: function _setupMediaListeners() {\n var _this2 = this;\n\n this.mediaListeners.error = function () {\n _this2.fireEvent('error', 'Error loading media element');\n };\n\n this.mediaListeners.canplay = function () {\n _this2.fireEvent('canplay');\n };\n\n this.mediaListeners.ended = function () {\n _this2.fireEvent('finish');\n }; // listen to and relay play, pause and seeked events to enable\n // playback control from the external media element\n\n\n this.mediaListeners.play = function () {\n _this2.fireEvent('play');\n };\n\n this.mediaListeners.pause = function () {\n _this2.fireEvent('pause');\n };\n\n this.mediaListeners.seeked = function (event) {\n _this2.fireEvent('seek');\n };\n\n this.mediaListeners.volumechange = function (event) {\n _this2.isMuted = _this2.media.muted;\n\n if (_this2.isMuted) {\n _this2.volume = 0;\n } else {\n _this2.volume = _this2.media.volume;\n }\n\n _this2.fireEvent('volume');\n }; // reset event listeners\n\n\n Object.keys(this.mediaListeners).forEach(function (id) {\n _this2.media.removeEventListener(id, _this2.mediaListeners[id]);\n\n _this2.media.addEventListener(id, _this2.mediaListeners[id]);\n });\n }\n /**\n * Create a timer to provide a more precise `audioprocess` event.\n */\n\n }, {\n key: \"createTimer\",\n value: function createTimer() {\n var _this3 = this;\n\n var onAudioProcess = function onAudioProcess() {\n if (_this3.isPaused()) {\n return;\n }\n\n _this3.fireEvent('audioprocess', _this3.getCurrentTime()); // Call again in the next frame\n\n\n util.frame(onAudioProcess)();\n };\n\n this.on('play', onAudioProcess); // Update the progress one more time to prevent it from being stuck in\n // case of lower framerates\n\n this.on('pause', function () {\n _this3.fireEvent('audioprocess', _this3.getCurrentTime());\n });\n }\n /**\n * Create media element with url as its source,\n * and append to container element.\n *\n * @param {string} url Path to media file\n * @param {HTMLElement} container HTML element\n * @param {number[]|Number.<Array[]>} peaks Array of peak data\n * @param {string} preload HTML 5 preload attribute value\n * @throws Will throw an error if the `url` argument is not a valid media\n * element.\n */\n\n }, {\n key: \"load\",\n value: function load(url, container, peaks, preload) {\n var media = document.createElement(this.mediaType);\n media.controls = this.params.mediaControls;\n media.autoplay = this.params.autoplay || false;\n media.preload = preload == null ? 'auto' : preload;\n media.src = url;\n media.style.width = '100%';\n var prevMedia = container.querySelector(this.mediaType);\n\n if (prevMedia) {\n container.removeChild(prevMedia);\n }\n\n container.appendChild(media);\n\n this._load(media, peaks);\n }\n /**\n * Load existing media element.\n *\n * @param {HTMLMediaElement} elt HTML5 Audio or Video element\n * @param {number[]|Number.<Array[]>} peaks Array of peak data\n */\n\n }, {\n key: \"loadElt\",\n value: function loadElt(elt, peaks) {\n elt.controls = this.params.mediaControls;\n elt.autoplay = this.params.autoplay || false;\n\n this._load(elt, peaks);\n }\n /**\n * Method called by both `load` (from url)\n * and `loadElt` (existing media element) methods.\n *\n * @param {HTMLMediaElement} media HTML5 Audio or Video element\n * @param {number[]|Number.<Array[]>} peaks Array of peak data\n * @throws Will throw an error if the `media` argument is not a valid media\n * element.\n * @private\n */\n\n }, {\n key: \"_load\",\n value: function _load(media, peaks) {\n // verify media element is valid\n if (!(media instanceof HTMLMediaElement) || typeof media.addEventListener === 'undefined') {\n throw new Error('media parameter is not a valid media element');\n } // load must be called manually on iOS, otherwise peaks won't draw\n // until a user interaction triggers load --> 'ready' event\n\n\n if (typeof media.load == 'function') {\n // Resets the media element and restarts the media resource. Any\n // pending events are discarded. How much media data is fetched is\n // still affected by the preload attribute.\n media.load();\n }\n\n this.media = media;\n\n this._setupMediaListeners();\n\n this.peaks = peaks;\n this.onPlayEnd = null;\n this.buffer = null;\n this.isMuted = media.muted;\n this.setPlaybackRate(this.playbackRate);\n this.setVolume(this.volume);\n }\n /**\n * Used by `wavesurfer.isPlaying()` and `wavesurfer.playPause()`\n *\n * @return {boolean} Media paused or not\n */\n\n }, {\n key: \"isPaused\",\n value: function isPaused() {\n return !this.media || this.media.paused;\n }\n /**\n * Used by `wavesurfer.getDuration()`\n *\n * @return {number} Duration\n */\n\n }, {\n key: \"getDuration\",\n value: function getDuration() {\n if (this.explicitDuration) {\n return this.explicitDuration;\n }\n\n var duration = (this.buffer || this.media).duration;\n\n if (duration >= Infinity) {\n // streaming audio\n duration = this.media.seekable.end(0);\n }\n\n return duration;\n }\n /**\n * Returns the current time in seconds relative to the audio-clip's\n * duration.\n *\n * @return {number} Current time\n */\n\n }, {\n key: \"getCurrentTime\",\n value: function getCurrentTime() {\n return this.media && this.media.currentTime;\n }\n /**\n * Get the position from 0 to 1\n *\n * @return {number} Current position\n */\n\n }, {\n key: \"getPlayedPercents\",\n value: function getPlayedPercents() {\n return this.getCurrentTime() / this.getDuration() || 0;\n }\n /**\n * Get the audio source playback rate.\n *\n * @return {number} Playback rate\n */\n\n }, {\n key: \"getPlaybackRate\",\n value: function getPlaybackRate() {\n return this.playbackRate || this.media.playbackRate;\n }\n /**\n * Set the audio source playback rate.\n *\n * @param {number} value Playback rate\n */\n\n }, {\n key: \"setPlaybackRate\",\n value: function setPlaybackRate(value) {\n this.playbackRate = value || 1;\n this.media.playbackRate = this.playbackRate;\n }\n /**\n * Used by `wavesurfer.seekTo()`\n *\n * @param {number} start Position to start at in seconds\n */\n\n }, {\n key: \"seekTo\",\n value: function seekTo(start) {\n if (start != null) {\n this.media.currentTime = start;\n }\n\n this.clearPlayEnd();\n }\n /**\n * Plays the loaded audio region.\n *\n * @param {number} start Start offset in seconds, relative to the beginning\n * of a clip.\n * @param {number} end When to stop, relative to the beginning of a clip.\n * @emits MediaElement#play\n * @return {Promise} Result\n */\n\n }, {\n key: \"play\",\n value: function play(start, end) {\n this.seekTo(start);\n var promise = this.media.play();\n end && this.setPlayEnd(end);\n return promise;\n }\n /**\n * Pauses the loaded audio.\n *\n * @emits MediaElement#pause\n * @return {Promise} Result\n */\n\n }, {\n key: \"pause\",\n value: function pause() {\n var promise;\n\n if (this.media) {\n promise = this.media.pause();\n }\n\n this.clearPlayEnd();\n return promise;\n }\n /**\n * Set the play end\n *\n * @param {number} end Where to end\n */\n\n }, {\n key: \"setPlayEnd\",\n value: function setPlayEnd(end) {\n var _this4 = this;\n\n this.clearPlayEnd();\n\n this._onPlayEnd = function (time) {\n if (time >= end) {\n _this4.pause();\n\n _this4.seekTo(end);\n }\n };\n\n this.on('audioprocess', this._onPlayEnd);\n }\n /** @private */\n\n }, {\n key: \"clearPlayEnd\",\n value: function clearPlayEnd() {\n if (this._onPlayEnd) {\n this.un('audioprocess', this._onPlayEnd);\n this._onPlayEnd = null;\n }\n }\n /**\n * Compute the max and min value of the waveform when broken into\n * <length> subranges.\n *\n * @param {number} length How many subranges to break the waveform into.\n * @param {number} first First sample in the required range.\n * @param {number} last Last sample in the required range.\n * @return {number[]|Number.<Array[]>} Array of 2*<length> peaks or array of\n * arrays of peaks consisting of (max, min) values for each subrange.\n */\n\n }, {\n key: \"getPeaks\",\n value: function getPeaks(length, first, last) {\n if (this.buffer) {\n return _get(_getPrototypeOf(MediaElement.prototype), \"getPeaks\", this).call(this, length, first, last);\n }\n\n return this.peaks || [];\n }\n /**\n * Set the sink id for the media player\n *\n * @param {string} deviceId String value representing audio device id.\n * @returns {Promise} A Promise that resolves to `undefined` when there\n * are no errors.\n */\n\n }, {\n key: \"setSinkId\",\n value: function setSinkId(deviceId) {\n if (deviceId) {\n if (!this.media.setSinkId) {\n return Promise.reject(new Error('setSinkId is not supported in your browser'));\n }\n\n return this.media.setSinkId(deviceId);\n }\n\n return Promise.reject(new Error('Invalid deviceId: ' + deviceId));\n }\n /**\n * Get the current volume\n *\n * @return {number} value A floating point value between 0 and 1.\n */\n\n }, {\n key: \"getVolume\",\n value: function getVolume() {\n return this.volume;\n }\n /**\n * Set the audio volume\n *\n * @param {number} value A floating point value between 0 and 1.\n */\n\n }, {\n key: \"setVolume\",\n value: function setVolume(value) {\n this.volume = value; // no need to change when it's already at that volume\n\n if (this.media.volume !== this.volume) {\n this.media.volume = this.volume;\n }\n }\n /**\n * This is called when wavesurfer is destroyed\n *\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this5 = this;\n\n this.pause();\n this.unAll();\n this.destroyed = true; // cleanup media event listeners\n\n Object.keys(this.mediaListeners).forEach(function (id) {\n if (_this5.media) {\n _this5.media.removeEventListener(id, _this5.mediaListeners[id]);\n }\n });\n\n if (this.params.removeMediaElementOnDestroy && this.media && this.media.parentNode) {\n this.media.parentNode.removeChild(this.media);\n }\n\n this.media = null;\n }\n }]);\n\n return MediaElement;\n }(_webaudio.default);\n\n exports.default = MediaElement;\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/peakcache.js\":\n /*!**************************!*\\\n !*** ./src/peakcache.js ***!\n \\**************************/\n\n /*! no static exports found */\n\n /***/\n function srcPeakcacheJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = void 0;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n /**\n * Caches the decoded peaks data to improve rendering speed for large audio\n *\n * Is used if the option parameter `partialRender` is set to `true`\n */\n\n\n var PeakCache =\n /*#__PURE__*/\n function () {\n /**\n * Instantiate cache\n */\n function PeakCache() {\n _classCallCheck(this, PeakCache);\n\n this.clearPeakCache();\n }\n /**\n * Empty the cache\n */\n\n\n _createClass(PeakCache, [{\n key: \"clearPeakCache\",\n value: function clearPeakCache() {\n /**\n * Flat array with entries that are always in pairs to mark the\n * beginning and end of each subrange. This is a convenience so we can\n * iterate over the pairs for easy set difference operations.\n * @private\n */\n this.peakCacheRanges = [];\n /**\n * Length of the entire cachable region, used for resetting the cache\n * when this changes (zoom events, for instance).\n * @private\n */\n\n this.peakCacheLength = -1;\n }\n /**\n * Add a range of peaks to the cache\n *\n * @param {number} length The length of the range\n * @param {number} start The x offset of the start of the range\n * @param {number} end The x offset of the end of the range\n * @return {Number.<Array[]>} Array with arrays of numbers\n */\n\n }, {\n key: \"addRangeToPeakCache\",\n value: function addRangeToPeakCache(length, start, end) {\n if (length != this.peakCacheLength) {\n this.clearPeakCache();\n this.peakCacheLength = length;\n } // Return ranges that weren't in the cache before the call.\n\n\n var uncachedRanges = [];\n var i = 0; // Skip ranges before the current start.\n\n while (i < this.peakCacheRanges.length && this.peakCacheRanges[i] < start) {\n i++;\n } // If |i| is even, |start| falls after an existing range. Otherwise,\n // |start| falls between an existing range, and the uncached region\n // starts when we encounter the next node in |peakCacheRanges| or\n // |end|, whichever comes first.\n\n\n if (i % 2 == 0) {\n uncachedRanges.push(start);\n }\n\n while (i < this.peakCacheRanges.length && this.peakCacheRanges[i] <= end) {\n uncachedRanges.push(this.peakCacheRanges[i]);\n i++;\n } // If |i| is even, |end| is after all existing ranges.\n\n\n if (i % 2 == 0) {\n uncachedRanges.push(end);\n } // Filter out the 0-length ranges.\n\n\n uncachedRanges = uncachedRanges.filter(function (item, pos, arr) {\n if (pos == 0) {\n return item != arr[pos + 1];\n } else if (pos == arr.length - 1) {\n return item != arr[pos - 1];\n }\n\n return item != arr[pos - 1] && item != arr[pos + 1];\n }); // Merge the two ranges together, uncachedRanges will either contain\n // wholly new points, or duplicates of points in peakCacheRanges. If\n // duplicates are detected, remove both and extend the range.\n\n this.peakCacheRanges = this.peakCacheRanges.concat(uncachedRanges);\n this.peakCacheRanges = this.peakCacheRanges.sort(function (a, b) {\n return a - b;\n }).filter(function (item, pos, arr) {\n if (pos == 0) {\n return item != arr[pos + 1];\n } else if (pos == arr.length - 1) {\n return item != arr[pos - 1];\n }\n\n return item != arr[pos - 1] && item != arr[pos + 1];\n }); // Push the uncached ranges into an array of arrays for ease of\n // iteration in the functions that call this.\n\n var uncachedRangePairs = [];\n\n for (i = 0; i < uncachedRanges.length; i += 2) {\n uncachedRangePairs.push([uncachedRanges[i], uncachedRanges[i + 1]]);\n }\n\n return uncachedRangePairs;\n }\n /**\n * For testing\n *\n * @return {Number.<Array[]>} Array with arrays of numbers\n */\n\n }, {\n key: \"getCacheRanges\",\n value: function getCacheRanges() {\n var peakCacheRangePairs = [];\n var i;\n\n for (i = 0; i < this.peakCacheRanges.length; i += 2) {\n peakCacheRangePairs.push([this.peakCacheRanges[i], this.peakCacheRanges[i + 1]]);\n }\n\n return peakCacheRangePairs;\n }\n }]);\n\n return PeakCache;\n }();\n\n exports.default = PeakCache;\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/util/ajax.js\":\n /*!**************************!*\\\n !*** ./src/util/ajax.js ***!\n \\**************************/\n\n /*! no static exports found */\n\n /***/\n function srcUtilAjaxJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = ajax;\n\n var _observer = _interopRequireDefault(__webpack_require__(\n /*! ./observer */\n \"./src/util/observer.js\"));\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n /**\n * Perform an ajax request using `XMLHttpRequest`.\n *\n * @deprecated Use `util.fetchFile` instead.\n *\n * @param {Object} options AJAX options to use. See example below for options.\n * @returns {Observer} Observer instance\n * @example\n * // default options\n * let options = {\n * method: 'GET',\n * url: undefined,\n * responseType: 'json',\n * xhr: {}\n * };\n *\n * // override default options\n * options.url = '../media/demo.wav';\n * options.responseType = 'arraybuffer';\n * options.xhr = {\n * requestHeaders: [\n * {\n * key: 'Authorization',\n * value: 'my-token'\n * }\n * ],\n * withCredentials: true\n * };\n *\n * // make ajax call\n * let ajaxCall = util.ajax(options);\n * ajaxCall.on('progress', e => {\n * console.log('progress', e);\n * });\n * ajaxCall.on('success', (data, e) => {\n * console.log('success!', data);\n * });\n * ajaxCall.on('error', e => {\n * console.warn('ajax error: ' + e.target.statusText);\n * });\n */\n\n\n function ajax(options) {\n var instance = new _observer.default();\n var xhr = new XMLHttpRequest();\n var fired100 = false;\n xhr.open(options.method || 'GET', options.url, true);\n xhr.responseType = options.responseType || 'json';\n\n if (options.xhr) {\n if (options.xhr.requestHeaders) {\n // add custom request headers\n options.xhr.requestHeaders.forEach(function (header) {\n xhr.setRequestHeader(header.key, header.value);\n });\n }\n\n if (options.xhr.withCredentials) {\n // use credentials\n xhr.withCredentials = true;\n }\n }\n\n xhr.addEventListener('progress', function (e) {\n instance.fireEvent('progress', e);\n\n if (e.lengthComputable && e.loaded == e.total) {\n fired100 = true;\n }\n });\n xhr.addEventListener('load', function (e) {\n if (!fired100) {\n instance.fireEvent('progress', e);\n }\n\n instance.fireEvent('load', e);\n\n if (200 == xhr.status || 206 == xhr.status) {\n instance.fireEvent('success', xhr.response, e);\n } else {\n instance.fireEvent('error', e);\n }\n });\n xhr.addEventListener('error', function (e) {\n return instance.fireEvent('error', e);\n });\n xhr.send();\n instance.xhr = xhr;\n return instance;\n }\n\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/util/extend.js\":\n /*!****************************!*\\\n !*** ./src/util/extend.js ***!\n \\****************************/\n\n /*! no static exports found */\n\n /***/\n function srcUtilExtendJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = extend;\n /**\n * Extend an object shallowly with others\n *\n * @param {Object} dest The target object\n * @param {Object[]} sources The objects to use for extending\n *\n * @return {Object} Merged object\n * @deprecated since version 3.3.0\n */\n\n function extend(dest) {\n console.warn('util.extend is deprecated; use Object.assign instead');\n\n for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n sources[_key - 1] = arguments[_key];\n }\n\n sources.forEach(function (source) {\n Object.keys(source).forEach(function (key) {\n dest[key] = source[key];\n });\n });\n return dest;\n }\n\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/util/fetch.js\":\n /*!***************************!*\\\n !*** ./src/util/fetch.js ***!\n \\***************************/\n\n /*! no static exports found */\n\n /***/\n function srcUtilFetchJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = fetchFile;\n\n var _observer = _interopRequireDefault(__webpack_require__(\n /*! ./observer */\n \"./src/util/observer.js\"));\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n var ProgressHandler =\n /*#__PURE__*/\n function () {\n /**\n * Instantiate ProgressHandler\n *\n * @param {Observer} instance The `fetchFile` observer instance.\n * @param {Number} contentLength Content length.\n * @param {Response} response Response object.\n */\n function ProgressHandler(instance, contentLength, response) {\n _classCallCheck(this, ProgressHandler);\n\n this.instance = instance;\n this.instance._reader = response.body.getReader();\n this.total = parseInt(contentLength, 10);\n this.loaded = 0;\n }\n /**\n * A method that is called once, immediately after the `ReadableStream``\n * is constructed.\n *\n * @param {ReadableStreamDefaultController} controller Controller instance\n * used to control the stream.\n */\n\n\n _createClass(ProgressHandler, [{\n key: \"start\",\n value: function start(controller) {\n var _this = this;\n\n var read = function read() {\n // instance._reader.read() returns a promise that resolves\n // when a value has been received\n _this.instance._reader.read().then(function (_ref) {\n var done = _ref.done,\n value = _ref.value; // result objects contain two properties:\n // done - true if the stream has already given you all its data.\n // value - some data. Always undefined when done is true.\n\n if (done) {\n // ensure onProgress called when content-length=0\n if (_this.total === 0) {\n _this.instance.onProgress.call(_this.instance, {\n loaded: _this.loaded,\n total: _this.total,\n lengthComputable: false\n });\n } // no more data needs to be consumed, close the stream\n\n\n controller.close();\n return;\n }\n\n _this.loaded += value.byteLength;\n\n _this.instance.onProgress.call(_this.instance, {\n loaded: _this.loaded,\n total: _this.total,\n lengthComputable: !(_this.total === 0)\n }); // enqueue the next data chunk into our target stream\n\n\n controller.enqueue(value);\n read();\n }).catch(function (error) {\n controller.error(error);\n });\n };\n\n read();\n }\n }]);\n\n return ProgressHandler;\n }();\n /**\n * Load a file using `fetch`.\n *\n * @param {object} options Request options to use. See example below.\n * @returns {Observer} Observer instance\n * @example\n * // default options\n * let options = {\n * url: undefined,\n * method: 'GET',\n * mode: 'cors',\n * credentials: 'same-origin',\n * cache: 'default',\n * responseType: 'json',\n * requestHeaders: [],\n * redirect: 'follow',\n * referrer: 'client'\n * };\n *\n * // override some options\n * options.url = '../media/demo.wav';\n \n * // available types: 'arraybuffer', 'blob', 'json' or 'text'\n * options.responseType = 'arraybuffer';\n *\n * // make fetch call\n * let request = util.fetchFile(options);\n *\n * // listen for events\n * request.on('progress', e => {\n * console.log('progress', e);\n * });\n *\n * request.on('success', data => {\n * console.log('success!', data);\n * });\n *\n * request.on('error', e => {\n * console.warn('fetchFile error: ', e);\n * });\n */\n\n\n function fetchFile(options) {\n if (!options) {\n throw new Error('fetch options missing');\n } else if (!options.url) {\n throw new Error('fetch url missing');\n }\n\n var instance = new _observer.default();\n var fetchHeaders = new Headers();\n var fetchRequest = new Request(options.url); // add ability to abort\n\n instance.controller = new AbortController(); // check if headers have to be added\n\n if (options && options.requestHeaders) {\n // add custom request headers\n options.requestHeaders.forEach(function (header) {\n fetchHeaders.append(header.key, header.value);\n });\n } // parse fetch options\n\n\n var responseType = options.responseType || 'json';\n var fetchOptions = {\n method: options.method || 'GET',\n headers: fetchHeaders,\n mode: options.mode || 'cors',\n credentials: options.credentials || 'same-origin',\n cache: options.cache || 'default',\n redirect: options.redirect || 'follow',\n referrer: options.referrer || 'client',\n signal: instance.controller.signal\n };\n fetch(fetchRequest, fetchOptions).then(function (response) {\n // store response reference\n instance.response = response;\n var progressAvailable = true;\n\n if (!response.body) {\n // ReadableStream is not yet supported in this browser\n // see https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream\n progressAvailable = false;\n } // Server must send CORS header \"Access-Control-Expose-Headers: content-length\"\n\n\n var contentLength = response.headers.get('content-length');\n\n if (contentLength === null) {\n // Content-Length server response header missing.\n // Don't evaluate download progress if we can't compare against a total size\n // see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Access-Control-Expose-Headers\n progressAvailable = false;\n }\n\n if (!progressAvailable) {\n // not able to check download progress so skip it\n return response;\n } // fire progress event when during load\n\n\n instance.onProgress = function (e) {\n instance.fireEvent('progress', e);\n };\n\n return new Response(new ReadableStream(new ProgressHandler(instance, contentLength, response)), fetchOptions);\n }).then(function (response) {\n var errMsg;\n\n if (response.ok) {\n switch (responseType) {\n case 'arraybuffer':\n return response.arrayBuffer();\n\n case 'json':\n return response.json();\n\n case 'blob':\n return response.blob();\n\n case 'text':\n return response.text();\n\n default:\n errMsg = 'Unknown responseType: ' + responseType;\n break;\n }\n }\n\n if (!errMsg) {\n errMsg = 'HTTP error status: ' + response.status;\n }\n\n throw new Error(errMsg);\n }).then(function (response) {\n instance.fireEvent('success', response);\n }).catch(function (error) {\n instance.fireEvent('error', error);\n }); // return the fetch request\n\n instance.fetchRequest = fetchRequest;\n return instance;\n }\n\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/util/frame.js\":\n /*!***************************!*\\\n !*** ./src/util/frame.js ***!\n \\***************************/\n\n /*! no static exports found */\n\n /***/\n function srcUtilFrameJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = frame;\n\n var _requestAnimationFrame = _interopRequireDefault(__webpack_require__(\n /*! ./request-animation-frame */\n \"./src/util/request-animation-frame.js\"));\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n /**\n * Create a function which will be called at the next requestAnimationFrame\n * cycle\n *\n * @param {function} func The function to call\n *\n * @return {func} The function wrapped within a requestAnimationFrame\n */\n\n\n function frame(func) {\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return (0, _requestAnimationFrame.default)(function () {\n return func.apply(void 0, args);\n });\n };\n }\n\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/util/get-id.js\":\n /*!****************************!*\\\n !*** ./src/util/get-id.js ***!\n \\****************************/\n\n /*! no static exports found */\n\n /***/\n function srcUtilGetIdJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = getId;\n /**\n * Get a random prefixed ID\n *\n * @param {String} prefix Prefix to use. Default is `'wavesurfer_'`.\n * @returns {String} Random prefixed ID\n * @example\n * console.log(getId()); // logs 'wavesurfer_b5pors4ru6g'\n *\n * let prefix = 'foo-';\n * console.log(getId(prefix)); // logs 'foo-b5pors4ru6g'\n */\n\n function getId(prefix) {\n if (prefix === undefined) {\n prefix = 'wavesurfer_';\n }\n\n return prefix + Math.random().toString(32).substring(2);\n }\n\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/util/index.js\":\n /*!***************************!*\\\n !*** ./src/util/index.js ***!\n \\***************************/\n\n /*! no static exports found */\n\n /***/\n function srcUtilIndexJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(exports, \"ajax\", {\n enumerable: true,\n get: function get() {\n return _ajax.default;\n }\n });\n Object.defineProperty(exports, \"getId\", {\n enumerable: true,\n get: function get() {\n return _getId.default;\n }\n });\n Object.defineProperty(exports, \"max\", {\n enumerable: true,\n get: function get() {\n return _max.default;\n }\n });\n Object.defineProperty(exports, \"min\", {\n enumerable: true,\n get: function get() {\n return _min.default;\n }\n });\n Object.defineProperty(exports, \"Observer\", {\n enumerable: true,\n get: function get() {\n return _observer.default;\n }\n });\n Object.defineProperty(exports, \"extend\", {\n enumerable: true,\n get: function get() {\n return _extend.default;\n }\n });\n Object.defineProperty(exports, \"style\", {\n enumerable: true,\n get: function get() {\n return _style.default;\n }\n });\n Object.defineProperty(exports, \"requestAnimationFrame\", {\n enumerable: true,\n get: function get() {\n return _requestAnimationFrame.default;\n }\n });\n Object.defineProperty(exports, \"frame\", {\n enumerable: true,\n get: function get() {\n return _frame.default;\n }\n });\n Object.defineProperty(exports, \"debounce\", {\n enumerable: true,\n get: function get() {\n return _debounce.default;\n }\n });\n Object.defineProperty(exports, \"preventClick\", {\n enumerable: true,\n get: function get() {\n return _preventClick.default;\n }\n });\n Object.defineProperty(exports, \"fetchFile\", {\n enumerable: true,\n get: function get() {\n return _fetch.default;\n }\n });\n\n var _ajax = _interopRequireDefault(__webpack_require__(\n /*! ./ajax */\n \"./src/util/ajax.js\"));\n\n var _getId = _interopRequireDefault(__webpack_require__(\n /*! ./get-id */\n \"./src/util/get-id.js\"));\n\n var _max = _interopRequireDefault(__webpack_require__(\n /*! ./max */\n \"./src/util/max.js\"));\n\n var _min = _interopRequireDefault(__webpack_require__(\n /*! ./min */\n \"./src/util/min.js\"));\n\n var _observer = _interopRequireDefault(__webpack_require__(\n /*! ./observer */\n \"./src/util/observer.js\"));\n\n var _extend = _interopRequireDefault(__webpack_require__(\n /*! ./extend */\n \"./src/util/extend.js\"));\n\n var _style = _interopRequireDefault(__webpack_require__(\n /*! ./style */\n \"./src/util/style.js\"));\n\n var _requestAnimationFrame = _interopRequireDefault(__webpack_require__(\n /*! ./request-animation-frame */\n \"./src/util/request-animation-frame.js\"));\n\n var _frame = _interopRequireDefault(__webpack_require__(\n /*! ./frame */\n \"./src/util/frame.js\"));\n\n var _debounce = _interopRequireDefault(__webpack_require__(\n /*! debounce */\n \"./node_modules/debounce/index.js\"));\n\n var _preventClick = _interopRequireDefault(__webpack_require__(\n /*! ./prevent-click */\n \"./src/util/prevent-click.js\"));\n\n var _fetch = _interopRequireDefault(__webpack_require__(\n /*! ./fetch */\n \"./src/util/fetch.js\"));\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n /***/\n\n },\n\n /***/\n \"./src/util/max.js\":\n /*!*************************!*\\\n !*** ./src/util/max.js ***!\n \\*************************/\n\n /*! no static exports found */\n\n /***/\n function srcUtilMaxJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = max;\n /**\n * Get the largest value\n *\n * @param {Array} values Array of numbers\n * @returns {Number} Largest number found\n * @example console.log(max([1, 2, 3])); // logs 3\n */\n\n function max(values) {\n var largest = -Infinity;\n Object.keys(values).forEach(function (i) {\n if (values[i] > largest) {\n largest = values[i];\n }\n });\n return largest;\n }\n\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/util/min.js\":\n /*!*************************!*\\\n !*** ./src/util/min.js ***!\n \\*************************/\n\n /*! no static exports found */\n\n /***/\n function srcUtilMinJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = min;\n /**\n * Get the smallest value\n *\n * @param {Array} values Array of numbers\n * @returns {Number} Smallest number found\n * @example console.log(min([1, 2, 3])); // logs 1\n */\n\n function min(values) {\n var smallest = Number(Infinity);\n Object.keys(values).forEach(function (i) {\n if (values[i] < smallest) {\n smallest = values[i];\n }\n });\n return smallest;\n }\n\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/util/observer.js\":\n /*!******************************!*\\\n !*** ./src/util/observer.js ***!\n \\******************************/\n\n /*! no static exports found */\n\n /***/\n function srcUtilObserverJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = void 0;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n /**\n * @typedef {Object} ListenerDescriptor\n * @property {string} name The name of the event\n * @property {function} callback The callback\n * @property {function} un The function to call to remove the listener\n */\n\n /**\n * Observer class\n */\n\n\n var Observer =\n /*#__PURE__*/\n function () {\n /**\n * Instantiate Observer\n */\n function Observer() {\n _classCallCheck(this, Observer);\n /**\n * @private\n * @todo Initialise the handlers here already and remove the conditional\n * assignment in `on()`\n */\n\n\n this.handlers = null;\n }\n /**\n * Attach a handler function for an event.\n *\n * @param {string} event Name of the event to listen to\n * @param {function} fn The callback to trigger when the event is fired\n * @return {ListenerDescriptor} The event descriptor\n */\n\n\n _createClass(Observer, [{\n key: \"on\",\n value: function on(event, fn) {\n var _this = this;\n\n if (!this.handlers) {\n this.handlers = {};\n }\n\n var handlers = this.handlers[event];\n\n if (!handlers) {\n handlers = this.handlers[event] = [];\n }\n\n handlers.push(fn); // Return an event descriptor\n\n return {\n name: event,\n callback: fn,\n un: function un(e, fn) {\n return _this.un(e, fn);\n }\n };\n }\n /**\n * Remove an event handler.\n *\n * @param {string} event Name of the event the listener that should be\n * removed listens to\n * @param {function} fn The callback that should be removed\n */\n\n }, {\n key: \"un\",\n value: function un(event, fn) {\n if (!this.handlers) {\n return;\n }\n\n var handlers = this.handlers[event];\n var i;\n\n if (handlers) {\n if (fn) {\n for (i = handlers.length - 1; i >= 0; i--) {\n if (handlers[i] == fn) {\n handlers.splice(i, 1);\n }\n }\n } else {\n handlers.length = 0;\n }\n }\n }\n /**\n * Remove all event handlers.\n */\n\n }, {\n key: \"unAll\",\n value: function unAll() {\n this.handlers = null;\n }\n /**\n * Attach a handler to an event. The handler is executed at most once per\n * event type.\n *\n * @param {string} event The event to listen to\n * @param {function} handler The callback that is only to be called once\n * @return {ListenerDescriptor} The event descriptor\n */\n\n }, {\n key: \"once\",\n value: function once(event, handler) {\n var _this2 = this;\n\n var fn = function fn() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n /* eslint-disable no-invalid-this */\n\n\n handler.apply(_this2, args);\n /* eslint-enable no-invalid-this */\n\n setTimeout(function () {\n _this2.un(event, fn);\n }, 0);\n };\n\n return this.on(event, fn);\n }\n /**\n * Manually fire an event\n *\n * @param {string} event The event to fire manually\n * @param {...any} args The arguments with which to call the listeners\n */\n\n }, {\n key: \"fireEvent\",\n value: function fireEvent(event) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n if (!this.handlers) {\n return;\n }\n\n var handlers = this.handlers[event];\n handlers && handlers.forEach(function (fn) {\n fn.apply(void 0, args);\n });\n }\n }]);\n\n return Observer;\n }();\n\n exports.default = Observer;\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/util/prevent-click.js\":\n /*!***********************************!*\\\n !*** ./src/util/prevent-click.js ***!\n \\***********************************/\n\n /*! no static exports found */\n\n /***/\n function srcUtilPreventClickJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = preventClick;\n /**\n * Stops propagation of click event and removes event listener\n *\n * @private\n * @param {object} event The click event\n */\n\n function preventClickHandler(event) {\n event.stopPropagation();\n document.body.removeEventListener('click', preventClickHandler, true);\n }\n /**\n * Starts listening for click event and prevent propagation\n *\n * @param {object} values Values\n */\n\n\n function preventClick(values) {\n document.body.addEventListener('click', preventClickHandler, true);\n }\n\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/util/request-animation-frame.js\":\n /*!*********************************************!*\\\n !*** ./src/util/request-animation-frame.js ***!\n \\*********************************************/\n\n /*! no static exports found */\n\n /***/\n function srcUtilRequestAnimationFrameJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = void 0;\n /* eslint-disable valid-jsdoc */\n\n /**\n * Returns the `requestAnimationFrame` function for the browser, or a shim with\n * `setTimeout` if the function is not found\n *\n * @return {function} Available `requestAnimationFrame` function for the browser\n */\n\n var _default = (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback, element) {\n return setTimeout(callback, 1000 / 60);\n }).bind(window);\n\n exports.default = _default;\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/util/style.js\":\n /*!***************************!*\\\n !*** ./src/util/style.js ***!\n \\***************************/\n\n /*! no static exports found */\n\n /***/\n function srcUtilStyleJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = style;\n /**\n * Apply a map of styles to an element\n *\n * @param {HTMLElement} el The element that the styles will be applied to\n * @param {Object} styles The map of propName: attribute, both are used as-is\n *\n * @return {HTMLElement} el\n */\n\n function style(el, styles) {\n Object.keys(styles).forEach(function (prop) {\n if (el.style[prop] !== styles[prop]) {\n el.style[prop] = styles[prop];\n }\n });\n return el;\n }\n\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/wavesurfer.js\":\n /*!***************************!*\\\n !*** ./src/wavesurfer.js ***!\n \\***************************/\n\n /*! no static exports found */\n\n /***/\n function srcWavesurferJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = void 0;\n\n var util = _interopRequireWildcard(__webpack_require__(\n /*! ./util */\n \"./src/util/index.js\"));\n\n var _drawer = _interopRequireDefault(__webpack_require__(\n /*! ./drawer.multicanvas */\n \"./src/drawer.multicanvas.js\"));\n\n var _webaudio = _interopRequireDefault(__webpack_require__(\n /*! ./webaudio */\n \"./src/webaudio.js\"));\n\n var _mediaelement = _interopRequireDefault(__webpack_require__(\n /*! ./mediaelement */\n \"./src/mediaelement.js\"));\n\n var _peakcache = _interopRequireDefault(__webpack_require__(\n /*! ./peakcache */\n \"./src/peakcache.js\"));\n\n var _mediaelementWebaudio = _interopRequireDefault(__webpack_require__(\n /*! ./mediaelement-webaudio */\n \"./src/mediaelement-webaudio.js\"));\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n function _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n\n return cache;\n }\n\n function _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n\n var cache = _getRequireWildcardCache();\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj.default = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n }\n\n function _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n }\n\n function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n /*\n * This work is licensed under a BSD-3-Clause License.\n */\n\n /** @external {HTMLElement} https://developer.mozilla.org/en/docs/Web/API/HTMLElement */\n\n /** @external {OfflineAudioContext} https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext */\n\n /** @external {File} https://developer.mozilla.org/en-US/docs/Web/API/File */\n\n /** @external {Blob} https://developer.mozilla.org/en-US/docs/Web/API/Blob */\n\n /** @external {CanvasRenderingContext2D} https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D */\n\n /** @external {MediaStreamConstraints} https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamConstraints */\n\n /** @external {AudioNode} https://developer.mozilla.org/de/docs/Web/API/AudioNode */\n\n /**\n * @typedef {Object} WavesurferParams\n * @property {AudioContext} audioContext=null Use your own previously\n * initialized AudioContext or leave blank.\n * @property {number} audioRate=1 Speed at which to play audio. Lower number is\n * slower.\n * @property {ScriptProcessorNode} audioScriptProcessor=null Use your own previously\n * initialized ScriptProcessorNode or leave blank.\n * @property {boolean} autoCenter=true If a scrollbar is present, center the\n * waveform on current progress\n * @property {number} autoCenterRate=5 If autoCenter is active, rate at which the\n * waveform is centered\n * @property {boolean} autoCenterImmediately=false If autoCenter is active, immediately\n * center waveform on current progress\n * @property {string} backend='WebAudio' `'WebAudio'|'MediaElement'|'MediaElementWebAudio'` In most cases\n * you don't have to set this manually. MediaElement is a fallback for unsupported browsers.\n * MediaElementWebAudio allows to use WebAudio API also with big audio files, loading audio like with\n * MediaElement backend (HTML5 audio tag). You have to use the same methods of MediaElement backend for loading and\n * playback, giving also peaks, so the audio data are not decoded. In this way you can use WebAudio features, like filters,\n * also with audio with big duration. For example:\n * ` wavesurfer.load(url | HTMLMediaElement, peaks, preload, duration);\n * wavesurfer.play();\n * wavesurfer.setFilter(customFilter);\n * `\n * @property {string} backgroundColor=null Change background color of the\n * waveform container.\n * @property {number} barHeight=1 The height of the wave bars.\n * @property {number} barRadius=0 The radius of the wave bars. Makes bars rounded\n * @property {number} barGap=null The optional spacing between bars of the wave,\n * if not provided will be calculated in legacy format.\n * @property {number} barWidth=null Draw the waveform using bars.\n * @property {number} barMinHeight=null If specified, draw at least a bar of this height,\n * eliminating waveform gaps\n * @property {boolean} closeAudioContext=false Close and nullify all audio\n * contexts when the destroy method is called.\n * @property {!string|HTMLElement} container CSS selector or HTML element where\n * the waveform should be drawn. This is the only required parameter.\n * @property {string} cursorColor='#333' The fill color of the cursor indicating\n * the playhead position.\n * @property {number} cursorWidth=1 Measured in pixels.\n * @property {object} drawingContextAttributes={desynchronized: true} Drawing context\n * attributes.\n * @property {number} duration=null Optional audio length so pre-rendered peaks\n * can be display immediately for example.\n * @property {boolean} fillParent=true Whether to fill the entire container or\n * draw only according to `minPxPerSec`.\n * @property {boolean} forceDecode=false Force decoding of audio using web audio\n * when zooming to get a more detailed waveform.\n * @property {number} height=128 The height of the waveform. Measured in\n * pixels.\n * @property {boolean} hideScrollbar=false Whether to hide the horizontal\n * scrollbar when one would normally be shown.\n * @property {boolean} interact=true Whether the mouse interaction will be\n * enabled at initialization. You can switch this parameter at any time later\n * on.\n * @property {boolean} loopSelection=true (Use with regions plugin) Enable\n * looping of selected regions\n * @property {number} maxCanvasWidth=4000 Maximum width of a single canvas in\n * pixels, excluding a small overlap (2 * `pixelRatio`, rounded up to the next\n * even integer). If the waveform is longer than this value, additional canvases\n * will be used to render the waveform, which is useful for very large waveforms\n * that may be too wide for browsers to draw on a single canvas.\n * @property {boolean} mediaControls=false (Use with backend `MediaElement` or `MediaElementWebAudio`)\n * this enables the native controls for the media element\n * @property {string} mediaType='audio' (Use with backend `MediaElement` or `MediaElementWebAudio`)\n * `'audio'|'video'` ('video' only for `MediaElement`)\n * @property {number} minPxPerSec=20 Minimum number of pixels per second of\n * audio.\n * @property {boolean} normalize=false If true, normalize by the maximum peak\n * instead of 1.0.\n * @property {boolean} partialRender=false Use the PeakCache to improve\n * rendering speed of large waveforms\n * @property {number} pixelRatio=window.devicePixelRatio The pixel ratio used to\n * calculate display\n * @property {PluginDefinition[]} plugins=[] An array of plugin definitions to\n * register during instantiation, they will be directly initialised unless they\n * are added with the `deferInit` property set to true.\n * @property {string} progressColor='#555' The fill color of the part of the\n * waveform behind the cursor. When `progressColor` and `waveColor` are the same\n * the progress wave is not rendered at all.\n * @property {boolean} removeMediaElementOnDestroy=true Set to false to keep the\n * media element in the DOM when the player is destroyed. This is useful when\n * reusing an existing media element via the `loadMediaElement` method.\n * @property {Object} renderer=MultiCanvas Can be used to inject a custom\n * renderer.\n * @property {boolean|number} responsive=false If set to `true` resize the\n * waveform, when the window is resized. This is debounced with a `100ms`\n * timeout by default. If this parameter is a number it represents that timeout.\n * @property {boolean} rtl=false If set to `true`, renders waveform from\n * right-to-left.\n * @property {boolean} scrollParent=false Whether to scroll the container with a\n * lengthy waveform. Otherwise the waveform is shrunk to the container width\n * (see fillParent).\n * @property {number} skipLength=2 Number of seconds to skip with the\n * skipForward() and skipBackward() methods.\n * @property {boolean} splitChannels=false Render with separate waveforms for\n * the channels of the audio\n * @property {string} waveColor='#999' The fill color of the waveform after the\n * cursor.\n * @property {object} xhr={} XHR options. For example:\n * `let xhr = {\n * cache: 'default',\n * mode: 'cors',\n * method: 'GET',\n * credentials: 'same-origin',\n * redirect: 'follow',\n * referrer: 'client',\n * headers: [\n * {\n * key: 'Authorization',\n * value: 'my-token'\n * }\n * ]\n * };`\n */\n\n /**\n * @typedef {Object} PluginDefinition\n * @desc The Object used to describe a plugin\n * @example wavesurfer.addPlugin(pluginDefinition);\n * @property {string} name The name of the plugin, the plugin instance will be\n * added as a property to the wavesurfer instance under this name\n * @property {?Object} staticProps The properties that should be added to the\n * wavesurfer instance as static properties\n * @property {?boolean} deferInit Don't initialise plugin\n * automatically\n * @property {Object} params={} The plugin parameters, they are the first parameter\n * passed to the plugin class constructor function\n * @property {PluginClass} instance The plugin instance factory, is called with\n * the dependency specified in extends. Returns the plugin class.\n */\n\n /**\n * @interface PluginClass\n *\n * @desc This is the interface which is implemented by all plugin classes. Note\n * that this only turns into an observer after being passed through\n * `wavesurfer.addPlugin`.\n *\n * @extends {Observer}\n */\n\n\n var PluginClass =\n /*#__PURE__*/\n function () {\n _createClass(PluginClass, [{\n key: \"create\",\n\n /**\n * Plugin definition factory\n *\n * This function must be used to create a plugin definition which can be\n * used by wavesurfer to correctly instantiate the plugin.\n *\n * It returns a `PluginDefinition` object representing the plugin.\n *\n * @param {Object} params={} The plugin params (specific to the plugin)\n */\n value: function create(params) {}\n /**\n * Construct the plugin\n *\n * @param {Object} params={} The plugin params (specific to the plugin)\n * @param {Object} ws The wavesurfer instance\n */\n\n }]);\n\n function PluginClass(params, ws) {\n _classCallCheck(this, PluginClass);\n }\n /**\n * Initialise the plugin\n *\n * Start doing something. This is called by\n * `wavesurfer.initPlugin(pluginName)`\n */\n\n\n _createClass(PluginClass, [{\n key: \"init\",\n value: function init() {}\n /**\n * Destroy the plugin instance\n *\n * Stop doing something. This is called by\n * `wavesurfer.destroyPlugin(pluginName)`\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {}\n }]);\n\n return PluginClass;\n }();\n /**\n * WaveSurfer core library class\n *\n * @extends {Observer}\n * @example\n * const params = {\n * container: '#waveform',\n * waveColor: 'violet',\n * progressColor: 'purple'\n * };\n *\n * // initialise like this\n * const wavesurfer = WaveSurfer.create(params);\n *\n * // or like this ...\n * const wavesurfer = new WaveSurfer(params);\n * wavesurfer.init();\n *\n * // load audio file\n * wavesurfer.load('example/media/demo.wav');\n */\n\n\n var WaveSurfer =\n /*#__PURE__*/\n function (_util$Observer) {\n _inherits(WaveSurfer, _util$Observer);\n\n _createClass(WaveSurfer, null, [{\n key: \"create\",\n\n /** @private */\n\n /** @private */\n\n /**\n * Instantiate this class, call its `init` function and returns it\n *\n * @param {WavesurferParams} params The wavesurfer parameters\n * @return {Object} WaveSurfer instance\n * @example const wavesurfer = WaveSurfer.create(params);\n */\n value: function create(params) {\n var wavesurfer = new WaveSurfer(params);\n return wavesurfer.init();\n }\n /**\n * The library version number is available as a static property of the\n * WaveSurfer class\n *\n * @type {String}\n * @example\n * console.log('Using wavesurfer.js ' + WaveSurfer.VERSION);\n */\n\n }]);\n /**\n * Initialise wavesurfer instance\n *\n * @param {WavesurferParams} params Instantiation options for wavesurfer\n * @example\n * const wavesurfer = new WaveSurfer(params);\n * @returns {this} Wavesurfer instance\n */\n\n\n function WaveSurfer(params) {\n var _this;\n\n _classCallCheck(this, WaveSurfer);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(WaveSurfer).call(this));\n /**\n * Extract relevant parameters (or defaults)\n * @private\n */\n\n _this.defaultParams = {\n audioContext: null,\n audioScriptProcessor: null,\n audioRate: 1,\n autoCenter: true,\n autoCenterRate: 5,\n autoCenterImmediately: false,\n backend: 'WebAudio',\n backgroundColor: null,\n barHeight: 1,\n barRadius: 0,\n barGap: null,\n barMinHeight: null,\n container: null,\n cursorColor: '#333',\n cursorWidth: 1,\n dragSelection: true,\n drawingContextAttributes: {\n // Boolean that hints the user agent to reduce the latency\n // by desynchronizing the canvas paint cycle from the event\n // loop\n desynchronized: true\n },\n duration: null,\n fillParent: true,\n forceDecode: false,\n height: 128,\n hideScrollbar: false,\n interact: true,\n loopSelection: true,\n maxCanvasWidth: 4000,\n mediaContainer: null,\n mediaControls: false,\n mediaType: 'audio',\n minPxPerSec: 20,\n normalize: false,\n partialRender: false,\n pixelRatio: window.devicePixelRatio || screen.deviceXDPI / screen.logicalXDPI,\n plugins: [],\n progressColor: '#555',\n removeMediaElementOnDestroy: true,\n renderer: _drawer.default,\n responsive: false,\n rtl: false,\n scrollParent: false,\n skipLength: 2,\n splitChannels: false,\n waveColor: '#999',\n xhr: {}\n };\n _this.backends = {\n MediaElement: _mediaelement.default,\n WebAudio: _webaudio.default,\n MediaElementWebAudio: _mediaelementWebaudio.default\n };\n _this.util = util;\n _this.params = Object.assign({}, _this.defaultParams, params);\n /** @private */\n\n _this.container = 'string' == typeof params.container ? document.querySelector(_this.params.container) : _this.params.container;\n\n if (!_this.container) {\n throw new Error('Container element not found');\n }\n\n if (_this.params.mediaContainer == null) {\n /** @private */\n _this.mediaContainer = _this.container;\n } else if (typeof _this.params.mediaContainer == 'string') {\n /** @private */\n _this.mediaContainer = document.querySelector(_this.params.mediaContainer);\n } else {\n /** @private */\n _this.mediaContainer = _this.params.mediaContainer;\n }\n\n if (!_this.mediaContainer) {\n throw new Error('Media Container element not found');\n }\n\n if (_this.params.maxCanvasWidth <= 1) {\n throw new Error('maxCanvasWidth must be greater than 1');\n } else if (_this.params.maxCanvasWidth % 2 == 1) {\n throw new Error('maxCanvasWidth must be an even number');\n }\n\n if (_this.params.rtl === true) {\n util.style(_this.container, {\n transform: 'rotateY(180deg)'\n });\n }\n\n if (_this.params.backgroundColor) {\n _this.setBackgroundColor(_this.params.backgroundColor);\n }\n /**\n * @private Used to save the current volume when muting so we can\n * restore once unmuted\n * @type {number}\n */\n\n\n _this.savedVolume = 0;\n /**\n * @private The current muted state\n * @type {boolean}\n */\n\n _this.isMuted = false;\n /**\n * @private Will hold a list of event descriptors that need to be\n * canceled on subsequent loads of audio\n * @type {Object[]}\n */\n\n _this.tmpEvents = [];\n /**\n * @private Holds any running audio downloads\n * @type {Observer}\n */\n\n _this.currentRequest = null;\n /** @private */\n\n _this.arraybuffer = null;\n /** @private */\n\n _this.drawer = null;\n /** @private */\n\n _this.backend = null;\n /** @private */\n\n _this.peakCache = null; // cache constructor objects\n\n if (typeof _this.params.renderer !== 'function') {\n throw new Error('Renderer parameter is invalid');\n }\n /**\n * @private The uninitialised Drawer class\n */\n\n\n _this.Drawer = _this.params.renderer;\n /**\n * @private The uninitialised Backend class\n */\n // Back compat\n\n if (_this.params.backend == 'AudioElement') {\n _this.params.backend = 'MediaElement';\n }\n\n if ((_this.params.backend == 'WebAudio' || _this.params.backend === 'MediaElementWebAudio') && !_webaudio.default.prototype.supportsWebAudio.call(null)) {\n _this.params.backend = 'MediaElement';\n }\n\n _this.Backend = _this.backends[_this.params.backend];\n /**\n * @private map of plugin names that are currently initialised\n */\n\n _this.initialisedPluginList = {};\n /** @private */\n\n _this.isDestroyed = false;\n /**\n * Get the current ready status.\n *\n * @example const isReady = wavesurfer.isReady;\n * @return {boolean}\n */\n\n _this.isReady = false; // responsive debounced event listener. If this.params.responsive is not\n // set, this is never called. Use 100ms or this.params.responsive as\n // timeout for the debounce function.\n\n var prevWidth = 0;\n _this._onResize = util.debounce(function () {\n if (prevWidth != _this.drawer.wrapper.clientWidth && !_this.params.scrollParent) {\n prevWidth = _this.drawer.wrapper.clientWidth;\n\n _this.drawer.fireEvent('redraw');\n }\n }, typeof _this.params.responsive === 'number' ? _this.params.responsive : 100);\n return _possibleConstructorReturn(_this, _assertThisInitialized(_this));\n }\n /**\n * Initialise the wave\n *\n * @example\n * var wavesurfer = new WaveSurfer(params);\n * wavesurfer.init();\n * @return {this} The wavesurfer instance\n */\n\n\n _createClass(WaveSurfer, [{\n key: \"init\",\n value: function init() {\n this.registerPlugins(this.params.plugins);\n this.createDrawer();\n this.createBackend();\n this.createPeakCache();\n return this;\n }\n /**\n * Add and initialise array of plugins (if `plugin.deferInit` is falsey),\n * this function is called in the init function of wavesurfer\n *\n * @param {PluginDefinition[]} plugins An array of plugin definitions\n * @emits {WaveSurfer#plugins-registered} Called with the array of plugin definitions\n * @return {this} The wavesurfer instance\n */\n\n }, {\n key: \"registerPlugins\",\n value: function registerPlugins(plugins) {\n var _this2 = this; // first instantiate all the plugins\n\n\n plugins.forEach(function (plugin) {\n return _this2.addPlugin(plugin);\n }); // now run the init functions\n\n plugins.forEach(function (plugin) {\n // call init function of the plugin if deferInit is falsey\n // in that case you would manually use initPlugins()\n if (!plugin.deferInit) {\n _this2.initPlugin(plugin.name);\n }\n });\n this.fireEvent('plugins-registered', plugins);\n return this;\n }\n /**\n * Get a map of plugin names that are currently initialised\n *\n * @example wavesurfer.getPlugins();\n * @return {Object} Object with plugin names\n */\n\n }, {\n key: \"getActivePlugins\",\n value: function getActivePlugins() {\n return this.initialisedPluginList;\n }\n /**\n * Add a plugin object to wavesurfer\n *\n * @param {PluginDefinition} plugin A plugin definition\n * @emits {WaveSurfer#plugin-added} Called with the name of the plugin that was added\n * @example wavesurfer.addPlugin(WaveSurfer.minimap());\n * @return {this} The wavesurfer instance\n */\n\n }, {\n key: \"addPlugin\",\n value: function addPlugin(plugin) {\n var _this3 = this;\n\n if (!plugin.name) {\n throw new Error('Plugin does not have a name!');\n }\n\n if (!plugin.instance) {\n throw new Error(\"Plugin \".concat(plugin.name, \" does not have an instance property!\"));\n } // staticProps properties are applied to wavesurfer instance\n\n\n if (plugin.staticProps) {\n Object.keys(plugin.staticProps).forEach(function (pluginStaticProp) {\n /**\n * Properties defined in a plugin definition's `staticProps` property are added as\n * staticProps properties of the WaveSurfer instance\n */\n _this3[pluginStaticProp] = plugin.staticProps[pluginStaticProp];\n });\n }\n\n var Instance = plugin.instance; // turn the plugin instance into an observer\n\n var observerPrototypeKeys = Object.getOwnPropertyNames(util.Observer.prototype);\n observerPrototypeKeys.forEach(function (key) {\n Instance.prototype[key] = util.Observer.prototype[key];\n });\n /**\n * Instantiated plugin classes are added as a property of the wavesurfer\n * instance\n * @type {Object}\n */\n\n this[plugin.name] = new Instance(plugin.params || {}, this);\n this.fireEvent('plugin-added', plugin.name);\n return this;\n }\n /**\n * Initialise a plugin\n *\n * @param {string} name A plugin name\n * @emits WaveSurfer#plugin-initialised\n * @example wavesurfer.initPlugin('minimap');\n * @return {this} The wavesurfer instance\n */\n\n }, {\n key: \"initPlugin\",\n value: function initPlugin(name) {\n if (!this[name]) {\n throw new Error(\"Plugin \".concat(name, \" has not been added yet!\"));\n }\n\n if (this.initialisedPluginList[name]) {\n // destroy any already initialised plugins\n this.destroyPlugin(name);\n }\n\n this[name].init();\n this.initialisedPluginList[name] = true;\n this.fireEvent('plugin-initialised', name);\n return this;\n }\n /**\n * Destroy a plugin\n *\n * @param {string} name A plugin name\n * @emits WaveSurfer#plugin-destroyed\n * @example wavesurfer.destroyPlugin('minimap');\n * @returns {this} The wavesurfer instance\n */\n\n }, {\n key: \"destroyPlugin\",\n value: function destroyPlugin(name) {\n if (!this[name]) {\n throw new Error(\"Plugin \".concat(name, \" has not been added yet and cannot be destroyed!\"));\n }\n\n if (!this.initialisedPluginList[name]) {\n throw new Error(\"Plugin \".concat(name, \" is not active and cannot be destroyed!\"));\n }\n\n if (typeof this[name].destroy !== 'function') {\n throw new Error(\"Plugin \".concat(name, \" does not have a destroy function!\"));\n }\n\n this[name].destroy();\n delete this.initialisedPluginList[name];\n this.fireEvent('plugin-destroyed', name);\n return this;\n }\n /**\n * Destroy all initialised plugins. Convenience function to use when\n * wavesurfer is removed\n *\n * @private\n */\n\n }, {\n key: \"destroyAllPlugins\",\n value: function destroyAllPlugins() {\n var _this4 = this;\n\n Object.keys(this.initialisedPluginList).forEach(function (name) {\n return _this4.destroyPlugin(name);\n });\n }\n /**\n * Create the drawer and draw the waveform\n *\n * @private\n * @emits WaveSurfer#drawer-created\n */\n\n }, {\n key: \"createDrawer\",\n value: function createDrawer() {\n var _this5 = this;\n\n this.drawer = new this.Drawer(this.container, this.params);\n this.drawer.init();\n this.fireEvent('drawer-created', this.drawer);\n\n if (this.params.responsive !== false) {\n window.addEventListener('resize', this._onResize, true);\n window.addEventListener('orientationchange', this._onResize, true);\n }\n\n this.drawer.on('redraw', function () {\n _this5.drawBuffer();\n\n _this5.drawer.progress(_this5.backend.getPlayedPercents());\n }); // Click-to-seek\n\n this.drawer.on('click', function (e, progress) {\n setTimeout(function () {\n return _this5.seekTo(progress);\n }, 0);\n }); // Relay the scroll event from the drawer\n\n this.drawer.on('scroll', function (e) {\n if (_this5.params.partialRender) {\n _this5.drawBuffer();\n }\n\n _this5.fireEvent('scroll', e);\n });\n }\n /**\n * Create the backend\n *\n * @private\n * @emits WaveSurfer#backend-created\n */\n\n }, {\n key: \"createBackend\",\n value: function createBackend() {\n var _this6 = this;\n\n if (this.backend) {\n this.backend.destroy();\n }\n\n this.backend = new this.Backend(this.params);\n this.backend.init();\n this.fireEvent('backend-created', this.backend);\n this.backend.on('finish', function () {\n _this6.drawer.progress(_this6.backend.getPlayedPercents());\n\n _this6.fireEvent('finish');\n });\n this.backend.on('play', function () {\n return _this6.fireEvent('play');\n });\n this.backend.on('pause', function () {\n return _this6.fireEvent('pause');\n });\n this.backend.on('audioprocess', function (time) {\n _this6.drawer.progress(_this6.backend.getPlayedPercents());\n\n _this6.fireEvent('audioprocess', time);\n }); // only needed for MediaElement and MediaElementWebAudio backend\n\n if (this.params.backend === 'MediaElement' || this.params.backend === 'MediaElementWebAudio') {\n this.backend.on('seek', function () {\n _this6.drawer.progress(_this6.backend.getPlayedPercents());\n });\n this.backend.on('volume', function () {\n var newVolume = _this6.getVolume();\n\n _this6.fireEvent('volume', newVolume);\n\n if (_this6.backend.isMuted !== _this6.isMuted) {\n _this6.isMuted = _this6.backend.isMuted;\n\n _this6.fireEvent('mute', _this6.isMuted);\n }\n });\n }\n }\n /**\n * Create the peak cache\n *\n * @private\n */\n\n }, {\n key: \"createPeakCache\",\n value: function createPeakCache() {\n if (this.params.partialRender) {\n this.peakCache = new _peakcache.default();\n }\n }\n /**\n * Get the duration of the audio clip\n *\n * @example const duration = wavesurfer.getDuration();\n * @return {number} Duration in seconds\n */\n\n }, {\n key: \"getDuration\",\n value: function getDuration() {\n return this.backend.getDuration();\n }\n /**\n * Get the current playback position\n *\n * @example const currentTime = wavesurfer.getCurrentTime();\n * @return {number} Playback position in seconds\n */\n\n }, {\n key: \"getCurrentTime\",\n value: function getCurrentTime() {\n return this.backend.getCurrentTime();\n }\n /**\n * Set the current play time in seconds.\n *\n * @param {number} seconds A positive number in seconds. E.g. 10 means 10\n * seconds, 60 means 1 minute\n */\n\n }, {\n key: \"setCurrentTime\",\n value: function setCurrentTime(seconds) {\n if (seconds >= this.getDuration()) {\n this.seekTo(1);\n } else {\n this.seekTo(seconds / this.getDuration());\n }\n }\n /**\n * Starts playback from the current position. Optional start and end\n * measured in seconds can be used to set the range of audio to play.\n *\n * @param {?number} start Position to start at\n * @param {?number} end Position to end at\n * @emits WaveSurfer#interaction\n * @return {Promise} Result of the backend play method\n * @example\n * // play from second 1 to 5\n * wavesurfer.play(1, 5);\n */\n\n }, {\n key: \"play\",\n value: function play(start, end) {\n var _this7 = this;\n\n this.fireEvent('interaction', function () {\n return _this7.play(start, end);\n });\n return this.backend.play(start, end);\n }\n /**\n * Set a point in seconds for playback to stop at.\n *\n * @param {number} position Position (in seconds) to stop at\n * @version 3.3.0\n */\n\n }, {\n key: \"setPlayEnd\",\n value: function setPlayEnd(position) {\n this.backend.setPlayEnd(position);\n }\n /**\n * Stops and pauses playback\n *\n * @example wavesurfer.pause();\n * @return {Promise} Result of the backend pause method\n */\n\n }, {\n key: \"pause\",\n value: function pause() {\n if (!this.backend.isPaused()) {\n return this.backend.pause();\n }\n }\n /**\n * Toggle playback\n *\n * @example wavesurfer.playPause();\n * @return {Promise} Result of the backend play or pause method\n */\n\n }, {\n key: \"playPause\",\n value: function playPause() {\n return this.backend.isPaused() ? this.play() : this.pause();\n }\n /**\n * Get the current playback state\n *\n * @example const isPlaying = wavesurfer.isPlaying();\n * @return {boolean} False if paused, true if playing\n */\n\n }, {\n key: \"isPlaying\",\n value: function isPlaying() {\n return !this.backend.isPaused();\n }\n /**\n * Skip backward\n *\n * @param {?number} seconds Amount to skip back, if not specified `skipLength`\n * is used\n * @example wavesurfer.skipBackward();\n */\n\n }, {\n key: \"skipBackward\",\n value: function skipBackward(seconds) {\n this.skip(-seconds || -this.params.skipLength);\n }\n /**\n * Skip forward\n *\n * @param {?number} seconds Amount to skip back, if not specified `skipLength`\n * is used\n * @example wavesurfer.skipForward();\n */\n\n }, {\n key: \"skipForward\",\n value: function skipForward(seconds) {\n this.skip(seconds || this.params.skipLength);\n }\n /**\n * Skip a number of seconds from the current position (use a negative value\n * to go backwards).\n *\n * @param {number} offset Amount to skip back or forwards\n * @example\n * // go back 2 seconds\n * wavesurfer.skip(-2);\n */\n\n }, {\n key: \"skip\",\n value: function skip(offset) {\n var duration = this.getDuration() || 1;\n var position = this.getCurrentTime() || 0;\n position = Math.max(0, Math.min(duration, position + (offset || 0)));\n this.seekAndCenter(position / duration);\n }\n /**\n * Seeks to a position and centers the view\n *\n * @param {number} progress Between 0 (=beginning) and 1 (=end)\n * @example\n * // seek and go to the middle of the audio\n * wavesurfer.seekTo(0.5);\n */\n\n }, {\n key: \"seekAndCenter\",\n value: function seekAndCenter(progress) {\n this.seekTo(progress);\n this.drawer.recenter(progress);\n }\n /**\n * Seeks to a position\n *\n * @param {number} progress Between 0 (=beginning) and 1 (=end)\n * @emits WaveSurfer#interaction\n * @emits WaveSurfer#seek\n * @example\n * // seek to the middle of the audio\n * wavesurfer.seekTo(0.5);\n */\n\n }, {\n key: \"seekTo\",\n value: function seekTo(progress) {\n var _this8 = this; // return an error if progress is not a number between 0 and 1\n\n\n if (typeof progress !== 'number' || !isFinite(progress) || progress < 0 || progress > 1) {\n throw new Error('Error calling wavesurfer.seekTo, parameter must be a number between 0 and 1!');\n }\n\n this.fireEvent('interaction', function () {\n return _this8.seekTo(progress);\n });\n var paused = this.backend.isPaused(); // avoid draw wrong position while playing backward seeking\n\n if (!paused) {\n this.backend.pause();\n } // avoid small scrolls while paused seeking\n\n\n var oldScrollParent = this.params.scrollParent;\n this.params.scrollParent = false;\n this.backend.seekTo(progress * this.getDuration());\n this.drawer.progress(progress);\n\n if (!paused) {\n this.backend.play();\n }\n\n this.params.scrollParent = oldScrollParent;\n this.fireEvent('seek', progress);\n }\n /**\n * Stops and goes to the beginning.\n *\n * @example wavesurfer.stop();\n */\n\n }, {\n key: \"stop\",\n value: function stop() {\n this.pause();\n this.seekTo(0);\n this.drawer.progress(0);\n }\n /**\n * Sets the ID of the audio device to use for output and returns a Promise.\n *\n * @param {string} deviceId String value representing underlying output\n * device\n * @returns {Promise} `Promise` that resolves to `undefined` when there are\n * no errors detected.\n */\n\n }, {\n key: \"setSinkId\",\n value: function setSinkId(deviceId) {\n return this.backend.setSinkId(deviceId);\n }\n /**\n * Set the playback volume.\n *\n * @param {number} newVolume A value between 0 and 1, 0 being no\n * volume and 1 being full volume.\n * @emits WaveSurfer#volume\n */\n\n }, {\n key: \"setVolume\",\n value: function setVolume(newVolume) {\n this.backend.setVolume(newVolume);\n this.fireEvent('volume', newVolume);\n }\n /**\n * Get the playback volume.\n *\n * @return {number} A value between 0 and 1, 0 being no\n * volume and 1 being full volume.\n */\n\n }, {\n key: \"getVolume\",\n value: function getVolume() {\n return this.backend.getVolume();\n }\n /**\n * Set the playback rate.\n *\n * @param {number} rate A positive number. E.g. 0.5 means half the normal\n * speed, 2 means double speed and so on.\n * @example wavesurfer.setPlaybackRate(2);\n */\n\n }, {\n key: \"setPlaybackRate\",\n value: function setPlaybackRate(rate) {\n this.backend.setPlaybackRate(rate);\n }\n /**\n * Get the playback rate.\n *\n * @return {number} The current playback rate.\n */\n\n }, {\n key: \"getPlaybackRate\",\n value: function getPlaybackRate() {\n return this.backend.getPlaybackRate();\n }\n /**\n * Toggle the volume on and off. If not currently muted it will save the\n * current volume value and turn the volume off. If currently muted then it\n * will restore the volume to the saved value, and then rest the saved\n * value.\n *\n * @example wavesurfer.toggleMute();\n */\n\n }, {\n key: \"toggleMute\",\n value: function toggleMute() {\n this.setMute(!this.isMuted);\n }\n /**\n * Enable or disable muted audio\n *\n * @param {boolean} mute Specify `true` to mute audio.\n * @emits WaveSurfer#volume\n * @emits WaveSurfer#mute\n * @example\n * // unmute\n * wavesurfer.setMute(false);\n * console.log(wavesurfer.getMute()) // logs false\n */\n\n }, {\n key: \"setMute\",\n value: function setMute(mute) {\n // ignore all muting requests if the audio is already in that state\n if (mute === this.isMuted) {\n this.fireEvent('mute', this.isMuted);\n return;\n }\n\n if (mute) {\n // If currently not muted then save current volume,\n // turn off the volume and update the mute properties\n this.savedVolume = this.backend.getVolume();\n this.backend.setVolume(0);\n this.isMuted = true;\n this.fireEvent('volume', 0);\n } else {\n // If currently muted then restore to the saved volume\n // and update the mute properties\n this.backend.setVolume(this.savedVolume);\n this.isMuted = false;\n this.fireEvent('volume', this.savedVolume);\n }\n\n this.fireEvent('mute', this.isMuted);\n }\n /**\n * Get the current mute status.\n *\n * @example const isMuted = wavesurfer.getMute();\n * @return {boolean} Current mute status\n */\n\n }, {\n key: \"getMute\",\n value: function getMute() {\n return this.isMuted;\n }\n /**\n * Get the list of current set filters as an array.\n *\n * Filters must be set with setFilters method first\n *\n * @return {array} List of enabled filters\n */\n\n }, {\n key: \"getFilters\",\n value: function getFilters() {\n return this.backend.filters || [];\n }\n /**\n * Toggles `scrollParent` and redraws\n *\n * @example wavesurfer.toggleScroll();\n */\n\n }, {\n key: \"toggleScroll\",\n value: function toggleScroll() {\n this.params.scrollParent = !this.params.scrollParent;\n this.drawBuffer();\n }\n /**\n * Toggle mouse interaction\n *\n * @example wavesurfer.toggleInteraction();\n */\n\n }, {\n key: \"toggleInteraction\",\n value: function toggleInteraction() {\n this.params.interact = !this.params.interact;\n }\n /**\n * Get the fill color of the waveform after the cursor.\n *\n * @return {string} A CSS color string.\n */\n\n }, {\n key: \"getWaveColor\",\n value: function getWaveColor() {\n return this.params.waveColor;\n }\n /**\n * Set the fill color of the waveform after the cursor.\n *\n * @param {string} color A CSS color string.\n * @example wavesurfer.setWaveColor('#ddd');\n */\n\n }, {\n key: \"setWaveColor\",\n value: function setWaveColor(color) {\n this.params.waveColor = color;\n this.drawBuffer();\n }\n /**\n * Get the fill color of the waveform behind the cursor.\n *\n * @return {string} A CSS color string.\n */\n\n }, {\n key: \"getProgressColor\",\n value: function getProgressColor() {\n return this.params.progressColor;\n }\n /**\n * Set the fill color of the waveform behind the cursor.\n *\n * @param {string} color A CSS color string.\n * @example wavesurfer.setProgressColor('#400');\n */\n\n }, {\n key: \"setProgressColor\",\n value: function setProgressColor(color) {\n this.params.progressColor = color;\n this.drawBuffer();\n }\n /**\n * Get the background color of the waveform container.\n *\n * @return {string} A CSS color string.\n */\n\n }, {\n key: \"getBackgroundColor\",\n value: function getBackgroundColor() {\n return this.params.backgroundColor;\n }\n /**\n * Set the background color of the waveform container.\n *\n * @param {string} color A CSS color string.\n * @example wavesurfer.setBackgroundColor('#FF00FF');\n */\n\n }, {\n key: \"setBackgroundColor\",\n value: function setBackgroundColor(color) {\n this.params.backgroundColor = color;\n util.style(this.container, {\n background: this.params.backgroundColor\n });\n }\n /**\n * Get the fill color of the cursor indicating the playhead\n * position.\n *\n * @return {string} A CSS color string.\n */\n\n }, {\n key: \"getCursorColor\",\n value: function getCursorColor() {\n return this.params.cursorColor;\n }\n /**\n * Set the fill color of the cursor indicating the playhead\n * position.\n *\n * @param {string} color A CSS color string.\n * @example wavesurfer.setCursorColor('#222');\n */\n\n }, {\n key: \"setCursorColor\",\n value: function setCursorColor(color) {\n this.params.cursorColor = color;\n this.drawer.updateCursor();\n }\n /**\n * Get the height of the waveform.\n *\n * @return {number} Height measured in pixels.\n */\n\n }, {\n key: \"getHeight\",\n value: function getHeight() {\n return this.params.height;\n }\n /**\n * Set the height of the waveform.\n *\n * @param {number} height Height measured in pixels.\n * @example wavesurfer.setHeight(200);\n */\n\n }, {\n key: \"setHeight\",\n value: function setHeight(height) {\n this.params.height = height;\n this.drawer.setHeight(height * this.params.pixelRatio);\n this.drawBuffer();\n }\n /**\n * Get the correct peaks for current wave view-port and render wave\n *\n * @private\n * @emits WaveSurfer#redraw\n */\n\n }, {\n key: \"drawBuffer\",\n value: function drawBuffer() {\n var nominalWidth = Math.round(this.getDuration() * this.params.minPxPerSec * this.params.pixelRatio);\n var parentWidth = this.drawer.getWidth();\n var width = nominalWidth; // always start at 0 after zooming for scrolling : issue redraw left part\n\n var start = 0;\n var end = Math.max(start + parentWidth, width); // Fill container\n\n if (this.params.fillParent && (!this.params.scrollParent || nominalWidth < parentWidth)) {\n width = parentWidth;\n start = 0;\n end = width;\n }\n\n var peaks;\n\n if (this.params.partialRender) {\n var newRanges = this.peakCache.addRangeToPeakCache(width, start, end);\n var i;\n\n for (i = 0; i < newRanges.length; i++) {\n peaks = this.backend.getPeaks(width, newRanges[i][0], newRanges[i][1]);\n this.drawer.drawPeaks(peaks, width, newRanges[i][0], newRanges[i][1]);\n }\n } else {\n peaks = this.backend.getPeaks(width, start, end);\n this.drawer.drawPeaks(peaks, width, start, end);\n }\n\n this.fireEvent('redraw', peaks, width);\n }\n /**\n * Horizontally zooms the waveform in and out. It also changes the parameter\n * `minPxPerSec` and enables the `scrollParent` option. Calling the function\n * with a falsey parameter will reset the zoom state.\n *\n * @param {?number} pxPerSec Number of horizontal pixels per second of\n * audio, if none is set the waveform returns to unzoomed state\n * @emits WaveSurfer#zoom\n * @example wavesurfer.zoom(20);\n */\n\n }, {\n key: \"zoom\",\n value: function zoom(pxPerSec) {\n if (!pxPerSec) {\n this.params.minPxPerSec = this.defaultParams.minPxPerSec;\n this.params.scrollParent = false;\n } else {\n this.params.minPxPerSec = pxPerSec;\n this.params.scrollParent = true;\n }\n\n this.drawBuffer();\n this.drawer.progress(this.backend.getPlayedPercents());\n this.drawer.recenter(this.getCurrentTime() / this.getDuration());\n this.fireEvent('zoom', pxPerSec);\n }\n /**\n * Decode buffer and load\n *\n * @private\n * @param {ArrayBuffer} arraybuffer Buffer to process\n */\n\n }, {\n key: \"loadArrayBuffer\",\n value: function loadArrayBuffer(arraybuffer) {\n var _this9 = this;\n\n this.decodeArrayBuffer(arraybuffer, function (data) {\n if (!_this9.isDestroyed) {\n _this9.loadDecodedBuffer(data);\n }\n });\n }\n /**\n * Directly load an externally decoded AudioBuffer\n *\n * @private\n * @param {AudioBuffer} buffer Buffer to process\n * @emits WaveSurfer#ready\n */\n\n }, {\n key: \"loadDecodedBuffer\",\n value: function loadDecodedBuffer(buffer) {\n this.backend.load(buffer);\n this.drawBuffer();\n this.isReady = true;\n this.fireEvent('ready');\n }\n /**\n * Loads audio data from a Blob or File object\n *\n * @param {Blob|File} blob Audio data\n * @example\n */\n\n }, {\n key: \"loadBlob\",\n value: function loadBlob(blob) {\n var _this10 = this; // Create file reader\n\n\n var reader = new FileReader();\n reader.addEventListener('progress', function (e) {\n return _this10.onProgress(e);\n });\n reader.addEventListener('load', function (e) {\n return _this10.loadArrayBuffer(e.target.result);\n });\n reader.addEventListener('error', function () {\n return _this10.fireEvent('error', 'Error reading file');\n });\n reader.readAsArrayBuffer(blob);\n this.empty();\n }\n /**\n * Loads audio and re-renders the waveform.\n *\n * @param {string|HTMLMediaElement} url The url of the audio file or the\n * audio element with the audio\n * @param {number[]|Number.<Array[]>} peaks Wavesurfer does not have to decode\n * the audio to render the waveform if this is specified\n * @param {?string} preload (Use with backend `MediaElement` and `MediaElementWebAudio`)\n * `'none'|'metadata'|'auto'` Preload attribute for the media element\n * @param {?number} duration The duration of the audio. This is used to\n * render the peaks data in the correct size for the audio duration (as\n * befits the current `minPxPerSec` and zoom value) without having to decode\n * the audio.\n * @returns {void}\n * @throws Will throw an error if the `url` argument is empty.\n * @example\n * // uses fetch or media element to load file (depending on backend)\n * wavesurfer.load('http://example.com/demo.wav');\n *\n * // setting preload attribute with media element backend and supplying\n * // peaks\n * wavesurfer.load(\n * 'http://example.com/demo.wav',\n * [0.0218, 0.0183, 0.0165, 0.0198, 0.2137, 0.2888],\n * true\n * );\n */\n\n }, {\n key: \"load\",\n value: function load(url, peaks, preload, duration) {\n if (!url) {\n throw new Error('url parameter cannot be empty');\n }\n\n this.empty();\n\n if (preload) {\n // check whether the preload attribute will be usable and if not log\n // a warning listing the reasons why not and nullify the variable\n var preloadIgnoreReasons = {\n \"Preload is not 'auto', 'none' or 'metadata'\": ['auto', 'metadata', 'none'].indexOf(preload) === -1,\n 'Peaks are not provided': !peaks,\n \"Backend is not of type 'MediaElement' or 'MediaElementWebAudio'\": ['MediaElement', 'MediaElementWebAudio'].indexOf(this.params.backend) === -1,\n 'Url is not of type string': typeof url !== 'string'\n };\n var activeReasons = Object.keys(preloadIgnoreReasons).filter(function (reason) {\n return preloadIgnoreReasons[reason];\n });\n\n if (activeReasons.length) {\n // eslint-disable-next-line no-console\n console.warn('Preload parameter of wavesurfer.load will be ignored because:\\n\\t- ' + activeReasons.join('\\n\\t- ')); // stop invalid values from being used\n\n preload = null;\n }\n }\n\n switch (this.params.backend) {\n case 'WebAudio':\n return this.loadBuffer(url, peaks, duration);\n\n case 'MediaElement':\n case 'MediaElementWebAudio':\n return this.loadMediaElement(url, peaks, preload, duration);\n }\n }\n /**\n * Loads audio using Web Audio buffer backend.\n *\n * @private\n * @param {string} url URL of audio file\n * @param {number[]|Number.<Array[]>} peaks Peaks data\n * @param {?number} duration Optional duration of audio file\n * @returns {void}\n */\n\n }, {\n key: \"loadBuffer\",\n value: function loadBuffer(url, peaks, duration) {\n var _this11 = this;\n\n var load = function load(action) {\n if (action) {\n _this11.tmpEvents.push(_this11.once('ready', action));\n }\n\n return _this11.getArrayBuffer(url, function (data) {\n return _this11.loadArrayBuffer(data);\n });\n };\n\n if (peaks) {\n this.backend.setPeaks(peaks, duration);\n this.drawBuffer();\n this.tmpEvents.push(this.once('interaction', load));\n } else {\n return load();\n }\n }\n /**\n * Either create a media element, or load an existing media element.\n *\n * @private\n * @param {string|HTMLMediaElement} urlOrElt Either a path to a media file, or an\n * existing HTML5 Audio/Video Element\n * @param {number[]|Number.<Array[]>} peaks Array of peaks. Required to bypass web audio\n * dependency\n * @param {?boolean} preload Set to true if the preload attribute of the\n * audio element should be enabled\n * @param {?number} duration Optional duration of audio file\n */\n\n }, {\n key: \"loadMediaElement\",\n value: function loadMediaElement(urlOrElt, peaks, preload, duration) {\n var _this12 = this;\n\n var url = urlOrElt;\n\n if (typeof urlOrElt === 'string') {\n this.backend.load(url, this.mediaContainer, peaks, preload);\n } else {\n var elt = urlOrElt;\n this.backend.loadElt(elt, peaks); // If peaks are not provided,\n // url = element.src so we can get peaks with web audio\n\n url = elt.src;\n }\n\n this.tmpEvents.push(this.backend.once('canplay', function () {\n // ignore when backend was already destroyed\n if (!_this12.backend.destroyed) {\n _this12.drawBuffer();\n\n _this12.isReady = true;\n\n _this12.fireEvent('ready');\n }\n }), this.backend.once('error', function (err) {\n return _this12.fireEvent('error', err);\n })); // If no pre-decoded peaks provided or pre-decoded peaks are\n // provided with forceDecode flag, attempt to download the\n // audio file and decode it with Web Audio.\n\n if (peaks) {\n this.backend.setPeaks(peaks, duration);\n }\n\n if ((!peaks || this.params.forceDecode) && this.backend.supportsWebAudio()) {\n this.getArrayBuffer(url, function (arraybuffer) {\n _this12.decodeArrayBuffer(arraybuffer, function (buffer) {\n _this12.backend.buffer = buffer;\n\n _this12.backend.setPeaks(null);\n\n _this12.drawBuffer();\n\n _this12.fireEvent('waveform-ready');\n });\n });\n }\n }\n /**\n * Decode an array buffer and pass data to a callback\n *\n * @private\n * @param {Object} arraybuffer The array buffer to decode\n * @param {function} callback The function to call on complete\n */\n\n }, {\n key: \"decodeArrayBuffer\",\n value: function decodeArrayBuffer(arraybuffer, callback) {\n var _this13 = this;\n\n this.arraybuffer = arraybuffer;\n this.backend.decodeArrayBuffer(arraybuffer, function (data) {\n // Only use the decoded data if we haven't been destroyed or\n // another decode started in the meantime\n if (!_this13.isDestroyed && _this13.arraybuffer == arraybuffer) {\n callback(data);\n _this13.arraybuffer = null;\n }\n }, function () {\n return _this13.fireEvent('error', 'Error decoding audiobuffer');\n });\n }\n /**\n * Load an array buffer using fetch and pass the result to a callback\n *\n * @param {string} url The URL of the file object\n * @param {function} callback The function to call on complete\n * @returns {util.fetchFile} fetch call\n * @private\n */\n\n }, {\n key: \"getArrayBuffer\",\n value: function getArrayBuffer(url, callback) {\n var _this14 = this;\n\n var options = Object.assign({\n url: url,\n responseType: 'arraybuffer'\n }, this.params.xhr);\n var request = util.fetchFile(options);\n this.currentRequest = request;\n this.tmpEvents.push(request.on('progress', function (e) {\n _this14.onProgress(e);\n }), request.on('success', function (data) {\n callback(data);\n _this14.currentRequest = null;\n }), request.on('error', function (e) {\n _this14.fireEvent('error', e);\n\n _this14.currentRequest = null;\n }));\n return request;\n }\n /**\n * Called while the audio file is loading\n *\n * @private\n * @param {Event} e Progress event\n * @emits WaveSurfer#loading\n */\n\n }, {\n key: \"onProgress\",\n value: function onProgress(e) {\n var percentComplete;\n\n if (e.lengthComputable) {\n percentComplete = e.loaded / e.total;\n } else {\n // Approximate progress with an asymptotic\n // function, and assume downloads in the 1-3 MB range.\n percentComplete = e.loaded / (e.loaded + 1000000);\n }\n\n this.fireEvent('loading', Math.round(percentComplete * 100), e.target);\n }\n /**\n * Exports PCM data into a JSON array and opens in a new window.\n *\n * @param {number} length=1024 The scale in which to export the peaks\n * @param {number} accuracy=10000\n * @param {?boolean} noWindow Set to true to disable opening a new\n * window with the JSON\n * @param {number} start Start index\n * @param {number} end End index\n * @return {Promise} Promise that resolves with array of peaks\n */\n\n }, {\n key: \"exportPCM\",\n value: function exportPCM(length, accuracy, noWindow, start, end) {\n length = length || 1024;\n start = start || 0;\n accuracy = accuracy || 10000;\n noWindow = noWindow || false;\n var peaks = this.backend.getPeaks(length, start, end);\n var arr = [].map.call(peaks, function (val) {\n return Math.round(val * accuracy) / accuracy;\n });\n return new Promise(function (resolve, reject) {\n var json = JSON.stringify(arr);\n\n if (!noWindow) {\n window.open('data:application/json;charset=utf-8,' + encodeURIComponent(json));\n }\n\n resolve(json);\n });\n }\n /**\n * Save waveform image as data URI.\n *\n * The default format is `'image/png'`. Other supported types are\n * `'image/jpeg'` and `'image/webp'`.\n *\n * @param {string} format='image/png' A string indicating the image format.\n * The default format type is `'image/png'`.\n * @param {number} quality=1 A number between 0 and 1 indicating the image\n * quality to use for image formats that use lossy compression such as\n * `'image/jpeg'`` and `'image/webp'`.\n * @param {string} type Image data type to return. Either 'dataURL' (default)\n * or 'blob'.\n * @return {string|string[]|Promise} When using `'dataURL'` type this returns\n * a single data URL or an array of data URLs, one for each canvas. When using\n * `'blob'` type this returns a `Promise` resolving with an array of `Blob`\n * instances, one for each canvas.\n */\n\n }, {\n key: \"exportImage\",\n value: function exportImage(format, quality, type) {\n if (!format) {\n format = 'image/png';\n }\n\n if (!quality) {\n quality = 1;\n }\n\n if (!type) {\n type = 'dataURL';\n }\n\n return this.drawer.getImage(format, quality, type);\n }\n /**\n * Cancel any fetch request currently in progress\n */\n\n }, {\n key: \"cancelAjax\",\n value: function cancelAjax() {\n if (this.currentRequest && this.currentRequest.controller) {\n this.currentRequest.controller.abort();\n this.currentRequest = null;\n }\n }\n /**\n * @private\n */\n\n }, {\n key: \"clearTmpEvents\",\n value: function clearTmpEvents() {\n this.tmpEvents.forEach(function (e) {\n return e.un();\n });\n }\n /**\n * Display empty waveform.\n */\n\n }, {\n key: \"empty\",\n value: function empty() {\n if (!this.backend.isPaused()) {\n this.stop();\n this.backend.disconnectSource();\n }\n\n this.isReady = false;\n this.cancelAjax();\n this.clearTmpEvents(); // empty drawer\n\n this.drawer.progress(0);\n this.drawer.setWidth(0);\n this.drawer.drawPeaks({\n length: this.drawer.getWidth()\n }, 0);\n }\n /**\n * Remove events, elements and disconnect WebAudio nodes.\n *\n * @emits WaveSurfer#destroy\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.destroyAllPlugins();\n this.fireEvent('destroy');\n this.cancelAjax();\n this.clearTmpEvents();\n this.unAll();\n\n if (this.params.responsive !== false) {\n window.removeEventListener('resize', this._onResize, true);\n window.removeEventListener('orientationchange', this._onResize, true);\n }\n\n if (this.backend) {\n this.backend.destroy();\n }\n\n if (this.drawer) {\n this.drawer.destroy();\n }\n\n this.isDestroyed = true;\n this.isReady = false;\n this.arraybuffer = null;\n }\n }]);\n\n return WaveSurfer;\n }(util.Observer);\n\n exports.default = WaveSurfer;\n WaveSurfer.VERSION = \"3.3.1\";\n WaveSurfer.util = util;\n module.exports = exports.default;\n /***/\n },\n\n /***/\n \"./src/webaudio.js\":\n /*!*************************!*\\\n !*** ./src/webaudio.js ***!\n \\*************************/\n\n /*! no static exports found */\n\n /***/\n function srcWebaudioJs(module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = void 0;\n\n var util = _interopRequireWildcard(__webpack_require__(\n /*! ./util */\n \"./src/util/index.js\"));\n\n function _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n\n return cache;\n }\n\n function _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n\n var cache = _getRequireWildcardCache();\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj.default = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n }\n\n function _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n }\n\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n }\n\n function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n } // using constants to prevent someone writing the string wrong\n\n\n var PLAYING = 'playing';\n var PAUSED = 'paused';\n var FINISHED = 'finished';\n /**\n * WebAudio backend\n *\n * @extends {Observer}\n */\n\n var WebAudio =\n /*#__PURE__*/\n function (_util$Observer) {\n _inherits(WebAudio, _util$Observer);\n\n _createClass(WebAudio, [{\n key: \"supportsWebAudio\",\n\n /** scriptBufferSize: size of the processing buffer */\n\n /** audioContext: allows to process audio with WebAudio API */\n\n /** @private */\n\n /** @private */\n\n /**\n * Does the browser support this backend\n *\n * @return {boolean} Whether or not this browser supports this backend\n */\n value: function supportsWebAudio() {\n return !!(window.AudioContext || window.webkitAudioContext);\n }\n /**\n * Get the audio context used by this backend or create one\n *\n * @return {AudioContext} Existing audio context, or creates a new one\n */\n\n }, {\n key: \"getAudioContext\",\n value: function getAudioContext() {\n if (!window.WaveSurferAudioContext) {\n window.WaveSurferAudioContext = new (window.AudioContext || window.webkitAudioContext)();\n }\n\n return window.WaveSurferAudioContext;\n }\n /**\n * Get the offline audio context used by this backend or create one\n *\n * @param {number} sampleRate The sample rate to use\n * @return {OfflineAudioContext} Existing offline audio context, or creates\n * a new one\n */\n\n }, {\n key: \"getOfflineAudioContext\",\n value: function getOfflineAudioContext(sampleRate) {\n if (!window.WaveSurferOfflineAudioContext) {\n window.WaveSurferOfflineAudioContext = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 2, sampleRate);\n }\n\n return window.WaveSurferOfflineAudioContext;\n }\n /**\n * Construct the backend\n *\n * @param {WavesurferParams} params Wavesurfer parameters\n */\n\n }]);\n\n function WebAudio(params) {\n var _this$stateBehaviors, _this$states;\n\n var _this;\n\n _classCallCheck(this, WebAudio);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(WebAudio).call(this));\n /** @private */\n\n _this.audioContext = null;\n _this.offlineAudioContext = null;\n _this.stateBehaviors = (_this$stateBehaviors = {}, _defineProperty(_this$stateBehaviors, PLAYING, {\n init: function init() {\n this.addOnAudioProcess();\n },\n getPlayedPercents: function getPlayedPercents() {\n var duration = this.getDuration();\n return this.getCurrentTime() / duration || 0;\n },\n getCurrentTime: function getCurrentTime() {\n return this.startPosition + this.getPlayedTime();\n }\n }), _defineProperty(_this$stateBehaviors, PAUSED, {\n init: function init() {\n this.removeOnAudioProcess();\n },\n getPlayedPercents: function getPlayedPercents() {\n var duration = this.getDuration();\n return this.getCurrentTime() / duration || 0;\n },\n getCurrentTime: function getCurrentTime() {\n return this.startPosition;\n }\n }), _defineProperty(_this$stateBehaviors, FINISHED, {\n init: function init() {\n this.removeOnAudioProcess();\n this.fireEvent('finish');\n },\n getPlayedPercents: function getPlayedPercents() {\n return 1;\n },\n getCurrentTime: function getCurrentTime() {\n return this.getDuration();\n }\n }), _this$stateBehaviors);\n _this.params = params;\n /** ac: Audio Context instance */\n\n _this.ac = params.audioContext || (_this.supportsWebAudio() ? _this.getAudioContext() : {});\n /**@private */\n\n _this.lastPlay = _this.ac.currentTime;\n /** @private */\n\n _this.startPosition = 0;\n /** @private */\n\n _this.scheduledPause = null;\n /** @private */\n\n _this.states = (_this$states = {}, _defineProperty(_this$states, PLAYING, Object.create(_this.stateBehaviors[PLAYING])), _defineProperty(_this$states, PAUSED, Object.create(_this.stateBehaviors[PAUSED])), _defineProperty(_this$states, FINISHED, Object.create(_this.stateBehaviors[FINISHED])), _this$states);\n /** @private */\n\n _this.buffer = null;\n /** @private */\n\n _this.filters = [];\n /** gainNode: allows to control audio volume */\n\n _this.gainNode = null;\n /** @private */\n\n _this.mergedPeaks = null;\n /** @private */\n\n _this.offlineAc = null;\n /** @private */\n\n _this.peaks = null;\n /** @private */\n\n _this.playbackRate = 1;\n /** analyser: provides audio analysis information */\n\n _this.analyser = null;\n /** scriptNode: allows processing audio */\n\n _this.scriptNode = null;\n /** @private */\n\n _this.source = null;\n /** @private */\n\n _this.splitPeaks = [];\n /** @private */\n\n _this.state = null;\n /** @private */\n\n _this.explicitDuration = params.duration;\n /**\n * Boolean indicating if the backend was destroyed.\n */\n\n _this.destroyed = false;\n return _this;\n }\n /**\n * Initialise the backend, called in `wavesurfer.createBackend()`\n */\n\n\n _createClass(WebAudio, [{\n key: \"init\",\n value: function init() {\n this.createVolumeNode();\n this.createScriptNode();\n this.createAnalyserNode();\n this.setState(PAUSED);\n this.setPlaybackRate(this.params.audioRate);\n this.setLength(0);\n }\n /** @private */\n\n }, {\n key: \"disconnectFilters\",\n value: function disconnectFilters() {\n if (this.filters) {\n this.filters.forEach(function (filter) {\n filter && filter.disconnect();\n });\n this.filters = null; // Reconnect direct path\n\n this.analyser.connect(this.gainNode);\n }\n }\n /**\n * @private\n *\n * @param {string} state The new state\n */\n\n }, {\n key: \"setState\",\n value: function setState(state) {\n if (this.state !== this.states[state]) {\n this.state = this.states[state];\n this.state.init.call(this);\n }\n }\n /**\n * Unpacked `setFilters()`\n *\n * @param {...AudioNode} filters One or more filters to set\n */\n\n }, {\n key: \"setFilter\",\n value: function setFilter() {\n for (var _len = arguments.length, filters = new Array(_len), _key = 0; _key < _len; _key++) {\n filters[_key] = arguments[_key];\n }\n\n this.setFilters(filters);\n }\n /**\n * Insert custom Web Audio nodes into the graph\n *\n * @param {AudioNode[]} filters Packed filters array\n * @example\n * const lowpass = wavesurfer.backend.ac.createBiquadFilter();\n * wavesurfer.backend.setFilter(lowpass);\n */\n\n }, {\n key: \"setFilters\",\n value: function setFilters(filters) {\n // Remove existing filters\n this.disconnectFilters(); // Insert filters if filter array not empty\n\n if (filters && filters.length) {\n this.filters = filters; // Disconnect direct path before inserting filters\n\n this.analyser.disconnect(); // Connect each filter in turn\n\n filters.reduce(function (prev, curr) {\n prev.connect(curr);\n return curr;\n }, this.analyser).connect(this.gainNode);\n }\n }\n /** Create ScriptProcessorNode to process audio */\n\n }, {\n key: \"createScriptNode\",\n value: function createScriptNode() {\n if (this.params.audioScriptProcessor) {\n this.scriptNode = this.params.audioScriptProcessor;\n } else {\n if (this.ac.createScriptProcessor) {\n this.scriptNode = this.ac.createScriptProcessor(WebAudio.scriptBufferSize);\n } else {\n this.scriptNode = this.ac.createJavaScriptNode(WebAudio.scriptBufferSize);\n }\n }\n\n this.scriptNode.connect(this.ac.destination);\n }\n /** @private */\n\n }, {\n key: \"addOnAudioProcess\",\n value: function addOnAudioProcess() {\n var _this2 = this;\n\n this.scriptNode.onaudioprocess = function () {\n var time = _this2.getCurrentTime();\n\n if (time >= _this2.getDuration()) {\n _this2.setState(FINISHED);\n\n _this2.fireEvent('pause');\n } else if (time >= _this2.scheduledPause) {\n _this2.pause();\n } else if (_this2.state === _this2.states[PLAYING]) {\n _this2.fireEvent('audioprocess', time);\n }\n };\n }\n /** @private */\n\n }, {\n key: \"removeOnAudioProcess\",\n value: function removeOnAudioProcess() {\n this.scriptNode.onaudioprocess = function () {};\n }\n /** Create analyser node to perform audio analysis */\n\n }, {\n key: \"createAnalyserNode\",\n value: function createAnalyserNode() {\n this.analyser = this.ac.createAnalyser();\n this.analyser.connect(this.gainNode);\n }\n /**\n * Create the gain node needed to control the playback volume.\n *\n */\n\n }, {\n key: \"createVolumeNode\",\n value: function createVolumeNode() {\n // Create gain node using the AudioContext\n if (this.ac.createGain) {\n this.gainNode = this.ac.createGain();\n } else {\n this.gainNode = this.ac.createGainNode();\n } // Add the gain node to the graph\n\n\n this.gainNode.connect(this.ac.destination);\n }\n /**\n * Set the sink id for the media player\n *\n * @param {string} deviceId String value representing audio device id.\n * @returns {Promise} A Promise that resolves to `undefined` when there\n * are no errors.\n */\n\n }, {\n key: \"setSinkId\",\n value: function setSinkId(deviceId) {\n if (deviceId) {\n /**\n * The webaudio API doesn't currently support setting the device\n * output. Here we create an HTMLAudioElement, connect the\n * webaudio stream to that element and setSinkId there.\n */\n var audio = new window.Audio();\n\n if (!audio.setSinkId) {\n return Promise.reject(new Error('setSinkId is not supported in your browser'));\n }\n\n audio.autoplay = true;\n var dest = this.ac.createMediaStreamDestination();\n this.gainNode.disconnect();\n this.gainNode.connect(dest);\n audio.srcObject = dest.stream;\n return audio.setSinkId(deviceId);\n } else {\n return Promise.reject(new Error('Invalid deviceId: ' + deviceId));\n }\n }\n /**\n * Set the audio volume\n *\n * @param {number} value A floating point value between 0 and 1.\n */\n\n }, {\n key: \"setVolume\",\n value: function setVolume(value) {\n this.gainNode.gain.setValueAtTime(value, this.ac.currentTime);\n }\n /**\n * Get the current volume\n *\n * @return {number} value A floating point value between 0 and 1.\n */\n\n }, {\n key: \"getVolume\",\n value: function getVolume() {\n return this.gainNode.gain.value;\n }\n /**\n * Decode an array buffer and pass data to a callback\n *\n * @private\n * @param {ArrayBuffer} arraybuffer The array buffer to decode\n * @param {function} callback The function to call on complete.\n * @param {function} errback The function to call on error.\n */\n\n }, {\n key: \"decodeArrayBuffer\",\n value: function decodeArrayBuffer(arraybuffer, callback, errback) {\n if (!this.offlineAc) {\n this.offlineAc = this.getOfflineAudioContext(this.ac && this.ac.sampleRate ? this.ac.sampleRate : 44100);\n }\n\n this.offlineAc.decodeAudioData(arraybuffer, function (data) {\n return callback(data);\n }, errback);\n }\n /**\n * Set pre-decoded peaks\n *\n * @param {number[]|Number.<Array[]>} peaks Peaks data\n * @param {?number} duration Explicit duration\n */\n\n }, {\n key: \"setPeaks\",\n value: function setPeaks(peaks, duration) {\n if (duration != null) {\n this.explicitDuration = duration;\n }\n\n this.peaks = peaks;\n }\n /**\n * Set the rendered length (different from the length of the audio)\n *\n * @param {number} length The rendered length\n */\n\n }, {\n key: \"setLength\",\n value: function setLength(length) {\n // No resize, we can preserve the cached peaks.\n if (this.mergedPeaks && length == 2 * this.mergedPeaks.length - 1 + 2) {\n return;\n }\n\n this.splitPeaks = [];\n this.mergedPeaks = []; // Set the last element of the sparse array so the peak arrays are\n // appropriately sized for other calculations.\n\n var channels = this.buffer ? this.buffer.numberOfChannels : 1;\n var c;\n\n for (c = 0; c < channels; c++) {\n this.splitPeaks[c] = [];\n this.splitPeaks[c][2 * (length - 1)] = 0;\n this.splitPeaks[c][2 * (length - 1) + 1] = 0;\n }\n\n this.mergedPeaks[2 * (length - 1)] = 0;\n this.mergedPeaks[2 * (length - 1) + 1] = 0;\n }\n /**\n * Compute the max and min value of the waveform when broken into <length> subranges.\n *\n * @param {number} length How many subranges to break the waveform into.\n * @param {number} first First sample in the required range.\n * @param {number} last Last sample in the required range.\n * @return {number[]|Number.<Array[]>} Array of 2*<length> peaks or array of arrays of\n * peaks consisting of (max, min) values for each subrange.\n */\n\n }, {\n key: \"getPeaks\",\n value: function getPeaks(length, first, last) {\n if (this.peaks) {\n return this.peaks;\n }\n\n if (!this.buffer) {\n return [];\n }\n\n first = first || 0;\n last = last || length - 1;\n this.setLength(length);\n\n if (!this.buffer) {\n return this.params.splitChannels ? this.splitPeaks : this.mergedPeaks;\n }\n /**\n * The following snippet fixes a buffering data issue on the Safari\n * browser which returned undefined It creates the missing buffer based\n * on 1 channel, 4096 samples and the sampleRate from the current\n * webaudio context 4096 samples seemed to be the best fit for rendering\n * will review this code once a stable version of Safari TP is out\n */\n\n\n if (!this.buffer.length) {\n var newBuffer = this.createBuffer(1, 4096, this.sampleRate);\n this.buffer = newBuffer.buffer;\n }\n\n var sampleSize = this.buffer.length / length;\n var sampleStep = ~~(sampleSize / 10) || 1;\n var channels = this.buffer.numberOfChannels;\n var c;\n\n for (c = 0; c < channels; c++) {\n var peaks = this.splitPeaks[c];\n var chan = this.buffer.getChannelData(c);\n var i = void 0;\n\n for (i = first; i <= last; i++) {\n var start = ~~(i * sampleSize);\n var end = ~~(start + sampleSize);\n var min = 0;\n var max = 0;\n var j = void 0;\n\n for (j = start; j < end; j += sampleStep) {\n var value = chan[j];\n\n if (value > max) {\n max = value;\n }\n\n if (value < min) {\n min = value;\n }\n }\n\n peaks[2 * i] = max;\n peaks[2 * i + 1] = min;\n\n if (c == 0 || max > this.mergedPeaks[2 * i]) {\n this.mergedPeaks[2 * i] = max;\n }\n\n if (c == 0 || min < this.mergedPeaks[2 * i + 1]) {\n this.mergedPeaks[2 * i + 1] = min;\n }\n }\n }\n\n return this.params.splitChannels ? this.splitPeaks : this.mergedPeaks;\n }\n /**\n * Get the position from 0 to 1\n *\n * @return {number} Position\n */\n\n }, {\n key: \"getPlayedPercents\",\n value: function getPlayedPercents() {\n return this.state.getPlayedPercents.call(this);\n }\n /** @private */\n\n }, {\n key: \"disconnectSource\",\n value: function disconnectSource() {\n if (this.source) {\n this.source.disconnect();\n }\n }\n /**\n * This is called when wavesurfer is destroyed\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (!this.isPaused()) {\n this.pause();\n }\n\n this.unAll();\n this.buffer = null;\n this.destroyed = true;\n this.disconnectFilters();\n this.disconnectSource();\n this.gainNode.disconnect();\n this.scriptNode.disconnect();\n this.analyser.disconnect(); // close the audioContext if closeAudioContext option is set to true\n\n if (this.params.closeAudioContext) {\n // check if browser supports AudioContext.close()\n if (typeof this.ac.close === 'function' && this.ac.state != 'closed') {\n this.ac.close();\n } // clear the reference to the audiocontext\n\n\n this.ac = null; // clear the actual audiocontext, either passed as param or the\n // global singleton\n\n if (!this.params.audioContext) {\n window.WaveSurferAudioContext = null;\n } else {\n this.params.audioContext = null;\n } // clear the offlineAudioContext\n\n\n window.WaveSurferOfflineAudioContext = null;\n }\n }\n /**\n * Loaded a decoded audio buffer\n *\n * @param {Object} buffer Decoded audio buffer to load\n */\n\n }, {\n key: \"load\",\n value: function load(buffer) {\n this.startPosition = 0;\n this.lastPlay = this.ac.currentTime;\n this.buffer = buffer;\n this.createSource();\n }\n /** @private */\n\n }, {\n key: \"createSource\",\n value: function createSource() {\n this.disconnectSource();\n this.source = this.ac.createBufferSource(); // adjust for old browsers\n\n this.source.start = this.source.start || this.source.noteGrainOn;\n this.source.stop = this.source.stop || this.source.noteOff;\n this.source.playbackRate.setValueAtTime(this.playbackRate, this.ac.currentTime);\n this.source.buffer = this.buffer;\n this.source.connect(this.analyser);\n }\n /**\n * Used by `wavesurfer.isPlaying()` and `wavesurfer.playPause()`\n *\n * @return {boolean} Whether or not this backend is currently paused\n */\n\n }, {\n key: \"isPaused\",\n value: function isPaused() {\n return this.state !== this.states[PLAYING];\n }\n /**\n * Used by `wavesurfer.getDuration()`\n *\n * @return {number} Duration of loaded buffer\n */\n\n }, {\n key: \"getDuration\",\n value: function getDuration() {\n if (this.explicitDuration) {\n return this.explicitDuration;\n }\n\n if (!this.buffer) {\n return 0;\n }\n\n return this.buffer.duration;\n }\n /**\n * Used by `wavesurfer.seekTo()`\n *\n * @param {number} start Position to start at in seconds\n * @param {number} end Position to end at in seconds\n * @return {{start: number, end: number}} Object containing start and end\n * positions\n */\n\n }, {\n key: \"seekTo\",\n value: function seekTo(start, end) {\n if (!this.buffer) {\n return;\n }\n\n this.scheduledPause = null;\n\n if (start == null) {\n start = this.getCurrentTime();\n\n if (start >= this.getDuration()) {\n start = 0;\n }\n }\n\n if (end == null) {\n end = this.getDuration();\n }\n\n this.startPosition = start;\n this.lastPlay = this.ac.currentTime;\n\n if (this.state === this.states[FINISHED]) {\n this.setState(PAUSED);\n }\n\n return {\n start: start,\n end: end\n };\n }\n /**\n * Get the playback position in seconds\n *\n * @return {number} The playback position in seconds\n */\n\n }, {\n key: \"getPlayedTime\",\n value: function getPlayedTime() {\n return (this.ac.currentTime - this.lastPlay) * this.playbackRate;\n }\n /**\n * Plays the loaded audio region.\n *\n * @param {number} start Start offset in seconds, relative to the beginning\n * of a clip.\n * @param {number} end When to stop relative to the beginning of a clip.\n */\n\n }, {\n key: \"play\",\n value: function play(start, end) {\n if (!this.buffer) {\n return;\n } // need to re-create source on each playback\n\n\n this.createSource();\n var adjustedTime = this.seekTo(start, end);\n start = adjustedTime.start;\n end = adjustedTime.end;\n this.scheduledPause = end;\n this.source.start(0, start);\n\n if (this.ac.state == 'suspended') {\n this.ac.resume && this.ac.resume();\n }\n\n this.setState(PLAYING);\n this.fireEvent('play');\n }\n /**\n * Pauses the loaded audio.\n */\n\n }, {\n key: \"pause\",\n value: function pause() {\n this.scheduledPause = null;\n this.startPosition += this.getPlayedTime();\n this.source && this.source.stop(0);\n this.setState(PAUSED);\n this.fireEvent('pause');\n }\n /**\n * Returns the current time in seconds relative to the audio-clip's\n * duration.\n *\n * @return {number} The current time in seconds\n */\n\n }, {\n key: \"getCurrentTime\",\n value: function getCurrentTime() {\n return this.state.getCurrentTime.call(this);\n }\n /**\n * Returns the current playback rate. (0=no playback, 1=normal playback)\n *\n * @return {number} The current playback rate\n */\n\n }, {\n key: \"getPlaybackRate\",\n value: function getPlaybackRate() {\n return this.playbackRate;\n }\n /**\n * Set the audio source playback rate.\n *\n * @param {number} value The playback rate to use\n */\n\n }, {\n key: \"setPlaybackRate\",\n value: function setPlaybackRate(value) {\n value = value || 1;\n\n if (this.isPaused()) {\n this.playbackRate = value;\n } else {\n this.pause();\n this.playbackRate = value;\n this.play();\n }\n }\n /**\n * Set a point in seconds for playback to stop at.\n *\n * @param {number} end Position to end at\n * @version 3.3.0\n */\n\n }, {\n key: \"setPlayEnd\",\n value: function setPlayEnd(end) {\n this.scheduledPause = end;\n }\n }]);\n\n return WebAudio;\n }(util.Observer);\n\n exports.default = WebAudio;\n WebAudio.scriptBufferSize = 256;\n module.exports = exports.default;\n /***/\n }\n /******/\n\n })\n );\n});","export default function symbolObservablePonyfill(root) {\n var result;\n var Symbol = root.Symbol;\n\n if (typeof Symbol === 'function') {\n if (Symbol.observable) {\n result = Symbol.observable;\n } else {\n result = Symbol('observable');\n Symbol.observable = result;\n }\n } else {\n result = '@@observable';\n }\n\n return result;\n}\n;","// APIs for normalizing fullscreen operations. Note that Edge uses\n// the WebKit-prefixed APIs currently (as of Edge 16).\n\nexport const isFullscreen = () => document.fullscreenElement ||\n document.webkitFullscreenElement ||\n document.mozFullScreenElement;\n\nexport const exitFullscreen = () => {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n }\n};\n\nexport const requestFullscreen = el => {\n if (el.requestFullscreen) {\n el.requestFullscreen();\n } else if (el.webkitRequestFullscreen) {\n el.webkitRequestFullscreen();\n } else if (el.mozRequestFullScreen) {\n el.mozRequestFullScreen();\n }\n};\n\nexport const attachFullscreenListener = (listener) => {\n if ('onfullscreenchange' in document) {\n document.addEventListener('fullscreenchange', listener);\n } else if ('onwebkitfullscreenchange' in document) {\n document.addEventListener('webkitfullscreenchange', listener);\n } else if ('onmozfullscreenchange' in document) {\n document.addEventListener('mozfullscreenchange', listener);\n }\n};\n\nexport const detachFullscreenListener = (listener) => {\n if ('onfullscreenchange' in document) {\n document.removeEventListener('fullscreenchange', listener);\n } else if ('onwebkitfullscreenchange' in document) {\n document.removeEventListener('webkitfullscreenchange', listener);\n } else if ('onmozfullscreenchange' in document) {\n document.removeEventListener('mozfullscreenchange', listener);\n }\n};\n","// APIs for normalizing fullscreen operations. Note that Edge uses\n// the WebKit-prefixed APIs currently (as of Edge 16).\n\nexport const isFullscreen = () => document.fullscreenElement ||\n document.webkitFullscreenElement ||\n document.mozFullScreenElement;\n\nexport const exitFullscreen = () => {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n }\n};\n\nexport const requestFullscreen = el => {\n if (el.requestFullscreen) {\n el.requestFullscreen();\n } else if (el.webkitRequestFullscreen) {\n el.webkitRequestFullscreen();\n } else if (el.mozRequestFullScreen) {\n el.mozRequestFullScreen();\n }\n};\n\nexport const attachFullscreenListener = (listener) => {\n if ('onfullscreenchange' in document) {\n document.addEventListener('fullscreenchange', listener);\n } else if ('onwebkitfullscreenchange' in document) {\n document.addEventListener('webkitfullscreenchange', listener);\n } else if ('onmozfullscreenchange' in document) {\n document.addEventListener('mozfullscreenchange', listener);\n }\n};\n\nexport const detachFullscreenListener = (listener) => {\n if ('onfullscreenchange' in document) {\n document.removeEventListener('fullscreenchange', listener);\n } else if ('onwebkitfullscreenchange' in document) {\n document.removeEventListener('webkitfullscreenchange', listener);\n } else if ('onmozfullscreenchange' in document) {\n document.removeEventListener('mozfullscreenchange', listener);\n }\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nexport default class Icon extends React.PureComponent {\n\n static propTypes = {\n id: PropTypes.string.isRequired,\n className: PropTypes.string,\n fixedWidth: PropTypes.bool,\n };\n\n render () {\n const { id, className, fixedWidth, ...other } = this.props;\n\n return (\n <i role='img' className={classNames('fa', `fa-${id}`, className, { 'fa-fw': fixedWidth })} {...other} />\n );\n }\n\n}\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = exports.animationEnd = exports.animationDelay = exports.animationTiming = exports.animationDuration = exports.animationName = exports.transitionEnd = exports.transitionDuration = exports.transitionDelay = exports.transitionTiming = exports.transitionProperty = exports.transform = void 0;\n\nvar _inDOM = _interopRequireDefault(require(\"../util/inDOM\"));\n\nvar transform = 'transform';\nexports.transform = transform;\nvar prefix, transitionEnd, animationEnd;\nexports.animationEnd = animationEnd;\nexports.transitionEnd = transitionEnd;\nvar transitionProperty, transitionDuration, transitionTiming, transitionDelay;\nexports.transitionDelay = transitionDelay;\nexports.transitionTiming = transitionTiming;\nexports.transitionDuration = transitionDuration;\nexports.transitionProperty = transitionProperty;\nvar animationName, animationDuration, animationTiming, animationDelay;\nexports.animationDelay = animationDelay;\nexports.animationTiming = animationTiming;\nexports.animationDuration = animationDuration;\nexports.animationName = animationName;\n\nif (_inDOM.default) {\n var _getTransitionPropert = getTransitionProperties();\n\n prefix = _getTransitionPropert.prefix;\n exports.transitionEnd = transitionEnd = _getTransitionPropert.transitionEnd;\n exports.animationEnd = animationEnd = _getTransitionPropert.animationEnd;\n exports.transform = transform = prefix + \"-\" + transform;\n exports.transitionProperty = transitionProperty = prefix + \"-transition-property\";\n exports.transitionDuration = transitionDuration = prefix + \"-transition-duration\";\n exports.transitionDelay = transitionDelay = prefix + \"-transition-delay\";\n exports.transitionTiming = transitionTiming = prefix + \"-transition-timing-function\";\n exports.animationName = animationName = prefix + \"-animation-name\";\n exports.animationDuration = animationDuration = prefix + \"-animation-duration\";\n exports.animationTiming = animationTiming = prefix + \"-animation-delay\";\n exports.animationDelay = animationDelay = prefix + \"-animation-timing-function\";\n}\n\nvar _default = {\n transform: transform,\n end: transitionEnd,\n property: transitionProperty,\n timing: transitionTiming,\n delay: transitionDelay,\n duration: transitionDuration\n};\nexports.default = _default;\n\nfunction getTransitionProperties() {\n var style = document.createElement('div').style;\n var vendorMap = {\n O: function O(e) {\n return \"o\" + e.toLowerCase();\n },\n Moz: function Moz(e) {\n return e.toLowerCase();\n },\n Webkit: function Webkit(e) {\n return \"webkit\" + e;\n },\n ms: function ms(e) {\n return \"MS\" + e;\n }\n };\n var vendors = Object.keys(vendorMap);\n var transitionEnd, animationEnd;\n var prefix = '';\n\n for (var i = 0; i < vendors.length; i++) {\n var vendor = vendors[i];\n\n if (vendor + \"TransitionProperty\" in style) {\n prefix = \"-\" + vendor.toLowerCase();\n transitionEnd = vendorMap[vendor]('TransitionEnd');\n animationEnd = vendorMap[vendor]('AnimationEnd');\n break;\n }\n }\n\n if (!transitionEnd && 'transitionProperty' in style) transitionEnd = 'transitionend';\n if (!animationEnd && 'animationName' in style) animationEnd = 'animationend';\n style = null;\n return {\n animationEnd: animationEnd,\n transitionEnd: transitionEnd,\n prefix: prefix\n };\n}","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\nmodule.exports = freeGlobal;","import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class GIFV extends React.PureComponent {\n\n static propTypes = {\n src: PropTypes.string.isRequired,\n alt: PropTypes.string,\n width: PropTypes.number,\n height: PropTypes.number,\n onClick: PropTypes.func,\n };\n\n state = {\n loading: true,\n };\n\n handleLoadedData = () => {\n this.setState({ loading: false });\n }\n\n componentWillReceiveProps (nextProps) {\n if (nextProps.src !== this.props.src) {\n this.setState({ loading: true });\n }\n }\n\n handleClick = e => {\n const { onClick } = this.props;\n\n if (onClick) {\n e.stopPropagation();\n onClick();\n }\n }\n\n render () {\n const { src, width, height, alt } = this.props;\n const { loading } = this.state;\n\n return (\n <div className='gifv' style={{ position: 'relative' }}>\n {loading && (\n <canvas\n width={width}\n height={height}\n role='button'\n tabIndex='0'\n aria-label={alt}\n title={alt}\n onClick={this.handleClick}\n />\n )}\n\n <video\n src={src}\n width={width}\n height={height}\n role='button'\n tabIndex='0'\n aria-label={alt}\n title={alt}\n muted\n loop\n autoPlay\n playsInline\n onClick={this.handleClick}\n onLoadedData={this.handleLoadedData}\n style={{ position: loading ? 'absolute' : 'static', top: 0, left: 0 }}\n />\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class GIFV extends React.PureComponent {\n\n static propTypes = {\n src: PropTypes.string.isRequired,\n alt: PropTypes.string,\n width: PropTypes.number,\n height: PropTypes.number,\n onClick: PropTypes.func,\n };\n\n state = {\n loading: true,\n };\n\n handleLoadedData = () => {\n this.setState({ loading: false });\n }\n\n componentWillReceiveProps (nextProps) {\n if (nextProps.src !== this.props.src) {\n this.setState({ loading: true });\n }\n }\n\n handleClick = e => {\n const { onClick } = this.props;\n\n if (onClick) {\n e.stopPropagation();\n onClick();\n }\n }\n\n render () {\n const { src, width, height, alt } = this.props;\n const { loading } = this.state;\n\n return (\n <div className='gifv' style={{ position: 'relative' }}>\n {loading && (\n <canvas\n width={width}\n height={height}\n role='button'\n tabIndex='0'\n aria-label={alt}\n title={alt}\n onClick={this.handleClick}\n />\n )}\n\n <video\n src={src}\n width={width}\n height={height}\n role='button'\n tabIndex='0'\n aria-label={alt}\n title={alt}\n muted\n loop\n autoPlay\n playsInline\n onClick={this.handleClick}\n onLoadedData={this.handleLoadedData}\n style={{ position: loading ? 'absolute' : 'static', top: 0, left: 0 }}\n />\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class Permalink extends React.PureComponent {\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n className: PropTypes.string,\n href: PropTypes.string.isRequired,\n to: PropTypes.string.isRequired,\n children: PropTypes.node,\n onInterceptClick: PropTypes.func,\n };\n\n handleClick = e => {\n if (this.props.onInterceptClick && this.props.onInterceptClick()) {\n e.preventDefault();\n return;\n }\n\n if (this.context.router && e.button === 0 && !(e.ctrlKey || e.metaKey)) {\n e.preventDefault();\n this.context.router.history.push(this.props.to);\n }\n }\n\n render () {\n const { href, children, className, onInterceptClick, ...other } = this.props;\n\n return (\n <a target='_blank' href={href} onClick={this.handleClick} {...other} className={`permalink${className ? ' ' + className : ''}`}>\n {children}\n </a>\n );\n }\n\n}\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","import punycode from 'punycode';\n\nconst IDNA_PREFIX = 'xn--';\n\nexport const decode = domain => {\n return domain\n .split('.')\n .map(part => part.indexOf(IDNA_PREFIX) === 0 ? punycode.decode(part.slice(IDNA_PREFIX.length)) : part)\n .join('.');\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst MIN_SCALE = 1;\nconst MAX_SCALE = 4;\n\nconst getMidpoint = (p1, p2) => ({\n x: (p1.clientX + p2.clientX) / 2,\n y: (p1.clientY + p2.clientY) / 2,\n});\n\nconst getDistance = (p1, p2) =>\n Math.sqrt(Math.pow(p1.clientX - p2.clientX, 2) + Math.pow(p1.clientY - p2.clientY, 2));\n\nconst clamp = (min, max, value) => Math.min(max, Math.max(min, value));\n\nexport default class ZoomableImage extends React.PureComponent {\n\n static propTypes = {\n alt: PropTypes.string,\n src: PropTypes.string.isRequired,\n width: PropTypes.number,\n height: PropTypes.number,\n onClick: PropTypes.func,\n }\n\n static defaultProps = {\n alt: '',\n width: null,\n height: null,\n };\n\n state = {\n scale: MIN_SCALE,\n }\n\n removers = [];\n container = null;\n image = null;\n lastTouchEndTime = 0;\n lastDistance = 0;\n\n componentDidMount () {\n let handler = this.handleTouchStart;\n this.container.addEventListener('touchstart', handler);\n this.removers.push(() => this.container.removeEventListener('touchstart', handler));\n handler = this.handleTouchMove;\n // on Chrome 56+, touch event listeners will default to passive\n // https://www.chromestatus.com/features/5093566007214080\n this.container.addEventListener('touchmove', handler, { passive: false });\n this.removers.push(() => this.container.removeEventListener('touchend', handler));\n }\n\n componentWillUnmount () {\n this.removeEventListeners();\n }\n\n removeEventListeners () {\n this.removers.forEach(listeners => listeners());\n this.removers = [];\n }\n\n handleTouchStart = e => {\n if (e.touches.length !== 2) return;\n\n this.lastDistance = getDistance(...e.touches);\n }\n\n handleTouchMove = e => {\n const { scrollTop, scrollHeight, clientHeight } = this.container;\n if (e.touches.length === 1 && scrollTop !== scrollHeight - clientHeight) {\n // prevent propagating event to MediaModal\n e.stopPropagation();\n return;\n }\n if (e.touches.length !== 2) return;\n\n e.preventDefault();\n e.stopPropagation();\n\n const distance = getDistance(...e.touches);\n const midpoint = getMidpoint(...e.touches);\n const scale = clamp(MIN_SCALE, MAX_SCALE, this.state.scale * distance / this.lastDistance);\n\n this.zoom(scale, midpoint);\n\n this.lastMidpoint = midpoint;\n this.lastDistance = distance;\n }\n\n zoom(nextScale, midpoint) {\n const { scale } = this.state;\n const { scrollLeft, scrollTop } = this.container;\n\n // math memo:\n // x = (scrollLeft + midpoint.x) / scrollWidth\n // x' = (nextScrollLeft + midpoint.x) / nextScrollWidth\n // scrollWidth = clientWidth * scale\n // scrollWidth' = clientWidth * nextScale\n // Solve x = x' for nextScrollLeft\n const nextScrollLeft = (scrollLeft + midpoint.x) * nextScale / scale - midpoint.x;\n const nextScrollTop = (scrollTop + midpoint.y) * nextScale / scale - midpoint.y;\n\n this.setState({ scale: nextScale }, () => {\n this.container.scrollLeft = nextScrollLeft;\n this.container.scrollTop = nextScrollTop;\n });\n }\n\n handleClick = e => {\n // don't propagate event to MediaModal\n e.stopPropagation();\n const handler = this.props.onClick;\n if (handler) handler();\n }\n\n setContainerRef = c => {\n this.container = c;\n }\n\n setImageRef = c => {\n this.image = c;\n }\n\n render () {\n const { alt, src } = this.props;\n const { scale } = this.state;\n const overflow = scale === 1 ? 'hidden' : 'scroll';\n\n return (\n <div\n className='zoomable-image'\n ref={this.setContainerRef}\n style={{ overflow }}\n >\n <img\n role='presentation'\n ref={this.setImageRef}\n alt={alt}\n title={alt}\n src={src}\n style={{\n transform: `scale(${scale})`,\n transformOrigin: '0 0',\n }}\n onClick={this.handleClick}\n />\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { LoadingBar } from 'react-redux-loading-bar';\nimport ZoomableImage from './zoomable_image';\n\nexport default class ImageLoader extends React.PureComponent {\n\n static propTypes = {\n alt: PropTypes.string,\n src: PropTypes.string.isRequired,\n previewSrc: PropTypes.string,\n width: PropTypes.number,\n height: PropTypes.number,\n onClick: PropTypes.func,\n }\n\n static defaultProps = {\n alt: '',\n width: null,\n height: null,\n };\n\n state = {\n loading: true,\n error: false,\n width: null,\n }\n\n removers = [];\n canvas = null;\n\n get canvasContext() {\n if (!this.canvas) {\n return null;\n }\n this._canvasContext = this._canvasContext || this.canvas.getContext('2d');\n return this._canvasContext;\n }\n\n componentDidMount () {\n this.loadImage(this.props);\n }\n\n componentWillReceiveProps (nextProps) {\n if (this.props.src !== nextProps.src) {\n this.loadImage(nextProps);\n }\n }\n\n componentWillUnmount () {\n this.removeEventListeners();\n }\n\n loadImage (props) {\n this.removeEventListeners();\n this.setState({ loading: true, error: false });\n Promise.all([\n props.previewSrc && this.loadPreviewCanvas(props),\n this.hasSize() && this.loadOriginalImage(props),\n ].filter(Boolean))\n .then(() => {\n this.setState({ loading: false, error: false });\n this.clearPreviewCanvas();\n })\n .catch(() => this.setState({ loading: false, error: true }));\n }\n\n loadPreviewCanvas = ({ previewSrc, width, height }) => new Promise((resolve, reject) => {\n const image = new Image();\n const removeEventListeners = () => {\n image.removeEventListener('error', handleError);\n image.removeEventListener('load', handleLoad);\n };\n const handleError = () => {\n removeEventListeners();\n reject();\n };\n const handleLoad = () => {\n removeEventListeners();\n this.canvasContext.drawImage(image, 0, 0, width, height);\n resolve();\n };\n image.addEventListener('error', handleError);\n image.addEventListener('load', handleLoad);\n image.src = previewSrc;\n this.removers.push(removeEventListeners);\n })\n\n clearPreviewCanvas () {\n const { width, height } = this.canvas;\n this.canvasContext.clearRect(0, 0, width, height);\n }\n\n loadOriginalImage = ({ src }) => new Promise((resolve, reject) => {\n const image = new Image();\n const removeEventListeners = () => {\n image.removeEventListener('error', handleError);\n image.removeEventListener('load', handleLoad);\n };\n const handleError = () => {\n removeEventListeners();\n reject();\n };\n const handleLoad = () => {\n removeEventListeners();\n resolve();\n };\n image.addEventListener('error', handleError);\n image.addEventListener('load', handleLoad);\n image.src = src;\n this.removers.push(removeEventListeners);\n });\n\n removeEventListeners () {\n this.removers.forEach(listeners => listeners());\n this.removers = [];\n }\n\n hasSize () {\n const { width, height } = this.props;\n return typeof width === 'number' && typeof height === 'number';\n }\n\n setCanvasRef = c => {\n this.canvas = c;\n if (c) this.setState({ width: c.offsetWidth });\n }\n\n render () {\n const { alt, src, width, height, onClick } = this.props;\n const { loading } = this.state;\n\n const className = classNames('image-loader', {\n 'image-loader--loading': loading,\n 'image-loader--amorphous': !this.hasSize(),\n });\n\n return (\n <div className={className}>\n <LoadingBar loading={loading ? 1 : 0} className='loading-bar' style={{ width: this.state.width || width }} />\n {loading ? (\n <canvas\n className='image-loader__preview-canvas'\n ref={this.setCanvasRef}\n width={width}\n height={height}\n />\n ) : (\n <ZoomableImage\n alt={alt}\n src={src}\n onClick={onClick}\n />\n )}\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport ReactSwipeableViews from 'react-swipeable-views';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport Video from 'mastodon/features/video';\nimport classNames from 'classnames';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport IconButton from 'mastodon/components/icon_button';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ImageLoader from './image_loader';\nimport Icon from 'mastodon/components/icon';\nimport GIFV from 'mastodon/components/gifv';\n\nconst messages = defineMessages({\n close: { id: 'lightbox.close', defaultMessage: 'Close' },\n previous: { id: 'lightbox.previous', defaultMessage: 'Previous' },\n next: { id: 'lightbox.next', defaultMessage: 'Next' },\n});\n\nexport const previewState = 'previewMediaModal';\n\nexport default @injectIntl\nclass MediaModal extends ImmutablePureComponent {\n\n static propTypes = {\n media: ImmutablePropTypes.list.isRequired,\n status: ImmutablePropTypes.map,\n index: PropTypes.number.isRequired,\n onClose: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n state = {\n index: null,\n navigationHidden: false,\n };\n\n handleSwipe = (index) => {\n this.setState({ index: index % this.props.media.size });\n }\n\n handleNextClick = () => {\n this.setState({ index: (this.getIndex() + 1) % this.props.media.size });\n }\n\n handlePrevClick = () => {\n this.setState({ index: (this.props.media.size + this.getIndex() - 1) % this.props.media.size });\n }\n\n handleChangeIndex = (e) => {\n const index = Number(e.currentTarget.getAttribute('data-index'));\n this.setState({ index: index % this.props.media.size });\n }\n\n handleKeyDown = (e) => {\n switch(e.key) {\n case 'ArrowLeft':\n this.handlePrevClick();\n e.preventDefault();\n e.stopPropagation();\n break;\n case 'ArrowRight':\n this.handleNextClick();\n e.preventDefault();\n e.stopPropagation();\n break;\n }\n }\n\n componentDidMount () {\n window.addEventListener('keydown', this.handleKeyDown, false);\n\n if (this.context.router) {\n const history = this.context.router.history;\n\n history.push(history.location.pathname, previewState);\n\n this.unlistenHistory = history.listen(() => {\n this.props.onClose();\n });\n }\n }\n\n componentWillUnmount () {\n window.removeEventListener('keydown', this.handleKeyDown);\n\n if (this.context.router) {\n this.unlistenHistory();\n\n if (this.context.router.history.location.state === previewState) {\n this.context.router.history.goBack();\n }\n }\n }\n\n getIndex () {\n return this.state.index !== null ? this.state.index : this.props.index;\n }\n\n toggleNavigation = () => {\n this.setState(prevState => ({\n navigationHidden: !prevState.navigationHidden,\n }));\n };\n\n handleStatusClick = e => {\n if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {\n e.preventDefault();\n this.context.router.history.push(`/statuses/${this.props.status.get('id')}`);\n }\n }\n\n render () {\n const { media, status, intl, onClose } = this.props;\n const { navigationHidden } = this.state;\n\n const index = this.getIndex();\n let pagination = [];\n\n const leftNav = media.size > 1 && <button tabIndex='0' className='media-modal__nav media-modal__nav--left' onClick={this.handlePrevClick} aria-label={intl.formatMessage(messages.previous)}><Icon id='chevron-left' fixedWidth /></button>;\n const rightNav = media.size > 1 && <button tabIndex='0' className='media-modal__nav media-modal__nav--right' onClick={this.handleNextClick} aria-label={intl.formatMessage(messages.next)}><Icon id='chevron-right' fixedWidth /></button>;\n\n if (media.size > 1) {\n pagination = media.map((item, i) => {\n const classes = ['media-modal__button'];\n if (i === index) {\n classes.push('media-modal__button--active');\n }\n return (<li className='media-modal__page-dot' key={i}><button tabIndex='0' className={classes.join(' ')} onClick={this.handleChangeIndex} data-index={i}>{i + 1}</button></li>);\n });\n }\n\n const content = media.map((image) => {\n const width = image.getIn(['meta', 'original', 'width']) || null;\n const height = image.getIn(['meta', 'original', 'height']) || null;\n\n if (image.get('type') === 'image') {\n return (\n <ImageLoader\n previewSrc={image.get('preview_url')}\n src={image.get('url')}\n width={width}\n height={height}\n alt={image.get('description')}\n key={image.get('url')}\n onClick={this.toggleNavigation}\n />\n );\n } else if (image.get('type') === 'video') {\n const { time } = this.props;\n\n return (\n <Video\n preview={image.get('preview_url')}\n blurhash={image.get('blurhash')}\n src={image.get('url')}\n width={image.get('width')}\n height={image.get('height')}\n startTime={time || 0}\n onCloseVideo={onClose}\n detailed\n alt={image.get('description')}\n key={image.get('url')}\n />\n );\n } else if (image.get('type') === 'gifv') {\n return (\n <GIFV\n src={image.get('url')}\n width={width}\n height={height}\n key={image.get('preview_url')}\n alt={image.get('description')}\n onClick={this.toggleNavigation}\n />\n );\n }\n\n return null;\n }).toArray();\n\n // you can't use 100vh, because the viewport height is taller\n // than the visible part of the document in some mobile\n // browsers when it's address bar is visible.\n // https://developers.google.com/web/updates/2016/12/url-bar-resizing\n const swipeableViewsStyle = {\n width: '100%',\n height: '100%',\n };\n\n const containerStyle = {\n alignItems: 'center', // center vertically\n };\n\n const navigationClassName = classNames('media-modal__navigation', {\n 'media-modal__navigation--hidden': navigationHidden,\n });\n\n return (\n <div className='modal-root__modal media-modal'>\n <div\n className='media-modal__closer'\n role='presentation'\n onClick={onClose}\n >\n <ReactSwipeableViews\n style={swipeableViewsStyle}\n containerStyle={containerStyle}\n onChangeIndex={this.handleSwipe}\n onSwitching={this.handleSwitching}\n index={index}\n >\n {content}\n </ReactSwipeableViews>\n </div>\n\n <div className={navigationClassName}>\n <IconButton className='media-modal__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={40} />\n\n {leftNav}\n {rightNav}\n\n {status && (\n <div className={classNames('media-modal__meta', { 'media-modal__meta--shifted': media.size > 1 })}>\n <a href={status.get('url')} onClick={this.handleStatusClick}><Icon id='comments' /> <FormattedMessage id='lightbox.view_context' defaultMessage='View context' /></a>\n </div>\n )}\n\n <ul className='media-modal__pagination'>\n {pagination}\n </ul>\n </div>\n </div>\n );\n }\n\n}\n","import _createClass from \"@babel/runtime/helpers/esm/createClass\";\n\n/**\n * This work is licensed under the W3C Software and Document License\n * (http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).\n */\n// Convenience function for converting NodeLists.\n\n/** @type {typeof Array.prototype.slice} */\nvar slice = Array.prototype.slice;\n/**\n * IE has a non-standard name for \"matches\".\n * @type {typeof Element.prototype.matches}\n */\n\nvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector;\n/** @type {string} */\n\nvar _focusableElementsString = ['a[href]', 'area[href]', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'iframe', 'object', 'embed', '[contenteditable]'].join(',');\n/**\n * `InertRoot` manages a single inert subtree, i.e. a DOM subtree whose root element has an `inert`\n * attribute.\n *\n * Its main functions are:\n *\n * - to create and maintain a set of managed `InertNode`s, including when mutations occur in the\n * subtree. The `makeSubtreeUnfocusable()` method handles collecting `InertNode`s via registering\n * each focusable node in the subtree with the singleton `InertManager` which manages all known\n * focusable nodes within inert subtrees. `InertManager` ensures that a single `InertNode`\n * instance exists for each focusable node which has at least one inert root as an ancestor.\n *\n * - to notify all managed `InertNode`s when this subtree stops being inert (i.e. when the `inert`\n * attribute is removed from the root node). This is handled in the destructor, which calls the\n * `deregister` method on `InertManager` for each managed inert node.\n */\n\n\nvar InertRoot =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {!Element} rootElement The Element at the root of the inert subtree.\n * @param {!InertManager} inertManager The global singleton InertManager object.\n */\n function InertRoot(rootElement, inertManager) {\n /** @type {!InertManager} */\n this._inertManager = inertManager;\n /** @type {!Element} */\n\n this._rootElement = rootElement;\n /**\n * @type {!Set<!InertNode>}\n * All managed focusable nodes in this InertRoot's subtree.\n */\n\n this._managedNodes = new Set(); // Make the subtree hidden from assistive technology\n\n if (this._rootElement.hasAttribute('aria-hidden')) {\n /** @type {?string} */\n this._savedAriaHidden = this._rootElement.getAttribute('aria-hidden');\n } else {\n this._savedAriaHidden = null;\n }\n\n this._rootElement.setAttribute('aria-hidden', 'true'); // Make all focusable elements in the subtree unfocusable and add them to _managedNodes\n\n\n this._makeSubtreeUnfocusable(this._rootElement); // Watch for:\n // - any additions in the subtree: make them unfocusable too\n // - any removals from the subtree: remove them from this inert root's managed nodes\n // - attribute changes: if `tabindex` is added, or removed from an intrinsically focusable\n // element, make that node a managed node.\n\n\n this._observer = new MutationObserver(this._onMutation.bind(this));\n\n this._observer.observe(this._rootElement, {\n attributes: true,\n childList: true,\n subtree: true\n });\n }\n /**\n * Call this whenever this object is about to become obsolete. This unwinds all of the state\n * stored in this object and updates the state of all of the managed nodes.\n */\n\n\n var _proto = InertRoot.prototype;\n\n _proto.destructor = function destructor() {\n this._observer.disconnect();\n\n if (this._rootElement) {\n if (this._savedAriaHidden !== null) {\n this._rootElement.setAttribute('aria-hidden', this._savedAriaHidden);\n } else {\n this._rootElement.removeAttribute('aria-hidden');\n }\n }\n\n this._managedNodes.forEach(function (inertNode) {\n this._unmanageNode(inertNode.node);\n }, this); // Note we cast the nulls to the ANY type here because:\n // 1) We want the class properties to be declared as non-null, or else we\n // need even more casts throughout this code. All bets are off if an\n // instance has been destroyed and a method is called.\n // 2) We don't want to cast \"this\", because we want type-aware optimizations\n // to know which properties we're setting.\n\n\n this._observer =\n /** @type {?} */\n null;\n this._rootElement =\n /** @type {?} */\n null;\n this._managedNodes =\n /** @type {?} */\n null;\n this._inertManager =\n /** @type {?} */\n null;\n }\n /**\n * @return {!Set<!InertNode>} A copy of this InertRoot's managed nodes set.\n */\n ;\n\n /**\n * @param {!Node} startNode\n */\n _proto._makeSubtreeUnfocusable = function _makeSubtreeUnfocusable(startNode) {\n var _this = this;\n\n composedTreeWalk(startNode, function (node) {\n return _this._visitNode(node);\n });\n var activeElement = document.activeElement;\n\n if (!document.body.contains(startNode)) {\n // startNode may be in shadow DOM, so find its nearest shadowRoot to get the activeElement.\n var node = startNode;\n /** @type {!ShadowRoot|undefined} */\n\n var root = undefined;\n\n while (node) {\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n root =\n /** @type {!ShadowRoot} */\n node;\n break;\n }\n\n node = node.parentNode;\n }\n\n if (root) {\n activeElement = root.activeElement;\n }\n }\n\n if (startNode.contains(activeElement)) {\n activeElement.blur(); // In IE11, if an element is already focused, and then set to tabindex=-1\n // calling blur() will not actually move the focus.\n // To work around this we call focus() on the body instead.\n\n if (activeElement === document.activeElement) {\n document.body.focus();\n }\n }\n }\n /**\n * @param {!Node} node\n */\n ;\n\n _proto._visitNode = function _visitNode(node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n\n var element =\n /** @type {!Element} */\n node; // If a descendant inert root becomes un-inert, its descendants will still be inert because of\n // this inert root, so all of its managed nodes need to be adopted by this InertRoot.\n\n if (element !== this._rootElement && element.hasAttribute('inert')) {\n this._adoptInertRoot(element);\n }\n\n if (matches.call(element, _focusableElementsString) || element.hasAttribute('tabindex')) {\n this._manageNode(element);\n }\n }\n /**\n * Register the given node with this InertRoot and with InertManager.\n * @param {!Node} node\n */\n ;\n\n _proto._manageNode = function _manageNode(node) {\n var inertNode = this._inertManager.register(node, this);\n\n this._managedNodes.add(inertNode);\n }\n /**\n * Unregister the given node with this InertRoot and with InertManager.\n * @param {!Node} node\n */\n ;\n\n _proto._unmanageNode = function _unmanageNode(node) {\n var inertNode = this._inertManager.deregister(node, this);\n\n if (inertNode) {\n this._managedNodes.delete(inertNode);\n }\n }\n /**\n * Unregister the entire subtree starting at `startNode`.\n * @param {!Node} startNode\n */\n ;\n\n _proto._unmanageSubtree = function _unmanageSubtree(startNode) {\n var _this2 = this;\n\n composedTreeWalk(startNode, function (node) {\n return _this2._unmanageNode(node);\n });\n }\n /**\n * If a descendant node is found with an `inert` attribute, adopt its managed nodes.\n * @param {!Element} node\n */\n ;\n\n _proto._adoptInertRoot = function _adoptInertRoot(node) {\n var inertSubroot = this._inertManager.getInertRoot(node); // During initialisation this inert root may not have been registered yet,\n // so register it now if need be.\n\n\n if (!inertSubroot) {\n this._inertManager.setInert(node, true);\n\n inertSubroot = this._inertManager.getInertRoot(node);\n }\n\n inertSubroot.managedNodes.forEach(function (savedInertNode) {\n this._manageNode(savedInertNode.node);\n }, this);\n }\n /**\n * Callback used when mutation observer detects subtree additions, removals, or attribute changes.\n * @param {!Array<!MutationRecord>} records\n * @param {!MutationObserver} self\n */\n ;\n\n _proto._onMutation = function _onMutation(records, self) {\n records.forEach(function (record) {\n var target =\n /** @type {!Element} */\n record.target;\n\n if (record.type === 'childList') {\n // Manage added nodes\n slice.call(record.addedNodes).forEach(function (node) {\n this._makeSubtreeUnfocusable(node);\n }, this); // Un-manage removed nodes\n\n slice.call(record.removedNodes).forEach(function (node) {\n this._unmanageSubtree(node);\n }, this);\n } else if (record.type === 'attributes') {\n if (record.attributeName === 'tabindex') {\n // Re-initialise inert node if tabindex changes\n this._manageNode(target);\n } else if (target !== this._rootElement && record.attributeName === 'inert' && target.hasAttribute('inert')) {\n // If a new inert root is added, adopt its managed nodes and make sure it knows about the\n // already managed nodes from this inert subroot.\n this._adoptInertRoot(target);\n\n var inertSubroot = this._inertManager.getInertRoot(target);\n\n this._managedNodes.forEach(function (managedNode) {\n if (target.contains(managedNode.node)) {\n inertSubroot._manageNode(managedNode.node);\n }\n });\n }\n }\n }, this);\n };\n\n _createClass(InertRoot, [{\n key: \"managedNodes\",\n get: function get() {\n return new Set(this._managedNodes);\n }\n /** @return {boolean} */\n\n }, {\n key: \"hasSavedAriaHidden\",\n get: function get() {\n return this._savedAriaHidden !== null;\n }\n /** @param {?string} ariaHidden */\n\n }, {\n key: \"savedAriaHidden\",\n set: function set(ariaHidden) {\n this._savedAriaHidden = ariaHidden;\n }\n /** @return {?string} */\n ,\n get: function get() {\n return this._savedAriaHidden;\n }\n }]);\n\n return InertRoot;\n}();\n/**\n * `InertNode` initialises and manages a single inert node.\n * A node is inert if it is a descendant of one or more inert root elements.\n *\n * On construction, `InertNode` saves the existing `tabindex` value for the node, if any, and\n * either removes the `tabindex` attribute or sets it to `-1`, depending on whether the element\n * is intrinsically focusable or not.\n *\n * `InertNode` maintains a set of `InertRoot`s which are descendants of this `InertNode`. When an\n * `InertRoot` is destroyed, and calls `InertManager.deregister()`, the `InertManager` notifies the\n * `InertNode` via `removeInertRoot()`, which in turn destroys the `InertNode` if no `InertRoot`s\n * remain in the set. On destruction, `InertNode` reinstates the stored `tabindex` if one exists,\n * or removes the `tabindex` attribute if the element is intrinsically focusable.\n */\n\n\nvar InertNode =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {!Node} node A focusable element to be made inert.\n * @param {!InertRoot} inertRoot The inert root element associated with this inert node.\n */\n function InertNode(node, inertRoot) {\n /** @type {!Node} */\n this._node = node;\n /** @type {boolean} */\n\n this._overrodeFocusMethod = false;\n /**\n * @type {!Set<!InertRoot>} The set of descendant inert roots.\n * If and only if this set becomes empty, this node is no longer inert.\n */\n\n this._inertRoots = new Set([inertRoot]);\n /** @type {?number} */\n\n this._savedTabIndex = null;\n /** @type {boolean} */\n\n this._destroyed = false; // Save any prior tabindex info and make this node untabbable\n\n this.ensureUntabbable();\n }\n /**\n * Call this whenever this object is about to become obsolete.\n * This makes the managed node focusable again and deletes all of the previously stored state.\n */\n\n\n var _proto2 = InertNode.prototype;\n\n _proto2.destructor = function destructor() {\n this._throwIfDestroyed();\n\n if (this._node && this._node.nodeType === Node.ELEMENT_NODE) {\n var element =\n /** @type {!Element} */\n this._node;\n\n if (this._savedTabIndex !== null) {\n element.setAttribute('tabindex', this._savedTabIndex);\n } else {\n element.removeAttribute('tabindex');\n } // Use `delete` to restore native focus method.\n\n\n if (this._overrodeFocusMethod) {\n delete element.focus;\n }\n } // See note in InertRoot.destructor for why we cast these nulls to ANY.\n\n\n this._node =\n /** @type {?} */\n null;\n this._inertRoots =\n /** @type {?} */\n null;\n this._destroyed = true;\n }\n /**\n * @type {boolean} Whether this object is obsolete because the managed node is no longer inert.\n * If the object has been destroyed, any attempt to access it will cause an exception.\n */\n ;\n\n /**\n * Throw if user tries to access destroyed InertNode.\n */\n _proto2._throwIfDestroyed = function _throwIfDestroyed() {\n if (this.destroyed) {\n throw new Error('Trying to access destroyed InertNode');\n }\n }\n /** @return {boolean} */\n ;\n\n /** Save the existing tabindex value and make the node untabbable and unfocusable */\n _proto2.ensureUntabbable = function ensureUntabbable() {\n if (this.node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n\n var element =\n /** @type {!Element} */\n this.node;\n\n if (matches.call(element, _focusableElementsString)) {\n if (\n /** @type {!HTMLElement} */\n element.tabIndex === -1 && this.hasSavedTabIndex) {\n return;\n }\n\n if (element.hasAttribute('tabindex')) {\n this._savedTabIndex =\n /** @type {!HTMLElement} */\n element.tabIndex;\n }\n\n element.setAttribute('tabindex', '-1');\n\n if (element.nodeType === Node.ELEMENT_NODE) {\n element.focus = function () {};\n\n this._overrodeFocusMethod = true;\n }\n } else if (element.hasAttribute('tabindex')) {\n this._savedTabIndex =\n /** @type {!HTMLElement} */\n element.tabIndex;\n element.removeAttribute('tabindex');\n }\n }\n /**\n * Add another inert root to this inert node's set of managing inert roots.\n * @param {!InertRoot} inertRoot\n */\n ;\n\n _proto2.addInertRoot = function addInertRoot(inertRoot) {\n this._throwIfDestroyed();\n\n this._inertRoots.add(inertRoot);\n }\n /**\n * Remove the given inert root from this inert node's set of managing inert roots.\n * If the set of managing inert roots becomes empty, this node is no longer inert,\n * so the object should be destroyed.\n * @param {!InertRoot} inertRoot\n */\n ;\n\n _proto2.removeInertRoot = function removeInertRoot(inertRoot) {\n this._throwIfDestroyed();\n\n this._inertRoots.delete(inertRoot);\n\n if (this._inertRoots.size === 0) {\n this.destructor();\n }\n };\n\n _createClass(InertNode, [{\n key: \"destroyed\",\n get: function get() {\n return (\n /** @type {!InertNode} */\n this._destroyed\n );\n }\n }, {\n key: \"hasSavedTabIndex\",\n get: function get() {\n return this._savedTabIndex !== null;\n }\n /** @return {!Node} */\n\n }, {\n key: \"node\",\n get: function get() {\n this._throwIfDestroyed();\n\n return this._node;\n }\n /** @param {?number} tabIndex */\n\n }, {\n key: \"savedTabIndex\",\n set: function set(tabIndex) {\n this._throwIfDestroyed();\n\n this._savedTabIndex = tabIndex;\n }\n /** @return {?number} */\n ,\n get: function get() {\n this._throwIfDestroyed();\n\n return this._savedTabIndex;\n }\n }]);\n\n return InertNode;\n}();\n/**\n * InertManager is a per-document singleton object which manages all inert roots and nodes.\n *\n * When an element becomes an inert root by having an `inert` attribute set and/or its `inert`\n * property set to `true`, the `setInert` method creates an `InertRoot` object for the element.\n * The `InertRoot` in turn registers itself as managing all of the element's focusable descendant\n * nodes via the `register()` method. The `InertManager` ensures that a single `InertNode` instance\n * is created for each such node, via the `_managedNodes` map.\n */\n\n\nvar InertManager =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {!Document} document\n */\n function InertManager(document) {\n if (!document) {\n throw new Error('Missing required argument; InertManager needs to wrap a document.');\n }\n /** @type {!Document} */\n\n\n this._document = document;\n /**\n * All managed nodes known to this InertManager. In a map to allow looking up by Node.\n * @type {!Map<!Node, !InertNode>}\n */\n\n this._managedNodes = new Map();\n /**\n * All inert roots known to this InertManager. In a map to allow looking up by Node.\n * @type {!Map<!Node, !InertRoot>}\n */\n\n this._inertRoots = new Map();\n /**\n * Observer for mutations on `document.body`.\n * @type {!MutationObserver}\n */\n\n this._observer = new MutationObserver(this._watchForInert.bind(this)); // Add inert style.\n\n addInertStyle(document.head || document.body || document.documentElement); // Wait for document to be loaded.\n\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', this._onDocumentLoaded.bind(this));\n } else {\n this._onDocumentLoaded();\n }\n }\n /**\n * Set whether the given element should be an inert root or not.\n * @param {!Element} root\n * @param {boolean} inert\n */\n\n\n var _proto3 = InertManager.prototype;\n\n _proto3.setInert = function setInert(root, inert) {\n if (inert) {\n if (this._inertRoots.has(root)) {\n // element is already inert\n return;\n }\n\n var inertRoot = new InertRoot(root, this);\n root.setAttribute('inert', '');\n\n this._inertRoots.set(root, inertRoot); // If not contained in the document, it must be in a shadowRoot.\n // Ensure inert styles are added there.\n\n\n if (!this._document.body.contains(root)) {\n var parent = root.parentNode;\n\n while (parent) {\n if (parent.nodeType === 11) {\n addInertStyle(parent);\n }\n\n parent = parent.parentNode;\n }\n }\n } else {\n if (!this._inertRoots.has(root)) {\n // element is already non-inert\n return;\n }\n\n var _inertRoot = this._inertRoots.get(root);\n\n _inertRoot.destructor();\n\n this._inertRoots.delete(root);\n\n root.removeAttribute('inert');\n }\n }\n /**\n * Get the InertRoot object corresponding to the given inert root element, if any.\n * @param {!Node} element\n * @return {!InertRoot|undefined}\n */\n ;\n\n _proto3.getInertRoot = function getInertRoot(element) {\n return this._inertRoots.get(element);\n }\n /**\n * Register the given InertRoot as managing the given node.\n * In the case where the node has a previously existing inert root, this inert root will\n * be added to its set of inert roots.\n * @param {!Node} node\n * @param {!InertRoot} inertRoot\n * @return {!InertNode} inertNode\n */\n ;\n\n _proto3.register = function register(node, inertRoot) {\n var inertNode = this._managedNodes.get(node);\n\n if (inertNode !== undefined) {\n // node was already in an inert subtree\n inertNode.addInertRoot(inertRoot);\n } else {\n inertNode = new InertNode(node, inertRoot);\n }\n\n this._managedNodes.set(node, inertNode);\n\n return inertNode;\n }\n /**\n * De-register the given InertRoot as managing the given inert node.\n * Removes the inert root from the InertNode's set of managing inert roots, and remove the inert\n * node from the InertManager's set of managed nodes if it is destroyed.\n * If the node is not currently managed, this is essentially a no-op.\n * @param {!Node} node\n * @param {!InertRoot} inertRoot\n * @return {?InertNode} The potentially destroyed InertNode associated with this node, if any.\n */\n ;\n\n _proto3.deregister = function deregister(node, inertRoot) {\n var inertNode = this._managedNodes.get(node);\n\n if (!inertNode) {\n return null;\n }\n\n inertNode.removeInertRoot(inertRoot);\n\n if (inertNode.destroyed) {\n this._managedNodes.delete(node);\n }\n\n return inertNode;\n }\n /**\n * Callback used when document has finished loading.\n */\n ;\n\n _proto3._onDocumentLoaded = function _onDocumentLoaded() {\n // Find all inert roots in document and make them actually inert.\n var inertElements = slice.call(this._document.querySelectorAll('[inert]'));\n inertElements.forEach(function (inertElement) {\n this.setInert(inertElement, true);\n }, this); // Comment this out to use programmatic API only.\n\n this._observer.observe(this._document.body, {\n attributes: true,\n subtree: true,\n childList: true\n });\n }\n /**\n * Callback used when mutation observer detects attribute changes.\n * @param {!Array<!MutationRecord>} records\n * @param {!MutationObserver} self\n */\n ;\n\n _proto3._watchForInert = function _watchForInert(records, self) {\n var _this = this;\n\n records.forEach(function (record) {\n switch (record.type) {\n case 'childList':\n slice.call(record.addedNodes).forEach(function (node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n\n var inertElements = slice.call(node.querySelectorAll('[inert]'));\n\n if (matches.call(node, '[inert]')) {\n inertElements.unshift(node);\n }\n\n inertElements.forEach(function (inertElement) {\n this.setInert(inertElement, true);\n }, _this);\n }, _this);\n break;\n\n case 'attributes':\n if (record.attributeName !== 'inert') {\n return;\n }\n\n var target =\n /** @type {!Element} */\n record.target;\n var inert = target.hasAttribute('inert');\n\n _this.setInert(target, inert);\n\n break;\n }\n }, this);\n };\n\n return InertManager;\n}();\n/**\n * Recursively walk the composed tree from |node|.\n * @param {!Node} node\n * @param {(function (!Element))=} callback Callback to be called for each element traversed,\n * before descending into child nodes.\n * @param {?ShadowRoot=} shadowRootAncestor The nearest ShadowRoot ancestor, if any.\n */\n\n\nfunction composedTreeWalk(node, callback, shadowRootAncestor) {\n if (node.nodeType == Node.ELEMENT_NODE) {\n var element =\n /** @type {!Element} */\n node;\n\n if (callback) {\n callback(element);\n } // Descend into node:\n // If it has a ShadowRoot, ignore all child elements - these will be picked\n // up by the <content> or <shadow> elements. Descend straight into the\n // ShadowRoot.\n\n\n var shadowRoot =\n /** @type {!HTMLElement} */\n element.shadowRoot;\n\n if (shadowRoot) {\n composedTreeWalk(shadowRoot, callback, shadowRoot);\n return;\n } // If it is a <content> element, descend into distributed elements - these\n // are elements from outside the shadow root which are rendered inside the\n // shadow DOM.\n\n\n if (element.localName == 'content') {\n var content =\n /** @type {!HTMLContentElement} */\n element; // Verifies if ShadowDom v0 is supported.\n\n var distributedNodes = content.getDistributedNodes ? content.getDistributedNodes() : [];\n\n for (var i = 0; i < distributedNodes.length; i++) {\n composedTreeWalk(distributedNodes[i], callback, shadowRootAncestor);\n }\n\n return;\n } // If it is a <slot> element, descend into assigned nodes - these\n // are elements from outside the shadow root which are rendered inside the\n // shadow DOM.\n\n\n if (element.localName == 'slot') {\n var slot =\n /** @type {!HTMLSlotElement} */\n element; // Verify if ShadowDom v1 is supported.\n\n var _distributedNodes = slot.assignedNodes ? slot.assignedNodes({\n flatten: true\n }) : [];\n\n for (var _i = 0; _i < _distributedNodes.length; _i++) {\n composedTreeWalk(_distributedNodes[_i], callback, shadowRootAncestor);\n }\n\n return;\n }\n } // If it is neither the parent of a ShadowRoot, a <content> element, a <slot>\n // element, nor a <shadow> element recurse normally.\n\n\n var child = node.firstChild;\n\n while (child != null) {\n composedTreeWalk(child, callback, shadowRootAncestor);\n child = child.nextSibling;\n }\n}\n/**\n * Adds a style element to the node containing the inert specific styles\n * @param {!Node} node\n */\n\n\nfunction addInertStyle(node) {\n if (node.querySelector('style#inert-style')) {\n return;\n }\n\n var style = document.createElement('style');\n style.setAttribute('id', 'inert-style');\n style.textContent = '\\n' + '[inert] {\\n' + ' pointer-events: none;\\n' + ' cursor: default;\\n' + '}\\n' + '\\n' + '[inert], [inert] * {\\n' + ' user-select: none;\\n' + ' -webkit-user-select: none;\\n' + ' -moz-user-select: none;\\n' + ' -ms-user-select: none;\\n' + '}\\n';\n node.appendChild(style);\n}\n/** @type {!InertManager} */\n\n\nvar inertManager = new InertManager(document);\n\nif (!Element.prototype.hasOwnProperty('inert')) {\n Object.defineProperty(Element.prototype, 'inert', {\n enumerable: true,\n\n /** @this {!Element} */\n get: function get() {\n return this.hasAttribute('inert');\n },\n\n /** @this {!Element} */\n set: function set(inert) {\n inertManager.setInert(this, inert);\n }\n });\n}","module.exports = function (originalModule) {\n if (!originalModule.webpackPolyfill) {\n var module = Object.create(originalModule); // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n Object.defineProperty(module, \"exports\", {\n enumerable: true\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};","// taken from:\n// https://github.com/twitter/twemoji/blob/47732c7/twemoji-generator.js#L848-L866\nexports.unicodeToFilename = (str) => {\n let result = '';\n let charCode = 0;\n let p = 0;\n let i = 0;\n while (i < str.length) {\n charCode = str.charCodeAt(i++);\n if (p) {\n if (result.length > 0) {\n result += '-';\n }\n result += (0x10000 + ((p - 0xD800) << 10) + (charCode - 0xDC00)).toString(16);\n p = 0;\n } else if (0xD800 <= charCode && charCode <= 0xDBFF) {\n p = charCode;\n } else {\n if (result.length > 0) {\n result += '-';\n }\n result += charCode.toString(16);\n }\n }\n return result;\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar bind = require('./helpers/bind');\n\nvar Axios = require('./core/Axios');\n\nvar mergeConfig = require('./core/mergeConfig');\n\nvar defaults = require('./defaults');\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\n\n\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context); // Copy axios.prototype to instance\n\n utils.extend(instance, Axios.prototype, context); // Copy context to instance\n\n utils.extend(instance, context);\n return instance;\n} // Create the default instance to be exported\n\n\nvar axios = createInstance(defaults); // Expose Axios class to allow class inheritance\n\naxios.Axios = Axios; // Factory for creating new instances\n\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n}; // Expose Cancel & CancelToken\n\n\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel'); // Expose all/spread\n\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = require('./helpers/spread');\nmodule.exports = axios; // Allow use of default import syntax in TypeScript\n\nmodule.exports.default = axios;","'use strict';\n\nvar utils = require('./../utils');\n\nvar buildURL = require('../helpers/buildURL');\n\nvar InterceptorManager = require('./InterceptorManager');\n\nvar dispatchRequest = require('./dispatchRequest');\n\nvar mergeConfig = require('./mergeConfig');\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\n\n\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\n\n\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config); // Set config.method\n\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n } // Hook up interceptors middleware\n\n\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n}; // Provide aliases for supported request methods\n\n\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function (url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function (url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\nmodule.exports = Axios;","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n\n\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\n\n\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\n\n\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;","'use strict';\n\nvar utils = require('./../utils');\n\nvar transformData = require('./transformData');\n\nvar isCancel = require('../cancel/isCancel');\n\nvar defaults = require('../defaults');\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\n\n\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\n\n\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config); // Ensure headers exist\n\n config.headers = config.headers || {}; // Transform request data\n\n config.data = transformData(config.data, config.headers, config.transformRequest); // Flatten headers\n\n config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);\n utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function cleanHeaderConfig(method) {\n delete config.headers[method];\n });\n var adapter = config.adapter || defaults.adapter;\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config); // Transform response data\n\n response.data = transformData(response.data, response.headers, config.transformResponse);\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config); // Transform response data\n\n if (reason && reason.response) {\n reason.response.data = transformData(reason.response.data, reason.response.headers, config.transformResponse);\n }\n }\n\n return Promise.reject(reason);\n });\n};","'use strict';\n\nvar utils = require('./../utils');\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\n\n\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n return data;\n};","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};","'use strict';\n\nvar createError = require('./createError');\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\n\n\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n\n if (!validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response));\n }\n};","'use strict';\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\n\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function () {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n\n return error;\n};","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\n\nvar combineURLs = require('../helpers/combineURLs');\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\n\n\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n\n return requestedURL;\n};","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nexports['default'] = spring;\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nvar _presets = require('./presets');\n\nvar _presets2 = _interopRequireDefault(_presets);\n\nvar defaultConfig = _extends({}, _presets2['default'].noWobble, {\n precision: 0.01\n});\n\nfunction spring(val, config) {\n return _extends({}, defaultConfig, config, {\n val: val\n });\n}\n\nmodule.exports = exports['default'];","'use strict';\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\n\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};","'use strict';\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\n\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '') : baseURL;\n};","'use strict';\n\nvar utils = require('./../utils'); // Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\n\n\nvar ignoreDuplicateOf = ['age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent'];\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\n\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) {\n return parsed;\n }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n return parsed;\n};","'use strict';\n\nvar utils = require('./../utils');\n\nvar isValidXss = require('./isValidXss');\n\nmodule.exports = utils.isStandardBrowserEnv() ? // Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\nfunction standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n\n function resolveURL(url) {\n var href = url;\n\n if (isValidXss(url)) {\n throw new Error('URL contains XSS injection attempt');\n }\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href); // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n\n return function isURLSameOrigin(requestURL) {\n var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;\n return parsed.protocol === originURL.protocol && parsed.host === originURL.host;\n };\n}() : // Non standard browser envs (web workers, react-native) lack needed support.\nfunction nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n}();","'use strict';\n\nmodule.exports = function isValidXss(requestURL) {\n var xssRegex = /(\\b)(on\\w+)=|javascript|(<\\s*)(\\/*)script/gi;\n return xssRegex.test(requestURL);\n};","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = utils.isStandardBrowserEnv() ? // Standard browser envs support document.cookie\nfunction standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return match ? decodeURIComponent(match[3]) : null;\n },\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n}() : // Non standard browser env (web workers, react-native) lack needed support.\nfunction nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() {\n return null;\n },\n remove: function remove() {}\n };\n}();","'use strict';\n\nvar Cancel = require('./Cancel');\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\n\n\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\n\n\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n\n\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;","'use strict';\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\n\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};","var root = require('./_root');\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n\n\nvar now = function now() {\n return root.Date.now();\n};\n\nmodule.exports = now;","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n/** Used as references for various `Number` constants. */\n\n\nvar NAN = 0 / 0;\n/** Used to match leading and trailing whitespace. */\n\nvar reTrim = /^\\s+|\\s+$/g;\n/** Used to detect bad signed hexadecimal string values. */\n\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n/** Used to detect binary string values. */\n\nvar reIsBinary = /^0b[01]+$/i;\n/** Used to detect octal string values. */\n\nvar reIsOctal = /^0o[0-7]+$/i;\n/** Built-in method references without a dependency on `root`. */\n\nvar freeParseInt = parseInt;\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n\n if (isSymbol(value)) {\n return NAN;\n }\n\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? other + '' : other;\n }\n\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;\n}\n\nmodule.exports = toNumber;","var Symbol = require('./_Symbol');\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n\nvar nativeObjectToString = objectProto.toString;\n/** Built-in value references. */\n\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n\n return result;\n}\n\nmodule.exports = getRawTag;","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n\nvar nativeObjectToString = objectProto.toString;\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;","/**\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 */\nfunction componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}\n\nfunction componentWillReceiveProps(nextProps) {\n // Call this.constructor.gDSFP to support sub-classes.\n // Use the setState() updater to ensure state isn't stale in certain edge cases.\n function updater(prevState) {\n var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);\n return state !== null && state !== undefined ? state : null;\n } // Binding \"this\" is important for shallow renderer support.\n\n\n this.setState(updater.bind(this));\n}\n\nfunction componentWillUpdate(nextProps, nextState) {\n try {\n var prevProps = this.props;\n var prevState = this.state;\n this.props = nextProps;\n this.state = nextState;\n this.__reactInternalSnapshotFlag = true;\n this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(prevProps, prevState);\n } finally {\n this.props = prevProps;\n this.state = prevState;\n }\n} // React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\n\n\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\n\nfunction polyfill(Component) {\n var prototype = Component.prototype;\n\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n }\n\n if (typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function') {\n return Component;\n } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Error if any of these lifecycles are present,\n // Because they would work differently between older and newer (16.3+) versions of React.\n\n\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n\n if (typeof prototype.componentWillMount === 'function') {\n foundWillMountName = 'componentWillMount';\n } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n\n if (typeof prototype.componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n\n if (typeof prototype.componentWillUpdate === 'function') {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n\n if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var componentName = Component.displayName || Component.name;\n var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n throw Error('Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\\n ' + foundWillUpdateName : '') + '\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\n' + 'https://fb.me/react-async-component-lifecycle-hooks');\n } // React <= 16.2 does not support static getDerivedStateFromProps.\n // As a workaround, use cWM and cWRP to invoke the new static lifecycle.\n // Newer versions of React will ignore these lifecycles if gDSFP exists.\n\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n prototype.componentWillMount = componentWillMount;\n prototype.componentWillReceiveProps = componentWillReceiveProps;\n } // React <= 16.2 does not support getSnapshotBeforeUpdate.\n // As a workaround, use cWU to invoke the new lifecycle.\n // Newer versions of React will ignore that lifecycle if gSBU exists.\n\n\n if (typeof prototype.getSnapshotBeforeUpdate === 'function') {\n if (typeof prototype.componentDidUpdate !== 'function') {\n throw new Error('Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype');\n }\n\n prototype.componentWillUpdate = componentWillUpdate;\n var componentDidUpdate = prototype.componentDidUpdate;\n\n prototype.componentDidUpdate = function componentDidUpdatePolyfill(prevProps, prevState, maybeSnapshot) {\n // 16.3+ will not execute our will-update method;\n // It will pass a snapshot value to did-update though.\n // Older versions will require our polyfilled will-update value.\n // We need to handle both cases, but can't just check for the presence of \"maybeSnapshot\",\n // Because for <= 15.x versions this might be a \"prevContext\" object.\n // We also can't just check \"__reactInternalSnapshot\",\n // Because get-snapshot might return a falsy value.\n // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.\n var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot;\n componentDidUpdate.call(this, prevProps, prevState, snapshot);\n };\n }\n\n return Component;\n}\n\nexport { polyfill };","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();\n\nexports.default = loadingBarMiddleware;\n\nvar _loading_bar_ducks = require('./loading_bar_ducks');\n\nvar defaultTypeSuffixes = ['PENDING', 'FULFILLED', 'REJECTED'];\n\nfunction loadingBarMiddleware() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypeSuffixes;\n var scope = config.scope || _loading_bar_ducks.DEFAULT_SCOPE;\n return function (_ref) {\n var dispatch = _ref.dispatch;\n return function (next) {\n return function (action) {\n if (action.type) {\n var _promiseTypeSuffixes = _slicedToArray(promiseTypeSuffixes, 3),\n PENDING = _promiseTypeSuffixes[0],\n FULFILLED = _promiseTypeSuffixes[1],\n REJECTED = _promiseTypeSuffixes[2];\n\n var isPending = new RegExp(PENDING + '$', 'g');\n var isFulfilled = new RegExp(FULFILLED + '$', 'g');\n var isRejected = new RegExp(REJECTED + '$', 'g');\n var actionScope = action.meta && action.meta.scope || action.scope || scope;\n\n if (action.type.match(isPending)) {\n dispatch((0, _loading_bar_ducks.showLoading)(actionScope));\n } else if (action.type.match(isFulfilled) || action.type.match(isRejected)) {\n dispatch((0, _loading_bar_ducks.hideLoading)(actionScope));\n }\n }\n\n return next(action);\n };\n };\n };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = require('react-redux');\n\nvar _loading_bar = require('./loading_bar');\n\nvar _loading_bar_ducks = require('./loading_bar_ducks');\n\nvar mapImmutableStateToProps = function mapImmutableStateToProps(state, ownProps) {\n return {\n loading: state.get('loadingBar')[ownProps.scope || _loading_bar_ducks.DEFAULT_SCOPE]\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapImmutableStateToProps)(_loading_bar.LoadingBar);","// currently used to initiate the velocity style object to 0\n'use strict';\n\nexports.__esModule = true;\nexports['default'] = mapToZero;\n\nfunction mapToZero(obj) {\n var ret = {};\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n ret[key] = 0;\n }\n }\n\n return ret;\n}\n\nmodule.exports = exports['default'];","// turn {x: {val: 1, stiffness: 1, damping: 2}, y: 2} generated by\n// `{x: spring(1, {stiffness: 1, damping: 2}), y: 2}` into {x: 1, y: 2}\n'use strict';\n\nexports.__esModule = true;\nexports['default'] = stripStyle;\n\nfunction stripStyle(style) {\n var ret = {};\n\n for (var key in style) {\n if (!Object.prototype.hasOwnProperty.call(style, key)) {\n continue;\n }\n\n ret[key] = typeof style[key] === 'number' ? style[key] : style[key].val;\n }\n\n return ret;\n}\n\nmodule.exports = exports['default'];","// stepper is used a lot. Saves allocation to return the same array wrapper.\n// This is fine and danger-free against mutations because the callsite\n// immediately destructures it and gets the numbers inside without passing the\n\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = stepper;\nvar reusedTuple = [0, 0];\n\nfunction stepper(secondPerFrame, x, v, destX, k, b, precision) {\n // Spring stiffness, in kg / s^2\n // for animations, destX is really spring length (spring at rest). initial\n // position is considered as the stretched/compressed position of a spring\n var Fspring = -k * (x - destX); // Damping, in kg / s\n\n var Fdamper = -b * v; // usually we put mass here, but for animation purposes, specifying mass is a\n // bit redundant. you could simply adjust k and b accordingly\n // let a = (Fspring + Fdamper) / mass;\n\n var a = Fspring + Fdamper;\n var newV = v + a * secondPerFrame;\n var newX = x + newV * secondPerFrame;\n\n if (Math.abs(newV) < precision && Math.abs(newX - destX) < precision) {\n reusedTuple[0] = destX;\n reusedTuple[1] = 0;\n return reusedTuple;\n }\n\n reusedTuple[0] = newX;\n reusedTuple[1] = newV;\n return reusedTuple;\n}\n\nmodule.exports = exports[\"default\"]; // array reference around.","// Generated by CoffeeScript 1.7.1\n(function () {\n var getNanoSeconds, hrtime, loadTime;\n\n if (typeof performance !== \"undefined\" && performance !== null && performance.now) {\n module.exports = function () {\n return performance.now();\n };\n } else if (typeof process !== \"undefined\" && process !== null && process.hrtime) {\n module.exports = function () {\n return (getNanoSeconds() - loadTime) / 1e6;\n };\n\n hrtime = process.hrtime;\n\n getNanoSeconds = function getNanoSeconds() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n\n loadTime = getNanoSeconds();\n } else if (Date.now) {\n module.exports = function () {\n return Date.now() - loadTime;\n };\n\n loadTime = Date.now();\n } else {\n module.exports = function () {\n return new Date().getTime() - loadTime;\n };\n\n loadTime = new Date().getTime();\n }\n}).call(this);","var now = require('performance-now'),\n root = typeof window === 'undefined' ? global : window,\n vendors = ['moz', 'webkit'],\n suffix = 'AnimationFrame',\n raf = root['request' + suffix],\n caf = root['cancel' + suffix] || root['cancelRequest' + suffix];\n\nfor (var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix];\n caf = root[vendors[i] + 'Cancel' + suffix] || root[vendors[i] + 'CancelRequest' + suffix];\n} // Some versions of FF have rAF but not cAF\n\n\nif (!raf || !caf) {\n var last = 0,\n id = 0,\n queue = [],\n frameDuration = 1000 / 60;\n\n raf = function raf(callback) {\n if (queue.length === 0) {\n var _now = now(),\n next = Math.max(0, frameDuration - (_now - last));\n\n last = next + _now;\n setTimeout(function () {\n var cp = queue.slice(0); // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n\n queue.length = 0;\n\n for (var i = 0; i < cp.length; i++) {\n if (!cp[i].cancelled) {\n try {\n cp[i].callback(last);\n } catch (e) {\n setTimeout(function () {\n throw e;\n }, 0);\n }\n }\n }\n }, Math.round(next));\n }\n\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n });\n return id;\n };\n\n caf = function caf(handle) {\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].handle === handle) {\n queue[i].cancelled = true;\n }\n }\n };\n}\n\nmodule.exports = function (fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn);\n};\n\nmodule.exports.cancel = function () {\n caf.apply(root, arguments);\n};\n\nmodule.exports.polyfill = function (object) {\n if (!object) {\n object = root;\n }\n\n object.requestAnimationFrame = raf;\n object.cancelAnimationFrame = caf;\n};","// Generated by CoffeeScript 1.12.2\n(function () {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if (typeof performance !== \"undefined\" && performance !== null && performance.now) {\n module.exports = function () {\n return performance.now();\n };\n } else if (typeof process !== \"undefined\" && process !== null && process.hrtime) {\n module.exports = function () {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n\n hrtime = process.hrtime;\n\n getNanoSeconds = function getNanoSeconds() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function () {\n return Date.now() - loadTime;\n };\n\n loadTime = Date.now();\n } else {\n module.exports = function () {\n return new Date().getTime() - loadTime;\n };\n\n loadTime = new Date().getTime();\n }\n}).call(this);","// usage assumption: currentStyle values have already been rendered but it says\n// nothing of whether currentStyle is stale (see unreadPropStyle)\n'use strict';\n\nexports.__esModule = true;\nexports['default'] = shouldStopAnimation;\n\nfunction shouldStopAnimation(currentStyle, style, currentVelocity) {\n for (var key in style) {\n if (!Object.prototype.hasOwnProperty.call(style, key)) {\n continue;\n }\n\n if (currentVelocity[key] !== 0) {\n return false;\n }\n\n var styleValue = typeof style[key] === 'number' ? style[key] : style[key].val; // stepper will have already taken care of rounding precision errors, so\n // won't have such thing as 0.9999 !=== 1\n\n if (currentStyle[key] !== styleValue) {\n return false;\n }\n }\n\n return true;\n}\n\nmodule.exports = exports['default'];","\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = {\n noWobble: {\n stiffness: 170,\n damping: 26\n },\n // the default, if nothing provided\n gentle: {\n stiffness: 120,\n damping: 14\n },\n wobbly: {\n stiffness: 180,\n damping: 12\n },\n stiff: {\n stiffness: 210,\n damping: 20\n }\n};\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar base83_1 = require(\"./base83\");\n\nvar utils_1 = require(\"./utils\");\n\nvar error_1 = require(\"./error\");\n/**\n * Returns an error message if invalid or undefined if valid\n * @param blurhash\n */\n\n\nvar validateBlurhash = function validateBlurhash(blurhash) {\n if (!blurhash || blurhash.length < 6) {\n throw new error_1.ValidationError(\"The blurhash string must be at least 6 characters\");\n }\n\n var sizeFlag = base83_1.decode83(blurhash[0]);\n var numY = Math.floor(sizeFlag / 9) + 1;\n var numX = sizeFlag % 9 + 1;\n\n if (blurhash.length !== 4 + 2 * numX * numY) {\n throw new error_1.ValidationError(\"blurhash length mismatch: length is \" + blurhash.length + \" but it should be \" + (4 + 2 * numX * numY));\n }\n};\n\nexports.isBlurhashValid = function (blurhash) {\n try {\n validateBlurhash(blurhash);\n } catch (error) {\n return {\n result: false,\n errorReason: error.message\n };\n }\n\n return {\n result: true\n };\n};\n\nvar decodeDC = function decodeDC(value) {\n var intR = value >> 16;\n var intG = value >> 8 & 255;\n var intB = value & 255;\n return [utils_1.sRGBToLinear(intR), utils_1.sRGBToLinear(intG), utils_1.sRGBToLinear(intB)];\n};\n\nvar decodeAC = function decodeAC(value, maximumValue) {\n var quantR = Math.floor(value / (19 * 19));\n var quantG = Math.floor(value / 19) % 19;\n var quantB = value % 19;\n var rgb = [utils_1.signPow((quantR - 9) / 9, 2.0) * maximumValue, utils_1.signPow((quantG - 9) / 9, 2.0) * maximumValue, utils_1.signPow((quantB - 9) / 9, 2.0) * maximumValue];\n return rgb;\n};\n\nvar decode = function decode(blurhash, width, height, punch) {\n validateBlurhash(blurhash);\n punch = punch | 1;\n var sizeFlag = base83_1.decode83(blurhash[0]);\n var numY = Math.floor(sizeFlag / 9) + 1;\n var numX = sizeFlag % 9 + 1;\n var quantisedMaximumValue = base83_1.decode83(blurhash[1]);\n var maximumValue = (quantisedMaximumValue + 1) / 166;\n var colors = new Array(numX * numY);\n\n for (var i = 0; i < colors.length; i++) {\n if (i === 0) {\n var value = base83_1.decode83(blurhash.substring(2, 6));\n colors[i] = decodeDC(value);\n } else {\n var value = base83_1.decode83(blurhash.substring(4 + i * 2, 6 + i * 2));\n colors[i] = decodeAC(value, maximumValue * punch);\n }\n }\n\n var bytesPerRow = width * 4;\n var pixels = new Uint8ClampedArray(bytesPerRow * height);\n\n for (var y = 0; y < height; y++) {\n for (var x = 0; x < width; x++) {\n var r = 0;\n var g = 0;\n var b = 0;\n\n for (var j = 0; j < numY; j++) {\n for (var i = 0; i < numX; i++) {\n var basis = Math.cos(Math.PI * x * i / width) * Math.cos(Math.PI * y * j / height);\n var color = colors[i + j * numX];\n r += color[0] * basis;\n g += color[1] * basis;\n b += color[2] * basis;\n }\n }\n\n var intR = utils_1.linearTosRGB(r);\n var intG = utils_1.linearTosRGB(g);\n var intB = utils_1.linearTosRGB(b);\n pixels[4 * x + 0 + y * bytesPerRow] = intR;\n pixels[4 * x + 1 + y * bytesPerRow] = intG;\n pixels[4 * x + 2 + y * bytesPerRow] = intB;\n pixels[4 * x + 3 + y * bytesPerRow] = 255; // alpha\n }\n }\n\n return pixels;\n};\n\nexports.default = decode;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar base83_1 = require(\"./base83\");\n\nvar utils_1 = require(\"./utils\");\n\nvar error_1 = require(\"./error\");\n\nvar bytesPerPixel = 4;\n\nvar multiplyBasisFunction = function multiplyBasisFunction(pixels, width, height, basisFunction) {\n var r = 0;\n var g = 0;\n var b = 0;\n var bytesPerRow = width * bytesPerPixel;\n\n for (var x = 0; x < width; x++) {\n for (var y = 0; y < height; y++) {\n var basis = basisFunction(x, y);\n r += basis * utils_1.sRGBToLinear(pixels[bytesPerPixel * x + 0 + y * bytesPerRow]);\n g += basis * utils_1.sRGBToLinear(pixels[bytesPerPixel * x + 1 + y * bytesPerRow]);\n b += basis * utils_1.sRGBToLinear(pixels[bytesPerPixel * x + 2 + y * bytesPerRow]);\n }\n }\n\n var scale = 1 / (width * height);\n return [r * scale, g * scale, b * scale];\n};\n\nvar encodeDC = function encodeDC(value) {\n var roundedR = utils_1.linearTosRGB(value[0]);\n var roundedG = utils_1.linearTosRGB(value[1]);\n var roundedB = utils_1.linearTosRGB(value[2]);\n return (roundedR << 16) + (roundedG << 8) + roundedB;\n};\n\nvar encodeAC = function encodeAC(value, maximumValue) {\n var quantR = Math.floor(Math.max(0, Math.min(18, Math.floor(utils_1.signPow(value[0] / maximumValue, 0.5) * 9 + 9.5))));\n var quantG = Math.floor(Math.max(0, Math.min(18, Math.floor(utils_1.signPow(value[1] / maximumValue, 0.5) * 9 + 9.5))));\n var quantB = Math.floor(Math.max(0, Math.min(18, Math.floor(utils_1.signPow(value[2] / maximumValue, 0.5) * 9 + 9.5))));\n return quantR * 19 * 19 + quantG * 19 + quantB;\n};\n\nvar encode = function encode(pixels, width, height, componentX, componentY) {\n if (componentX < 1 || componentX > 9 || componentY < 1 || componentY > 9) {\n throw new error_1.ValidationError(\"BlurHash must have between 1 and 9 components\");\n }\n\n if (width * height * 4 !== pixels.length) {\n throw new error_1.ValidationError(\"Width and height must match the pixels array\");\n }\n\n var factors = [];\n\n var _loop_1 = function _loop_1(y) {\n var _loop_2 = function _loop_2(x) {\n var normalisation = x == 0 && y == 0 ? 1 : 2;\n var factor = multiplyBasisFunction(pixels, width, height, function (i, j) {\n return normalisation * Math.cos(Math.PI * x * i / width) * Math.cos(Math.PI * y * j / height);\n });\n factors.push(factor);\n };\n\n for (var x = 0; x < componentX; x++) {\n _loop_2(x);\n }\n };\n\n for (var y = 0; y < componentY; y++) {\n _loop_1(y);\n }\n\n var dc = factors[0];\n var ac = factors.slice(1);\n var hash = \"\";\n var sizeFlag = componentX - 1 + (componentY - 1) * 9;\n hash += base83_1.encode83(sizeFlag, 1);\n var maximumValue;\n\n if (ac.length > 0) {\n var actualMaximumValue = Math.max.apply(Math, ac.map(function (val) {\n return Math.max.apply(Math, val);\n }));\n var quantisedMaximumValue = Math.floor(Math.max(0, Math.min(82, Math.floor(actualMaximumValue * 166 - 0.5))));\n maximumValue = (quantisedMaximumValue + 1) / 166;\n hash += base83_1.encode83(quantisedMaximumValue, 1);\n } else {\n maximumValue = 1;\n hash += base83_1.encode83(0, 1);\n }\n\n hash += base83_1.encode83(encodeDC(dc), 4);\n ac.forEach(function (factor) {\n hash += base83_1.encode83(encodeAC(factor, maximumValue), 2);\n });\n return hash;\n};\n\nexports.default = encode;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getDomTreeShapes = getDomTreeShapes;\nexports.findNativeHandler = findNativeHandler;\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _warning = _interopRequireDefault(require(\"warning\"));\n\nvar _properties = _interopRequireDefault(require(\"dom-helpers/transition/properties\"));\n\nvar _on = _interopRequireDefault(require(\"dom-helpers/events/on\"));\n\nvar _off = _interopRequireDefault(require(\"dom-helpers/events/off\"));\n\nvar _reactSwipeableViewsCore = require(\"react-swipeable-views-core\");\n\nfunction addEventListenerEnhanced(node, event, handler, options) {\n (0, _on.default)(node, event, handler, options);\n return {\n remove: function remove() {\n (0, _off.default)(node, event, handler, options);\n }\n };\n}\n\nvar styles = {\n container: {\n direction: 'ltr',\n display: 'flex',\n willChange: 'transform'\n },\n slide: {\n width: '100%',\n WebkitFlexShrink: 0,\n flexShrink: 0,\n overflow: 'auto'\n }\n};\nvar axisProperties = {\n root: {\n x: {\n overflowX: 'hidden'\n },\n 'x-reverse': {\n overflowX: 'hidden'\n },\n y: {\n overflowY: 'hidden'\n },\n 'y-reverse': {\n overflowY: 'hidden'\n }\n },\n flexDirection: {\n x: 'row',\n 'x-reverse': 'row-reverse',\n y: 'column',\n 'y-reverse': 'column-reverse'\n },\n transform: {\n x: function x(translate) {\n return \"translate(\".concat(-translate, \"%, 0)\");\n },\n 'x-reverse': function xReverse(translate) {\n return \"translate(\".concat(translate, \"%, 0)\");\n },\n y: function y(translate) {\n return \"translate(0, \".concat(-translate, \"%)\");\n },\n 'y-reverse': function yReverse(translate) {\n return \"translate(0, \".concat(translate, \"%)\");\n }\n },\n length: {\n x: 'width',\n 'x-reverse': 'width',\n y: 'height',\n 'y-reverse': 'height'\n },\n rotationMatrix: {\n x: {\n x: [1, 0],\n y: [0, 1]\n },\n 'x-reverse': {\n x: [-1, 0],\n y: [0, 1]\n },\n y: {\n x: [0, 1],\n y: [1, 0]\n },\n 'y-reverse': {\n x: [0, -1],\n y: [1, 0]\n }\n },\n scrollPosition: {\n x: 'scrollLeft',\n 'x-reverse': 'scrollLeft',\n y: 'scrollTop',\n 'y-reverse': 'scrollTop'\n },\n scrollLength: {\n x: 'scrollWidth',\n 'x-reverse': 'scrollWidth',\n y: 'scrollHeight',\n 'y-reverse': 'scrollHeight'\n },\n clientLength: {\n x: 'clientWidth',\n 'x-reverse': 'clientWidth',\n y: 'clientHeight',\n 'y-reverse': 'clientHeight'\n }\n};\n\nfunction createTransition(property, options) {\n var duration = options.duration,\n easeFunction = options.easeFunction,\n delay = options.delay;\n return \"\".concat(property, \" \").concat(duration, \" \").concat(easeFunction, \" \").concat(delay);\n} // We are using a 2x2 rotation matrix.\n\n\nfunction applyRotationMatrix(touch, axis) {\n var rotationMatrix = axisProperties.rotationMatrix[axis];\n return {\n pageX: rotationMatrix.x[0] * touch.pageX + rotationMatrix.x[1] * touch.pageY,\n pageY: rotationMatrix.y[0] * touch.pageX + rotationMatrix.y[1] * touch.pageY\n };\n}\n\nfunction adaptMouse(event) {\n event.touches = [{\n pageX: event.pageX,\n pageY: event.pageY\n }];\n return event;\n}\n\nfunction getDomTreeShapes(element, rootNode) {\n var domTreeShapes = [];\n\n while (element && element !== rootNode) {\n // We reach a Swipeable View, no need to look higher in the dom tree.\n if (element.hasAttribute('data-swipeable')) {\n break;\n }\n\n var style = window.getComputedStyle(element);\n\n if ( // Ignore the scroll children if the element is absolute positioned.\n style.getPropertyValue('position') === 'absolute' || // Ignore the scroll children if the element has an overflowX hidden\n style.getPropertyValue('overflow-x') === 'hidden') {\n domTreeShapes = [];\n } else if (element.clientWidth > 0 && element.scrollWidth > element.clientWidth || element.clientHeight > 0 && element.scrollHeight > element.clientHeight) {\n // Ignore the nodes that have no width.\n // Keep elements with a scroll\n domTreeShapes.push({\n element: element,\n scrollWidth: element.scrollWidth,\n scrollHeight: element.scrollHeight,\n clientWidth: element.clientWidth,\n clientHeight: element.clientHeight,\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n });\n }\n\n element = element.parentNode;\n }\n\n return domTreeShapes;\n} // We can only have one node at the time claiming ownership for handling the swipe.\n// Otherwise, the UX would be confusing.\n// That's why we use a singleton here.\n\n\nvar nodeWhoClaimedTheScroll = null;\n\nfunction findNativeHandler(params) {\n var domTreeShapes = params.domTreeShapes,\n pageX = params.pageX,\n startX = params.startX,\n axis = params.axis;\n return domTreeShapes.some(function (shape) {\n // Determine if we are going backward or forward.\n var goingForward = pageX >= startX;\n\n if (axis === 'x' || axis === 'y') {\n goingForward = !goingForward;\n }\n\n var scrollPosition = shape[axisProperties.scrollPosition[axis]];\n var areNotAtStart = scrollPosition > 0;\n var areNotAtEnd = scrollPosition + shape[axisProperties.clientLength[axis]] < shape[axisProperties.scrollLength[axis]];\n\n if (goingForward && areNotAtEnd || !goingForward && areNotAtStart) {\n nodeWhoClaimedTheScroll = shape.element;\n return true;\n }\n\n return false;\n });\n}\n\nvar SwipeableViews =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inherits2.default)(SwipeableViews, _React$Component);\n\n function SwipeableViews(props) {\n var _this;\n\n (0, _classCallCheck2.default)(this, SwipeableViews);\n _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(SwipeableViews).call(this, props));\n _this.rootNode = null;\n _this.containerNode = null;\n _this.ignoreNextScrollEvents = false;\n _this.viewLength = 0;\n _this.startX = 0;\n _this.lastX = 0;\n _this.vx = 0;\n _this.startY = 0;\n _this.isSwiping = undefined;\n _this.started = false;\n _this.startIndex = 0;\n _this.resizeListener = null;\n _this.transitionListener = null;\n _this.touchMoveListener = null;\n _this.activeSlide = null;\n _this.indexCurrent = null;\n _this.firstRenderTimeout = null;\n\n _this.setRootNode = function (node) {\n _this.rootNode = node;\n };\n\n _this.setContainerNode = function (node) {\n _this.containerNode = node;\n };\n\n _this.setActiveSlide = function (node) {\n _this.activeSlide = node;\n\n _this.updateHeight();\n };\n\n _this.handleSwipeStart = function (event) {\n var axis = _this.props.axis;\n var touch = applyRotationMatrix(event.touches[0], axis);\n var rootStyle = window.getComputedStyle(_this.rootNode);\n _this.viewLength = _this.rootNode.getBoundingClientRect()[axisProperties.length[axis]] - parseInt(rootStyle.paddingLeft, 10) - parseInt(rootStyle.paddingRight, 10);\n _this.startX = touch.pageX;\n _this.lastX = touch.pageX;\n _this.vx = 0;\n _this.startY = touch.pageY;\n _this.isSwiping = undefined;\n _this.started = true;\n var computedStyle = window.getComputedStyle(_this.containerNode);\n var transform = computedStyle.getPropertyValue('-webkit-transform') || computedStyle.getPropertyValue('transform');\n\n if (transform && transform !== 'none') {\n var transformValues = transform.split('(')[1].split(')')[0].split(',');\n var tranformNormalized = applyRotationMatrix({\n pageX: parseInt(transformValues[4], 10),\n pageY: parseInt(transformValues[5], 10)\n }, axis);\n _this.startIndex = -tranformNormalized.pageX / _this.viewLength || 0;\n }\n };\n\n _this.handleSwipeMove = function (event) {\n // The touch start event can be cancel.\n // Makes sure we set a starting point.\n if (!_this.started) {\n _this.handleTouchStart(event);\n\n return;\n } // We are not supposed to hanlde this touch move.\n\n\n if (nodeWhoClaimedTheScroll !== null && nodeWhoClaimedTheScroll !== _this.rootNode) {\n return;\n }\n\n var _this$props = _this.props,\n axis = _this$props.axis,\n children = _this$props.children,\n ignoreNativeScroll = _this$props.ignoreNativeScroll,\n onSwitching = _this$props.onSwitching,\n resistance = _this$props.resistance;\n var touch = applyRotationMatrix(event.touches[0], axis); // We don't know yet.\n\n if (_this.isSwiping === undefined) {\n var dx = Math.abs(touch.pageX - _this.startX);\n var dy = Math.abs(touch.pageY - _this.startY);\n var isSwiping = dx > dy && dx > _reactSwipeableViewsCore.constant.UNCERTAINTY_THRESHOLD; // We let the parent handle the scroll.\n\n if (!resistance && (axis === 'y' || axis === 'y-reverse') && (_this.indexCurrent === 0 && _this.startX < touch.pageX || _this.indexCurrent === _react.default.Children.count(_this.props.children) - 1 && _this.startX > touch.pageX)) {\n _this.isSwiping = false;\n return;\n } // We are likely to be swiping, let's prevent the scroll event.\n\n\n if (dx > dy && event.cancelable) {\n event.preventDefault();\n }\n\n if (isSwiping === true || dy > _reactSwipeableViewsCore.constant.UNCERTAINTY_THRESHOLD) {\n _this.isSwiping = isSwiping;\n _this.startX = touch.pageX; // Shift the starting point.\n\n return; // Let's wait the next touch event to move something.\n }\n }\n\n if (_this.isSwiping !== true) {\n return;\n } // We are swiping, let's prevent the scroll event.\n\n\n if (event.cancelable) {\n event.preventDefault();\n } // Low Pass filter.\n\n\n _this.vx = _this.vx * 0.5 + (touch.pageX - _this.lastX) * 0.5;\n _this.lastX = touch.pageX;\n\n var _computeIndex = (0, _reactSwipeableViewsCore.computeIndex)({\n children: children,\n resistance: resistance,\n pageX: touch.pageX,\n startIndex: _this.startIndex,\n startX: _this.startX,\n viewLength: _this.viewLength\n }),\n index = _computeIndex.index,\n startX = _computeIndex.startX; // Add support for native scroll elements.\n\n\n if (nodeWhoClaimedTheScroll === null && !ignoreNativeScroll) {\n var domTreeShapes = getDomTreeShapes(event.target, _this.rootNode);\n var hasFoundNativeHandler = findNativeHandler({\n domTreeShapes: domTreeShapes,\n startX: _this.startX,\n pageX: touch.pageX,\n axis: axis\n }); // We abort the touch move handler.\n\n if (hasFoundNativeHandler) {\n return;\n }\n } // We are moving toward the edges.\n\n\n if (startX) {\n _this.startX = startX;\n } else if (nodeWhoClaimedTheScroll === null) {\n nodeWhoClaimedTheScroll = _this.rootNode;\n }\n\n _this.setIndexCurrent(index);\n\n var callback = function callback() {\n if (onSwitching) {\n onSwitching(index, 'move');\n }\n };\n\n if (_this.state.displaySameSlide || !_this.state.isDragging) {\n _this.setState({\n displaySameSlide: false,\n isDragging: true\n }, callback);\n }\n\n callback();\n };\n\n _this.handleSwipeEnd = function () {\n nodeWhoClaimedTheScroll = null; // The touch start event can be cancel.\n // Makes sure that a starting point is set.\n\n if (!_this.started) {\n return;\n }\n\n _this.started = false;\n\n if (_this.isSwiping !== true) {\n return;\n }\n\n var indexLatest = _this.state.indexLatest;\n var indexCurrent = _this.indexCurrent;\n var delta = indexLatest - indexCurrent;\n var indexNew; // Quick movement\n\n if (Math.abs(_this.vx) > _this.props.threshold) {\n if (_this.vx > 0) {\n indexNew = Math.floor(indexCurrent);\n } else {\n indexNew = Math.ceil(indexCurrent);\n }\n } else if (Math.abs(delta) > _this.props.hysteresis) {\n // Some hysteresis with indexLatest.\n indexNew = delta > 0 ? Math.floor(indexCurrent) : Math.ceil(indexCurrent);\n } else {\n indexNew = indexLatest;\n }\n\n var indexMax = _react.default.Children.count(_this.props.children) - 1;\n\n if (indexNew < 0) {\n indexNew = 0;\n } else if (indexNew > indexMax) {\n indexNew = indexMax;\n }\n\n _this.setIndexCurrent(indexNew);\n\n _this.setState({\n indexLatest: indexNew,\n isDragging: false\n }, function () {\n if (_this.props.onSwitching) {\n _this.props.onSwitching(indexNew, 'end');\n }\n\n if (_this.props.onChangeIndex && indexNew !== indexLatest) {\n _this.props.onChangeIndex(indexNew, indexLatest, {\n reason: 'swipe'\n });\n } // Manually calling handleTransitionEnd in that case as isn't otherwise.\n\n\n if (indexCurrent === indexLatest) {\n _this.handleTransitionEnd();\n }\n });\n };\n\n _this.handleTouchStart = function (event) {\n if (_this.props.onTouchStart) {\n var shouldReturn = _this.props.onTouchStart(event);\n\n if (shouldReturn) {\n return;\n }\n }\n\n _this.handleSwipeStart(event);\n };\n\n _this.handleTouchEnd = function (event) {\n if (_this.props.onTouchEnd) {\n _this.props.onTouchEnd(event);\n }\n\n _this.handleSwipeEnd(event);\n };\n\n _this.handleMouseDown = function (event) {\n if (_this.props.onMouseDown) {\n _this.props.onMouseDown(event);\n }\n\n event.persist();\n\n _this.handleSwipeStart(adaptMouse(event));\n };\n\n _this.handleMouseUp = function (event) {\n if (_this.props.onMouseUp) {\n _this.props.onMouseUp(event);\n }\n\n _this.handleSwipeEnd(adaptMouse(event));\n };\n\n _this.handleMouseLeave = function (event) {\n if (_this.props.onMouseLeave) {\n _this.props.onMouseLeave(event);\n } // Filter out events\n\n\n if (_this.started) {\n _this.handleSwipeEnd(adaptMouse(event));\n }\n };\n\n _this.handleMouseMove = function (event) {\n if (_this.props.onMouseMove) {\n _this.props.onMouseMove(event);\n } // Filter out events\n\n\n if (_this.started) {\n _this.handleSwipeMove(adaptMouse(event));\n }\n };\n\n _this.handleScroll = function (event) {\n if (_this.props.onScroll) {\n _this.props.onScroll(event);\n } // Ignore events bubbling up.\n\n\n if (event.target !== _this.rootNode) {\n return;\n }\n\n if (_this.ignoreNextScrollEvents) {\n _this.ignoreNextScrollEvents = false;\n return;\n }\n\n var indexLatest = _this.state.indexLatest;\n var indexNew = Math.ceil(event.target.scrollLeft / event.target.clientWidth) + indexLatest;\n _this.ignoreNextScrollEvents = true; // Reset the scroll position.\n\n event.target.scrollLeft = 0;\n\n if (_this.props.onChangeIndex && indexNew !== indexLatest) {\n _this.props.onChangeIndex(indexNew, indexLatest, {\n reason: 'focus'\n });\n }\n };\n\n _this.updateHeight = function () {\n if (_this.activeSlide !== null) {\n var child = _this.activeSlide.children[0];\n\n if (child !== undefined && child.offsetHeight !== undefined && _this.state.heightLatest !== child.offsetHeight) {\n _this.setState({\n heightLatest: child.offsetHeight\n });\n }\n }\n };\n\n if (process.env.NODE_ENV !== 'production') {\n (0, _reactSwipeableViewsCore.checkIndexBounds)(props);\n }\n\n _this.state = {\n indexLatest: props.index,\n // Set to true as soon as the component is swiping.\n // It's the state counter part of this.isSwiping.\n isDragging: false,\n // Help with SSR logic and lazy loading logic.\n renderOnlyActive: !props.disableLazyLoading,\n heightLatest: 0,\n // Let the render method that we are going to display the same slide than previously.\n displaySameSlide: true\n };\n\n _this.setIndexCurrent(props.index);\n\n return _this;\n }\n\n (0, _createClass2.default)(SwipeableViews, [{\n key: \"getChildContext\",\n value: function getChildContext() {\n var _this2 = this;\n\n return {\n swipeableViews: {\n slideUpdateHeight: function slideUpdateHeight() {\n _this2.updateHeight();\n }\n }\n };\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this3 = this; // Subscribe to resize events and update height if animateHeight param is set.\n\n\n this.resizeListener = addEventListenerEnhanced(window, 'resize', function () {\n if (!_this3.props.animateHeight) {\n return;\n }\n\n _this3.updateHeight();\n }); // Subscribe to transition end events.\n\n this.transitionListener = addEventListenerEnhanced(this.containerNode, _properties.default.end, function (event) {\n if (event.target !== _this3.containerNode) {\n return;\n }\n\n _this3.handleTransitionEnd();\n }); // Block the thread to handle that event.\n\n this.touchMoveListener = addEventListenerEnhanced(this.rootNode, 'touchmove', function (event) {\n // Handling touch events is disabled.\n if (_this3.props.disabled) {\n return;\n }\n\n _this3.handleSwipeMove(event);\n }, {\n passive: false\n });\n\n if (!this.props.disableLazyLoading) {\n this.firstRenderTimeout = setTimeout(function () {\n _this3.setState({\n renderOnlyActive: false\n });\n }, 0);\n } // Send all functions in an object if action param is set.\n\n\n if (this.props.action) {\n this.props.action({\n updateHeight: this.updateHeight\n });\n }\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n var index = nextProps.index;\n\n if (typeof index === 'number' && index !== this.props.index) {\n if (process.env.NODE_ENV !== 'production') {\n (0, _reactSwipeableViewsCore.checkIndexBounds)(nextProps);\n }\n\n this.setIndexCurrent(index);\n this.setState({\n // If true, we are going to change the children. We shoudn't animate it.\n displaySameSlide: (0, _reactSwipeableViewsCore.getDisplaySameSlide)(this.props, nextProps),\n indexLatest: index\n });\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n // If animateHeight is on\n // and has changed children, readjust height\n var _this$props2 = this.props,\n animateHeight = _this$props2.animateHeight,\n children = _this$props2.children;\n\n if (animateHeight === true && prevProps.children !== children) {\n this.updateHeight();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.resizeListener.remove();\n this.transitionListener.remove();\n this.touchMoveListener.remove();\n clearTimeout(this.firstRenderTimeout);\n }\n }, {\n key: \"setIndexCurrent\",\n value: function setIndexCurrent(indexCurrent) {\n if (!this.props.animateTransitions && this.indexCurrent !== indexCurrent) {\n this.handleTransitionEnd();\n }\n\n this.indexCurrent = indexCurrent;\n\n if (this.containerNode) {\n var axis = this.props.axis;\n var transform = axisProperties.transform[axis](indexCurrent * 100);\n this.containerNode.style.WebkitTransform = transform;\n this.containerNode.style.transform = transform; // Prevent animation jumping before DOM is updated\n\n this.containerNode.style.transition = 'all 0s ease 0s';\n }\n }\n }, {\n key: \"UNSAFE_componentWillReceiveProps\",\n value: function UNSAFE_componentWillReceiveProps(nextProps) {\n var index = nextProps.index;\n\n if (typeof index === 'number' && index !== this.props.index) {\n if (process.env.NODE_ENV !== 'production') {\n (0, _reactSwipeableViewsCore.checkIndexBounds)(nextProps);\n }\n\n this.setIndexCurrent(index);\n this.setState({\n // If true, we are going to change the children. We shoudn't animate it.\n displaySameSlide: (0, _reactSwipeableViewsCore.getDisplaySameSlide)(this.props, nextProps),\n indexLatest: index\n });\n }\n }\n }, {\n key: \"handleTransitionEnd\",\n value: function handleTransitionEnd() {\n if (!this.props.onTransitionEnd) {\n return;\n } // Filters out when changing the children\n\n\n if (this.state.displaySameSlide) {\n return;\n } // The rest callback is triggered when swiping. It's just noise.\n // We filter it out.\n\n\n if (!this.state.isDragging) {\n this.props.onTransitionEnd();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n var _this$props3 = this.props,\n action = _this$props3.action,\n animateHeight = _this$props3.animateHeight,\n animateTransitions = _this$props3.animateTransitions,\n axis = _this$props3.axis,\n children = _this$props3.children,\n containerStyleProp = _this$props3.containerStyle,\n disabled = _this$props3.disabled,\n disableLazyLoading = _this$props3.disableLazyLoading,\n enableMouseEvents = _this$props3.enableMouseEvents,\n hysteresis = _this$props3.hysteresis,\n ignoreNativeScroll = _this$props3.ignoreNativeScroll,\n index = _this$props3.index,\n onChangeIndex = _this$props3.onChangeIndex,\n onSwitching = _this$props3.onSwitching,\n onTransitionEnd = _this$props3.onTransitionEnd,\n resistance = _this$props3.resistance,\n slideStyleProp = _this$props3.slideStyle,\n slideClassName = _this$props3.slideClassName,\n springConfig = _this$props3.springConfig,\n style = _this$props3.style,\n threshold = _this$props3.threshold,\n other = (0, _objectWithoutProperties2.default)(_this$props3, [\"action\", \"animateHeight\", \"animateTransitions\", \"axis\", \"children\", \"containerStyle\", \"disabled\", \"disableLazyLoading\", \"enableMouseEvents\", \"hysteresis\", \"ignoreNativeScroll\", \"index\", \"onChangeIndex\", \"onSwitching\", \"onTransitionEnd\", \"resistance\", \"slideStyle\", \"slideClassName\", \"springConfig\", \"style\", \"threshold\"]);\n var _this$state = this.state,\n displaySameSlide = _this$state.displaySameSlide,\n heightLatest = _this$state.heightLatest,\n indexLatest = _this$state.indexLatest,\n isDragging = _this$state.isDragging,\n renderOnlyActive = _this$state.renderOnlyActive;\n var touchEvents = !disabled ? {\n onTouchStart: this.handleTouchStart,\n onTouchEnd: this.handleTouchEnd\n } : {};\n var mouseEvents = !disabled && enableMouseEvents ? {\n onMouseDown: this.handleMouseDown,\n onMouseUp: this.handleMouseUp,\n onMouseLeave: this.handleMouseLeave,\n onMouseMove: this.handleMouseMove\n } : {}; // There is no point to animate if we are already providing a height.\n\n process.env.NODE_ENV !== \"production\" ? (0, _warning.default)(!animateHeight || !containerStyleProp || !containerStyleProp.height, \"react-swipeable-view: You are setting animateHeight to true but you are\\nalso providing a custom height.\\nThe custom height has a higher priority than the animateHeight property.\\nSo animateHeight is most likely having no effect at all.\") : void 0;\n var slideStyle = (0, _extends2.default)({}, styles.slide, slideStyleProp);\n var transition;\n var WebkitTransition;\n\n if (isDragging || !animateTransitions || displaySameSlide) {\n transition = 'all 0s ease 0s';\n WebkitTransition = 'all 0s ease 0s';\n } else {\n transition = createTransition('transform', springConfig);\n WebkitTransition = createTransition('-webkit-transform', springConfig);\n\n if (heightLatest !== 0) {\n var additionalTranstion = \", \".concat(createTransition('height', springConfig));\n transition += additionalTranstion;\n WebkitTransition += additionalTranstion;\n }\n }\n\n var containerStyle = {\n height: null,\n WebkitFlexDirection: axisProperties.flexDirection[axis],\n flexDirection: axisProperties.flexDirection[axis],\n WebkitTransition: WebkitTransition,\n transition: transition\n }; // Overwrite transition set directly to the ref in this.setIndexCurrent\n\n if (this.containerNode) {\n this.containerNode.style.transition = transition;\n } // Apply the styles for SSR considerations\n\n\n if (!renderOnlyActive) {\n var transform = axisProperties.transform[axis](this.indexCurrent * 100);\n containerStyle.WebkitTransform = transform;\n containerStyle.transform = transform;\n }\n\n if (animateHeight) {\n containerStyle.height = heightLatest;\n }\n\n return _react.default.createElement(\"div\", (0, _extends2.default)({\n ref: this.setRootNode,\n style: (0, _extends2.default)({}, axisProperties.root[axis], style)\n }, other, touchEvents, mouseEvents, {\n onScroll: this.handleScroll\n }), _react.default.createElement(\"div\", {\n ref: this.setContainerNode,\n style: (0, _extends2.default)({}, containerStyle, styles.container, containerStyleProp),\n className: \"react-swipeable-view-container\"\n }, _react.default.Children.map(children, function (child, indexChild) {\n if (renderOnlyActive && indexChild !== indexLatest) {\n return null;\n }\n\n process.env.NODE_ENV !== \"production\" ? (0, _warning.default)(_react.default.isValidElement(child), \"react-swipeable-view: one of the children provided is invalid: \".concat(child, \".\\nWe are expecting a valid React Element\")) : void 0;\n var ref;\n var hidden = true;\n\n if (indexChild === indexLatest) {\n hidden = false;\n\n if (animateHeight) {\n ref = _this4.setActiveSlide;\n slideStyle.overflowY = 'hidden';\n }\n }\n\n return _react.default.createElement(\"div\", {\n ref: ref,\n style: slideStyle,\n className: slideClassName,\n \"aria-hidden\": hidden,\n \"data-swipeable\": \"true\"\n }, child);\n })));\n }\n }]);\n return SwipeableViews;\n}(_react.default.Component); // Added as an ads for people using the React dev tools in production.\n// So they know, the tool used to build the awesome UI they\n// are looking at/retro engineering.\n\n\nSwipeableViews.displayName = 'ReactSwipableView';\nSwipeableViews.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * This is callback property. It's called by the component on mount.\n * This is useful when you want to trigger an action programmatically.\n * It currently only supports updateHeight() action.\n *\n * @param {object} actions This object contains all posible actions\n * that can be triggered programmatically.\n */\n action: _propTypes.default.func,\n\n /**\n * If `true`, the height of the container will be animated to match the current slide height.\n * Animating another style property has a negative impact regarding performance.\n */\n animateHeight: _propTypes.default.bool,\n\n /**\n * If `false`, changes to the index prop will not cause an animated transition.\n */\n animateTransitions: _propTypes.default.bool,\n\n /**\n * The axis on which the slides will slide.\n */\n axis: _propTypes.default.oneOf(['x', 'x-reverse', 'y', 'y-reverse']),\n\n /**\n * Use this property to provide your slides.\n */\n children: _propTypes.default.node.isRequired,\n\n /**\n * This is the inlined style that will be applied\n * to each slide container.\n */\n containerStyle: _propTypes.default.object,\n\n /**\n * If `true`, it will disable touch events.\n * This is useful when you want to prohibit the user from changing slides.\n */\n disabled: _propTypes.default.bool,\n\n /**\n * This is the config used to disable lazyloding,\n * if `true` will render all the views in first rendering.\n */\n disableLazyLoading: _propTypes.default.bool,\n\n /**\n * If `true`, it will enable mouse events.\n * This will allow the user to perform the relevant swipe actions with a mouse.\n */\n enableMouseEvents: _propTypes.default.bool,\n\n /**\n * Configure hysteresis between slides. This value determines how far\n * should user swipe to switch slide.\n */\n hysteresis: _propTypes.default.number,\n\n /**\n * If `true`, it will ignore native scroll container.\n * It can be used to filter out false positive that blocks the swipe.\n */\n ignoreNativeScroll: _propTypes.default.bool,\n\n /**\n * This is the index of the slide to show.\n * This is useful when you want to change the default slide shown.\n * Or when you have tabs linked to each slide.\n */\n index: _propTypes.default.number,\n\n /**\n * This is callback prop. It's call by the\n * component when the shown slide change after a swipe made by the user.\n * This is useful when you have tabs linked to each slide.\n *\n * @param {integer} index This is the current index of the slide.\n * @param {integer} indexLatest This is the oldest index of the slide.\n * @param {object} meta Meta data containing more information about the event.\n */\n onChangeIndex: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onMouseDown: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onMouseLeave: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onMouseMove: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onMouseUp: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onScroll: _propTypes.default.func,\n\n /**\n * This is callback prop. It's called by the\n * component when the slide switching.\n * This is useful when you want to implement something corresponding\n * to the current slide position.\n *\n * @param {integer} index This is the current index of the slide.\n * @param {string} type Can be either `move` or `end`.\n */\n onSwitching: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onTouchEnd: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onTouchMove: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onTouchStart: _propTypes.default.func,\n\n /**\n * The callback that fires when the animation comes to a rest.\n * This is useful to defer CPU intensive task.\n */\n onTransitionEnd: _propTypes.default.func,\n\n /**\n * If `true`, it will add bounds effect on the edges.\n */\n resistance: _propTypes.default.bool,\n\n /**\n * This is the className that will be applied\n * on the slide component.\n */\n slideClassName: _propTypes.default.string,\n\n /**\n * This is the inlined style that will be applied\n * on the slide component.\n */\n slideStyle: _propTypes.default.object,\n\n /**\n * This is the config used to create CSS transitions.\n * This is useful to change the dynamic of the transition.\n */\n springConfig: _propTypes.default.shape({\n delay: _propTypes.default.string,\n duration: _propTypes.default.string,\n easeFunction: _propTypes.default.string\n }),\n\n /**\n * This is the inlined style that will be applied\n * on the root component.\n */\n style: _propTypes.default.object,\n\n /**\n * This is the threshold used for detecting a quick swipe.\n * If the computed speed is above this value, the index change.\n */\n threshold: _propTypes.default.number\n} : {};\nSwipeableViews.defaultProps = {\n animateHeight: false,\n animateTransitions: true,\n axis: 'x',\n disabled: false,\n disableLazyLoading: false,\n enableMouseEvents: false,\n hysteresis: 0.6,\n ignoreNativeScroll: false,\n index: 0,\n threshold: 5,\n springConfig: {\n duration: '0.35s',\n easeFunction: 'cubic-bezier(0.15, 0.3, 0.25, 1)',\n delay: '0s'\n },\n resistance: false\n};\nSwipeableViews.childContextTypes = {\n swipeableViews: _propTypes.default.shape({\n slideUpdateHeight: _propTypes.default.func\n })\n};\nvar _default = SwipeableViews;\nexports.default = _default;","function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"checkIndexBounds\", {\n enumerable: true,\n get: function get() {\n return _checkIndexBounds.default;\n }\n});\nObject.defineProperty(exports, \"computeIndex\", {\n enumerable: true,\n get: function get() {\n return _computeIndex.default;\n }\n});\nObject.defineProperty(exports, \"constant\", {\n enumerable: true,\n get: function get() {\n return _constant.default;\n }\n});\nObject.defineProperty(exports, \"getDisplaySameSlide\", {\n enumerable: true,\n get: function get() {\n return _getDisplaySameSlide.default;\n }\n});\nObject.defineProperty(exports, \"mod\", {\n enumerable: true,\n get: function get() {\n return _mod.default;\n }\n});\n\nvar _checkIndexBounds = _interopRequireDefault(require(\"./checkIndexBounds\"));\n\nvar _computeIndex = _interopRequireDefault(require(\"./computeIndex\"));\n\nvar _constant = _interopRequireDefault(require(\"./constant\"));\n\nvar _getDisplaySameSlide = _interopRequireDefault(require(\"./getDisplaySameSlide\"));\n\nvar _mod = _interopRequireDefault(require(\"./mod\"));","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _warning = _interopRequireDefault(require(\"warning\"));\n\nvar checkIndexBounds = function checkIndexBounds(props) {\n var index = props.index,\n children = props.children;\n\n var childrenCount = _react.default.Children.count(children);\n\n process.env.NODE_ENV !== \"production\" ? (0, _warning.default)(index >= 0 && index <= childrenCount, \"react-swipeable-view: the new index: \".concat(index, \" is out of bounds: [0-\").concat(childrenCount, \"].\")) : void 0;\n};\n\nvar _default = checkIndexBounds;\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = computeIndex;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _constant = _interopRequireDefault(require(\"./constant\"));\n\nfunction computeIndex(params) {\n var children = params.children,\n startIndex = params.startIndex,\n startX = params.startX,\n pageX = params.pageX,\n viewLength = params.viewLength,\n resistance = params.resistance;\n var indexMax = _react.default.Children.count(children) - 1;\n var index = startIndex + (startX - pageX) / viewLength;\n var newStartX;\n\n if (!resistance) {\n // Reset the starting point\n if (index < 0) {\n index = 0;\n newStartX = (index - startIndex) * viewLength + pageX;\n } else if (index > indexMax) {\n index = indexMax;\n newStartX = (index - startIndex) * viewLength + pageX;\n }\n } else if (index < 0) {\n index = Math.exp(index * _constant.default.RESISTANCE_COEF) - 1;\n } else if (index > indexMax) {\n index = indexMax + 1 - Math.exp((indexMax - index) * _constant.default.RESISTANCE_COEF);\n }\n\n return {\n index: index,\n startX: newStartX\n };\n}","'use strict';\n\nvar bind = require('./helpers/bind');\n/*global toString:true*/\n// utils is a library of generic helper functions non-specific to axios\n\n\nvar toString = Object.prototype.toString;\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\n\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\n\n\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\n\n\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\n\n\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\n\n\nfunction isFormData(val) {\n return typeof FormData !== 'undefined' && val instanceof FormData;\n}\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\n\n\nfunction isArrayBufferView(val) {\n var result;\n\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n result = ArrayBuffer.isView(val);\n } else {\n result = val && val.buffer && val.buffer instanceof ArrayBuffer;\n }\n\n return result;\n}\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\n\n\nfunction isString(val) {\n return typeof val === 'string';\n}\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\n\n\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\n\n\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\n\n\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\n\n\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\n\n\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\n\n\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\n\n\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\n\n\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\n\n\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\n\n\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || navigator.product === 'NativeScript' || navigator.product === 'NS')) {\n return false;\n }\n\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\n\n\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n } // Force an array if not already something iterable\n\n\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\n\n\nfunction merge()\n/* obj1, obj2, obj3, ... */\n{\n var result = {};\n\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n\n return result;\n}\n/**\n * Function equal to merge with the difference being that no reference\n * to original objects is kept.\n *\n * @see merge\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\n\n\nfunction deepMerge()\n/* obj1, obj2, obj3, ... */\n{\n var result = {};\n\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = deepMerge(result[key], val);\n } else if (typeof val === 'object') {\n result[key] = deepMerge({}, val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n\n return result;\n}\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\n\n\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n deepMerge: deepMerge,\n extend: extend,\n trim: trim\n};","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar getDisplaySameSlide = function getDisplaySameSlide(props, nextProps) {\n var displaySameSlide = false;\n\n var getChildrenKey = function getChildrenKey(child) {\n return child ? child.key : 'empty';\n };\n\n if (props.children.length && nextProps.children.length) {\n var oldKeys = _react.default.Children.map(props.children, getChildrenKey);\n\n var oldKey = oldKeys[props.index];\n\n if (oldKey !== null && oldKey !== undefined) {\n var newKeys = _react.default.Children.map(nextProps.children, getChildrenKey);\n\n var newKey = newKeys[nextProps.index];\n\n if (oldKey === newKey) {\n displaySameSlide = true;\n }\n }\n }\n\n return displaySameSlide;\n};\n\nvar _default = getDisplaySameSlide;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0; // Extended version of % with negative integer support.\n\nfunction mod(n, m) {\n var q = n % m;\n return q < 0 ? q + m : q;\n}\n\nvar _default = mod;\nexports.default = _default;","import React from 'react';\nimport Motion from 'flavours/glitch/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Icon from 'flavours/glitch/components/icon';\n\nexport default class IconButton extends React.PureComponent {\n\n static propTypes = {\n className: PropTypes.string,\n title: PropTypes.string.isRequired,\n icon: PropTypes.string.isRequired,\n onClick: PropTypes.func,\n onMouseDown: PropTypes.func,\n onKeyDown: PropTypes.func,\n onKeyPress: PropTypes.func,\n size: PropTypes.number,\n active: PropTypes.bool,\n pressed: PropTypes.bool,\n expanded: PropTypes.bool,\n style: PropTypes.object,\n activeStyle: PropTypes.object,\n disabled: PropTypes.bool,\n inverted: PropTypes.bool,\n animate: PropTypes.bool,\n overlay: PropTypes.bool,\n tabIndex: PropTypes.string,\n label: PropTypes.string,\n };\n\n static defaultProps = {\n size: 18,\n active: false,\n disabled: false,\n animate: false,\n overlay: false,\n tabIndex: '0',\n };\n\n state = {\n activate: false,\n deactivate: false,\n }\n\n componentWillReceiveProps (nextProps) {\n if (!nextProps.animate) return;\n\n if (this.props.active && !nextProps.active) {\n this.setState({ activate: false, deactivate: true });\n } else if (!this.props.active && nextProps.active) {\n this.setState({ activate: true, deactivate: false });\n }\n }\n\n handleClick = (e) => {\n e.preventDefault();\n\n if (!this.props.disabled) {\n this.props.onClick(e);\n }\n }\n\n handleKeyPress = (e) => {\n if (this.props.onKeyPress && !this.props.disabled) {\n this.props.onKeyPress(e);\n }\n }\n\n handleMouseDown = (e) => {\n if (!this.props.disabled && this.props.onMouseDown) {\n this.props.onMouseDown(e);\n }\n }\n\n handleKeyDown = (e) => {\n if (!this.props.disabled && this.props.onKeyDown) {\n this.props.onKeyDown(e);\n }\n }\n\n render () {\n let style = {\n fontSize: `${this.props.size}px`,\n height: `${this.props.size * 1.28571429}px`,\n lineHeight: `${this.props.size}px`,\n ...this.props.style,\n ...(this.props.active ? this.props.activeStyle : {}),\n };\n if (!this.props.label) {\n style.width = `${this.props.size * 1.28571429}px`;\n } else {\n style.textAlign = 'left';\n }\n\n const {\n active,\n className,\n disabled,\n expanded,\n icon,\n inverted,\n overlay,\n pressed,\n tabIndex,\n title,\n } = this.props;\n\n const {\n activate,\n deactivate,\n } = this.state;\n\n const classes = classNames(className, 'icon-button', {\n active,\n disabled,\n inverted,\n activate,\n deactivate,\n overlayed: overlay,\n });\n\n return (\n <button\n aria-label={title}\n aria-pressed={pressed}\n aria-expanded={expanded}\n title={title}\n className={classes}\n onClick={this.handleClick}\n onMouseDown={this.handleMouseDown}\n onKeyDown={this.handleKeyDown}\n onKeyPress={this.handleKeyPress}\n style={style}\n tabIndex={tabIndex}\n disabled={disabled}\n >\n <Icon id={icon} fixedWidth aria-hidden='true' />\n {this.props.label}\n </button>\n );\n }\n\n}\n","'use strict';\n\nvar printWarning = function printWarning() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function printWarning(format, subs) {\n var index = 0;\n var message = 'Warning: ' + (subs.length > 0 ? format.replace(/%s/g, function () {\n return subs[index++];\n }) : format);\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging history ---\n // This error was thrown as a convenience so that you can use the\n // stack trace to find the callsite that triggered this warning.\n throw new Error(message);\n } catch (e) {}\n };\n}\n\nexport default function (member) {\n printWarning('Please use `import { %s } from \"history\"` instead of `import %s from \"history/es/%s\"`. ' + 'Support for the latter will be removed in the next major release.', [member, member]);\n}","'use strict';\n\nimport warnAboutDeprecatedESMImport from './warnAboutDeprecatedESMImport.js';\nwarnAboutDeprecatedESMImport('createBrowserHistory');\nimport { createBrowserHistory } from '../esm/history.js';\nexport default createBrowserHistory;","/**\n * Copyright (c) 2014-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(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.Immutable = factory();\n})(this, function () {\n 'use strict';\n\n var SLICE$0 = Array.prototype.slice;\n\n function createClass(ctor, superClass) {\n if (superClass) {\n ctor.prototype = Object.create(superClass.prototype);\n }\n\n ctor.prototype.constructor = ctor;\n }\n\n function Iterable(value) {\n return isIterable(value) ? value : Seq(value);\n }\n\n createClass(KeyedIterable, Iterable);\n\n function KeyedIterable(value) {\n return isKeyed(value) ? value : KeyedSeq(value);\n }\n\n createClass(IndexedIterable, Iterable);\n\n function IndexedIterable(value) {\n return isIndexed(value) ? value : IndexedSeq(value);\n }\n\n createClass(SetIterable, Iterable);\n\n function SetIterable(value) {\n return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);\n }\n\n function isIterable(maybeIterable) {\n return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);\n }\n\n function isKeyed(maybeKeyed) {\n return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);\n }\n\n function isIndexed(maybeIndexed) {\n return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);\n }\n\n function isAssociative(maybeAssociative) {\n return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n }\n\n function isOrdered(maybeOrdered) {\n return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);\n }\n\n Iterable.isIterable = isIterable;\n Iterable.isKeyed = isKeyed;\n Iterable.isIndexed = isIndexed;\n Iterable.isAssociative = isAssociative;\n Iterable.isOrdered = isOrdered;\n Iterable.Keyed = KeyedIterable;\n Iterable.Indexed = IndexedIterable;\n Iterable.Set = SetIterable;\n var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'; // Used for setting prototype methods that IE8 chokes on.\n\n var DELETE = 'delete'; // Constants describing the size of trie nodes.\n\n var SHIFT = 5; // Resulted in best performance after ______?\n\n var SIZE = 1 << SHIFT;\n var MASK = SIZE - 1; // A consistent shared value representing \"not set\" which equals nothing other\n // than itself, and nothing that could be provided externally.\n\n var NOT_SET = {}; // Boolean references, Rough equivalent of `bool &`.\n\n var CHANGE_LENGTH = {\n value: false\n };\n var DID_ALTER = {\n value: false\n };\n\n function MakeRef(ref) {\n ref.value = false;\n return ref;\n }\n\n function SetRef(ref) {\n ref && (ref.value = true);\n } // A function which returns a value representing an \"owner\" for transient writes\n // to tries. The return value will only ever equal itself, and will not equal\n // the return of any subsequent call of this function.\n\n\n function OwnerID() {} // http://jsperf.com/copy-array-inline\n\n\n function arrCopy(arr, offset) {\n offset = offset || 0;\n var len = Math.max(0, arr.length - offset);\n var newArr = new Array(len);\n\n for (var ii = 0; ii < len; ii++) {\n newArr[ii] = arr[ii + offset];\n }\n\n return newArr;\n }\n\n function ensureSize(iter) {\n if (iter.size === undefined) {\n iter.size = iter.__iterate(returnTrue);\n }\n\n return iter.size;\n }\n\n function wrapIndex(iter, index) {\n // This implements \"is array index\" which the ECMAString spec defines as:\n //\n // A String property name P is an array index if and only if\n // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal\n // to 2^32−1.\n //\n // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects\n if (typeof index !== 'number') {\n var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32\n\n if ('' + uint32Index !== index || uint32Index === 4294967295) {\n return NaN;\n }\n\n index = uint32Index;\n }\n\n return index < 0 ? ensureSize(iter) + index : index;\n }\n\n function returnTrue() {\n return true;\n }\n\n function wholeSlice(begin, end, size) {\n return (begin === 0 || size !== undefined && begin <= -size) && (end === undefined || size !== undefined && end >= size);\n }\n\n function resolveBegin(begin, size) {\n return resolveIndex(begin, size, 0);\n }\n\n function resolveEnd(end, size) {\n return resolveIndex(end, size, size);\n }\n\n function resolveIndex(index, size, defaultIndex) {\n return index === undefined ? defaultIndex : index < 0 ? Math.max(0, size + index) : size === undefined ? index : Math.min(size, index);\n }\n /* global Symbol */\n\n\n var ITERATE_KEYS = 0;\n var ITERATE_VALUES = 1;\n var ITERATE_ENTRIES = 2;\n var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator';\n var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\n function Iterator(next) {\n this.next = next;\n }\n\n Iterator.prototype.toString = function () {\n return '[Iterator]';\n };\n\n Iterator.KEYS = ITERATE_KEYS;\n Iterator.VALUES = ITERATE_VALUES;\n Iterator.ENTRIES = ITERATE_ENTRIES;\n\n Iterator.prototype.inspect = Iterator.prototype.toSource = function () {\n return this.toString();\n };\n\n Iterator.prototype[ITERATOR_SYMBOL] = function () {\n return this;\n };\n\n function iteratorValue(type, k, v, iteratorResult) {\n var value = type === 0 ? k : type === 1 ? v : [k, v];\n iteratorResult ? iteratorResult.value = value : iteratorResult = {\n value: value,\n done: false\n };\n return iteratorResult;\n }\n\n function iteratorDone() {\n return {\n value: undefined,\n done: true\n };\n }\n\n function hasIterator(maybeIterable) {\n return !!getIteratorFn(maybeIterable);\n }\n\n function isIterator(maybeIterator) {\n return maybeIterator && typeof maybeIterator.next === 'function';\n }\n\n function getIterator(iterable) {\n var iteratorFn = getIteratorFn(iterable);\n return iteratorFn && iteratorFn.call(iterable);\n }\n\n function getIteratorFn(iterable) {\n var iteratorFn = iterable && (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL] || iterable[FAUX_ITERATOR_SYMBOL]);\n\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n function isArrayLike(value) {\n return value && typeof value.length === 'number';\n }\n\n createClass(Seq, Iterable);\n\n function Seq(value) {\n return value === null || value === undefined ? emptySequence() : isIterable(value) ? value.toSeq() : seqFromValue(value);\n }\n\n Seq.of = function ()\n /*...values*/\n {\n return Seq(arguments);\n };\n\n Seq.prototype.toSeq = function () {\n return this;\n };\n\n Seq.prototype.toString = function () {\n return this.__toString('Seq {', '}');\n };\n\n Seq.prototype.cacheResult = function () {\n if (!this._cache && this.__iterateUncached) {\n this._cache = this.entrySeq().toArray();\n this.size = this._cache.length;\n }\n\n return this;\n }; // abstract __iterateUncached(fn, reverse)\n\n\n Seq.prototype.__iterate = function (fn, reverse) {\n return seqIterate(this, fn, reverse, true);\n }; // abstract __iteratorUncached(type, reverse)\n\n\n Seq.prototype.__iterator = function (type, reverse) {\n return seqIterator(this, type, reverse, true);\n };\n\n createClass(KeyedSeq, Seq);\n\n function KeyedSeq(value) {\n return value === null || value === undefined ? emptySequence().toKeyedSeq() : isIterable(value) ? isKeyed(value) ? value.toSeq() : value.fromEntrySeq() : keyedSeqFromValue(value);\n }\n\n KeyedSeq.prototype.toKeyedSeq = function () {\n return this;\n };\n\n createClass(IndexedSeq, Seq);\n\n function IndexedSeq(value) {\n return value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n }\n\n IndexedSeq.of = function ()\n /*...values*/\n {\n return IndexedSeq(arguments);\n };\n\n IndexedSeq.prototype.toIndexedSeq = function () {\n return this;\n };\n\n IndexedSeq.prototype.toString = function () {\n return this.__toString('Seq [', ']');\n };\n\n IndexedSeq.prototype.__iterate = function (fn, reverse) {\n return seqIterate(this, fn, reverse, false);\n };\n\n IndexedSeq.prototype.__iterator = function (type, reverse) {\n return seqIterator(this, type, reverse, false);\n };\n\n createClass(SetSeq, Seq);\n\n function SetSeq(value) {\n return (value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value).toSetSeq();\n }\n\n SetSeq.of = function ()\n /*...values*/\n {\n return SetSeq(arguments);\n };\n\n SetSeq.prototype.toSetSeq = function () {\n return this;\n };\n\n Seq.isSeq = isSeq;\n Seq.Keyed = KeyedSeq;\n Seq.Set = SetSeq;\n Seq.Indexed = IndexedSeq;\n var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n Seq.prototype[IS_SEQ_SENTINEL] = true;\n createClass(ArraySeq, IndexedSeq);\n\n function ArraySeq(array) {\n this._array = array;\n this.size = array.length;\n }\n\n ArraySeq.prototype.get = function (index, notSetValue) {\n return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n };\n\n ArraySeq.prototype.__iterate = function (fn, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n return ii + 1;\n }\n }\n\n return ii;\n };\n\n ArraySeq.prototype.__iterator = function (type, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n var ii = 0;\n return new Iterator(function () {\n return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++]);\n });\n };\n\n createClass(ObjectSeq, KeyedSeq);\n\n function ObjectSeq(object) {\n var keys = Object.keys(object);\n this._object = object;\n this._keys = keys;\n this.size = keys.length;\n }\n\n ObjectSeq.prototype.get = function (key, notSetValue) {\n if (notSetValue !== undefined && !this.has(key)) {\n return notSetValue;\n }\n\n return this._object[key];\n };\n\n ObjectSeq.prototype.has = function (key) {\n return this._object.hasOwnProperty(key);\n };\n\n ObjectSeq.prototype.__iterate = function (fn, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n\n for (var ii = 0; ii <= maxIndex; ii++) {\n var key = keys[reverse ? maxIndex - ii : ii];\n\n if (fn(object[key], key, this) === false) {\n return ii + 1;\n }\n }\n\n return ii;\n };\n\n ObjectSeq.prototype.__iterator = function (type, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n var ii = 0;\n return new Iterator(function () {\n var key = keys[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, key, object[key]);\n });\n };\n\n ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;\n createClass(IterableSeq, IndexedSeq);\n\n function IterableSeq(iterable) {\n this._iterable = iterable;\n this.size = iterable.length || iterable.size;\n }\n\n IterableSeq.prototype.__iterateUncached = function (fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n var iterations = 0;\n\n if (isIterator(iterator)) {\n var step;\n\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n }\n\n return iterations;\n };\n\n IterableSeq.prototype.__iteratorUncached = function (type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n\n if (!isIterator(iterator)) {\n return new Iterator(iteratorDone);\n }\n\n var iterations = 0;\n return new Iterator(function () {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value);\n });\n };\n\n createClass(IteratorSeq, IndexedSeq);\n\n function IteratorSeq(iterator) {\n this._iterator = iterator;\n this._iteratorCache = [];\n }\n\n IteratorSeq.prototype.__iterateUncached = function (fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n\n while (iterations < cache.length) {\n if (fn(cache[iterations], iterations++, this) === false) {\n return iterations;\n }\n }\n\n var step;\n\n while (!(step = iterator.next()).done) {\n var val = step.value;\n cache[iterations] = val;\n\n if (fn(val, iterations++, this) === false) {\n break;\n }\n }\n\n return iterations;\n };\n\n IteratorSeq.prototype.__iteratorUncached = function (type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n return new Iterator(function () {\n if (iterations >= cache.length) {\n var step = iterator.next();\n\n if (step.done) {\n return step;\n }\n\n cache[iterations] = step.value;\n }\n\n return iteratorValue(type, iterations, cache[iterations++]);\n });\n }; // # pragma Helper functions\n\n\n function isSeq(maybeSeq) {\n return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n }\n\n var EMPTY_SEQ;\n\n function emptySequence() {\n return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n }\n\n function keyedSeqFromValue(value) {\n var seq = Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() : isIterator(value) ? new IteratorSeq(value).fromEntrySeq() : hasIterator(value) ? new IterableSeq(value).fromEntrySeq() : typeof value === 'object' ? new ObjectSeq(value) : undefined;\n\n if (!seq) {\n throw new TypeError('Expected Array or iterable object of [k, v] entries, ' + 'or keyed object: ' + value);\n }\n\n return seq;\n }\n\n function indexedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n\n if (!seq) {\n throw new TypeError('Expected Array or iterable object of values: ' + value);\n }\n\n return seq;\n }\n\n function seqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value) || typeof value === 'object' && new ObjectSeq(value);\n\n if (!seq) {\n throw new TypeError('Expected Array or iterable object of values, or keyed object: ' + value);\n }\n\n return seq;\n }\n\n function maybeIndexedSeqFromValue(value) {\n return isArrayLike(value) ? new ArraySeq(value) : isIterator(value) ? new IteratorSeq(value) : hasIterator(value) ? new IterableSeq(value) : undefined;\n }\n\n function seqIterate(seq, fn, reverse, useKeys) {\n var cache = seq._cache;\n\n if (cache) {\n var maxIndex = cache.length - 1;\n\n for (var ii = 0; ii <= maxIndex; ii++) {\n var entry = cache[reverse ? maxIndex - ii : ii];\n\n if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n return ii + 1;\n }\n }\n\n return ii;\n }\n\n return seq.__iterateUncached(fn, reverse);\n }\n\n function seqIterator(seq, type, reverse, useKeys) {\n var cache = seq._cache;\n\n if (cache) {\n var maxIndex = cache.length - 1;\n var ii = 0;\n return new Iterator(function () {\n var entry = cache[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n });\n }\n\n return seq.__iteratorUncached(type, reverse);\n }\n\n function fromJS(json, converter) {\n return converter ? fromJSWith(converter, json, '', {\n '': json\n }) : fromJSDefault(json);\n }\n\n function fromJSWith(converter, json, key, parentJSON) {\n if (Array.isArray(json)) {\n return converter.call(parentJSON, key, IndexedSeq(json).map(function (v, k) {\n return fromJSWith(converter, v, k, json);\n }));\n }\n\n if (isPlainObj(json)) {\n return converter.call(parentJSON, key, KeyedSeq(json).map(function (v, k) {\n return fromJSWith(converter, v, k, json);\n }));\n }\n\n return json;\n }\n\n function fromJSDefault(json) {\n if (Array.isArray(json)) {\n return IndexedSeq(json).map(fromJSDefault).toList();\n }\n\n if (isPlainObj(json)) {\n return KeyedSeq(json).map(fromJSDefault).toMap();\n }\n\n return json;\n }\n\n function isPlainObj(value) {\n return value && (value.constructor === Object || value.constructor === undefined);\n }\n /**\n * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n *\n * NaN is considered the same as NaN, however -0 and 0 are considered the same\n * value, which is different from the algorithm described by\n * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n *\n * This is extended further to allow Objects to describe the values they\n * represent, by way of `valueOf` or `equals` (and `hashCode`).\n *\n * Note: because of this extension, the key equality of Immutable.Map and the\n * value equality of Immutable.Set will differ from ES6 Map and Set.\n *\n * ### Defining custom values\n *\n * The easiest way to describe the value an object represents is by implementing\n * `valueOf`. For example, `Date` represents a value by returning a unix\n * timestamp for `valueOf`:\n *\n * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n * var date2 = new Date(1234567890000);\n * date1.valueOf(); // 1234567890000\n * assert( date1 !== date2 );\n * assert( Immutable.is( date1, date2 ) );\n *\n * Note: overriding `valueOf` may have other implications if you use this object\n * where JavaScript expects a primitive, such as implicit string coercion.\n *\n * For more complex types, especially collections, implementing `valueOf` may\n * not be performant. An alternative is to implement `equals` and `hashCode`.\n *\n * `equals` takes another object, presumably of similar type, and returns true\n * if the it is equal. Equality is symmetrical, so the same result should be\n * returned if this and the argument are flipped.\n *\n * assert( a.equals(b) === b.equals(a) );\n *\n * `hashCode` returns a 32bit integer number representing the object which will\n * be used to determine how to store the value object in a Map or Set. You must\n * provide both or neither methods, one must not exist without the other.\n *\n * Also, an important relationship between these methods must be upheld: if two\n * values are equal, they *must* return the same hashCode. If the values are not\n * equal, they might have the same hashCode; this is called a hash collision,\n * and while undesirable for performance reasons, it is acceptable.\n *\n * if (a.equals(b)) {\n * assert( a.hashCode() === b.hashCode() );\n * }\n *\n * All Immutable collections implement `equals` and `hashCode`.\n *\n */\n\n\n function is(valueA, valueB) {\n if (valueA === valueB || valueA !== valueA && valueB !== valueB) {\n return true;\n }\n\n if (!valueA || !valueB) {\n return false;\n }\n\n if (typeof valueA.valueOf === 'function' && typeof valueB.valueOf === 'function') {\n valueA = valueA.valueOf();\n valueB = valueB.valueOf();\n\n if (valueA === valueB || valueA !== valueA && valueB !== valueB) {\n return true;\n }\n\n if (!valueA || !valueB) {\n return false;\n }\n }\n\n if (typeof valueA.equals === 'function' && typeof valueB.equals === 'function' && valueA.equals(valueB)) {\n return true;\n }\n\n return false;\n }\n\n function deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (!isIterable(b) || a.size !== undefined && b.size !== undefined && a.size !== b.size || a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash || isKeyed(a) !== isKeyed(b) || isIndexed(a) !== isIndexed(b) || isOrdered(a) !== isOrdered(b)) {\n return false;\n }\n\n if (a.size === 0 && b.size === 0) {\n return true;\n }\n\n var notAssociative = !isAssociative(a);\n\n if (isOrdered(a)) {\n var entries = a.entries();\n return b.every(function (v, k) {\n var entry = entries.next().value;\n return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n }) && entries.next().done;\n }\n\n var flipped = false;\n\n if (a.size === undefined) {\n if (b.size === undefined) {\n if (typeof a.cacheResult === 'function') {\n a.cacheResult();\n }\n } else {\n flipped = true;\n var _ = a;\n a = b;\n b = _;\n }\n }\n\n var allEqual = true;\n\n var bSize = b.__iterate(function (v, k) {\n if (notAssociative ? !a.has(v) : flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {\n allEqual = false;\n return false;\n }\n });\n\n return allEqual && a.size === bSize;\n }\n\n createClass(Repeat, IndexedSeq);\n\n function Repeat(value, times) {\n if (!(this instanceof Repeat)) {\n return new Repeat(value, times);\n }\n\n this._value = value;\n this.size = times === undefined ? Infinity : Math.max(0, times);\n\n if (this.size === 0) {\n if (EMPTY_REPEAT) {\n return EMPTY_REPEAT;\n }\n\n EMPTY_REPEAT = this;\n }\n }\n\n Repeat.prototype.toString = function () {\n if (this.size === 0) {\n return 'Repeat []';\n }\n\n return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n };\n\n Repeat.prototype.get = function (index, notSetValue) {\n return this.has(index) ? this._value : notSetValue;\n };\n\n Repeat.prototype.includes = function (searchValue) {\n return is(this._value, searchValue);\n };\n\n Repeat.prototype.slice = function (begin, end) {\n var size = this.size;\n return wholeSlice(begin, end, size) ? this : new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n };\n\n Repeat.prototype.reverse = function () {\n return this;\n };\n\n Repeat.prototype.indexOf = function (searchValue) {\n if (is(this._value, searchValue)) {\n return 0;\n }\n\n return -1;\n };\n\n Repeat.prototype.lastIndexOf = function (searchValue) {\n if (is(this._value, searchValue)) {\n return this.size;\n }\n\n return -1;\n };\n\n Repeat.prototype.__iterate = function (fn, reverse) {\n for (var ii = 0; ii < this.size; ii++) {\n if (fn(this._value, ii, this) === false) {\n return ii + 1;\n }\n }\n\n return ii;\n };\n\n Repeat.prototype.__iterator = function (type, reverse) {\n var this$0 = this;\n var ii = 0;\n return new Iterator(function () {\n return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone();\n });\n };\n\n Repeat.prototype.equals = function (other) {\n return other instanceof Repeat ? is(this._value, other._value) : deepEqual(other);\n };\n\n var EMPTY_REPEAT;\n\n function invariant(condition, error) {\n if (!condition) throw new Error(error);\n }\n\n createClass(Range, IndexedSeq);\n\n function Range(start, end, step) {\n if (!(this instanceof Range)) {\n return new Range(start, end, step);\n }\n\n invariant(step !== 0, 'Cannot step a Range by 0');\n start = start || 0;\n\n if (end === undefined) {\n end = Infinity;\n }\n\n step = step === undefined ? 1 : Math.abs(step);\n\n if (end < start) {\n step = -step;\n }\n\n this._start = start;\n this._end = end;\n this._step = step;\n this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n\n if (this.size === 0) {\n if (EMPTY_RANGE) {\n return EMPTY_RANGE;\n }\n\n EMPTY_RANGE = this;\n }\n }\n\n Range.prototype.toString = function () {\n if (this.size === 0) {\n return 'Range []';\n }\n\n return 'Range [ ' + this._start + '...' + this._end + (this._step !== 1 ? ' by ' + this._step : '') + ' ]';\n };\n\n Range.prototype.get = function (index, notSetValue) {\n return this.has(index) ? this._start + wrapIndex(this, index) * this._step : notSetValue;\n };\n\n Range.prototype.includes = function (searchValue) {\n var possibleIndex = (searchValue - this._start) / this._step;\n return possibleIndex >= 0 && possibleIndex < this.size && possibleIndex === Math.floor(possibleIndex);\n };\n\n Range.prototype.slice = function (begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n\n begin = resolveBegin(begin, this.size);\n end = resolveEnd(end, this.size);\n\n if (end <= begin) {\n return new Range(0, 0);\n }\n\n return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n };\n\n Range.prototype.indexOf = function (searchValue) {\n var offsetValue = searchValue - this._start;\n\n if (offsetValue % this._step === 0) {\n var index = offsetValue / this._step;\n\n if (index >= 0 && index < this.size) {\n return index;\n }\n }\n\n return -1;\n };\n\n Range.prototype.lastIndexOf = function (searchValue) {\n return this.indexOf(searchValue);\n };\n\n Range.prototype.__iterate = function (fn, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(value, ii, this) === false) {\n return ii + 1;\n }\n\n value += reverse ? -step : step;\n }\n\n return ii;\n };\n\n Range.prototype.__iterator = function (type, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n var ii = 0;\n return new Iterator(function () {\n var v = value;\n value += reverse ? -step : step;\n return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n });\n };\n\n Range.prototype.equals = function (other) {\n return other instanceof Range ? this._start === other._start && this._end === other._end && this._step === other._step : deepEqual(this, other);\n };\n\n var EMPTY_RANGE;\n createClass(Collection, Iterable);\n\n function Collection() {\n throw TypeError('Abstract');\n }\n\n createClass(KeyedCollection, Collection);\n\n function KeyedCollection() {}\n\n createClass(IndexedCollection, Collection);\n\n function IndexedCollection() {}\n\n createClass(SetCollection, Collection);\n\n function SetCollection() {}\n\n Collection.Keyed = KeyedCollection;\n Collection.Indexed = IndexedCollection;\n Collection.Set = SetCollection;\n var imul = typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ? Math.imul : function imul(a, b) {\n a = a | 0; // int\n\n b = b | 0; // int\n\n var c = a & 0xffff;\n var d = b & 0xffff; // Shift by 0 fixes the sign on the high part.\n\n return c * d + ((a >>> 16) * d + c * (b >>> 16) << 16 >>> 0) | 0; // int\n }; // v8 has an optimization for storing 31-bit signed numbers.\n // Values which have either 00 or 11 as the high order bits qualify.\n // This function drops the highest order bit in a signed number, maintaining\n // the sign bit.\n\n function smi(i32) {\n return i32 >>> 1 & 0x40000000 | i32 & 0xBFFFFFFF;\n }\n\n function hash(o) {\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n\n if (typeof o.valueOf === 'function') {\n o = o.valueOf();\n\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n }\n\n if (o === true) {\n return 1;\n }\n\n var type = typeof o;\n\n if (type === 'number') {\n if (o !== o || o === Infinity) {\n return 0;\n }\n\n var h = o | 0;\n\n if (h !== o) {\n h ^= o * 0xFFFFFFFF;\n }\n\n while (o > 0xFFFFFFFF) {\n o /= 0xFFFFFFFF;\n h ^= o;\n }\n\n return smi(h);\n }\n\n if (type === 'string') {\n return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n }\n\n if (typeof o.hashCode === 'function') {\n return o.hashCode();\n }\n\n if (type === 'object') {\n return hashJSObj(o);\n }\n\n if (typeof o.toString === 'function') {\n return hashString(o.toString());\n }\n\n throw new Error('Value type ' + type + ' cannot be hashed.');\n }\n\n function cachedHashString(string) {\n var hash = stringHashCache[string];\n\n if (hash === undefined) {\n hash = hashString(string);\n\n if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n STRING_HASH_CACHE_SIZE = 0;\n stringHashCache = {};\n }\n\n STRING_HASH_CACHE_SIZE++;\n stringHashCache[string] = hash;\n }\n\n return hash;\n } // http://jsperf.com/hashing-strings\n\n\n function hashString(string) {\n // This is the hash from JVM\n // The hash code for a string is computed as\n // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n // where s[i] is the ith character of the string and n is the length of\n // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n // (exclusive) by dropping high bits.\n var hash = 0;\n\n for (var ii = 0; ii < string.length; ii++) {\n hash = 31 * hash + string.charCodeAt(ii) | 0;\n }\n\n return smi(hash);\n }\n\n function hashJSObj(obj) {\n var hash;\n\n if (usingWeakMap) {\n hash = weakMap.get(obj);\n\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = obj[UID_HASH_KEY];\n\n if (hash !== undefined) {\n return hash;\n }\n\n if (!canDefineProperty) {\n hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n\n if (hash !== undefined) {\n return hash;\n }\n\n hash = getIENodeHash(obj);\n\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = ++objHashUID;\n\n if (objHashUID & 0x40000000) {\n objHashUID = 0;\n }\n\n if (usingWeakMap) {\n weakMap.set(obj, hash);\n } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n throw new Error('Non-extensible objects are not allowed as keys.');\n } else if (canDefineProperty) {\n Object.defineProperty(obj, UID_HASH_KEY, {\n 'enumerable': false,\n 'configurable': false,\n 'writable': false,\n 'value': hash\n });\n } else if (obj.propertyIsEnumerable !== undefined && obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n // Since we can't define a non-enumerable property on the object\n // we'll hijack one of the less-used non-enumerable properties to\n // save our hash on it. Since this is a function it will not show up in\n // `JSON.stringify` which is what we want.\n obj.propertyIsEnumerable = function () {\n return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n };\n\n obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n } else if (obj.nodeType !== undefined) {\n // At this point we couldn't get the IE `uniqueID` to use as a hash\n // and we couldn't use a non-enumerable property to exploit the\n // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n // itself.\n obj[UID_HASH_KEY] = hash;\n } else {\n throw new Error('Unable to set a non-enumerable property on object.');\n }\n\n return hash;\n } // Get references to ES5 object methods.\n\n\n var isExtensible = Object.isExtensible; // True if Object.defineProperty works as expected. IE8 fails this test.\n\n var canDefineProperty = function () {\n try {\n Object.defineProperty({}, '@', {});\n return true;\n } catch (e) {\n return false;\n }\n }(); // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n // and avoid memory leaks from the IE cloneNode bug.\n\n\n function getIENodeHash(node) {\n if (node && node.nodeType > 0) {\n switch (node.nodeType) {\n case 1:\n // Element\n return node.uniqueID;\n\n case 9:\n // Document\n return node.documentElement && node.documentElement.uniqueID;\n }\n }\n } // If possible, use a WeakMap.\n\n\n var usingWeakMap = typeof WeakMap === 'function';\n var weakMap;\n\n if (usingWeakMap) {\n weakMap = new WeakMap();\n }\n\n var objHashUID = 0;\n var UID_HASH_KEY = '__immutablehash__';\n\n if (typeof Symbol === 'function') {\n UID_HASH_KEY = Symbol(UID_HASH_KEY);\n }\n\n var STRING_HASH_CACHE_MIN_STRLEN = 16;\n var STRING_HASH_CACHE_MAX_SIZE = 255;\n var STRING_HASH_CACHE_SIZE = 0;\n var stringHashCache = {};\n\n function assertNotInfinite(size) {\n invariant(size !== Infinity, 'Cannot perform this action with an infinite size.');\n }\n\n createClass(Map, KeyedCollection); // @pragma Construction\n\n function Map(value) {\n return value === null || value === undefined ? emptyMap() : isMap(value) && !isOrdered(value) ? value : emptyMap().withMutations(function (map) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v, k) {\n return map.set(k, v);\n });\n });\n }\n\n Map.of = function () {\n var keyValues = SLICE$0.call(arguments, 0);\n return emptyMap().withMutations(function (map) {\n for (var i = 0; i < keyValues.length; i += 2) {\n if (i + 1 >= keyValues.length) {\n throw new Error('Missing value for key: ' + keyValues[i]);\n }\n\n map.set(keyValues[i], keyValues[i + 1]);\n }\n });\n };\n\n Map.prototype.toString = function () {\n return this.__toString('Map {', '}');\n }; // @pragma Access\n\n\n Map.prototype.get = function (k, notSetValue) {\n return this._root ? this._root.get(0, undefined, k, notSetValue) : notSetValue;\n }; // @pragma Modification\n\n\n Map.prototype.set = function (k, v) {\n return updateMap(this, k, v);\n };\n\n Map.prototype.setIn = function (keyPath, v) {\n return this.updateIn(keyPath, NOT_SET, function () {\n return v;\n });\n };\n\n Map.prototype.remove = function (k) {\n return updateMap(this, k, NOT_SET);\n };\n\n Map.prototype.deleteIn = function (keyPath) {\n return this.updateIn(keyPath, function () {\n return NOT_SET;\n });\n };\n\n Map.prototype.update = function (k, notSetValue, updater) {\n return arguments.length === 1 ? k(this) : this.updateIn([k], notSetValue, updater);\n };\n\n Map.prototype.updateIn = function (keyPath, notSetValue, updater) {\n if (!updater) {\n updater = notSetValue;\n notSetValue = undefined;\n }\n\n var updatedValue = updateInDeepMap(this, forceIterator(keyPath), notSetValue, updater);\n return updatedValue === NOT_SET ? undefined : updatedValue;\n };\n\n Map.prototype.clear = function () {\n if (this.size === 0) {\n return this;\n }\n\n if (this.__ownerID) {\n this.size = 0;\n this._root = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n\n return emptyMap();\n }; // @pragma Composition\n\n\n Map.prototype.merge = function ()\n /*...iters*/\n {\n return mergeIntoMapWith(this, undefined, arguments);\n };\n\n Map.prototype.mergeWith = function (merger) {\n var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, merger, iters);\n };\n\n Map.prototype.mergeIn = function (keyPath) {\n var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(keyPath, emptyMap(), function (m) {\n return typeof m.merge === 'function' ? m.merge.apply(m, iters) : iters[iters.length - 1];\n });\n };\n\n Map.prototype.mergeDeep = function ()\n /*...iters*/\n {\n return mergeIntoMapWith(this, deepMerger, arguments);\n };\n\n Map.prototype.mergeDeepWith = function (merger) {\n var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, deepMergerWith(merger), iters);\n };\n\n Map.prototype.mergeDeepIn = function (keyPath) {\n var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(keyPath, emptyMap(), function (m) {\n return typeof m.mergeDeep === 'function' ? m.mergeDeep.apply(m, iters) : iters[iters.length - 1];\n });\n };\n\n Map.prototype.sort = function (comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator));\n };\n\n Map.prototype.sortBy = function (mapper, comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator, mapper));\n }; // @pragma Mutability\n\n\n Map.prototype.withMutations = function (fn) {\n var mutable = this.asMutable();\n fn(mutable);\n return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n };\n\n Map.prototype.asMutable = function () {\n return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n };\n\n Map.prototype.asImmutable = function () {\n return this.__ensureOwner();\n };\n\n Map.prototype.wasAltered = function () {\n return this.__altered;\n };\n\n Map.prototype.__iterator = function (type, reverse) {\n return new MapIterator(this, type, reverse);\n };\n\n Map.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n var iterations = 0;\n this._root && this._root.iterate(function (entry) {\n iterations++;\n return fn(entry[1], entry[0], this$0);\n }, reverse);\n return iterations;\n };\n\n Map.prototype.__ensureOwner = function (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n\n return makeMap(this.size, this._root, ownerID, this.__hash);\n };\n\n function isMap(maybeMap) {\n return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n }\n\n Map.isMap = isMap;\n var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n var MapPrototype = Map.prototype;\n MapPrototype[IS_MAP_SENTINEL] = true;\n MapPrototype[DELETE] = MapPrototype.remove;\n MapPrototype.removeIn = MapPrototype.deleteIn; // #pragma Trie Nodes\n\n function ArrayMapNode(ownerID, entries) {\n this.ownerID = ownerID;\n this.entries = entries;\n }\n\n ArrayMapNode.prototype.get = function (shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n\n return notSetValue;\n };\n\n ArrayMapNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var entries = this.entries;\n var idx = 0;\n\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && entries.length === 1) {\n return; // undefined\n }\n\n if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n return createNodes(ownerID, entries, key, value);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : newEntries[idx] = newEntries.pop();\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new ArrayMapNode(ownerID, newEntries);\n };\n\n function BitmapIndexedNode(ownerID, bitmap, nodes) {\n this.ownerID = ownerID;\n this.bitmap = bitmap;\n this.nodes = nodes;\n }\n\n BitmapIndexedNode.prototype.get = function (shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK);\n var bitmap = this.bitmap;\n return (bitmap & bit) === 0 ? notSetValue : this.nodes[popCount(bitmap & bit - 1)].get(shift + SHIFT, keyHash, key, notSetValue);\n };\n\n BitmapIndexedNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var bit = 1 << keyHashFrag;\n var bitmap = this.bitmap;\n var exists = (bitmap & bit) !== 0;\n\n if (!exists && value === NOT_SET) {\n return this;\n }\n\n var idx = popCount(bitmap & bit - 1);\n var nodes = this.nodes;\n var node = exists ? nodes[idx] : undefined;\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\n if (newNode === node) {\n return this;\n }\n\n if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n }\n\n if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n return nodes[idx ^ 1];\n }\n\n if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n return newNode;\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n var newNodes = exists ? newNode ? setIn(nodes, idx, newNode, isEditable) : spliceOut(nodes, idx, isEditable) : spliceIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.bitmap = newBitmap;\n this.nodes = newNodes;\n return this;\n }\n\n return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n };\n\n function HashArrayMapNode(ownerID, count, nodes) {\n this.ownerID = ownerID;\n this.count = count;\n this.nodes = nodes;\n }\n\n HashArrayMapNode.prototype.get = function (shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var node = this.nodes[idx];\n return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;\n };\n\n HashArrayMapNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var removed = value === NOT_SET;\n var nodes = this.nodes;\n var node = nodes[idx];\n\n if (removed && !node) {\n return this;\n }\n\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\n if (newNode === node) {\n return this;\n }\n\n var newCount = this.count;\n\n if (!node) {\n newCount++;\n } else if (!newNode) {\n newCount--;\n\n if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n return packNodes(ownerID, nodes, newCount, idx);\n }\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newNodes = setIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.count = newCount;\n this.nodes = newNodes;\n return this;\n }\n\n return new HashArrayMapNode(ownerID, newCount, newNodes);\n };\n\n function HashCollisionNode(ownerID, keyHash, entries) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entries = entries;\n }\n\n HashCollisionNode.prototype.get = function (shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n\n return notSetValue;\n };\n\n HashCollisionNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var removed = value === NOT_SET;\n\n if (keyHash !== this.keyHash) {\n if (removed) {\n return this;\n }\n\n SetRef(didAlter);\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n }\n\n var entries = this.entries;\n var idx = 0;\n\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && len === 2) {\n return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : newEntries[idx] = newEntries.pop();\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n };\n\n function ValueNode(ownerID, keyHash, entry) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entry = entry;\n }\n\n ValueNode.prototype.get = function (shift, keyHash, key, notSetValue) {\n return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n };\n\n ValueNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var keyMatch = is(key, this.entry[0]);\n\n if (keyMatch ? value === this.entry[1] : removed) {\n return this;\n }\n\n SetRef(didAlter);\n\n if (removed) {\n SetRef(didChangeSize);\n return; // undefined\n }\n\n if (keyMatch) {\n if (ownerID && ownerID === this.ownerID) {\n this.entry[1] = value;\n return this;\n }\n\n return new ValueNode(ownerID, this.keyHash, [key, value]);\n }\n\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n }; // #pragma Iterators\n\n\n ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = function (fn, reverse) {\n var entries = this.entries;\n\n for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n return false;\n }\n }\n };\n\n BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = function (fn, reverse) {\n var nodes = this.nodes;\n\n for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n var node = nodes[reverse ? maxIndex - ii : ii];\n\n if (node && node.iterate(fn, reverse) === false) {\n return false;\n }\n }\n };\n\n ValueNode.prototype.iterate = function (fn, reverse) {\n return fn(this.entry);\n };\n\n createClass(MapIterator, Iterator);\n\n function MapIterator(map, type, reverse) {\n this._type = type;\n this._reverse = reverse;\n this._stack = map._root && mapIteratorFrame(map._root);\n }\n\n MapIterator.prototype.next = function () {\n var type = this._type;\n var stack = this._stack;\n\n while (stack) {\n var node = stack.node;\n var index = stack.index++;\n var maxIndex;\n\n if (node.entry) {\n if (index === 0) {\n return mapIteratorValue(type, node.entry);\n }\n } else if (node.entries) {\n maxIndex = node.entries.length - 1;\n\n if (index <= maxIndex) {\n return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n }\n } else {\n maxIndex = node.nodes.length - 1;\n\n if (index <= maxIndex) {\n var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n\n if (subNode) {\n if (subNode.entry) {\n return mapIteratorValue(type, subNode.entry);\n }\n\n stack = this._stack = mapIteratorFrame(subNode, stack);\n }\n\n continue;\n }\n }\n\n stack = this._stack = this._stack.__prev;\n }\n\n return iteratorDone();\n };\n\n function mapIteratorValue(type, entry) {\n return iteratorValue(type, entry[0], entry[1]);\n }\n\n function mapIteratorFrame(node, prev) {\n return {\n node: node,\n index: 0,\n __prev: prev\n };\n }\n\n function makeMap(size, root, ownerID, hash) {\n var map = Object.create(MapPrototype);\n map.size = size;\n map._root = root;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_MAP;\n\n function emptyMap() {\n return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n }\n\n function updateMap(map, k, v) {\n var newRoot;\n var newSize;\n\n if (!map._root) {\n if (v === NOT_SET) {\n return map;\n }\n\n newSize = 1;\n newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n } else {\n var didChangeSize = MakeRef(CHANGE_LENGTH);\n var didAlter = MakeRef(DID_ALTER);\n newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);\n\n if (!didAlter.value) {\n return map;\n }\n\n newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n }\n\n if (map.__ownerID) {\n map.size = newSize;\n map._root = newRoot;\n map.__hash = undefined;\n map.__altered = true;\n return map;\n }\n\n return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n }\n\n function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (!node) {\n if (value === NOT_SET) {\n return node;\n }\n\n SetRef(didAlter);\n SetRef(didChangeSize);\n return new ValueNode(ownerID, keyHash, [key, value]);\n }\n\n return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);\n }\n\n function isLeafNode(node) {\n return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n }\n\n function mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n if (node.keyHash === keyHash) {\n return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n }\n\n var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var newNode;\n var nodes = idx1 === idx2 ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] : (newNode = new ValueNode(ownerID, keyHash, entry), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n return new BitmapIndexedNode(ownerID, 1 << idx1 | 1 << idx2, nodes);\n }\n\n function createNodes(ownerID, entries, key, value) {\n if (!ownerID) {\n ownerID = new OwnerID();\n }\n\n var node = new ValueNode(ownerID, hash(key), [key, value]);\n\n for (var ii = 0; ii < entries.length; ii++) {\n var entry = entries[ii];\n node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n }\n\n return node;\n }\n\n function packNodes(ownerID, nodes, count, excluding) {\n var bitmap = 0;\n var packedII = 0;\n var packedNodes = new Array(count);\n\n for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n var node = nodes[ii];\n\n if (node !== undefined && ii !== excluding) {\n bitmap |= bit;\n packedNodes[packedII++] = node;\n }\n }\n\n return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n }\n\n function expandNodes(ownerID, nodes, bitmap, including, node) {\n var count = 0;\n var expandedNodes = new Array(SIZE);\n\n for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n }\n\n expandedNodes[including] = node;\n return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n }\n\n function mergeIntoMapWith(map, merger, iterables) {\n var iters = [];\n\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = KeyedIterable(value);\n\n if (!isIterable(value)) {\n iter = iter.map(function (v) {\n return fromJS(v);\n });\n }\n\n iters.push(iter);\n }\n\n return mergeIntoCollectionWith(map, merger, iters);\n }\n\n function deepMerger(existing, value, key) {\n return existing && existing.mergeDeep && isIterable(value) ? existing.mergeDeep(value) : is(existing, value) ? existing : value;\n }\n\n function deepMergerWith(merger) {\n return function (existing, value, key) {\n if (existing && existing.mergeDeepWith && isIterable(value)) {\n return existing.mergeDeepWith(merger, value);\n }\n\n var nextValue = merger(existing, value, key);\n return is(existing, nextValue) ? existing : nextValue;\n };\n }\n\n function mergeIntoCollectionWith(collection, merger, iters) {\n iters = iters.filter(function (x) {\n return x.size !== 0;\n });\n\n if (iters.length === 0) {\n return collection;\n }\n\n if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {\n return collection.constructor(iters[0]);\n }\n\n return collection.withMutations(function (collection) {\n var mergeIntoMap = merger ? function (value, key) {\n collection.update(key, NOT_SET, function (existing) {\n return existing === NOT_SET ? value : merger(existing, value, key);\n });\n } : function (value, key) {\n collection.set(key, value);\n };\n\n for (var ii = 0; ii < iters.length; ii++) {\n iters[ii].forEach(mergeIntoMap);\n }\n });\n }\n\n function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {\n var isNotSet = existing === NOT_SET;\n var step = keyPathIter.next();\n\n if (step.done) {\n var existingValue = isNotSet ? notSetValue : existing;\n var newValue = updater(existingValue);\n return newValue === existingValue ? existing : newValue;\n }\n\n invariant(isNotSet || existing && existing.set, 'invalid keyPath');\n var key = step.value;\n var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);\n var nextUpdated = updateInDeepMap(nextExisting, keyPathIter, notSetValue, updater);\n return nextUpdated === nextExisting ? existing : nextUpdated === NOT_SET ? existing.remove(key) : (isNotSet ? emptyMap() : existing).set(key, nextUpdated);\n }\n\n function popCount(x) {\n x = x - (x >> 1 & 0x55555555);\n x = (x & 0x33333333) + (x >> 2 & 0x33333333);\n x = x + (x >> 4) & 0x0f0f0f0f;\n x = x + (x >> 8);\n x = x + (x >> 16);\n return x & 0x7f;\n }\n\n function setIn(array, idx, val, canEdit) {\n var newArray = canEdit ? array : arrCopy(array);\n newArray[idx] = val;\n return newArray;\n }\n\n function spliceIn(array, idx, val, canEdit) {\n var newLen = array.length + 1;\n\n if (canEdit && idx + 1 === newLen) {\n array[idx] = val;\n return array;\n }\n\n var newArray = new Array(newLen);\n var after = 0;\n\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n newArray[ii] = val;\n after = -1;\n } else {\n newArray[ii] = array[ii + after];\n }\n }\n\n return newArray;\n }\n\n function spliceOut(array, idx, canEdit) {\n var newLen = array.length - 1;\n\n if (canEdit && idx === newLen) {\n array.pop();\n return array;\n }\n\n var newArray = new Array(newLen);\n var after = 0;\n\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n after = 1;\n }\n\n newArray[ii] = array[ii + after];\n }\n\n return newArray;\n }\n\n var MAX_ARRAY_MAP_SIZE = SIZE / 4;\n var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\n var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n createClass(List, IndexedCollection); // @pragma Construction\n\n function List(value) {\n var empty = emptyList();\n\n if (value === null || value === undefined) {\n return empty;\n }\n\n if (isList(value)) {\n return value;\n }\n\n var iter = IndexedIterable(value);\n var size = iter.size;\n\n if (size === 0) {\n return empty;\n }\n\n assertNotInfinite(size);\n\n if (size > 0 && size < SIZE) {\n return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n }\n\n return empty.withMutations(function (list) {\n list.setSize(size);\n iter.forEach(function (v, i) {\n return list.set(i, v);\n });\n });\n }\n\n List.of = function ()\n /*...values*/\n {\n return this(arguments);\n };\n\n List.prototype.toString = function () {\n return this.__toString('List [', ']');\n }; // @pragma Access\n\n\n List.prototype.get = function (index, notSetValue) {\n index = wrapIndex(this, index);\n\n if (index >= 0 && index < this.size) {\n index += this._origin;\n var node = listNodeFor(this, index);\n return node && node.array[index & MASK];\n }\n\n return notSetValue;\n }; // @pragma Modification\n\n\n List.prototype.set = function (index, value) {\n return updateList(this, index, value);\n };\n\n List.prototype.remove = function (index) {\n return !this.has(index) ? this : index === 0 ? this.shift() : index === this.size - 1 ? this.pop() : this.splice(index, 1);\n };\n\n List.prototype.insert = function (index, value) {\n return this.splice(index, 0, value);\n };\n\n List.prototype.clear = function () {\n if (this.size === 0) {\n return this;\n }\n\n if (this.__ownerID) {\n this.size = this._origin = this._capacity = 0;\n this._level = SHIFT;\n this._root = this._tail = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n\n return emptyList();\n };\n\n List.prototype.push = function ()\n /*...values*/\n {\n var values = arguments;\n var oldSize = this.size;\n return this.withMutations(function (list) {\n setListBounds(list, 0, oldSize + values.length);\n\n for (var ii = 0; ii < values.length; ii++) {\n list.set(oldSize + ii, values[ii]);\n }\n });\n };\n\n List.prototype.pop = function () {\n return setListBounds(this, 0, -1);\n };\n\n List.prototype.unshift = function ()\n /*...values*/\n {\n var values = arguments;\n return this.withMutations(function (list) {\n setListBounds(list, -values.length);\n\n for (var ii = 0; ii < values.length; ii++) {\n list.set(ii, values[ii]);\n }\n });\n };\n\n List.prototype.shift = function () {\n return setListBounds(this, 1);\n }; // @pragma Composition\n\n\n List.prototype.merge = function ()\n /*...iters*/\n {\n return mergeIntoListWith(this, undefined, arguments);\n };\n\n List.prototype.mergeWith = function (merger) {\n var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, merger, iters);\n };\n\n List.prototype.mergeDeep = function ()\n /*...iters*/\n {\n return mergeIntoListWith(this, deepMerger, arguments);\n };\n\n List.prototype.mergeDeepWith = function (merger) {\n var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, deepMergerWith(merger), iters);\n };\n\n List.prototype.setSize = function (size) {\n return setListBounds(this, 0, size);\n }; // @pragma Iteration\n\n\n List.prototype.slice = function (begin, end) {\n var size = this.size;\n\n if (wholeSlice(begin, end, size)) {\n return this;\n }\n\n return setListBounds(this, resolveBegin(begin, size), resolveEnd(end, size));\n };\n\n List.prototype.__iterator = function (type, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n return new Iterator(function () {\n var value = values();\n return value === DONE ? iteratorDone() : iteratorValue(type, index++, value);\n });\n };\n\n List.prototype.__iterate = function (fn, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n var value;\n\n while ((value = values()) !== DONE) {\n if (fn(value, index++, this) === false) {\n break;\n }\n }\n\n return index;\n };\n\n List.prototype.__ensureOwner = function (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n\n if (!ownerID) {\n this.__ownerID = ownerID;\n return this;\n }\n\n return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n };\n\n function isList(maybeList) {\n return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n }\n\n List.isList = isList;\n var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n var ListPrototype = List.prototype;\n ListPrototype[IS_LIST_SENTINEL] = true;\n ListPrototype[DELETE] = ListPrototype.remove;\n ListPrototype.setIn = MapPrototype.setIn;\n ListPrototype.deleteIn = ListPrototype.removeIn = MapPrototype.removeIn;\n ListPrototype.update = MapPrototype.update;\n ListPrototype.updateIn = MapPrototype.updateIn;\n ListPrototype.mergeIn = MapPrototype.mergeIn;\n ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n ListPrototype.withMutations = MapPrototype.withMutations;\n ListPrototype.asMutable = MapPrototype.asMutable;\n ListPrototype.asImmutable = MapPrototype.asImmutable;\n ListPrototype.wasAltered = MapPrototype.wasAltered;\n\n function VNode(array, ownerID) {\n this.array = array;\n this.ownerID = ownerID;\n } // TODO: seems like these methods are very similar\n\n\n VNode.prototype.removeBefore = function (ownerID, level, index) {\n if (index === level ? 1 << level : 0 || this.array.length === 0) {\n return this;\n }\n\n var originIndex = index >>> level & MASK;\n\n if (originIndex >= this.array.length) {\n return new VNode([], ownerID);\n }\n\n var removingFirst = originIndex === 0;\n var newChild;\n\n if (level > 0) {\n var oldChild = this.array[originIndex];\n newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n\n if (newChild === oldChild && removingFirst) {\n return this;\n }\n }\n\n if (removingFirst && !newChild) {\n return this;\n }\n\n var editable = editableVNode(this, ownerID);\n\n if (!removingFirst) {\n for (var ii = 0; ii < originIndex; ii++) {\n editable.array[ii] = undefined;\n }\n }\n\n if (newChild) {\n editable.array[originIndex] = newChild;\n }\n\n return editable;\n };\n\n VNode.prototype.removeAfter = function (ownerID, level, index) {\n if (index === (level ? 1 << level : 0) || this.array.length === 0) {\n return this;\n }\n\n var sizeIndex = index - 1 >>> level & MASK;\n\n if (sizeIndex >= this.array.length) {\n return this;\n }\n\n var newChild;\n\n if (level > 0) {\n var oldChild = this.array[sizeIndex];\n newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n\n if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n return this;\n }\n }\n\n var editable = editableVNode(this, ownerID);\n editable.array.splice(sizeIndex + 1);\n\n if (newChild) {\n editable.array[sizeIndex] = newChild;\n }\n\n return editable;\n };\n\n var DONE = {};\n\n function iterateList(list, reverse) {\n var left = list._origin;\n var right = list._capacity;\n var tailPos = getTailOffset(right);\n var tail = list._tail;\n return iterateNodeOrLeaf(list._root, list._level, 0);\n\n function iterateNodeOrLeaf(node, level, offset) {\n return level === 0 ? iterateLeaf(node, offset) : iterateNode(node, level, offset);\n }\n\n function iterateLeaf(node, offset) {\n var array = offset === tailPos ? tail && tail.array : node && node.array;\n var from = offset > left ? 0 : left - offset;\n var to = right - offset;\n\n if (to > SIZE) {\n to = SIZE;\n }\n\n return function () {\n if (from === to) {\n return DONE;\n }\n\n var idx = reverse ? --to : from++;\n return array && array[idx];\n };\n }\n\n function iterateNode(node, level, offset) {\n var values;\n var array = node && node.array;\n var from = offset > left ? 0 : left - offset >> level;\n var to = (right - offset >> level) + 1;\n\n if (to > SIZE) {\n to = SIZE;\n }\n\n return function () {\n do {\n if (values) {\n var value = values();\n\n if (value !== DONE) {\n return value;\n }\n\n values = null;\n }\n\n if (from === to) {\n return DONE;\n }\n\n var idx = reverse ? --to : from++;\n values = iterateNodeOrLeaf(array && array[idx], level - SHIFT, offset + (idx << level));\n } while (true);\n };\n }\n }\n\n function makeList(origin, capacity, level, root, tail, ownerID, hash) {\n var list = Object.create(ListPrototype);\n list.size = capacity - origin;\n list._origin = origin;\n list._capacity = capacity;\n list._level = level;\n list._root = root;\n list._tail = tail;\n list.__ownerID = ownerID;\n list.__hash = hash;\n list.__altered = false;\n return list;\n }\n\n var EMPTY_LIST;\n\n function emptyList() {\n return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n }\n\n function updateList(list, index, value) {\n index = wrapIndex(list, index);\n\n if (index !== index) {\n return list;\n }\n\n if (index >= list.size || index < 0) {\n return list.withMutations(function (list) {\n index < 0 ? setListBounds(list, index).set(0, value) : setListBounds(list, 0, index + 1).set(index, value);\n });\n }\n\n index += list._origin;\n var newTail = list._tail;\n var newRoot = list._root;\n var didAlter = MakeRef(DID_ALTER);\n\n if (index >= getTailOffset(list._capacity)) {\n newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n } else {\n newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n }\n\n if (!didAlter.value) {\n return list;\n }\n\n if (list.__ownerID) {\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n\n return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n }\n\n function updateVNode(node, ownerID, level, index, value, didAlter) {\n var idx = index >>> level & MASK;\n var nodeHas = node && idx < node.array.length;\n\n if (!nodeHas && value === undefined) {\n return node;\n }\n\n var newNode;\n\n if (level > 0) {\n var lowerNode = node && node.array[idx];\n var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n\n if (newLowerNode === lowerNode) {\n return node;\n }\n\n newNode = editableVNode(node, ownerID);\n newNode.array[idx] = newLowerNode;\n return newNode;\n }\n\n if (nodeHas && node.array[idx] === value) {\n return node;\n }\n\n SetRef(didAlter);\n newNode = editableVNode(node, ownerID);\n\n if (value === undefined && idx === newNode.array.length - 1) {\n newNode.array.pop();\n } else {\n newNode.array[idx] = value;\n }\n\n return newNode;\n }\n\n function editableVNode(node, ownerID) {\n if (ownerID && node && ownerID === node.ownerID) {\n return node;\n }\n\n return new VNode(node ? node.array.slice() : [], ownerID);\n }\n\n function listNodeFor(list, rawIndex) {\n if (rawIndex >= getTailOffset(list._capacity)) {\n return list._tail;\n }\n\n if (rawIndex < 1 << list._level + SHIFT) {\n var node = list._root;\n var level = list._level;\n\n while (node && level > 0) {\n node = node.array[rawIndex >>> level & MASK];\n level -= SHIFT;\n }\n\n return node;\n }\n }\n\n function setListBounds(list, begin, end) {\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n\n if (end !== undefined) {\n end = end | 0;\n }\n\n var owner = list.__ownerID || new OwnerID();\n var oldOrigin = list._origin;\n var oldCapacity = list._capacity;\n var newOrigin = oldOrigin + begin;\n var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n\n if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n return list;\n } // If it's going to end after it starts, it's empty.\n\n\n if (newOrigin >= newCapacity) {\n return list.clear();\n }\n\n var newLevel = list._level;\n var newRoot = list._root; // New origin might need creating a higher root.\n\n var offsetShift = 0;\n\n while (newOrigin + offsetShift < 0) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n newLevel += SHIFT;\n offsetShift += 1 << newLevel;\n }\n\n if (offsetShift) {\n newOrigin += offsetShift;\n oldOrigin += offsetShift;\n newCapacity += offsetShift;\n oldCapacity += offsetShift;\n }\n\n var oldTailOffset = getTailOffset(oldCapacity);\n var newTailOffset = getTailOffset(newCapacity); // New size might need creating a higher root.\n\n while (newTailOffset >= 1 << newLevel + SHIFT) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n newLevel += SHIFT;\n } // Locate or create the new tail.\n\n\n var oldTail = list._tail;\n var newTail = newTailOffset < oldTailOffset ? listNodeFor(list, newCapacity - 1) : newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail; // Merge Tail into tree.\n\n if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n newRoot = editableVNode(newRoot, owner);\n var node = newRoot;\n\n for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n var idx = oldTailOffset >>> level & MASK;\n node = node.array[idx] = editableVNode(node.array[idx], owner);\n }\n\n node.array[oldTailOffset >>> SHIFT & MASK] = oldTail;\n } // If the size has been reduced, there's a chance the tail needs to be trimmed.\n\n\n if (newCapacity < oldCapacity) {\n newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n } // If the new origin is within the tail, then we do not need a root.\n\n\n if (newOrigin >= newTailOffset) {\n newOrigin -= newTailOffset;\n newCapacity -= newTailOffset;\n newLevel = SHIFT;\n newRoot = null;\n newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); // Otherwise, if the root has been trimmed, garbage collect.\n } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n offsetShift = 0; // Identify the new top root node of the subtree of the old root.\n\n while (newRoot) {\n var beginIndex = newOrigin >>> newLevel & MASK;\n\n if (beginIndex !== newTailOffset >>> newLevel & MASK) {\n break;\n }\n\n if (beginIndex) {\n offsetShift += (1 << newLevel) * beginIndex;\n }\n\n newLevel -= SHIFT;\n newRoot = newRoot.array[beginIndex];\n } // Trim the new sides of the new root.\n\n\n if (newRoot && newOrigin > oldOrigin) {\n newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n }\n\n if (newRoot && newTailOffset < oldTailOffset) {\n newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n }\n\n if (offsetShift) {\n newOrigin -= offsetShift;\n newCapacity -= offsetShift;\n }\n }\n\n if (list.__ownerID) {\n list.size = newCapacity - newOrigin;\n list._origin = newOrigin;\n list._capacity = newCapacity;\n list._level = newLevel;\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n\n return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n }\n\n function mergeIntoListWith(list, merger, iterables) {\n var iters = [];\n var maxSize = 0;\n\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = IndexedIterable(value);\n\n if (iter.size > maxSize) {\n maxSize = iter.size;\n }\n\n if (!isIterable(value)) {\n iter = iter.map(function (v) {\n return fromJS(v);\n });\n }\n\n iters.push(iter);\n }\n\n if (maxSize > list.size) {\n list = list.setSize(maxSize);\n }\n\n return mergeIntoCollectionWith(list, merger, iters);\n }\n\n function getTailOffset(size) {\n return size < SIZE ? 0 : size - 1 >>> SHIFT << SHIFT;\n }\n\n createClass(OrderedMap, Map); // @pragma Construction\n\n function OrderedMap(value) {\n return value === null || value === undefined ? emptyOrderedMap() : isOrderedMap(value) ? value : emptyOrderedMap().withMutations(function (map) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v, k) {\n return map.set(k, v);\n });\n });\n }\n\n OrderedMap.of = function ()\n /*...values*/\n {\n return this(arguments);\n };\n\n OrderedMap.prototype.toString = function () {\n return this.__toString('OrderedMap {', '}');\n }; // @pragma Access\n\n\n OrderedMap.prototype.get = function (k, notSetValue) {\n var index = this._map.get(k);\n\n return index !== undefined ? this._list.get(index)[1] : notSetValue;\n }; // @pragma Modification\n\n\n OrderedMap.prototype.clear = function () {\n if (this.size === 0) {\n return this;\n }\n\n if (this.__ownerID) {\n this.size = 0;\n\n this._map.clear();\n\n this._list.clear();\n\n return this;\n }\n\n return emptyOrderedMap();\n };\n\n OrderedMap.prototype.set = function (k, v) {\n return updateOrderedMap(this, k, v);\n };\n\n OrderedMap.prototype.remove = function (k) {\n return updateOrderedMap(this, k, NOT_SET);\n };\n\n OrderedMap.prototype.wasAltered = function () {\n return this._map.wasAltered() || this._list.wasAltered();\n };\n\n OrderedMap.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n return this._list.__iterate(function (entry) {\n return entry && fn(entry[1], entry[0], this$0);\n }, reverse);\n };\n\n OrderedMap.prototype.__iterator = function (type, reverse) {\n return this._list.fromEntrySeq().__iterator(type, reverse);\n };\n\n OrderedMap.prototype.__ensureOwner = function (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n\n var newMap = this._map.__ensureOwner(ownerID);\n\n var newList = this._list.__ensureOwner(ownerID);\n\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n this._list = newList;\n return this;\n }\n\n return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n };\n\n function isOrderedMap(maybeOrderedMap) {\n return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n }\n\n OrderedMap.isOrderedMap = isOrderedMap;\n OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;\n OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\n function makeOrderedMap(map, list, ownerID, hash) {\n var omap = Object.create(OrderedMap.prototype);\n omap.size = map ? map.size : 0;\n omap._map = map;\n omap._list = list;\n omap.__ownerID = ownerID;\n omap.__hash = hash;\n return omap;\n }\n\n var EMPTY_ORDERED_MAP;\n\n function emptyOrderedMap() {\n return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n }\n\n function updateOrderedMap(omap, k, v) {\n var map = omap._map;\n var list = omap._list;\n var i = map.get(k);\n var has = i !== undefined;\n var newMap;\n var newList;\n\n if (v === NOT_SET) {\n // removed\n if (!has) {\n return omap;\n }\n\n if (list.size >= SIZE && list.size >= map.size * 2) {\n newList = list.filter(function (entry, idx) {\n return entry !== undefined && i !== idx;\n });\n newMap = newList.toKeyedSeq().map(function (entry) {\n return entry[0];\n }).flip().toMap();\n\n if (omap.__ownerID) {\n newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n }\n } else {\n newMap = map.remove(k);\n newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n }\n } else {\n if (has) {\n if (v === list.get(i)[1]) {\n return omap;\n }\n\n newMap = map;\n newList = list.set(i, [k, v]);\n } else {\n newMap = map.set(k, list.size);\n newList = list.set(list.size, [k, v]);\n }\n }\n\n if (omap.__ownerID) {\n omap.size = newMap.size;\n omap._map = newMap;\n omap._list = newList;\n omap.__hash = undefined;\n return omap;\n }\n\n return makeOrderedMap(newMap, newList);\n }\n\n createClass(ToKeyedSequence, KeyedSeq);\n\n function ToKeyedSequence(indexed, useKeys) {\n this._iter = indexed;\n this._useKeys = useKeys;\n this.size = indexed.size;\n }\n\n ToKeyedSequence.prototype.get = function (key, notSetValue) {\n return this._iter.get(key, notSetValue);\n };\n\n ToKeyedSequence.prototype.has = function (key) {\n return this._iter.has(key);\n };\n\n ToKeyedSequence.prototype.valueSeq = function () {\n return this._iter.valueSeq();\n };\n\n ToKeyedSequence.prototype.reverse = function () {\n var this$0 = this;\n var reversedSequence = reverseFactory(this, true);\n\n if (!this._useKeys) {\n reversedSequence.valueSeq = function () {\n return this$0._iter.toSeq().reverse();\n };\n }\n\n return reversedSequence;\n };\n\n ToKeyedSequence.prototype.map = function (mapper, context) {\n var this$0 = this;\n var mappedSequence = mapFactory(this, mapper, context);\n\n if (!this._useKeys) {\n mappedSequence.valueSeq = function () {\n return this$0._iter.toSeq().map(mapper, context);\n };\n }\n\n return mappedSequence;\n };\n\n ToKeyedSequence.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n var ii;\n return this._iter.__iterate(this._useKeys ? function (v, k) {\n return fn(v, k, this$0);\n } : (ii = reverse ? resolveSize(this) : 0, function (v) {\n return fn(v, reverse ? --ii : ii++, this$0);\n }), reverse);\n };\n\n ToKeyedSequence.prototype.__iterator = function (type, reverse) {\n if (this._useKeys) {\n return this._iter.__iterator(type, reverse);\n }\n\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\n var ii = reverse ? resolveSize(this) : 0;\n return new Iterator(function () {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n });\n };\n\n ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;\n createClass(ToIndexedSequence, IndexedSeq);\n\n function ToIndexedSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToIndexedSequence.prototype.includes = function (value) {\n return this._iter.includes(value);\n };\n\n ToIndexedSequence.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n var iterations = 0;\n return this._iter.__iterate(function (v) {\n return fn(v, iterations++, this$0);\n }, reverse);\n };\n\n ToIndexedSequence.prototype.__iterator = function (type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\n var iterations = 0;\n return new Iterator(function () {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value, step);\n });\n };\n\n createClass(ToSetSequence, SetSeq);\n\n function ToSetSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToSetSequence.prototype.has = function (key) {\n return this._iter.includes(key);\n };\n\n ToSetSequence.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n return this._iter.__iterate(function (v) {\n return fn(v, v, this$0);\n }, reverse);\n };\n\n ToSetSequence.prototype.__iterator = function (type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\n return new Iterator(function () {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, step.value, step.value, step);\n });\n };\n\n createClass(FromEntriesSequence, KeyedSeq);\n\n function FromEntriesSequence(entries) {\n this._iter = entries;\n this.size = entries.size;\n }\n\n FromEntriesSequence.prototype.entrySeq = function () {\n return this._iter.toSeq();\n };\n\n FromEntriesSequence.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n return this._iter.__iterate(function (entry) {\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return fn(indexedIterable ? entry.get(1) : entry[1], indexedIterable ? entry.get(0) : entry[0], this$0);\n }\n }, reverse);\n };\n\n FromEntriesSequence.prototype.__iterator = function (type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\n return new Iterator(function () {\n while (true) {\n var step = iterator.next();\n\n if (step.done) {\n return step;\n }\n\n var entry = step.value; // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return iteratorValue(type, indexedIterable ? entry.get(0) : entry[0], indexedIterable ? entry.get(1) : entry[1], step);\n }\n }\n });\n };\n\n ToIndexedSequence.prototype.cacheResult = ToKeyedSequence.prototype.cacheResult = ToSetSequence.prototype.cacheResult = FromEntriesSequence.prototype.cacheResult = cacheResultThrough;\n\n function flipFactory(iterable) {\n var flipSequence = makeSequence(iterable);\n flipSequence._iter = iterable;\n flipSequence.size = iterable.size;\n\n flipSequence.flip = function () {\n return iterable;\n };\n\n flipSequence.reverse = function () {\n var reversedSequence = iterable.reverse.apply(this); // super.reverse()\n\n reversedSequence.flip = function () {\n return iterable.reverse();\n };\n\n return reversedSequence;\n };\n\n flipSequence.has = function (key) {\n return iterable.includes(key);\n };\n\n flipSequence.includes = function (key) {\n return iterable.has(key);\n };\n\n flipSequence.cacheResult = cacheResultThrough;\n\n flipSequence.__iterateUncached = function (fn, reverse) {\n var this$0 = this;\n return iterable.__iterate(function (v, k) {\n return fn(k, v, this$0) !== false;\n }, reverse);\n };\n\n flipSequence.__iteratorUncached = function (type, reverse) {\n if (type === ITERATE_ENTRIES) {\n var iterator = iterable.__iterator(type, reverse);\n\n return new Iterator(function () {\n var step = iterator.next();\n\n if (!step.done) {\n var k = step.value[0];\n step.value[0] = step.value[1];\n step.value[1] = k;\n }\n\n return step;\n });\n }\n\n return iterable.__iterator(type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, reverse);\n };\n\n return flipSequence;\n }\n\n function mapFactory(iterable, mapper, context) {\n var mappedSequence = makeSequence(iterable);\n mappedSequence.size = iterable.size;\n\n mappedSequence.has = function (key) {\n return iterable.has(key);\n };\n\n mappedSequence.get = function (key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v === NOT_SET ? notSetValue : mapper.call(context, v, key, iterable);\n };\n\n mappedSequence.__iterateUncached = function (fn, reverse) {\n var this$0 = this;\n return iterable.__iterate(function (v, k, c) {\n return fn(mapper.call(context, v, k, c), k, this$0) !== false;\n }, reverse);\n };\n\n mappedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\n return new Iterator(function () {\n var step = iterator.next();\n\n if (step.done) {\n return step;\n }\n\n var entry = step.value;\n var key = entry[0];\n return iteratorValue(type, key, mapper.call(context, entry[1], key, iterable), step);\n });\n };\n\n return mappedSequence;\n }\n\n function reverseFactory(iterable, useKeys) {\n var reversedSequence = makeSequence(iterable);\n reversedSequence._iter = iterable;\n reversedSequence.size = iterable.size;\n\n reversedSequence.reverse = function () {\n return iterable;\n };\n\n if (iterable.flip) {\n reversedSequence.flip = function () {\n var flipSequence = flipFactory(iterable);\n\n flipSequence.reverse = function () {\n return iterable.flip();\n };\n\n return flipSequence;\n };\n }\n\n reversedSequence.get = function (key, notSetValue) {\n return iterable.get(useKeys ? key : -1 - key, notSetValue);\n };\n\n reversedSequence.has = function (key) {\n return iterable.has(useKeys ? key : -1 - key);\n };\n\n reversedSequence.includes = function (value) {\n return iterable.includes(value);\n };\n\n reversedSequence.cacheResult = cacheResultThrough;\n\n reversedSequence.__iterate = function (fn, reverse) {\n var this$0 = this;\n return iterable.__iterate(function (v, k) {\n return fn(v, k, this$0);\n }, !reverse);\n };\n\n reversedSequence.__iterator = function (type, reverse) {\n return iterable.__iterator(type, !reverse);\n };\n\n return reversedSequence;\n }\n\n function filterFactory(iterable, predicate, context, useKeys) {\n var filterSequence = makeSequence(iterable);\n\n if (useKeys) {\n filterSequence.has = function (key) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n };\n\n filterSequence.get = function (key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && predicate.call(context, v, key, iterable) ? v : notSetValue;\n };\n }\n\n filterSequence.__iterateUncached = function (fn, reverse) {\n var this$0 = this;\n var iterations = 0;\n\n iterable.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n }, reverse);\n\n return iterations;\n };\n\n filterSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\n var iterations = 0;\n return new Iterator(function () {\n while (true) {\n var step = iterator.next();\n\n if (step.done) {\n return step;\n }\n\n var entry = step.value;\n var key = entry[0];\n var value = entry[1];\n\n if (predicate.call(context, value, key, iterable)) {\n return iteratorValue(type, useKeys ? key : iterations++, value, step);\n }\n }\n });\n };\n\n return filterSequence;\n }\n\n function countByFactory(iterable, grouper, context) {\n var groups = Map().asMutable();\n\n iterable.__iterate(function (v, k) {\n groups.update(grouper.call(context, v, k, iterable), 0, function (a) {\n return a + 1;\n });\n });\n\n return groups.asImmutable();\n }\n\n function groupByFactory(iterable, grouper, context) {\n var isKeyedIter = isKeyed(iterable);\n var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();\n\n iterable.__iterate(function (v, k) {\n groups.update(grouper.call(context, v, k, iterable), function (a) {\n return a = a || [], a.push(isKeyedIter ? [k, v] : v), a;\n });\n });\n\n var coerce = iterableClass(iterable);\n return groups.map(function (arr) {\n return reify(iterable, coerce(arr));\n });\n }\n\n function sliceFactory(iterable, begin, end, useKeys) {\n var originalSize = iterable.size; // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n\n if (begin !== undefined) {\n begin = begin | 0;\n }\n\n if (end !== undefined) {\n if (end === Infinity) {\n end = originalSize;\n } else {\n end = end | 0;\n }\n }\n\n if (wholeSlice(begin, end, originalSize)) {\n return iterable;\n }\n\n var resolvedBegin = resolveBegin(begin, originalSize);\n var resolvedEnd = resolveEnd(end, originalSize); // begin or end will be NaN if they were provided as negative numbers and\n // this iterable's size is unknown. In that case, cache first so there is\n // a known size and these do not resolve to NaN.\n\n if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);\n } // Note: resolvedEnd is undefined when the original sequence's length is\n // unknown and this slice did not supply an end and should contain all\n // elements after resolvedBegin.\n // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n\n\n var resolvedSize = resolvedEnd - resolvedBegin;\n var sliceSize;\n\n if (resolvedSize === resolvedSize) {\n sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n }\n\n var sliceSeq = makeSequence(iterable); // If iterable.size is undefined, the size of the realized sliceSeq is\n // unknown at this point unless the number of items to slice is 0\n\n sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;\n\n if (!useKeys && isSeq(iterable) && sliceSize >= 0) {\n sliceSeq.get = function (index, notSetValue) {\n index = wrapIndex(this, index);\n return index >= 0 && index < sliceSize ? iterable.get(index + resolvedBegin, notSetValue) : notSetValue;\n };\n }\n\n sliceSeq.__iterateUncached = function (fn, reverse) {\n var this$0 = this;\n\n if (sliceSize === 0) {\n return 0;\n }\n\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n\n var skipped = 0;\n var isSkipping = true;\n var iterations = 0;\n\n iterable.__iterate(function (v, k) {\n if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0) !== false && iterations !== sliceSize;\n }\n });\n\n return iterations;\n };\n\n sliceSeq.__iteratorUncached = function (type, reverse) {\n if (sliceSize !== 0 && reverse) {\n return this.cacheResult().__iterator(type, reverse);\n } // Don't bother instantiating parent iterator if taking 0.\n\n\n var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);\n\n var skipped = 0;\n var iterations = 0;\n return new Iterator(function () {\n while (skipped++ < resolvedBegin) {\n iterator.next();\n }\n\n if (++iterations > sliceSize) {\n return iteratorDone();\n }\n\n var step = iterator.next();\n\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations - 1, undefined, step);\n } else {\n return iteratorValue(type, iterations - 1, step.value[1], step);\n }\n });\n };\n\n return sliceSeq;\n }\n\n function takeWhileFactory(iterable, predicate, context) {\n var takeSequence = makeSequence(iterable);\n\n takeSequence.__iterateUncached = function (fn, reverse) {\n var this$0 = this;\n\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n\n var iterations = 0;\n\n iterable.__iterate(function (v, k, c) {\n return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0);\n });\n\n return iterations;\n };\n\n takeSequence.__iteratorUncached = function (type, reverse) {\n var this$0 = this;\n\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\n var iterating = true;\n return new Iterator(function () {\n if (!iterating) {\n return iteratorDone();\n }\n\n var step = iterator.next();\n\n if (step.done) {\n return step;\n }\n\n var entry = step.value;\n var k = entry[0];\n var v = entry[1];\n\n if (!predicate.call(context, v, k, this$0)) {\n iterating = false;\n return iteratorDone();\n }\n\n return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n });\n };\n\n return takeSequence;\n }\n\n function skipWhileFactory(iterable, predicate, context, useKeys) {\n var skipSequence = makeSequence(iterable);\n\n skipSequence.__iterateUncached = function (fn, reverse) {\n var this$0 = this;\n\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n\n var isSkipping = true;\n var iterations = 0;\n\n iterable.__iterate(function (v, k, c) {\n if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n });\n\n return iterations;\n };\n\n skipSequence.__iteratorUncached = function (type, reverse) {\n var this$0 = this;\n\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\n var skipping = true;\n var iterations = 0;\n return new Iterator(function () {\n var step, k, v;\n\n do {\n step = iterator.next();\n\n if (step.done) {\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations++, undefined, step);\n } else {\n return iteratorValue(type, iterations++, step.value[1], step);\n }\n }\n\n var entry = step.value;\n k = entry[0];\n v = entry[1];\n skipping && (skipping = predicate.call(context, v, k, this$0));\n } while (skipping);\n\n return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n });\n };\n\n return skipSequence;\n }\n\n function concatFactory(iterable, values) {\n var isKeyedIterable = isKeyed(iterable);\n var iters = [iterable].concat(values).map(function (v) {\n if (!isIterable(v)) {\n v = isKeyedIterable ? keyedSeqFromValue(v) : indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n } else if (isKeyedIterable) {\n v = KeyedIterable(v);\n }\n\n return v;\n }).filter(function (v) {\n return v.size !== 0;\n });\n\n if (iters.length === 0) {\n return iterable;\n }\n\n if (iters.length === 1) {\n var singleton = iters[0];\n\n if (singleton === iterable || isKeyedIterable && isKeyed(singleton) || isIndexed(iterable) && isIndexed(singleton)) {\n return singleton;\n }\n }\n\n var concatSeq = new ArraySeq(iters);\n\n if (isKeyedIterable) {\n concatSeq = concatSeq.toKeyedSeq();\n } else if (!isIndexed(iterable)) {\n concatSeq = concatSeq.toSetSeq();\n }\n\n concatSeq = concatSeq.flatten(true);\n concatSeq.size = iters.reduce(function (sum, seq) {\n if (sum !== undefined) {\n var size = seq.size;\n\n if (size !== undefined) {\n return sum + size;\n }\n }\n }, 0);\n return concatSeq;\n }\n\n function flattenFactory(iterable, depth, useKeys) {\n var flatSequence = makeSequence(iterable);\n\n flatSequence.__iterateUncached = function (fn, reverse) {\n var iterations = 0;\n var stopped = false;\n\n function flatDeep(iter, currentDepth) {\n var this$0 = this;\n\n iter.__iterate(function (v, k) {\n if ((!depth || currentDepth < depth) && isIterable(v)) {\n flatDeep(v, currentDepth + 1);\n } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {\n stopped = true;\n }\n\n return !stopped;\n }, reverse);\n }\n\n flatDeep(iterable, 0);\n return iterations;\n };\n\n flatSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(type, reverse);\n\n var stack = [];\n var iterations = 0;\n return new Iterator(function () {\n while (iterator) {\n var step = iterator.next();\n\n if (step.done !== false) {\n iterator = stack.pop();\n continue;\n }\n\n var v = step.value;\n\n if (type === ITERATE_ENTRIES) {\n v = v[1];\n }\n\n if ((!depth || stack.length < depth) && isIterable(v)) {\n stack.push(iterator);\n iterator = v.__iterator(type, reverse);\n } else {\n return useKeys ? step : iteratorValue(type, iterations++, v, step);\n }\n }\n\n return iteratorDone();\n });\n };\n\n return flatSequence;\n }\n\n function flatMapFactory(iterable, mapper, context) {\n var coerce = iterableClass(iterable);\n return iterable.toSeq().map(function (v, k) {\n return coerce(mapper.call(context, v, k, iterable));\n }).flatten(true);\n }\n\n function interposeFactory(iterable, separator) {\n var interposedSequence = makeSequence(iterable);\n interposedSequence.size = iterable.size && iterable.size * 2 - 1;\n\n interposedSequence.__iterateUncached = function (fn, reverse) {\n var this$0 = this;\n var iterations = 0;\n\n iterable.__iterate(function (v, k) {\n return (!iterations || fn(separator, iterations++, this$0) !== false) && fn(v, iterations++, this$0) !== false;\n }, reverse);\n\n return iterations;\n };\n\n interposedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n\n var iterations = 0;\n var step;\n return new Iterator(function () {\n if (!step || iterations % 2) {\n step = iterator.next();\n\n if (step.done) {\n return step;\n }\n }\n\n return iterations % 2 ? iteratorValue(type, iterations++, separator) : iteratorValue(type, iterations++, step.value, step);\n });\n };\n\n return interposedSequence;\n }\n\n function sortFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n\n var isKeyedIterable = isKeyed(iterable);\n var index = 0;\n var entries = iterable.toSeq().map(function (v, k) {\n return [k, v, index++, mapper ? mapper(v, k, iterable) : v];\n }).toArray();\n entries.sort(function (a, b) {\n return comparator(a[3], b[3]) || a[2] - b[2];\n }).forEach(isKeyedIterable ? function (v, i) {\n entries[i].length = 2;\n } : function (v, i) {\n entries[i] = v[1];\n });\n return isKeyedIterable ? KeyedSeq(entries) : isIndexed(iterable) ? IndexedSeq(entries) : SetSeq(entries);\n }\n\n function maxFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n\n if (mapper) {\n var entry = iterable.toSeq().map(function (v, k) {\n return [v, mapper(v, k, iterable)];\n }).reduce(function (a, b) {\n return maxCompare(comparator, a[1], b[1]) ? b : a;\n });\n return entry && entry[0];\n } else {\n return iterable.reduce(function (a, b) {\n return maxCompare(comparator, a, b) ? b : a;\n });\n }\n }\n\n function maxCompare(comparator, a, b) {\n var comp = comparator(b, a); // b is considered the new max if the comparator declares them equal, but\n // they are not equal and b is in fact a nullish value.\n\n return comp === 0 && b !== a && (b === undefined || b === null || b !== b) || comp > 0;\n }\n\n function zipWithFactory(keyIter, zipper, iters) {\n var zipSequence = makeSequence(keyIter);\n zipSequence.size = new ArraySeq(iters).map(function (i) {\n return i.size;\n }).min(); // Note: this a generic base implementation of __iterate in terms of\n // __iterator which may be more generically useful in the future.\n\n zipSequence.__iterate = function (fn, reverse) {\n /* generic:\n var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n iterations++;\n if (fn(step.value[1], step.value[0], this) === false) {\n break;\n }\n }\n return iterations;\n */\n // indexed:\n var iterator = this.__iterator(ITERATE_VALUES, reverse);\n\n var step;\n var iterations = 0;\n\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n\n return iterations;\n };\n\n zipSequence.__iteratorUncached = function (type, reverse) {\n var iterators = iters.map(function (i) {\n return i = Iterable(i), getIterator(reverse ? i.reverse() : i);\n });\n var iterations = 0;\n var isDone = false;\n return new Iterator(function () {\n var steps;\n\n if (!isDone) {\n steps = iterators.map(function (i) {\n return i.next();\n });\n isDone = steps.some(function (s) {\n return s.done;\n });\n }\n\n if (isDone) {\n return iteratorDone();\n }\n\n return iteratorValue(type, iterations++, zipper.apply(null, steps.map(function (s) {\n return s.value;\n })));\n });\n };\n\n return zipSequence;\n } // #pragma Helper Functions\n\n\n function reify(iter, seq) {\n return isSeq(iter) ? seq : iter.constructor(seq);\n }\n\n function validateEntry(entry) {\n if (entry !== Object(entry)) {\n throw new TypeError('Expected [K, V] tuple: ' + entry);\n }\n }\n\n function resolveSize(iter) {\n assertNotInfinite(iter.size);\n return ensureSize(iter);\n }\n\n function iterableClass(iterable) {\n return isKeyed(iterable) ? KeyedIterable : isIndexed(iterable) ? IndexedIterable : SetIterable;\n }\n\n function makeSequence(iterable) {\n return Object.create((isKeyed(iterable) ? KeyedSeq : isIndexed(iterable) ? IndexedSeq : SetSeq).prototype);\n }\n\n function cacheResultThrough() {\n if (this._iter.cacheResult) {\n this._iter.cacheResult();\n\n this.size = this._iter.size;\n return this;\n } else {\n return Seq.prototype.cacheResult.call(this);\n }\n }\n\n function defaultComparator(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n }\n\n function forceIterator(keyPath) {\n var iter = getIterator(keyPath);\n\n if (!iter) {\n // Array might not be iterable in this environment, so we need a fallback\n // to our wrapped type.\n if (!isArrayLike(keyPath)) {\n throw new TypeError('Expected iterable or array-like: ' + keyPath);\n }\n\n iter = getIterator(Iterable(keyPath));\n }\n\n return iter;\n }\n\n createClass(Record, KeyedCollection);\n\n function Record(defaultValues, name) {\n var hasInitialized;\n\n var RecordType = function Record(values) {\n if (values instanceof RecordType) {\n return values;\n }\n\n if (!(this instanceof RecordType)) {\n return new RecordType(values);\n }\n\n if (!hasInitialized) {\n hasInitialized = true;\n var keys = Object.keys(defaultValues);\n setProps(RecordTypePrototype, keys);\n RecordTypePrototype.size = keys.length;\n RecordTypePrototype._name = name;\n RecordTypePrototype._keys = keys;\n RecordTypePrototype._defaultValues = defaultValues;\n }\n\n this._map = Map(values);\n };\n\n var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n RecordTypePrototype.constructor = RecordType;\n return RecordType;\n }\n\n Record.prototype.toString = function () {\n return this.__toString(recordName(this) + ' {', '}');\n }; // @pragma Access\n\n\n Record.prototype.has = function (k) {\n return this._defaultValues.hasOwnProperty(k);\n };\n\n Record.prototype.get = function (k, notSetValue) {\n if (!this.has(k)) {\n return notSetValue;\n }\n\n var defaultVal = this._defaultValues[k];\n return this._map ? this._map.get(k, defaultVal) : defaultVal;\n }; // @pragma Modification\n\n\n Record.prototype.clear = function () {\n if (this.__ownerID) {\n this._map && this._map.clear();\n return this;\n }\n\n var RecordType = this.constructor;\n return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));\n };\n\n Record.prototype.set = function (k, v) {\n if (!this.has(k)) {\n throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n }\n\n if (this._map && !this._map.has(k)) {\n var defaultVal = this._defaultValues[k];\n\n if (v === defaultVal) {\n return this;\n }\n }\n\n var newMap = this._map && this._map.set(k, v);\n\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n\n return makeRecord(this, newMap);\n };\n\n Record.prototype.remove = function (k) {\n if (!this.has(k)) {\n return this;\n }\n\n var newMap = this._map && this._map.remove(k);\n\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n\n return makeRecord(this, newMap);\n };\n\n Record.prototype.wasAltered = function () {\n return this._map.wasAltered();\n };\n\n Record.prototype.__iterator = function (type, reverse) {\n var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function (_, k) {\n return this$0.get(k);\n }).__iterator(type, reverse);\n };\n\n Record.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function (_, k) {\n return this$0.get(k);\n }).__iterate(fn, reverse);\n };\n\n Record.prototype.__ensureOwner = function (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n\n var newMap = this._map && this._map.__ensureOwner(ownerID);\n\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n\n return makeRecord(this, newMap, ownerID);\n };\n\n var RecordPrototype = Record.prototype;\n RecordPrototype[DELETE] = RecordPrototype.remove;\n RecordPrototype.deleteIn = RecordPrototype.removeIn = MapPrototype.removeIn;\n RecordPrototype.merge = MapPrototype.merge;\n RecordPrototype.mergeWith = MapPrototype.mergeWith;\n RecordPrototype.mergeIn = MapPrototype.mergeIn;\n RecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n RecordPrototype.setIn = MapPrototype.setIn;\n RecordPrototype.update = MapPrototype.update;\n RecordPrototype.updateIn = MapPrototype.updateIn;\n RecordPrototype.withMutations = MapPrototype.withMutations;\n RecordPrototype.asMutable = MapPrototype.asMutable;\n RecordPrototype.asImmutable = MapPrototype.asImmutable;\n\n function makeRecord(likeRecord, map, ownerID) {\n var record = Object.create(Object.getPrototypeOf(likeRecord));\n record._map = map;\n record.__ownerID = ownerID;\n return record;\n }\n\n function recordName(record) {\n return record._name || record.constructor.name || 'Record';\n }\n\n function setProps(prototype, names) {\n try {\n names.forEach(setProp.bind(undefined, prototype));\n } catch (error) {// Object.defineProperty failed. Probably IE8.\n }\n }\n\n function setProp(prototype, name) {\n Object.defineProperty(prototype, name, {\n get: function get() {\n return this.get(name);\n },\n set: function set(value) {\n invariant(this.__ownerID, 'Cannot set on an immutable record.');\n this.set(name, value);\n }\n });\n }\n\n createClass(Set, SetCollection); // @pragma Construction\n\n function Set(value) {\n return value === null || value === undefined ? emptySet() : isSet(value) && !isOrdered(value) ? value : emptySet().withMutations(function (set) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v) {\n return set.add(v);\n });\n });\n }\n\n Set.of = function ()\n /*...values*/\n {\n return this(arguments);\n };\n\n Set.fromKeys = function (value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n Set.prototype.toString = function () {\n return this.__toString('Set {', '}');\n }; // @pragma Access\n\n\n Set.prototype.has = function (value) {\n return this._map.has(value);\n }; // @pragma Modification\n\n\n Set.prototype.add = function (value) {\n return updateSet(this, this._map.set(value, true));\n };\n\n Set.prototype.remove = function (value) {\n return updateSet(this, this._map.remove(value));\n };\n\n Set.prototype.clear = function () {\n return updateSet(this, this._map.clear());\n }; // @pragma Composition\n\n\n Set.prototype.union = function () {\n var iters = SLICE$0.call(arguments, 0);\n iters = iters.filter(function (x) {\n return x.size !== 0;\n });\n\n if (iters.length === 0) {\n return this;\n }\n\n if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n return this.constructor(iters[0]);\n }\n\n return this.withMutations(function (set) {\n for (var ii = 0; ii < iters.length; ii++) {\n SetIterable(iters[ii]).forEach(function (value) {\n return set.add(value);\n });\n }\n });\n };\n\n Set.prototype.intersect = function () {\n var iters = SLICE$0.call(arguments, 0);\n\n if (iters.length === 0) {\n return this;\n }\n\n iters = iters.map(function (iter) {\n return SetIterable(iter);\n });\n var originalSet = this;\n return this.withMutations(function (set) {\n originalSet.forEach(function (value) {\n if (!iters.every(function (iter) {\n return iter.includes(value);\n })) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.subtract = function () {\n var iters = SLICE$0.call(arguments, 0);\n\n if (iters.length === 0) {\n return this;\n }\n\n iters = iters.map(function (iter) {\n return SetIterable(iter);\n });\n var originalSet = this;\n return this.withMutations(function (set) {\n originalSet.forEach(function (value) {\n if (iters.some(function (iter) {\n return iter.includes(value);\n })) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.merge = function () {\n return this.union.apply(this, arguments);\n };\n\n Set.prototype.mergeWith = function (merger) {\n var iters = SLICE$0.call(arguments, 1);\n return this.union.apply(this, iters);\n };\n\n Set.prototype.sort = function (comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator));\n };\n\n Set.prototype.sortBy = function (mapper, comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator, mapper));\n };\n\n Set.prototype.wasAltered = function () {\n return this._map.wasAltered();\n };\n\n Set.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n return this._map.__iterate(function (_, k) {\n return fn(k, k, this$0);\n }, reverse);\n };\n\n Set.prototype.__iterator = function (type, reverse) {\n return this._map.map(function (_, k) {\n return k;\n }).__iterator(type, reverse);\n };\n\n Set.prototype.__ensureOwner = function (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n\n var newMap = this._map.__ensureOwner(ownerID);\n\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n\n return this.__make(newMap, ownerID);\n };\n\n function isSet(maybeSet) {\n return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n }\n\n Set.isSet = isSet;\n var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n var SetPrototype = Set.prototype;\n SetPrototype[IS_SET_SENTINEL] = true;\n SetPrototype[DELETE] = SetPrototype.remove;\n SetPrototype.mergeDeep = SetPrototype.merge;\n SetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n SetPrototype.withMutations = MapPrototype.withMutations;\n SetPrototype.asMutable = MapPrototype.asMutable;\n SetPrototype.asImmutable = MapPrototype.asImmutable;\n SetPrototype.__empty = emptySet;\n SetPrototype.__make = makeSet;\n\n function updateSet(set, newMap) {\n if (set.__ownerID) {\n set.size = newMap.size;\n set._map = newMap;\n return set;\n }\n\n return newMap === set._map ? set : newMap.size === 0 ? set.__empty() : set.__make(newMap);\n }\n\n function makeSet(map, ownerID) {\n var set = Object.create(SetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_SET;\n\n function emptySet() {\n return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n }\n\n createClass(OrderedSet, Set); // @pragma Construction\n\n function OrderedSet(value) {\n return value === null || value === undefined ? emptyOrderedSet() : isOrderedSet(value) ? value : emptyOrderedSet().withMutations(function (set) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v) {\n return set.add(v);\n });\n });\n }\n\n OrderedSet.of = function ()\n /*...values*/\n {\n return this(arguments);\n };\n\n OrderedSet.fromKeys = function (value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n OrderedSet.prototype.toString = function () {\n return this.__toString('OrderedSet {', '}');\n };\n\n function isOrderedSet(maybeOrderedSet) {\n return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n }\n\n OrderedSet.isOrderedSet = isOrderedSet;\n var OrderedSetPrototype = OrderedSet.prototype;\n OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;\n OrderedSetPrototype.__empty = emptyOrderedSet;\n OrderedSetPrototype.__make = makeOrderedSet;\n\n function makeOrderedSet(map, ownerID) {\n var set = Object.create(OrderedSetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_ORDERED_SET;\n\n function emptyOrderedSet() {\n return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));\n }\n\n createClass(Stack, IndexedCollection); // @pragma Construction\n\n function Stack(value) {\n return value === null || value === undefined ? emptyStack() : isStack(value) ? value : emptyStack().unshiftAll(value);\n }\n\n Stack.of = function ()\n /*...values*/\n {\n return this(arguments);\n };\n\n Stack.prototype.toString = function () {\n return this.__toString('Stack [', ']');\n }; // @pragma Access\n\n\n Stack.prototype.get = function (index, notSetValue) {\n var head = this._head;\n index = wrapIndex(this, index);\n\n while (head && index--) {\n head = head.next;\n }\n\n return head ? head.value : notSetValue;\n };\n\n Stack.prototype.peek = function () {\n return this._head && this._head.value;\n }; // @pragma Modification\n\n\n Stack.prototype.push = function ()\n /*...values*/\n {\n if (arguments.length === 0) {\n return this;\n }\n\n var newSize = this.size + arguments.length;\n var head = this._head;\n\n for (var ii = arguments.length - 1; ii >= 0; ii--) {\n head = {\n value: arguments[ii],\n next: head\n };\n }\n\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pushAll = function (iter) {\n iter = IndexedIterable(iter);\n\n if (iter.size === 0) {\n return this;\n }\n\n assertNotInfinite(iter.size);\n var newSize = this.size;\n var head = this._head;\n iter.reverse().forEach(function (value) {\n newSize++;\n head = {\n value: value,\n next: head\n };\n });\n\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pop = function () {\n return this.slice(1);\n };\n\n Stack.prototype.unshift = function ()\n /*...values*/\n {\n return this.push.apply(this, arguments);\n };\n\n Stack.prototype.unshiftAll = function (iter) {\n return this.pushAll(iter);\n };\n\n Stack.prototype.shift = function () {\n return this.pop.apply(this, arguments);\n };\n\n Stack.prototype.clear = function () {\n if (this.size === 0) {\n return this;\n }\n\n if (this.__ownerID) {\n this.size = 0;\n this._head = undefined;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n\n return emptyStack();\n };\n\n Stack.prototype.slice = function (begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n\n var resolvedBegin = resolveBegin(begin, this.size);\n var resolvedEnd = resolveEnd(end, this.size);\n\n if (resolvedEnd !== this.size) {\n // super.slice(begin, end);\n return IndexedCollection.prototype.slice.call(this, begin, end);\n }\n\n var newSize = this.size - resolvedBegin;\n var head = this._head;\n\n while (resolvedBegin--) {\n head = head.next;\n }\n\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n\n return makeStack(newSize, head);\n }; // @pragma Mutability\n\n\n Stack.prototype.__ensureOwner = function (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n\n return makeStack(this.size, this._head, ownerID, this.__hash);\n }; // @pragma Iteration\n\n\n Stack.prototype.__iterate = function (fn, reverse) {\n if (reverse) {\n return this.reverse().__iterate(fn);\n }\n\n var iterations = 0;\n var node = this._head;\n\n while (node) {\n if (fn(node.value, iterations++, this) === false) {\n break;\n }\n\n node = node.next;\n }\n\n return iterations;\n };\n\n Stack.prototype.__iterator = function (type, reverse) {\n if (reverse) {\n return this.reverse().__iterator(type);\n }\n\n var iterations = 0;\n var node = this._head;\n return new Iterator(function () {\n if (node) {\n var value = node.value;\n node = node.next;\n return iteratorValue(type, iterations++, value);\n }\n\n return iteratorDone();\n });\n };\n\n function isStack(maybeStack) {\n return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n }\n\n Stack.isStack = isStack;\n var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n var StackPrototype = Stack.prototype;\n StackPrototype[IS_STACK_SENTINEL] = true;\n StackPrototype.withMutations = MapPrototype.withMutations;\n StackPrototype.asMutable = MapPrototype.asMutable;\n StackPrototype.asImmutable = MapPrototype.asImmutable;\n StackPrototype.wasAltered = MapPrototype.wasAltered;\n\n function makeStack(size, head, ownerID, hash) {\n var map = Object.create(StackPrototype);\n map.size = size;\n map._head = head;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_STACK;\n\n function emptyStack() {\n return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n }\n /**\n * Contributes additional methods to a constructor\n */\n\n\n function mixin(ctor, methods) {\n var keyCopier = function keyCopier(key) {\n ctor.prototype[key] = methods[key];\n };\n\n Object.keys(methods).forEach(keyCopier);\n Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n return ctor;\n }\n\n Iterable.Iterator = Iterator;\n mixin(Iterable, {\n // ### Conversion to other types\n toArray: function toArray() {\n assertNotInfinite(this.size);\n var array = new Array(this.size || 0);\n\n this.valueSeq().__iterate(function (v, i) {\n array[i] = v;\n });\n\n return array;\n },\n toIndexedSeq: function toIndexedSeq() {\n return new ToIndexedSequence(this);\n },\n toJS: function toJS() {\n return this.toSeq().map(function (value) {\n return value && typeof value.toJS === 'function' ? value.toJS() : value;\n }).__toJS();\n },\n toJSON: function toJSON() {\n return this.toSeq().map(function (value) {\n return value && typeof value.toJSON === 'function' ? value.toJSON() : value;\n }).__toJS();\n },\n toKeyedSeq: function toKeyedSeq() {\n return new ToKeyedSequence(this, true);\n },\n toMap: function toMap() {\n // Use Late Binding here to solve the circular dependency.\n return Map(this.toKeyedSeq());\n },\n toObject: function toObject() {\n assertNotInfinite(this.size);\n var object = {};\n\n this.__iterate(function (v, k) {\n object[k] = v;\n });\n\n return object;\n },\n toOrderedMap: function toOrderedMap() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedMap(this.toKeyedSeq());\n },\n toOrderedSet: function toOrderedSet() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n },\n toSet: function toSet() {\n // Use Late Binding here to solve the circular dependency.\n return Set(isKeyed(this) ? this.valueSeq() : this);\n },\n toSetSeq: function toSetSeq() {\n return new ToSetSequence(this);\n },\n toSeq: function toSeq() {\n return isIndexed(this) ? this.toIndexedSeq() : isKeyed(this) ? this.toKeyedSeq() : this.toSetSeq();\n },\n toStack: function toStack() {\n // Use Late Binding here to solve the circular dependency.\n return Stack(isKeyed(this) ? this.valueSeq() : this);\n },\n toList: function toList() {\n // Use Late Binding here to solve the circular dependency.\n return List(isKeyed(this) ? this.valueSeq() : this);\n },\n // ### Common JavaScript methods and properties\n toString: function toString() {\n return '[Iterable]';\n },\n __toString: function __toString(head, tail) {\n if (this.size === 0) {\n return head + tail;\n }\n\n return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n },\n // ### ES6 Collection methods (ES6 Array and Map)\n concat: function concat() {\n var values = SLICE$0.call(arguments, 0);\n return reify(this, concatFactory(this, values));\n },\n includes: function includes(searchValue) {\n return this.some(function (value) {\n return is(value, searchValue);\n });\n },\n entries: function entries() {\n return this.__iterator(ITERATE_ENTRIES);\n },\n every: function every(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = true;\n\n this.__iterate(function (v, k, c) {\n if (!predicate.call(context, v, k, c)) {\n returnValue = false;\n return false;\n }\n });\n\n return returnValue;\n },\n filter: function filter(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, true));\n },\n find: function find(predicate, context, notSetValue) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[1] : notSetValue;\n },\n forEach: function forEach(sideEffect, context) {\n assertNotInfinite(this.size);\n return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n },\n join: function join(separator) {\n assertNotInfinite(this.size);\n separator = separator !== undefined ? '' + separator : ',';\n var joined = '';\n var isFirst = true;\n\n this.__iterate(function (v) {\n isFirst ? isFirst = false : joined += separator;\n joined += v !== null && v !== undefined ? v.toString() : '';\n });\n\n return joined;\n },\n keys: function keys() {\n return this.__iterator(ITERATE_KEYS);\n },\n map: function map(mapper, context) {\n return reify(this, mapFactory(this, mapper, context));\n },\n reduce: function reduce(reducer, initialReduction, context) {\n assertNotInfinite(this.size);\n var reduction;\n var useFirst;\n\n if (arguments.length < 2) {\n useFirst = true;\n } else {\n reduction = initialReduction;\n }\n\n this.__iterate(function (v, k, c) {\n if (useFirst) {\n useFirst = false;\n reduction = v;\n } else {\n reduction = reducer.call(context, reduction, v, k, c);\n }\n });\n\n return reduction;\n },\n reduceRight: function reduceRight(reducer, initialReduction, context) {\n var reversed = this.toKeyedSeq().reverse();\n return reversed.reduce.apply(reversed, arguments);\n },\n reverse: function reverse() {\n return reify(this, reverseFactory(this, true));\n },\n slice: function slice(begin, end) {\n return reify(this, sliceFactory(this, begin, end, true));\n },\n some: function some(predicate, context) {\n return !this.every(not(predicate), context);\n },\n sort: function sort(comparator) {\n return reify(this, sortFactory(this, comparator));\n },\n values: function values() {\n return this.__iterator(ITERATE_VALUES);\n },\n // ### More sequential methods\n butLast: function butLast() {\n return this.slice(0, -1);\n },\n isEmpty: function isEmpty() {\n return this.size !== undefined ? this.size === 0 : !this.some(function () {\n return true;\n });\n },\n count: function count(predicate, context) {\n return ensureSize(predicate ? this.toSeq().filter(predicate, context) : this);\n },\n countBy: function countBy(grouper, context) {\n return countByFactory(this, grouper, context);\n },\n equals: function equals(other) {\n return deepEqual(this, other);\n },\n entrySeq: function entrySeq() {\n var iterable = this;\n\n if (iterable._cache) {\n // We cache as an entries array, so we can just return the cache!\n return new ArraySeq(iterable._cache);\n }\n\n var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n\n entriesSequence.fromEntrySeq = function () {\n return iterable.toSeq();\n };\n\n return entriesSequence;\n },\n filterNot: function filterNot(predicate, context) {\n return this.filter(not(predicate), context);\n },\n findEntry: function findEntry(predicate, context, notSetValue) {\n var found = notSetValue;\n\n this.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n found = [k, v];\n return false;\n }\n });\n\n return found;\n },\n findKey: function findKey(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry && entry[0];\n },\n findLast: function findLast(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n },\n findLastEntry: function findLastEntry(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue);\n },\n findLastKey: function findLastKey(predicate, context) {\n return this.toKeyedSeq().reverse().findKey(predicate, context);\n },\n first: function first() {\n return this.find(returnTrue);\n },\n flatMap: function flatMap(mapper, context) {\n return reify(this, flatMapFactory(this, mapper, context));\n },\n flatten: function flatten(depth) {\n return reify(this, flattenFactory(this, depth, true));\n },\n fromEntrySeq: function fromEntrySeq() {\n return new FromEntriesSequence(this);\n },\n get: function get(searchKey, notSetValue) {\n return this.find(function (_, key) {\n return is(key, searchKey);\n }, undefined, notSetValue);\n },\n getIn: function getIn(searchKeyPath, notSetValue) {\n var nested = this; // Note: in an ES6 environment, we would prefer:\n // for (var key of searchKeyPath) {\n\n var iter = forceIterator(searchKeyPath);\n var step;\n\n while (!(step = iter.next()).done) {\n var key = step.value;\n nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;\n\n if (nested === NOT_SET) {\n return notSetValue;\n }\n }\n\n return nested;\n },\n groupBy: function groupBy(grouper, context) {\n return groupByFactory(this, grouper, context);\n },\n has: function has(searchKey) {\n return this.get(searchKey, NOT_SET) !== NOT_SET;\n },\n hasIn: function hasIn(searchKeyPath) {\n return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;\n },\n isSubset: function isSubset(iter) {\n iter = typeof iter.includes === 'function' ? iter : Iterable(iter);\n return this.every(function (value) {\n return iter.includes(value);\n });\n },\n isSuperset: function isSuperset(iter) {\n iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);\n return iter.isSubset(this);\n },\n keyOf: function keyOf(searchValue) {\n return this.findKey(function (value) {\n return is(value, searchValue);\n });\n },\n keySeq: function keySeq() {\n return this.toSeq().map(keyMapper).toIndexedSeq();\n },\n last: function last() {\n return this.toSeq().reverse().first();\n },\n lastKeyOf: function lastKeyOf(searchValue) {\n return this.toKeyedSeq().reverse().keyOf(searchValue);\n },\n max: function max(comparator) {\n return maxFactory(this, comparator);\n },\n maxBy: function maxBy(mapper, comparator) {\n return maxFactory(this, comparator, mapper);\n },\n min: function min(comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);\n },\n minBy: function minBy(mapper, comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);\n },\n rest: function rest() {\n return this.slice(1);\n },\n skip: function skip(amount) {\n return this.slice(Math.max(0, amount));\n },\n skipLast: function skipLast(amount) {\n return reify(this, this.toSeq().reverse().skip(amount).reverse());\n },\n skipWhile: function skipWhile(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, true));\n },\n skipUntil: function skipUntil(predicate, context) {\n return this.skipWhile(not(predicate), context);\n },\n sortBy: function sortBy(mapper, comparator) {\n return reify(this, sortFactory(this, comparator, mapper));\n },\n take: function take(amount) {\n return this.slice(0, Math.max(0, amount));\n },\n takeLast: function takeLast(amount) {\n return reify(this, this.toSeq().reverse().take(amount).reverse());\n },\n takeWhile: function takeWhile(predicate, context) {\n return reify(this, takeWhileFactory(this, predicate, context));\n },\n takeUntil: function takeUntil(predicate, context) {\n return this.takeWhile(not(predicate), context);\n },\n valueSeq: function valueSeq() {\n return this.toIndexedSeq();\n },\n // ### Hashable Object\n hashCode: function hashCode() {\n return this.__hash || (this.__hash = hashIterable(this));\n } // ### Internal\n // abstract __iterate(fn, reverse)\n // abstract __iterator(type, reverse)\n\n }); // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n var IterablePrototype = Iterable.prototype;\n IterablePrototype[IS_ITERABLE_SENTINEL] = true;\n IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n IterablePrototype.__toJS = IterablePrototype.toArray;\n IterablePrototype.__toStringMapper = quoteString;\n\n IterablePrototype.inspect = IterablePrototype.toSource = function () {\n return this.toString();\n };\n\n IterablePrototype.chain = IterablePrototype.flatMap;\n IterablePrototype.contains = IterablePrototype.includes;\n mixin(KeyedIterable, {\n // ### More sequential methods\n flip: function flip() {\n return reify(this, flipFactory(this));\n },\n mapEntries: function mapEntries(mapper, context) {\n var this$0 = this;\n var iterations = 0;\n return reify(this, this.toSeq().map(function (v, k) {\n return mapper.call(context, [k, v], iterations++, this$0);\n }).fromEntrySeq());\n },\n mapKeys: function mapKeys(mapper, context) {\n var this$0 = this;\n return reify(this, this.toSeq().flip().map(function (k, v) {\n return mapper.call(context, k, v, this$0);\n }).flip());\n }\n });\n var KeyedIterablePrototype = KeyedIterable.prototype;\n KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n KeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n\n KeyedIterablePrototype.__toStringMapper = function (v, k) {\n return JSON.stringify(k) + ': ' + quoteString(v);\n };\n\n mixin(IndexedIterable, {\n // ### Conversion to other types\n toKeyedSeq: function toKeyedSeq() {\n return new ToKeyedSequence(this, false);\n },\n // ### ES6 Collection methods (ES6 Array and Map)\n filter: function filter(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, false));\n },\n findIndex: function findIndex(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n indexOf: function indexOf(searchValue) {\n var key = this.keyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n lastIndexOf: function lastIndexOf(searchValue) {\n var key = this.lastKeyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n reverse: function reverse() {\n return reify(this, reverseFactory(this, false));\n },\n slice: function slice(begin, end) {\n return reify(this, sliceFactory(this, begin, end, false));\n },\n splice: function splice(index, removeNum\n /*, ...values*/\n ) {\n var numArgs = arguments.length;\n removeNum = Math.max(removeNum | 0, 0);\n\n if (numArgs === 0 || numArgs === 2 && !removeNum) {\n return this;\n } // If index is negative, it should resolve relative to the size of the\n // collection. However size may be expensive to compute if not cached, so\n // only call count() if the number is in fact negative.\n\n\n index = resolveBegin(index, index < 0 ? this.count() : this.size);\n var spliced = this.slice(0, index);\n return reify(this, numArgs === 1 ? spliced : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)));\n },\n // ### More collection methods\n findLastIndex: function findLastIndex(predicate, context) {\n var entry = this.findLastEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n first: function first() {\n return this.get(0);\n },\n flatten: function flatten(depth) {\n return reify(this, flattenFactory(this, depth, false));\n },\n get: function get(index, notSetValue) {\n index = wrapIndex(this, index);\n return index < 0 || this.size === Infinity || this.size !== undefined && index > this.size ? notSetValue : this.find(function (_, key) {\n return key === index;\n }, undefined, notSetValue);\n },\n has: function has(index) {\n index = wrapIndex(this, index);\n return index >= 0 && (this.size !== undefined ? this.size === Infinity || index < this.size : this.indexOf(index) !== -1);\n },\n interpose: function interpose(separator) {\n return reify(this, interposeFactory(this, separator));\n },\n interleave: function interleave()\n /*...iterables*/\n {\n var iterables = [this].concat(arrCopy(arguments));\n var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);\n var interleaved = zipped.flatten(true);\n\n if (zipped.size) {\n interleaved.size = zipped.size * iterables.length;\n }\n\n return reify(this, interleaved);\n },\n keySeq: function keySeq() {\n return Range(0, this.size);\n },\n last: function last() {\n return this.get(-1);\n },\n skipWhile: function skipWhile(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, false));\n },\n zip: function zip()\n /*, ...iterables */\n {\n var iterables = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, iterables));\n },\n zipWith: function zipWith(zipper\n /*, ...iterables */\n ) {\n var iterables = arrCopy(arguments);\n iterables[0] = this;\n return reify(this, zipWithFactory(this, zipper, iterables));\n }\n });\n IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;\n mixin(SetIterable, {\n // ### ES6 Collection methods (ES6 Array and Map)\n get: function get(value, notSetValue) {\n return this.has(value) ? value : notSetValue;\n },\n includes: function includes(value) {\n return this.has(value);\n },\n // ### More sequential methods\n keySeq: function keySeq() {\n return this.valueSeq();\n }\n });\n SetIterable.prototype.has = IterablePrototype.includes;\n SetIterable.prototype.contains = SetIterable.prototype.includes; // Mixin subclasses\n\n mixin(KeyedSeq, KeyedIterable.prototype);\n mixin(IndexedSeq, IndexedIterable.prototype);\n mixin(SetSeq, SetIterable.prototype);\n mixin(KeyedCollection, KeyedIterable.prototype);\n mixin(IndexedCollection, IndexedIterable.prototype);\n mixin(SetCollection, SetIterable.prototype); // #pragma Helper functions\n\n function keyMapper(v, k) {\n return k;\n }\n\n function entryMapper(v, k) {\n return [k, v];\n }\n\n function not(predicate) {\n return function () {\n return !predicate.apply(this, arguments);\n };\n }\n\n function neg(predicate) {\n return function () {\n return -predicate.apply(this, arguments);\n };\n }\n\n function quoteString(value) {\n return typeof value === 'string' ? JSON.stringify(value) : String(value);\n }\n\n function defaultZipper() {\n return arrCopy(arguments);\n }\n\n function defaultNegComparator(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n }\n\n function hashIterable(iterable) {\n if (iterable.size === Infinity) {\n return 0;\n }\n\n var ordered = isOrdered(iterable);\n var keyed = isKeyed(iterable);\n var h = ordered ? 1 : 0;\n\n var size = iterable.__iterate(keyed ? ordered ? function (v, k) {\n h = 31 * h + hashMerge(hash(v), hash(k)) | 0;\n } : function (v, k) {\n h = h + hashMerge(hash(v), hash(k)) | 0;\n } : ordered ? function (v) {\n h = 31 * h + hash(v) | 0;\n } : function (v) {\n h = h + hash(v) | 0;\n });\n\n return murmurHashOfSize(size, h);\n }\n\n function murmurHashOfSize(size, h) {\n h = imul(h, 0xCC9E2D51);\n h = imul(h << 15 | h >>> -15, 0x1B873593);\n h = imul(h << 13 | h >>> -13, 5);\n h = (h + 0xE6546B64 | 0) ^ size;\n h = imul(h ^ h >>> 16, 0x85EBCA6B);\n h = imul(h ^ h >>> 13, 0xC2B2AE35);\n h = smi(h ^ h >>> 16);\n return h;\n }\n\n function hashMerge(a, b) {\n return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int\n }\n\n var Immutable = {\n Iterable: Iterable,\n Seq: Seq,\n Collection: Collection,\n Map: Map,\n OrderedMap: OrderedMap,\n List: List,\n Stack: Stack,\n Set: Set,\n OrderedSet: OrderedSet,\n Record: Record,\n Range: Range,\n Repeat: Repeat,\n is: is,\n fromJS: fromJS\n };\n return Immutable;\n});","/** @type {number | null} */\nlet cachedScrollbarWidth = null;\n\n/**\n * @return {number}\n */\nconst getActualScrollbarWidth = () => {\n const outer = document.createElement('div');\n outer.style.visibility = 'hidden';\n outer.style.overflow = 'scroll';\n document.body.appendChild(outer);\n\n const inner = document.createElement('div');\n outer.appendChild(inner);\n\n const scrollbarWidth = outer.offsetWidth - inner.offsetWidth;\n outer.parentNode.removeChild(outer);\n\n return scrollbarWidth;\n};\n\n/**\n * @return {number}\n */\nexport const getScrollbarWidth = () => {\n if (cachedScrollbarWidth !== null) {\n return cachedScrollbarWidth;\n }\n\n const scrollbarWidth = getActualScrollbarWidth();\n cachedScrollbarWidth = scrollbarWidth;\n\n return scrollbarWidth;\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport 'wicg-inert';\nimport createHistory from 'history/createBrowserHistory';\n\nexport default class ModalRoot extends React.PureComponent {\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n children: PropTypes.node,\n onClose: PropTypes.func.isRequired,\n noEsc: PropTypes.bool,\n };\n\n state = {\n revealed: !!this.props.children,\n };\n\n activeElement = this.state.revealed ? document.activeElement : null;\n\n handleKeyUp = (e) => {\n if ((e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27)\n && !!this.props.children && !this.props.noEsc) {\n this.props.onClose();\n }\n }\n\n handleKeyDown = (e) => {\n if (e.key === 'Tab') {\n const focusable = Array.from(this.node.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])')).filter((x) => window.getComputedStyle(x).display !== 'none');\n const index = focusable.indexOf(e.target);\n\n let element;\n\n if (e.shiftKey) {\n element = focusable[index - 1] || focusable[focusable.length - 1];\n } else {\n element = focusable[index + 1] || focusable[0];\n }\n\n if (element) {\n element.focus();\n e.stopPropagation();\n e.preventDefault();\n }\n }\n }\n\n componentDidMount () {\n window.addEventListener('keyup', this.handleKeyUp, false);\n window.addEventListener('keydown', this.handleKeyDown, false);\n this.history = this.context.router ? this.context.router.history : createHistory();\n }\n\n componentWillReceiveProps (nextProps) {\n if (!!nextProps.children && !this.props.children) {\n this.activeElement = document.activeElement;\n\n this.getSiblings().forEach(sibling => sibling.setAttribute('inert', true));\n } else if (!nextProps.children) {\n this.setState({ revealed: false });\n }\n }\n\n componentDidUpdate (prevProps) {\n if (!this.props.children && !!prevProps.children) {\n this.getSiblings().forEach(sibling => sibling.removeAttribute('inert'));\n\n // Because of the wicg-inert polyfill, the activeElement may not be\n // immediately selectable, we have to wait for observers to run, as\n // described in https://github.com/WICG/inert#performance-and-gotchas\n Promise.resolve().then(() => {\n this.activeElement.focus({ preventScroll: true });\n this.activeElement = null;\n }).catch((error) => {\n console.error(error);\n });\n\n this.handleModalClose();\n }\n if (this.props.children) {\n requestAnimationFrame(() => {\n this.setState({ revealed: true });\n });\n if (!prevProps.children) this.handleModalOpen();\n }\n }\n\n componentWillUnmount () {\n window.removeEventListener('keyup', this.handleKeyUp);\n window.removeEventListener('keydown', this.handleKeyDown);\n }\n\n handleModalClose () {\n this.unlistenHistory();\n\n const state = this.history.location.state;\n if (state && state.mastodonModalOpen) {\n this.history.goBack();\n }\n }\n\n handleModalOpen () {\n const history = this.history;\n const state = {...history.location.state, mastodonModalOpen: true};\n history.push(history.location.pathname, state);\n this.unlistenHistory = history.listen(() => {\n this.props.onClose();\n });\n }\n\n getSiblings = () => {\n return Array(...this.node.parentElement.childNodes).filter(node => node !== this.node);\n }\n\n setRef = ref => {\n this.node = ref;\n }\n\n render () {\n const { children, onClose } = this.props;\n const { revealed } = this.state;\n const visible = !!children;\n\n if (!visible) {\n return (\n <div className='modal-root' ref={this.setRef} style={{ opacity: 0 }} />\n );\n }\n\n return (\n <div className='modal-root' ref={this.setRef} style={{ opacity: revealed ? 1 : 0 }}>\n <div style={{ pointerEvents: visible ? 'auto' : 'none' }}>\n <div role='presentation' className='modal-root__overlay' onClick={onClose} />\n <div role='dialog' className='modal-root__container'>{children}</div>\n </div>\n </div>\n );\n }\n\n}\n","import { isMobile } from '../is_mobile';\n\n/** @type {number | null} */\nlet cachedScrollbarWidth = null;\n\n/**\n * @return {number}\n */\nconst getActualScrollbarWidth = () => {\n const outer = document.createElement('div');\n outer.style.visibility = 'hidden';\n outer.style.overflow = 'scroll';\n document.body.appendChild(outer);\n\n const inner = document.createElement('div');\n outer.appendChild(inner);\n\n const scrollbarWidth = outer.offsetWidth - inner.offsetWidth;\n outer.parentNode.removeChild(outer);\n\n return scrollbarWidth;\n};\n\n/**\n * @return {number}\n */\nexport const getScrollbarWidth = () => {\n if (cachedScrollbarWidth !== null) {\n return cachedScrollbarWidth;\n }\n\n const scrollbarWidth = isMobile(window.innerWidth) ? 0 : getActualScrollbarWidth();\n cachedScrollbarWidth = scrollbarWidth;\n\n return scrollbarWidth;\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport 'wicg-inert';\n\nexport default class ModalRoot extends React.PureComponent {\n\n static propTypes = {\n children: PropTypes.node,\n onClose: PropTypes.func.isRequired,\n };\n\n state = {\n revealed: !!this.props.children,\n };\n\n activeElement = this.state.revealed ? document.activeElement : null;\n\n handleKeyUp = (e) => {\n if ((e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27)\n && !!this.props.children) {\n this.props.onClose();\n }\n }\n\n handleKeyDown = (e) => {\n if (e.key === 'Tab') {\n const focusable = Array.from(this.node.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])')).filter((x) => window.getComputedStyle(x).display !== 'none');\n const index = focusable.indexOf(e.target);\n\n let element;\n\n if (e.shiftKey) {\n element = focusable[index - 1] || focusable[focusable.length - 1];\n } else {\n element = focusable[index + 1] || focusable[0];\n }\n\n if (element) {\n element.focus();\n e.stopPropagation();\n e.preventDefault();\n }\n }\n }\n\n componentDidMount () {\n window.addEventListener('keyup', this.handleKeyUp, false);\n window.addEventListener('keydown', this.handleKeyDown, false);\n }\n\n componentWillReceiveProps (nextProps) {\n if (!!nextProps.children && !this.props.children) {\n this.activeElement = document.activeElement;\n\n this.getSiblings().forEach(sibling => sibling.setAttribute('inert', true));\n } else if (!nextProps.children) {\n this.setState({ revealed: false });\n }\n }\n\n componentDidUpdate (prevProps) {\n if (!this.props.children && !!prevProps.children) {\n this.getSiblings().forEach(sibling => sibling.removeAttribute('inert'));\n\n // Because of the wicg-inert polyfill, the activeElement may not be\n // immediately selectable, we have to wait for observers to run, as\n // described in https://github.com/WICG/inert#performance-and-gotchas\n Promise.resolve().then(() => {\n this.activeElement.focus();\n this.activeElement = null;\n }).catch((error) => {\n console.error(error);\n });\n }\n if (this.props.children) {\n requestAnimationFrame(() => {\n this.setState({ revealed: true });\n });\n }\n }\n\n componentWillUnmount () {\n window.removeEventListener('keyup', this.handleKeyUp);\n window.removeEventListener('keydown', this.handleKeyDown);\n }\n\n getSiblings = () => {\n return Array(...this.node.parentElement.childNodes).filter(node => node !== this.node);\n }\n\n setRef = ref => {\n this.node = ref;\n }\n\n render () {\n const { children, onClose } = this.props;\n const { revealed } = this.state;\n const visible = !!children;\n\n if (!visible) {\n return (\n <div className='modal-root' ref={this.setRef} style={{ opacity: 0 }} />\n );\n }\n\n return (\n <div className='modal-root' ref={this.setRef} style={{ opacity: revealed ? 1 : 0 }}>\n <div style={{ pointerEvents: visible ? 'auto' : 'none' }}>\n <div role='presentation' className='modal-root__overlay' onClick={onClose} />\n <div role='dialog' className='modal-root__container'>{children}</div>\n </div>\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst MIN_SCALE = 1;\nconst MAX_SCALE = 4;\n\nconst getMidpoint = (p1, p2) => ({\n x: (p1.clientX + p2.clientX) / 2,\n y: (p1.clientY + p2.clientY) / 2,\n});\n\nconst getDistance = (p1, p2) =>\n Math.sqrt(Math.pow(p1.clientX - p2.clientX, 2) + Math.pow(p1.clientY - p2.clientY, 2));\n\nconst clamp = (min, max, value) => Math.min(max, Math.max(min, value));\n\nexport default class ZoomableImage extends React.PureComponent {\n\n static propTypes = {\n alt: PropTypes.string,\n src: PropTypes.string.isRequired,\n width: PropTypes.number,\n height: PropTypes.number,\n onClick: PropTypes.func,\n }\n\n static defaultProps = {\n alt: '',\n width: null,\n height: null,\n };\n\n state = {\n scale: MIN_SCALE,\n }\n\n removers = [];\n container = null;\n image = null;\n lastTouchEndTime = 0;\n lastDistance = 0;\n\n componentDidMount () {\n let handler = this.handleTouchStart;\n this.container.addEventListener('touchstart', handler);\n this.removers.push(() => this.container.removeEventListener('touchstart', handler));\n handler = this.handleTouchMove;\n // on Chrome 56+, touch event listeners will default to passive\n // https://www.chromestatus.com/features/5093566007214080\n this.container.addEventListener('touchmove', handler, { passive: false });\n this.removers.push(() => this.container.removeEventListener('touchend', handler));\n }\n\n componentWillUnmount () {\n this.removeEventListeners();\n }\n\n removeEventListeners () {\n this.removers.forEach(listeners => listeners());\n this.removers = [];\n }\n\n handleTouchStart = e => {\n if (e.touches.length !== 2) return;\n\n this.lastDistance = getDistance(...e.touches);\n }\n\n handleTouchMove = e => {\n const { scrollTop, scrollHeight, clientHeight } = this.container;\n if (e.touches.length === 1 && scrollTop !== scrollHeight - clientHeight) {\n // prevent propagating event to MediaModal\n e.stopPropagation();\n return;\n }\n if (e.touches.length !== 2) return;\n\n e.preventDefault();\n e.stopPropagation();\n\n const distance = getDistance(...e.touches);\n const midpoint = getMidpoint(...e.touches);\n const scale = clamp(MIN_SCALE, MAX_SCALE, this.state.scale * distance / this.lastDistance);\n\n this.zoom(scale, midpoint);\n\n this.lastMidpoint = midpoint;\n this.lastDistance = distance;\n }\n\n zoom(nextScale, midpoint) {\n const { scale } = this.state;\n const { scrollLeft, scrollTop } = this.container;\n\n // math memo:\n // x = (scrollLeft + midpoint.x) / scrollWidth\n // x' = (nextScrollLeft + midpoint.x) / nextScrollWidth\n // scrollWidth = clientWidth * scale\n // scrollWidth' = clientWidth * nextScale\n // Solve x = x' for nextScrollLeft\n const nextScrollLeft = (scrollLeft + midpoint.x) * nextScale / scale - midpoint.x;\n const nextScrollTop = (scrollTop + midpoint.y) * nextScale / scale - midpoint.y;\n\n this.setState({ scale: nextScale }, () => {\n this.container.scrollLeft = nextScrollLeft;\n this.container.scrollTop = nextScrollTop;\n });\n }\n\n handleClick = e => {\n // don't propagate event to MediaModal\n e.stopPropagation();\n const handler = this.props.onClick;\n if (handler) handler();\n }\n\n setContainerRef = c => {\n this.container = c;\n }\n\n setImageRef = c => {\n this.image = c;\n }\n\n render () {\n const { alt, src } = this.props;\n const { scale } = this.state;\n const overflow = scale === 1 ? 'hidden' : 'scroll';\n\n return (\n <div\n className='zoomable-image'\n ref={this.setContainerRef}\n style={{ overflow }}\n >\n <img\n role='presentation'\n ref={this.setImageRef}\n alt={alt}\n title={alt}\n src={src}\n style={{\n transform: `scale(${scale})`,\n transformOrigin: '0 0',\n }}\n onClick={this.handleClick}\n />\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { LoadingBar } from 'react-redux-loading-bar';\nimport ZoomableImage from './zoomable_image';\n\nexport default class ImageLoader extends React.PureComponent {\n\n static propTypes = {\n alt: PropTypes.string,\n src: PropTypes.string.isRequired,\n previewSrc: PropTypes.string,\n width: PropTypes.number,\n height: PropTypes.number,\n onClick: PropTypes.func,\n }\n\n static defaultProps = {\n alt: '',\n width: null,\n height: null,\n };\n\n state = {\n loading: true,\n error: false,\n width: null,\n }\n\n removers = [];\n canvas = null;\n\n get canvasContext() {\n if (!this.canvas) {\n return null;\n }\n this._canvasContext = this._canvasContext || this.canvas.getContext('2d');\n return this._canvasContext;\n }\n\n componentDidMount () {\n this.loadImage(this.props);\n }\n\n componentWillReceiveProps (nextProps) {\n if (this.props.src !== nextProps.src) {\n this.loadImage(nextProps);\n }\n }\n\n componentWillUnmount () {\n this.removeEventListeners();\n }\n\n loadImage (props) {\n this.removeEventListeners();\n this.setState({ loading: true, error: false });\n Promise.all([\n props.previewSrc && this.loadPreviewCanvas(props),\n this.hasSize() && this.loadOriginalImage(props),\n ].filter(Boolean))\n .then(() => {\n this.setState({ loading: false, error: false });\n this.clearPreviewCanvas();\n })\n .catch(() => this.setState({ loading: false, error: true }));\n }\n\n loadPreviewCanvas = ({ previewSrc, width, height }) => new Promise((resolve, reject) => {\n const image = new Image();\n const removeEventListeners = () => {\n image.removeEventListener('error', handleError);\n image.removeEventListener('load', handleLoad);\n };\n const handleError = () => {\n removeEventListeners();\n reject();\n };\n const handleLoad = () => {\n removeEventListeners();\n this.canvasContext.drawImage(image, 0, 0, width, height);\n resolve();\n };\n image.addEventListener('error', handleError);\n image.addEventListener('load', handleLoad);\n image.src = previewSrc;\n this.removers.push(removeEventListeners);\n })\n\n clearPreviewCanvas () {\n const { width, height } = this.canvas;\n this.canvasContext.clearRect(0, 0, width, height);\n }\n\n loadOriginalImage = ({ src }) => new Promise((resolve, reject) => {\n const image = new Image();\n const removeEventListeners = () => {\n image.removeEventListener('error', handleError);\n image.removeEventListener('load', handleLoad);\n };\n const handleError = () => {\n removeEventListeners();\n reject();\n };\n const handleLoad = () => {\n removeEventListeners();\n resolve();\n };\n image.addEventListener('error', handleError);\n image.addEventListener('load', handleLoad);\n image.src = src;\n this.removers.push(removeEventListeners);\n });\n\n removeEventListeners () {\n this.removers.forEach(listeners => listeners());\n this.removers = [];\n }\n\n hasSize () {\n const { width, height } = this.props;\n return typeof width === 'number' && typeof height === 'number';\n }\n\n setCanvasRef = c => {\n this.canvas = c;\n if (c) this.setState({ width: c.offsetWidth });\n }\n\n render () {\n const { alt, src, width, height, onClick } = this.props;\n const { loading } = this.state;\n\n const className = classNames('image-loader', {\n 'image-loader--loading': loading,\n 'image-loader--amorphous': !this.hasSize(),\n });\n\n return (\n <div className={className}>\n <LoadingBar loading={loading ? 1 : 0} className='loading-bar' style={{ width: this.state.width || width }} />\n {loading ? (\n <canvas\n className='image-loader__preview-canvas'\n ref={this.setCanvasRef}\n width={width}\n height={height}\n />\n ) : (\n <ZoomableImage\n alt={alt}\n src={src}\n onClick={onClick}\n />\n )}\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport ReactSwipeableViews from 'react-swipeable-views';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport Video from 'flavours/glitch/features/video';\nimport classNames from 'classnames';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport IconButton from 'flavours/glitch/components/icon_button';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ImageLoader from './image_loader';\nimport Icon from 'flavours/glitch/components/icon';\nimport GIFV from 'flavours/glitch/components/gifv';\n\nconst messages = defineMessages({\n close: { id: 'lightbox.close', defaultMessage: 'Close' },\n previous: { id: 'lightbox.previous', defaultMessage: 'Previous' },\n next: { id: 'lightbox.next', defaultMessage: 'Next' },\n});\n\nexport default @injectIntl\nclass MediaModal extends ImmutablePureComponent {\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n media: ImmutablePropTypes.list.isRequired,\n status: ImmutablePropTypes.map,\n index: PropTypes.number.isRequired,\n onClose: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n state = {\n index: null,\n navigationHidden: false,\n };\n\n handleSwipe = (index) => {\n this.setState({ index: index % this.props.media.size });\n }\n\n handleNextClick = () => {\n this.setState({ index: (this.getIndex() + 1) % this.props.media.size });\n }\n\n handlePrevClick = () => {\n this.setState({ index: (this.props.media.size + this.getIndex() - 1) % this.props.media.size });\n }\n\n handleChangeIndex = (e) => {\n const index = Number(e.currentTarget.getAttribute('data-index'));\n this.setState({ index: index % this.props.media.size });\n }\n\n handleKeyDown = (e) => {\n switch(e.key) {\n case 'ArrowLeft':\n this.handlePrevClick();\n e.preventDefault();\n e.stopPropagation();\n break;\n case 'ArrowRight':\n this.handleNextClick();\n e.preventDefault();\n e.stopPropagation();\n break;\n }\n }\n\n componentDidMount () {\n window.addEventListener('keydown', this.handleKeyDown, false);\n }\n\n componentWillUnmount () {\n window.removeEventListener('keydown', this.handleKeyDown);\n }\n\n getIndex () {\n return this.state.index !== null ? this.state.index : this.props.index;\n }\n\n toggleNavigation = () => {\n this.setState(prevState => ({\n navigationHidden: !prevState.navigationHidden,\n }));\n };\n\n handleStatusClick = e => {\n if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {\n e.preventDefault();\n this.context.router.history.push(`/statuses/${this.props.status.get('id')}`);\n }\n }\n\n render () {\n const { media, status, intl, onClose } = this.props;\n const { navigationHidden } = this.state;\n\n const index = this.getIndex();\n let pagination = [];\n\n const leftNav = media.size > 1 && <button tabIndex='0' className='media-modal__nav media-modal__nav--left' onClick={this.handlePrevClick} aria-label={intl.formatMessage(messages.previous)}><Icon id='chevron-left' fixedWidth /></button>;\n const rightNav = media.size > 1 && <button tabIndex='0' className='media-modal__nav media-modal__nav--right' onClick={this.handleNextClick} aria-label={intl.formatMessage(messages.next)}><Icon id='chevron-right' fixedWidth /></button>;\n\n if (media.size > 1) {\n pagination = media.map((item, i) => {\n const classes = ['media-modal__button'];\n if (i === index) {\n classes.push('media-modal__button--active');\n }\n return (<li className='media-modal__page-dot' key={i}><button tabIndex='0' className={classes.join(' ')} onClick={this.handleChangeIndex} data-index={i}>{i + 1}</button></li>);\n });\n }\n\n const content = media.map((image) => {\n const width = image.getIn(['meta', 'original', 'width']) || null;\n const height = image.getIn(['meta', 'original', 'height']) || null;\n\n if (image.get('type') === 'image') {\n return (\n <ImageLoader\n previewSrc={image.get('preview_url')}\n src={image.get('url')}\n width={width}\n height={height}\n alt={image.get('description')}\n key={image.get('url')}\n onClick={this.toggleNavigation}\n />\n );\n } else if (image.get('type') === 'video') {\n const { time } = this.props;\n\n return (\n <Video\n preview={image.get('preview_url')}\n blurhash={image.get('blurhash')}\n src={image.get('url')}\n width={image.get('width')}\n height={image.get('height')}\n startTime={time || 0}\n onCloseVideo={onClose}\n detailed\n alt={image.get('description')}\n key={image.get('url')}\n />\n );\n } else if (image.get('type') === 'gifv') {\n return (\n <GIFV\n src={image.get('url')}\n width={width}\n height={height}\n key={image.get('preview_url')}\n alt={image.get('description')}\n onClick={this.toggleNavigation}\n />\n );\n }\n\n return null;\n }).toArray();\n\n // you can't use 100vh, because the viewport height is taller\n // than the visible part of the document in some mobile\n // browsers when it's address bar is visible.\n // https://developers.google.com/web/updates/2016/12/url-bar-resizing\n const swipeableViewsStyle = {\n width: '100%',\n height: '100%',\n };\n\n const containerStyle = {\n alignItems: 'center', // center vertically\n };\n\n const navigationClassName = classNames('media-modal__navigation', {\n 'media-modal__navigation--hidden': navigationHidden,\n });\n\n return (\n <div className='modal-root__modal media-modal'>\n <div\n className='media-modal__closer'\n role='presentation'\n onClick={onClose}\n >\n <ReactSwipeableViews\n style={swipeableViewsStyle}\n containerStyle={containerStyle}\n onChangeIndex={this.handleSwipe}\n onSwitching={this.handleSwitching}\n index={index}\n >\n {content}\n </ReactSwipeableViews>\n </div>\n\n <div className={navigationClassName}>\n <IconButton className='media-modal__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={40} />\n\n {leftNav}\n {rightNav}\n\n {status && (\n <div className={classNames('media-modal__meta', { 'media-modal__meta--shifted': media.size > 1 })}>\n <a href={status.get('url')} onClick={this.handleStatusClick}><Icon id='comments' /> <FormattedMessage id='lightbox.view_context' defaultMessage='View context' /></a>\n </div>\n )}\n\n <ul className='media-modal__pagination'>\n {pagination}\n </ul>\n </div>\n </div>\n );\n }\n\n}\n","import api from '../api';\nimport { importFetchedPoll } from './importer';\n\nexport const POLL_VOTE_REQUEST = 'POLL_VOTE_REQUEST';\nexport const POLL_VOTE_SUCCESS = 'POLL_VOTE_SUCCESS';\nexport const POLL_VOTE_FAIL = 'POLL_VOTE_FAIL';\n\nexport const POLL_FETCH_REQUEST = 'POLL_FETCH_REQUEST';\nexport const POLL_FETCH_SUCCESS = 'POLL_FETCH_SUCCESS';\nexport const POLL_FETCH_FAIL = 'POLL_FETCH_FAIL';\n\nexport const vote = (pollId, choices) => (dispatch, getState) => {\n dispatch(voteRequest());\n\n api(getState).post(`/api/v1/polls/${pollId}/votes`, { choices })\n .then(({ data }) => {\n dispatch(importFetchedPoll(data));\n dispatch(voteSuccess(data));\n })\n .catch(err => dispatch(voteFail(err)));\n};\n\nexport const fetchPoll = pollId => (dispatch, getState) => {\n dispatch(fetchPollRequest());\n\n api(getState).get(`/api/v1/polls/${pollId}`)\n .then(({ data }) => {\n dispatch(importFetchedPoll(data));\n dispatch(fetchPollSuccess(data));\n })\n .catch(err => dispatch(fetchPollFail(err)));\n};\n\nexport const voteRequest = () => ({\n type: POLL_VOTE_REQUEST,\n});\n\nexport const voteSuccess = poll => ({\n type: POLL_VOTE_SUCCESS,\n poll,\n});\n\nexport const voteFail = error => ({\n type: POLL_VOTE_FAIL,\n error,\n});\n\nexport const fetchPollRequest = () => ({\n type: POLL_FETCH_REQUEST,\n});\n\nexport const fetchPollSuccess = poll => ({\n type: POLL_FETCH_SUCCESS,\n poll,\n});\n\nexport const fetchPollFail = error => ({\n type: POLL_FETCH_FAIL,\n error,\n});\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport classNames from 'classnames';\nimport { vote, fetchPoll } from 'mastodon/actions/polls';\nimport Motion from 'mastodon/features/ui/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\nimport escapeTextContentForBrowser from 'escape-html';\nimport emojify from 'mastodon/features/emoji/emoji';\nimport RelativeTimestamp from './relative_timestamp';\nimport Icon from 'mastodon/components/icon';\n\nconst messages = defineMessages({\n closed: { id: 'poll.closed', defaultMessage: 'Closed' },\n voted: { id: 'poll.voted', defaultMessage: 'You voted for this answer', description: 'Tooltip of the \"voted\" checkmark in polls' },\n});\n\nconst makeEmojiMap = record => record.get('emojis').reduce((obj, emoji) => {\n obj[`:${emoji.get('shortcode')}:`] = emoji.toJS();\n return obj;\n}, {});\n\nexport default @injectIntl\nclass Poll extends ImmutablePureComponent {\n\n static propTypes = {\n poll: ImmutablePropTypes.map,\n intl: PropTypes.object.isRequired,\n dispatch: PropTypes.func,\n disabled: PropTypes.bool,\n };\n\n state = {\n selected: {},\n expired: null,\n };\n\n static getDerivedStateFromProps (props, state) {\n const { poll, intl } = props;\n const expires_at = poll.get('expires_at');\n const expired = poll.get('expired') || expires_at !== null && (new Date(expires_at)).getTime() < intl.now();\n return (expired === state.expired) ? null : { expired };\n }\n\n componentDidMount () {\n this._setupTimer();\n }\n\n componentDidUpdate () {\n this._setupTimer();\n }\n\n componentWillUnmount () {\n clearTimeout(this._timer);\n }\n\n _setupTimer () {\n const { poll, intl } = this.props;\n clearTimeout(this._timer);\n if (!this.state.expired) {\n const delay = (new Date(poll.get('expires_at'))).getTime() - intl.now();\n this._timer = setTimeout(() => {\n this.setState({ expired: true });\n }, delay);\n }\n }\n\n _toggleOption = value => {\n if (this.props.poll.get('multiple')) {\n const tmp = { ...this.state.selected };\n if (tmp[value]) {\n delete tmp[value];\n } else {\n tmp[value] = true;\n }\n this.setState({ selected: tmp });\n } else {\n const tmp = {};\n tmp[value] = true;\n this.setState({ selected: tmp });\n }\n }\n\n handleOptionChange = ({ target: { value } }) => {\n this._toggleOption(value);\n };\n\n handleOptionKeyPress = (e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n this._toggleOption(e.target.getAttribute('data-index'));\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n handleVote = () => {\n if (this.props.disabled) {\n return;\n }\n\n this.props.dispatch(vote(this.props.poll.get('id'), Object.keys(this.state.selected)));\n };\n\n handleRefresh = () => {\n if (this.props.disabled) {\n return;\n }\n\n this.props.dispatch(fetchPoll(this.props.poll.get('id')));\n };\n\n renderOption (option, optionIndex, showResults) {\n const { poll, disabled, intl } = this.props;\n const pollVotesCount = poll.get('voters_count') || poll.get('votes_count');\n const percent = pollVotesCount === 0 ? 0 : (option.get('votes_count') / pollVotesCount) * 100;\n const leading = poll.get('options').filterNot(other => other.get('title') === option.get('title')).every(other => option.get('votes_count') >= other.get('votes_count'));\n const active = !!this.state.selected[`${optionIndex}`];\n const voted = option.get('voted') || (poll.get('own_votes') && poll.get('own_votes').includes(optionIndex));\n\n let titleEmojified = option.get('title_emojified');\n if (!titleEmojified) {\n const emojiMap = makeEmojiMap(poll);\n titleEmojified = emojify(escapeTextContentForBrowser(option.get('title')), emojiMap);\n }\n\n return (\n <li key={option.get('title')}>\n {showResults && (\n <Motion defaultStyle={{ width: 0 }} style={{ width: spring(percent, { stiffness: 180, damping: 12 }) }}>\n {({ width }) =>\n <span className={classNames('poll__chart', { leading })} style={{ width: `${width}%` }} />\n }\n </Motion>\n )}\n\n <label className={classNames('poll__text', { selectable: !showResults })}>\n <input\n name='vote-options'\n type={poll.get('multiple') ? 'checkbox' : 'radio'}\n value={optionIndex}\n checked={active}\n onChange={this.handleOptionChange}\n disabled={disabled}\n />\n\n {!showResults && (\n <span\n className={classNames('poll__input', { checkbox: poll.get('multiple'), active })}\n tabIndex='0'\n role={poll.get('multiple') ? 'checkbox' : 'radio'}\n onKeyPress={this.handleOptionKeyPress}\n aria-checked={active}\n aria-label={option.get('title')}\n data-index={optionIndex}\n />\n )}\n {showResults && <span className='poll__number'>\n {!!voted && <Icon id='check' className='poll__vote__mark' title={intl.formatMessage(messages.voted)} />}\n {Math.round(percent)}%\n </span>}\n\n <span dangerouslySetInnerHTML={{ __html: titleEmojified }} />\n </label>\n </li>\n );\n }\n\n render () {\n const { poll, intl } = this.props;\n const { expired } = this.state;\n\n if (!poll) {\n return null;\n }\n\n const timeRemaining = expired ? intl.formatMessage(messages.closed) : <RelativeTimestamp timestamp={poll.get('expires_at')} futureDate />;\n const showResults = poll.get('voted') || expired;\n const disabled = this.props.disabled || Object.entries(this.state.selected).every(item => !item);\n\n let votesCount = null;\n\n if (poll.get('voters_count') !== null && poll.get('voters_count') !== undefined) {\n votesCount = <FormattedMessage id='poll.total_people' defaultMessage='{count, plural, one {# person} other {# people}}' values={{ count: poll.get('voters_count') }} />;\n } else {\n votesCount = <FormattedMessage id='poll.total_votes' defaultMessage='{count, plural, one {# vote} other {# votes}}' values={{ count: poll.get('votes_count') }} />;\n }\n\n return (\n <div className='poll'>\n <ul>\n {poll.get('options').map((option, i) => this.renderOption(option, i, showResults))}\n </ul>\n\n <div className='poll__footer'>\n {!showResults && <button className='button button-secondary' disabled={disabled} onClick={this.handleVote}><FormattedMessage id='poll.vote' defaultMessage='Vote' /></button>}\n {showResults && !this.props.disabled && <span><button className='poll__link' onClick={this.handleRefresh}><FormattedMessage id='poll.refresh' defaultMessage='Refresh' /></button> · </span>}\n {votesCount}\n {poll.get('expires_at') && <span> · {timeRemaining}</span>}\n </div>\n </div>\n );\n }\n\n}\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n'use strict';\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n // \"\n escape = '"';\n break;\n\n case 38:\n // &\n escape = '&';\n break;\n\n case 39:\n // '\n escape = ''';\n break;\n\n case 60:\n // <\n escape = '<';\n break;\n\n case 62:\n // >\n escape = '>';\n break;\n\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index ? html + str.substring(lastIndex, index) : html;\n}","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Icon from 'mastodon/components/icon';\n\nexport default class IconButton extends React.PureComponent {\n\n static propTypes = {\n className: PropTypes.string,\n title: PropTypes.string.isRequired,\n icon: PropTypes.string.isRequired,\n onClick: PropTypes.func,\n onMouseDown: PropTypes.func,\n onKeyDown: PropTypes.func,\n onKeyPress: PropTypes.func,\n size: PropTypes.number,\n active: PropTypes.bool,\n pressed: PropTypes.bool,\n expanded: PropTypes.bool,\n style: PropTypes.object,\n activeStyle: PropTypes.object,\n disabled: PropTypes.bool,\n inverted: PropTypes.bool,\n animate: PropTypes.bool,\n overlay: PropTypes.bool,\n tabIndex: PropTypes.string,\n };\n\n static defaultProps = {\n size: 18,\n active: false,\n disabled: false,\n animate: false,\n overlay: false,\n tabIndex: '0',\n };\n\n state = {\n activate: false,\n deactivate: false,\n }\n\n componentWillReceiveProps (nextProps) {\n if (!nextProps.animate) return;\n\n if (this.props.active && !nextProps.active) {\n this.setState({ activate: false, deactivate: true });\n } else if (!this.props.active && nextProps.active) {\n this.setState({ activate: true, deactivate: false });\n }\n }\n\n handleClick = (e) => {\n e.preventDefault();\n\n if (!this.props.disabled) {\n this.props.onClick(e);\n }\n }\n\n handleKeyPress = (e) => {\n if (this.props.onKeyPress && !this.props.disabled) {\n this.props.onKeyPress(e);\n }\n }\n\n handleMouseDown = (e) => {\n if (!this.props.disabled && this.props.onMouseDown) {\n this.props.onMouseDown(e);\n }\n }\n\n handleKeyDown = (e) => {\n if (!this.props.disabled && this.props.onKeyDown) {\n this.props.onKeyDown(e);\n }\n }\n\n render () {\n const style = {\n fontSize: `${this.props.size}px`,\n width: `${this.props.size * 1.28571429}px`,\n height: `${this.props.size * 1.28571429}px`,\n lineHeight: `${this.props.size}px`,\n ...this.props.style,\n ...(this.props.active ? this.props.activeStyle : {}),\n };\n\n const {\n active,\n className,\n disabled,\n expanded,\n icon,\n inverted,\n overlay,\n pressed,\n tabIndex,\n title,\n } = this.props;\n\n const {\n activate,\n deactivate,\n } = this.state;\n\n const classes = classNames(className, 'icon-button', {\n active,\n disabled,\n inverted,\n activate,\n deactivate,\n overlayed: overlay,\n });\n\n return (\n <button\n aria-label={title}\n aria-pressed={pressed}\n aria-expanded={expanded}\n title={title}\n className={classes}\n onClick={this.handleClick}\n onMouseDown={this.handleMouseDown}\n onKeyDown={this.handleKeyDown}\n onKeyPress={this.handleKeyPress}\n style={style}\n tabIndex={tabIndex}\n disabled={disabled}\n >\n <Icon id={icon} fixedWidth aria-hidden='true' />\n </button>\n );\n }\n\n}\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n/** Error message constants. */\n\n\nvar FUNC_ERROR_TEXT = 'Expected a function';\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;","import { autoPlayGif } from '../../initial_state';\nimport unicodeMapping from './emoji_unicode_mapping_light';\nimport Trie from 'substring-trie';\n\nconst trie = new Trie(Object.keys(unicodeMapping));\n\nconst assetHost = process.env.CDN_HOST || '';\n\nconst emojify = (str, customEmojis = {}) => {\n const tagCharsWithoutEmojis = '<&';\n const tagCharsWithEmojis = Object.keys(customEmojis).length ? '<&:' : '<&';\n let rtn = '', tagChars = tagCharsWithEmojis, invisible = 0;\n for (;;) {\n let match, i = 0, tag;\n while (i < str.length && (tag = tagChars.indexOf(str[i])) === -1 && (invisible || !(match = trie.search(str.slice(i))))) {\n i += str.codePointAt(i) < 65536 ? 1 : 2;\n }\n let rend, replacement = '';\n if (i === str.length) {\n break;\n } else if (str[i] === ':') {\n if (!(() => {\n rend = str.indexOf(':', i + 1) + 1;\n if (!rend) return false; // no pair of ':'\n const lt = str.indexOf('<', i + 1);\n if (!(lt === -1 || lt >= rend)) return false; // tag appeared before closing ':'\n const shortname = str.slice(i, rend);\n // now got a replacee as ':shortname:'\n // if you want additional emoji handler, add statements below which set replacement and return true.\n if (shortname in customEmojis) {\n const filename = autoPlayGif ? customEmojis[shortname].url : customEmojis[shortname].static_url;\n replacement = `<img draggable=\"false\" class=\"emojione custom-emoji\" alt=\"${shortname}\" title=\"${shortname}\" src=\"${filename}\" data-original=\"${customEmojis[shortname].url}\" data-static=\"${customEmojis[shortname].static_url}\" />`;\n return true;\n }\n return false;\n })()) rend = ++i;\n } else if (tag >= 0) { // <, &\n rend = str.indexOf('>;'[tag], i + 1) + 1;\n if (!rend) {\n break;\n }\n if (tag === 0) {\n if (invisible) {\n if (str[i + 1] === '/') { // closing tag\n if (!--invisible) {\n tagChars = tagCharsWithEmojis;\n }\n } else if (str[rend - 2] !== '/') { // opening tag\n invisible++;\n }\n } else {\n if (str.startsWith('<span class=\"invisible\">', i)) {\n // avoid emojifying on invisible text\n invisible = 1;\n tagChars = tagCharsWithoutEmojis;\n }\n }\n }\n i = rend;\n } else { // matched to unicode emoji\n const { filename, shortCode } = unicodeMapping[match];\n const title = shortCode ? `:${shortCode}:` : '';\n replacement = `<img draggable=\"false\" class=\"emojione\" alt=\"${match}\" title=\"${title}\" src=\"${assetHost}/emoji/${filename}.svg\" />`;\n rend = i + match.length;\n // If the matched character was followed by VS15 (for selecting text presentation), skip it.\n if (str.codePointAt(rend) === 65038) {\n rend += 1;\n }\n }\n rtn += str.slice(0, i) + replacement;\n str = str.slice(rend);\n }\n return rtn + str;\n};\n\nexport default emojify;\n\nexport const buildCustomEmojis = (customEmojis) => {\n const emojis = [];\n\n customEmojis.forEach(emoji => {\n const shortcode = emoji.get('shortcode');\n const url = autoPlayGif ? emoji.get('url') : emoji.get('static_url');\n const name = shortcode.replace(':', '');\n\n emojis.push({\n id: name,\n name,\n short_names: [name],\n text: '',\n emoticons: [],\n keywords: [name],\n imageUrl: url,\n custom: true,\n customCategory: emoji.get('category'),\n });\n });\n\n return emojis;\n};\n\nexport const categoriesFromEmojis = customEmojis => customEmojis.reduce((set, emoji) => set.add(emoji.get('category') ? `custom-${emoji.get('category')}` : 'custom'), new Set(['custom']));\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.showLoading = exports.resetLoading = exports.loadingBarReducer = exports.loadingBarMiddleware = exports.LoadingBar = exports.ImmutableLoadingBar = exports.hideLoading = undefined;\n\nvar _loading_bar = require('./loading_bar');\n\nvar _loading_bar2 = _interopRequireDefault(_loading_bar);\n\nvar _loading_bar_middleware = require('./loading_bar_middleware');\n\nvar _loading_bar_middleware2 = _interopRequireDefault(_loading_bar_middleware);\n\nvar _loading_bar_ducks = require('./loading_bar_ducks');\n\nvar _immutable = require('./immutable');\n\nvar _immutable2 = _interopRequireDefault(_immutable);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nexports.hideLoading = _loading_bar_ducks.hideLoading;\nexports.ImmutableLoadingBar = _immutable2.default;\nexports.LoadingBar = _loading_bar.LoadingBar;\nexports.loadingBarMiddleware = _loading_bar_middleware2.default;\nexports.loadingBarReducer = _loading_bar_ducks.loadingBarReducer;\nexports.resetLoading = _loading_bar_ducks.resetLoading;\nexports.showLoading = _loading_bar_ducks.showLoading;\nexports.default = _loading_bar2.default;","module.exports = require('./lib/axios');","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n/** Error message constants. */\n\n\nvar FUNC_ERROR_TEXT = 'Expected a function';\n/* Built-in method references for those with the same name as other `lodash` methods. */\n\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n\n wait = toNumber(wait) || 0;\n\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time; // Start the timer for the trailing edge.\n\n timerId = setTimeout(timerExpired, wait); // Invoke the leading edge.\n\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime; // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n\n return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;\n }\n\n function timerExpired() {\n var time = now();\n\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n } // Restart the timer.\n\n\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n\n return result;\n }\n\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); // adapted from https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n\nvar detectPassiveEvents = {\n update: function update() {\n if (typeof window !== 'undefined' && typeof window.addEventListener === 'function') {\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passive = true;\n }\n }); // note: have to set and remove a no-op listener instead of null\n // (which was used previously), becasue Edge v15 throws an error\n // when providing a null callback.\n // https://github.com/rafrex/detect-passive-events/pull/3\n\n var noop = function noop() {};\n\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n detectPassiveEvents.hasSupport = passive;\n }\n }\n};\ndetectPassiveEvents.update();\nexports.default = detectPassiveEvents;","import { autoPlayGif, useSystemEmojiFont } from 'flavours/glitch/util/initial_state';\nimport unicodeMapping from './emoji_unicode_mapping_light';\nimport Trie from 'substring-trie';\n\nconst trie = new Trie(Object.keys(unicodeMapping));\n\nconst assetHost = process.env.CDN_HOST || '';\n\nconst emojify = (str, customEmojis = {}) => {\n const tagCharsWithoutEmojis = '<&';\n const tagCharsWithEmojis = Object.keys(customEmojis).length ? '<&:' : '<&';\n let rtn = '', tagChars = tagCharsWithEmojis, invisible = 0;\n for (;;) {\n let match, i = 0, tag;\n while (i < str.length && (tag = tagChars.indexOf(str[i])) === -1 && (invisible || useSystemEmojiFont || !(match = trie.search(str.slice(i))))) {\n i += str.codePointAt(i) < 65536 ? 1 : 2;\n }\n let rend, replacement = '';\n if (i === str.length) {\n break;\n } else if (str[i] === ':') {\n if (!(() => {\n rend = str.indexOf(':', i + 1) + 1;\n if (!rend) return false; // no pair of ':'\n const lt = str.indexOf('<', i + 1);\n if (!(lt === -1 || lt >= rend)) return false; // tag appeared before closing ':'\n const shortname = str.slice(i, rend);\n // now got a replacee as ':shortname:'\n // if you want additional emoji handler, add statements below which set replacement and return true.\n if (shortname in customEmojis) {\n const filename = autoPlayGif ? customEmojis[shortname].url : customEmojis[shortname].static_url;\n replacement = `<img draggable=\"false\" class=\"emojione custom-emoji\" alt=\"${shortname}\" title=\"${shortname}\" src=\"${filename}\" data-original=\"${customEmojis[shortname].url}\" data-static=\"${customEmojis[shortname].static_url}\" />`;\n return true;\n }\n return false;\n })()) rend = ++i;\n } else if (tag >= 0) { // <, &\n rend = str.indexOf('>;'[tag], i + 1) + 1;\n if (!rend) {\n break;\n }\n if (tag === 0) {\n if (invisible) {\n if (str[i + 1] === '/') { // closing tag\n if (!--invisible) {\n tagChars = tagCharsWithEmojis;\n }\n } else if (str[rend - 2] !== '/') { // opening tag\n invisible++;\n }\n } else {\n if (str.startsWith('<span class=\"invisible\">', i)) {\n // avoid emojifying on invisible text\n invisible = 1;\n tagChars = tagCharsWithoutEmojis;\n }\n }\n }\n i = rend;\n } else if (!useSystemEmojiFont) { // matched to unicode emoji\n const { filename, shortCode } = unicodeMapping[match];\n const title = shortCode ? `:${shortCode}:` : '';\n replacement = `<img draggable=\"false\" class=\"emojione\" alt=\"${match}\" title=\"${title}\" src=\"${assetHost}/emoji/${filename}.svg\" />`;\n rend = i + match.length;\n // If the matched character was followed by VS15 (for selecting text presentation), skip it.\n if (str.codePointAt(rend) === 65038) {\n rend += 1;\n }\n }\n rtn += str.slice(0, i) + replacement;\n str = str.slice(rend);\n }\n return rtn + str;\n};\n\nexport default emojify;\nexport { unicodeMapping };\n\nexport const buildCustomEmojis = (customEmojis) => {\n const emojis = [];\n\n customEmojis.forEach(emoji => {\n const shortcode = emoji.get('shortcode');\n const url = autoPlayGif ? emoji.get('url') : emoji.get('static_url');\n const name = shortcode.replace(':', '');\n\n emojis.push({\n id: name,\n name,\n short_names: [name],\n text: '',\n emoticons: [],\n keywords: [name],\n imageUrl: url,\n custom: true,\n customCategory: emoji.get('category'),\n });\n });\n\n return emojis;\n};\n\nexport const categoriesFromEmojis = customEmojis => customEmojis.reduce((set, emoji) => set.add(emoji.get('category') ? `custom-${emoji.get('category')}` : 'custom'), new Set(['custom']));\n","/**\n * Copyright (c) 2014-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'use strict';\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function warning() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;","var freeGlobal = require('./_freeGlobal');\n/** Detect free variable `self`. */\n\n\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n/** Used as a reference to the global object. */\n\nvar root = freeGlobal || freeSelf || Function('return this')();\nmodule.exports = root;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","import React, { PureComponent, Fragment } from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { IntlProvider, addLocaleData } from 'react-intl';\nimport { List as ImmutableList, fromJS } from 'immutable';\nimport { getLocale } from 'mastodon/locales';\nimport { getScrollbarWidth } from 'flavours/glitch/util/scrollbar';\nimport MediaGallery from 'flavours/glitch/components/media_gallery';\nimport Poll from 'flavours/glitch/components/poll';\nimport Hashtag from 'flavours/glitch/components/hashtag';\nimport ModalRoot from 'flavours/glitch/components/modal_root';\nimport MediaModal from 'flavours/glitch/features/ui/components/media_modal';\nimport Video from 'flavours/glitch/features/video';\nimport Card from 'flavours/glitch/features/status/components/card';\nimport Audio from 'flavours/glitch/features/audio';\n\nconst { localeData, messages } = getLocale();\naddLocaleData(localeData);\n\nconst MEDIA_COMPONENTS = { MediaGallery, Video, Card, Poll, Hashtag, Audio };\n\nexport default class MediaContainer extends PureComponent {\n\n static propTypes = {\n locale: PropTypes.string.isRequired,\n components: PropTypes.object.isRequired,\n };\n\n state = {\n media: null,\n index: null,\n time: null,\n };\n\n handleOpenMedia = (media, index) => {\n document.body.classList.add('with-modals--active');\n document.documentElement.style.marginRight = `${getScrollbarWidth()}px`;\n\n this.setState({ media, index });\n }\n\n handleOpenVideo = (video, time) => {\n const media = ImmutableList([video]);\n\n document.body.classList.add('with-modals--active');\n document.documentElement.style.marginRight = `${getScrollbarWidth()}px`;\n\n this.setState({ media, time });\n }\n\n handleCloseMedia = () => {\n document.body.classList.remove('with-modals--active');\n document.documentElement.style.marginRight = 0;\n\n this.setState({ media: null, index: null, time: null });\n }\n\n render () {\n const { locale, components } = this.props;\n\n return (\n <IntlProvider locale={locale} messages={messages}>\n <Fragment>\n {[].map.call(components, (component, i) => {\n const componentName = component.getAttribute('data-component');\n const Component = MEDIA_COMPONENTS[componentName];\n const { media, card, poll, hashtag, ...props } = JSON.parse(component.getAttribute('data-props'));\n\n Object.assign(props, {\n ...(media ? { media: fromJS(media) } : {}),\n ...(card ? { card: fromJS(card) } : {}),\n ...(poll ? { poll: fromJS(poll) } : {}),\n ...(hashtag ? { hashtag: fromJS(hashtag) } : {}),\n\n ...(componentName === 'Video' ? {\n onOpenVideo: this.handleOpenVideo,\n } : {\n onOpenMedia: this.handleOpenMedia,\n }),\n });\n\n return ReactDOM.createPortal(\n <Component {...props} key={`media-${i}`} />,\n component,\n );\n })}\n\n <ModalRoot onClose={this.handleCloseMedia}>\n {this.state.media && (\n <MediaModal\n media={this.state.media}\n index={this.state.index || 0}\n time={this.state.time}\n onClose={this.handleCloseMedia}\n />\n )}\n </ModalRoot>\n </Fragment>\n </IntlProvider>\n );\n }\n\n}\n","// A mapping of unicode strings to an object containing the filename\n// (i.e. the svg filename) and a shortCode intended to be shown\n// as a \"title\" attribute in an HTML element (aka tooltip).\n\nconst [\n shortCodesToEmojiData,\n skins, // eslint-disable-line no-unused-vars\n categories, // eslint-disable-line no-unused-vars\n short_names, // eslint-disable-line no-unused-vars\n emojisWithoutShortCodes,\n] = require('./emoji_compressed');\nconst { unicodeToFilename } = require('./unicode_to_filename');\n\n// decompress\nconst unicodeMapping = {};\n\nfunction processEmojiMapData(emojiMapData, shortCode) {\n let [ native, filename ] = emojiMapData;\n if (!filename) {\n // filename name can be derived from unicodeToFilename\n filename = unicodeToFilename(native);\n }\n unicodeMapping[native] = {\n shortCode: shortCode,\n filename: filename,\n };\n}\n\nObject.keys(shortCodesToEmojiData).forEach((shortCode) => {\n let [ filenameData ] = shortCodesToEmojiData[shortCode];\n filenameData.forEach(emojiMapData => processEmojiMapData(emojiMapData, shortCode));\n});\nemojisWithoutShortCodes.forEach(emojiMapData => processEmojiMapData(emojiMapData));\n\nmodule.exports = unicodeMapping;\n","import $$observable from 'symbol-observable';\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\n\nvar randomString = function randomString() {\n return Math.random().toString(36).substring(7).split('').join('.');\n};\n\nvar ActionTypes = {\n INIT: \"@@redux/INIT\" + randomString(),\n REPLACE: \"@@redux/REPLACE\" + randomString(),\n PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {\n return \"@@redux/PROBE_UNKNOWN_ACTION\" + randomString();\n }\n};\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\n\nfunction isPlainObject(obj) {\n if (typeof obj !== 'object' || obj === null) return false;\n var proto = obj;\n\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(obj) === proto;\n}\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n\n\nfunction createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {\n throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function.');\n }\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n /**\n * This makes a shallow copy of currentListeners so we can use\n * nextListeners as a temporary list while dispatching.\n *\n * This prevents any bugs around consumers calling\n * subscribe/unsubscribe in the middle of a dispatch.\n */\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n\n\n function getState() {\n if (isDispatching) {\n throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');\n }\n\n return currentState;\n }\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n\n\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected the listener to be a function.');\n }\n\n if (isDispatching) {\n throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');\n }\n\n var isSubscribed = true;\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n if (isDispatching) {\n throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');\n }\n\n isSubscribed = false;\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n currentListeners = null;\n };\n }\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n\n\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n\n\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.\n // Any reducers that existed in both the new and old rootReducer\n // will receive the previous state. This effectively populates\n // the new state tree with any relevant data from the old one.\n\n dispatch({\n type: ActionTypes.REPLACE\n });\n }\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n\n\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object' || observer === null) {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return {\n unsubscribe: unsubscribe\n };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n } // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n\n\n dispatch({\n type: ActionTypes.INIT\n });\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\n\n\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n\n\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n } catch (e) {} // eslint-disable-line no-empty\n\n}\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionDescription = actionType && \"action \\\"\" + String(actionType) + \"\\\"\" || 'an action';\n return \"Given \" + actionDescription + \", reducer \\\"\" + key + \"\\\" returned undefined. \" + \"To ignore an action, you must explicitly return the previous state. \" + \"If you want this reducer to hold no value, you can return null instead of undefined.\";\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return \"The \" + argumentName + \" has unexpected type of \\\"\" + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + \"\\\". Expected argument to be an object with the following \" + (\"keys: \\\"\" + reducerKeys.join('\", \"') + \"\\\"\");\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n if (action && action.type === ActionTypes.REPLACE) return;\n\n if (unexpectedKeys.length > 0) {\n return \"Unexpected \" + (unexpectedKeys.length > 1 ? 'keys' : 'key') + \" \" + (\"\\\"\" + unexpectedKeys.join('\", \"') + \"\\\" found in \" + argumentName + \". \") + \"Expected to find one of the known reducer keys instead: \" + (\"\\\"\" + reducerKeys.join('\", \"') + \"\\\". Unexpected keys will be ignored.\");\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, {\n type: ActionTypes.INIT\n });\n\n if (typeof initialState === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined during initialization. \" + \"If the state passed to the reducer is undefined, you must \" + \"explicitly return the initial state. The initial state may \" + \"not be undefined. If you don't want to set a value for this reducer, \" + \"you can use null instead of undefined.\");\n }\n\n if (typeof reducer(undefined, {\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\n }) === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined when probed with a random type. \" + (\"Don't try to handle \" + ActionTypes.INIT + \" or other actions in \\\"redux/*\\\" \") + \"namespace. They are considered private. Instead, you must return the \" + \"current state for any unknown actions, unless it is undefined, \" + \"in which case you must return the initial state, regardless of the \" + \"action type. The initial state may not be undefined, but can be null.\");\n }\n });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof reducers[key] === 'undefined') {\n warning(\"No reducer provided for key \\\"\" + key + \"\\\"\");\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n\n var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same\n // keys multiple times.\n\n var unexpectedKeyCache;\n\n if (process.env.NODE_ENV !== 'production') {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError;\n\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination(state, action) {\n if (state === void 0) {\n state = {};\n }\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n\n hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass an action creator as the first argument,\n * and get a dispatch wrapped function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error(\"bindActionCreators expected an object or a function, instead received \" + (actionCreators === null ? 'null' : typeof actionCreators) + \". \" + \"Did you write \\\"import ActionCreators from\\\" instead of \\\"import * as ActionCreators from\\\"?\");\n }\n\n var boundActionCreators = {};\n\n for (var key in actionCreators) {\n var actionCreator = actionCreators[key];\n\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n\n return boundActionCreators;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n keys.push.apply(keys, Object.getOwnPropertySymbols(object));\n }\n\n if (enumerableOnly) keys = keys.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(source, true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\n\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\n\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n var store = createStore.apply(void 0, arguments);\n\n var _dispatch = function dispatch() {\n throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(void 0, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\n return _objectSpread2({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\n\n\nfunction isCrushed() {}\n\nif (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {\n warning('You are currently using minified code outside of NODE_ENV === \"production\". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');\n}\n\nexport { ActionTypes as __DO_NOT_USE__ActionTypes, applyMiddleware, bindActionCreators, combineReducers, compose, createStore };","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport { fromJS, is } from 'immutable';\nimport { throttle } from 'lodash';\nimport classNames from 'classnames';\nimport { isFullscreen, requestFullscreen, exitFullscreen } from 'flavours/glitch/util/fullscreen';\nimport { displayMedia, useBlurhash } from 'flavours/glitch/util/initial_state';\nimport Icon from 'flavours/glitch/components/icon';\nimport { decode } from 'blurhash';\n\nconst messages = defineMessages({\n play: { id: 'video.play', defaultMessage: 'Play' },\n pause: { id: 'video.pause', defaultMessage: 'Pause' },\n mute: { id: 'video.mute', defaultMessage: 'Mute sound' },\n unmute: { id: 'video.unmute', defaultMessage: 'Unmute sound' },\n hide: { id: 'video.hide', defaultMessage: 'Hide video' },\n expand: { id: 'video.expand', defaultMessage: 'Expand video' },\n close: { id: 'video.close', defaultMessage: 'Close video' },\n fullscreen: { id: 'video.fullscreen', defaultMessage: 'Full screen' },\n exit_fullscreen: { id: 'video.exit_fullscreen', defaultMessage: 'Exit full screen' },\n download: { id: 'video.download', defaultMessage: 'Download file' },\n});\n\nexport const formatTime = secondsNum => {\n let hours = Math.floor(secondsNum / 3600);\n let minutes = Math.floor((secondsNum - (hours * 3600)) / 60);\n let seconds = secondsNum - (hours * 3600) - (minutes * 60);\n\n if (hours < 10) hours = '0' + hours;\n if (minutes < 10) minutes = '0' + minutes;\n if (seconds < 10) seconds = '0' + seconds;\n return (hours === '00' ? '' : `${hours}:`) + `${minutes}:${seconds}`;\n};\n\nexport const findElementPosition = el => {\n let box;\n\n if (el.getBoundingClientRect && el.parentNode) {\n box = el.getBoundingClientRect();\n }\n\n if (!box) {\n return {\n left: 0,\n top: 0,\n };\n }\n\n const docEl = document.documentElement;\n const body = document.body;\n\n const clientLeft = docEl.clientLeft || body.clientLeft || 0;\n const scrollLeft = window.pageXOffset || body.scrollLeft;\n const left = (box.left + scrollLeft) - clientLeft;\n\n const clientTop = docEl.clientTop || body.clientTop || 0;\n const scrollTop = window.pageYOffset || body.scrollTop;\n const top = (box.top + scrollTop) - clientTop;\n\n return {\n left: Math.round(left),\n top: Math.round(top),\n };\n};\n\nexport const getPointerPosition = (el, event) => {\n const position = {};\n const box = findElementPosition(el);\n const boxW = el.offsetWidth;\n const boxH = el.offsetHeight;\n const boxY = box.top;\n const boxX = box.left;\n\n let pageY = event.pageY;\n let pageX = event.pageX;\n\n if (event.changedTouches) {\n pageX = event.changedTouches[0].pageX;\n pageY = event.changedTouches[0].pageY;\n }\n\n position.y = Math.max(0, Math.min(1, (pageY - boxY) / boxH));\n position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));\n\n return position;\n};\n\nexport default @injectIntl\nclass Video extends React.PureComponent {\n\n static propTypes = {\n preview: PropTypes.string,\n src: PropTypes.string.isRequired,\n alt: PropTypes.string,\n width: PropTypes.number,\n height: PropTypes.number,\n sensitive: PropTypes.bool,\n startTime: PropTypes.number,\n onOpenVideo: PropTypes.func,\n onCloseVideo: PropTypes.func,\n letterbox: PropTypes.bool,\n fullwidth: PropTypes.bool,\n detailed: PropTypes.bool,\n inline: PropTypes.bool,\n editable: PropTypes.bool,\n cacheWidth: PropTypes.func,\n intl: PropTypes.object.isRequired,\n visible: PropTypes.bool,\n onToggleVisibility: PropTypes.func,\n preventPlayback: PropTypes.bool,\n blurhash: PropTypes.string,\n link: PropTypes.node,\n };\n\n state = {\n currentTime: 0,\n duration: 0,\n volume: 0.5,\n paused: true,\n dragging: false,\n containerWidth: this.props.width,\n fullscreen: false,\n hovered: false,\n muted: false,\n revealed: this.props.visible !== undefined ? this.props.visible : (displayMedia !== 'hide_all' && !this.props.sensitive || displayMedia === 'show_all'),\n };\n\n componentWillReceiveProps (nextProps) {\n if (!is(nextProps.visible, this.props.visible) && nextProps.visible !== undefined) {\n this.setState({ revealed: nextProps.visible });\n }\n }\n\n // hard coded in components.scss\n // any way to get ::before values programatically?\n volWidth = 50;\n volOffset = 70;\n volHandleOffset = v => {\n const offset = v * this.volWidth + this.volOffset;\n return (offset > 110) ? 110 : offset;\n }\n\n setPlayerRef = c => {\n this.player = c;\n\n if (c && c.offsetWidth && c.offsetWidth != this.state.containerWidth) {\n if (this.props.cacheWidth) this.props.cacheWidth(this.player.offsetWidth);\n this.setState({\n containerWidth: c.offsetWidth,\n });\n }\n }\n\n setVideoRef = c => {\n this.video = c;\n\n if (this.video) {\n this.setState({ volume: this.video.volume, muted: this.video.muted });\n }\n }\n\n setSeekRef = c => {\n this.seek = c;\n }\n\n setVolumeRef = c => {\n this.volume = c;\n }\n\n setCanvasRef = c => {\n this.canvas = c;\n\n if (c && this.props.blurhash) {\n this._decode();\n }\n }\n\n handleMouseDownRoot = e => {\n e.preventDefault();\n e.stopPropagation();\n }\n\n handlePlay = () => {\n this.setState({ paused: false });\n }\n\n handlePause = () => {\n this.setState({ paused: true });\n }\n\n handleTimeUpdate = () => {\n this.setState({\n currentTime: Math.floor(this.video.currentTime),\n duration: Math.floor(this.video.duration),\n });\n }\n\n handleVolumeMouseDown = e => {\n document.addEventListener('mousemove', this.handleMouseVolSlide, true);\n document.addEventListener('mouseup', this.handleVolumeMouseUp, true);\n document.addEventListener('touchmove', this.handleMouseVolSlide, true);\n document.addEventListener('touchend', this.handleVolumeMouseUp, true);\n\n this.handleMouseVolSlide(e);\n\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleVolumeMouseUp = () => {\n document.removeEventListener('mousemove', this.handleMouseVolSlide, true);\n document.removeEventListener('mouseup', this.handleVolumeMouseUp, true);\n document.removeEventListener('touchmove', this.handleMouseVolSlide, true);\n document.removeEventListener('touchend', this.handleVolumeMouseUp, true);\n }\n\n handleMouseVolSlide = throttle(e => {\n const rect = this.volume.getBoundingClientRect();\n const x = (e.clientX - rect.left) / this.volWidth; //x position within the element.\n\n if(!isNaN(x)) {\n var slideamt = x;\n if(x > 1) {\n slideamt = 1;\n } else if(x < 0) {\n slideamt = 0;\n }\n this.video.volume = slideamt;\n this.setState({ volume: slideamt });\n }\n }, 60);\n\n handleMouseDown = e => {\n document.addEventListener('mousemove', this.handleMouseMove, true);\n document.addEventListener('mouseup', this.handleMouseUp, true);\n document.addEventListener('touchmove', this.handleMouseMove, true);\n document.addEventListener('touchend', this.handleMouseUp, true);\n\n this.setState({ dragging: true });\n this.video.pause();\n this.handleMouseMove(e);\n\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleMouseUp = () => {\n document.removeEventListener('mousemove', this.handleMouseMove, true);\n document.removeEventListener('mouseup', this.handleMouseUp, true);\n document.removeEventListener('touchmove', this.handleMouseMove, true);\n document.removeEventListener('touchend', this.handleMouseUp, true);\n\n this.setState({ dragging: false });\n this.video.play();\n }\n\n handleMouseMove = throttle(e => {\n const { x } = getPointerPosition(this.seek, e);\n const currentTime = Math.floor(this.video.duration * x);\n\n if (!isNaN(currentTime)) {\n this.video.currentTime = currentTime;\n this.setState({ currentTime });\n }\n }, 60);\n\n togglePlay = () => {\n if (this.state.paused) {\n this.video.play();\n } else {\n this.video.pause();\n }\n }\n\n toggleFullscreen = () => {\n if (isFullscreen()) {\n exitFullscreen();\n } else {\n requestFullscreen(this.player);\n }\n }\n\n componentDidMount () {\n document.addEventListener('fullscreenchange', this.handleFullscreenChange, true);\n document.addEventListener('webkitfullscreenchange', this.handleFullscreenChange, true);\n document.addEventListener('mozfullscreenchange', this.handleFullscreenChange, true);\n document.addEventListener('MSFullscreenChange', this.handleFullscreenChange, true);\n\n if (this.props.blurhash) {\n this._decode();\n }\n }\n\n componentWillUnmount () {\n document.removeEventListener('fullscreenchange', this.handleFullscreenChange, true);\n document.removeEventListener('webkitfullscreenchange', this.handleFullscreenChange, true);\n document.removeEventListener('mozfullscreenchange', this.handleFullscreenChange, true);\n document.removeEventListener('MSFullscreenChange', this.handleFullscreenChange, true);\n }\n\n componentDidUpdate (prevProps) {\n if (this.player && this.player.offsetWidth && this.player.offsetWidth != this.state.containerWidth && !this.state.fullscreen) {\n if (this.props.cacheWidth) this.props.cacheWidth(this.player.offsetWidth);\n this.setState({\n containerWidth: this.player.offsetWidth,\n });\n }\n if (this.video && this.state.revealed && this.props.preventPlayback && !prevProps.preventPlayback) {\n this.video.pause();\n }\n if (prevProps.blurhash !== this.props.blurhash && this.props.blurhash) {\n this._decode();\n }\n }\n\n _decode () {\n if (!this.canvas || !useBlurhash) return;\n\n const hash = this.props.blurhash;\n const pixels = decode(hash, 32, 32);\n\n if (pixels) {\n const ctx = this.canvas.getContext('2d');\n const imageData = new ImageData(pixels, 32, 32);\n\n ctx.putImageData(imageData, 0, 0);\n }\n }\n\n handleFullscreenChange = () => {\n this.setState({ fullscreen: isFullscreen() });\n }\n\n handleMouseEnter = () => {\n this.setState({ hovered: true });\n }\n\n handleMouseLeave = () => {\n this.setState({ hovered: false });\n }\n\n toggleMute = () => {\n this.video.muted = !this.video.muted;\n this.setState({ muted: this.video.muted });\n }\n\n toggleReveal = () => {\n if (this.state.revealed) {\n this.video.pause();\n }\n\n if (this.props.onToggleVisibility) {\n this.props.onToggleVisibility();\n } else {\n this.setState({ revealed: !this.state.revealed });\n }\n }\n\n handleLoadedData = () => {\n if (this.props.startTime) {\n this.video.currentTime = this.props.startTime;\n this.video.play();\n }\n }\n\n handleProgress = () => {\n if (this.video.buffered.length > 0) {\n this.setState({ buffer: this.video.buffered.end(0) / this.video.duration * 100 });\n }\n }\n\n handleVolumeChange = () => {\n this.setState({ volume: this.video.volume, muted: this.video.muted });\n }\n\n handleOpenVideo = () => {\n const { src, preview, width, height, alt } = this.props;\n\n const media = fromJS({\n type: 'video',\n url: src,\n preview_url: preview,\n description: alt,\n width,\n height,\n });\n\n this.video.pause();\n this.props.onOpenVideo(media, this.video.currentTime);\n }\n\n handleCloseVideo = () => {\n this.video.pause();\n this.props.onCloseVideo();\n }\n\n render () {\n const { preview, src, inline, startTime, onOpenVideo, onCloseVideo, intl, alt, letterbox, fullwidth, detailed, sensitive, link, editable } = this.props;\n const { containerWidth, currentTime, duration, volume, buffer, dragging, paused, fullscreen, hovered, muted, revealed } = this.state;\n const progress = (currentTime / duration) * 100;\n const playerStyle = {};\n\n const volumeWidth = (muted) ? 0 : volume * this.volWidth;\n const volumeHandleLoc = (muted) ? this.volHandleOffset(0) : this.volHandleOffset(volume);\n\n const computedClass = classNames('video-player', { inactive: !revealed, detailed, inline: inline && !fullscreen, fullscreen, editable, letterbox, 'full-width': fullwidth });\n\n let { width, height } = this.props;\n\n if (inline && containerWidth) {\n width = containerWidth;\n height = containerWidth / (16/9);\n\n playerStyle.height = height;\n } else if (inline) {\n return (<div className={computedClass} ref={this.setPlayerRef} tabindex={0}></div>);\n }\n\n let warning;\n if (sensitive) {\n warning = <FormattedMessage id='status.sensitive_warning' defaultMessage='Sensitive content' />;\n } else {\n warning = <FormattedMessage id='status.media_hidden' defaultMessage='Media hidden' />;\n }\n\n let preload;\n\n if (startTime || fullscreen || dragging) {\n preload = 'auto';\n } else if (detailed) {\n preload = 'metadata';\n } else {\n preload = 'none';\n }\n\n return (\n <div\n className={computedClass}\n style={playerStyle}\n ref={this.setPlayerRef}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n onMouseDown={this.handleMouseDownRoot}\n tabIndex={0}\n >\n <canvas width={32} height={32} ref={this.setCanvasRef} className={classNames('media-gallery__preview', { 'media-gallery__preview--hidden': revealed })} />\n\n {(revealed || editable) && <video\n ref={this.setVideoRef}\n src={src}\n poster={preview}\n preload={preload}\n loop\n role='button'\n tabIndex='0'\n aria-label={alt}\n title={alt}\n width={width}\n height={height}\n volume={volume}\n onClick={this.togglePlay}\n onPlay={this.handlePlay}\n onPause={this.handlePause}\n onTimeUpdate={this.handleTimeUpdate}\n onLoadedData={this.handleLoadedData}\n onProgress={this.handleProgress}\n onVolumeChange={this.handleVolumeChange}\n />}\n\n <div className={classNames('spoiler-button', { 'spoiler-button--hidden': revealed || editable })}>\n <button type='button' className='spoiler-button__overlay' onClick={this.toggleReveal}>\n <span className='spoiler-button__overlay__label'>{warning}</span>\n </button>\n </div>\n\n <div className={classNames('video-player__controls', { active: paused || hovered })}>\n <div className='video-player__seek' onMouseDown={this.handleMouseDown} ref={this.setSeekRef}>\n <div className='video-player__seek__buffer' style={{ width: `${buffer}%` }} />\n <div className='video-player__seek__progress' style={{ width: `${progress}%` }} />\n\n <span\n className={classNames('video-player__seek__handle', { active: dragging })}\n tabIndex='0'\n style={{ left: `${progress}%` }}\n />\n </div>\n\n <div className='video-player__buttons-bar'>\n <div className='video-player__buttons left'>\n <button type='button' aria-label={intl.formatMessage(paused ? messages.play : messages.pause)} onClick={this.togglePlay} autoFocus={detailed}><Icon id={paused ? 'play' : 'pause'} fixedWidth /></button>\n <button type='button' aria-label={intl.formatMessage(muted ? messages.unmute : messages.mute)} onClick={this.toggleMute}><Icon id={muted ? 'volume-off' : 'volume-up'} fixedWidth /></button>\n <div className='video-player__volume' onMouseDown={this.handleVolumeMouseDown} ref={this.setVolumeRef}>\n \n <div className='video-player__volume__current' style={{ width: `${volumeWidth}px` }} />\n <span\n className={classNames('video-player__volume__handle')}\n tabIndex='0'\n style={{ left: `${volumeHandleLoc}px` }}\n />\n </div>\n\n {(detailed || fullscreen) && (\n <span>\n <span className='video-player__time-current'>{formatTime(currentTime)}</span>\n <span className='video-player__time-sep'>/</span>\n <span className='video-player__time-total'>{formatTime(duration)}</span>\n </span>\n )}\n\n {link && <span className='video-player__link'>{link}</span>}\n </div>\n\n <div className='video-player__buttons right'>\n {(!onCloseVideo && !editable) && <button type='button' aria-label={intl.formatMessage(messages.hide)} onClick={this.toggleReveal}><Icon id='eye-slash' fixedWidth /></button>}\n {(!fullscreen && onOpenVideo) && <button type='button' aria-label={intl.formatMessage(messages.expand)} onClick={this.handleOpenVideo}><Icon id='expand' fixedWidth /></button>}\n {onCloseVideo && <button type='button' aria-label={intl.formatMessage(messages.close)} onClick={this.handleCloseVideo}><Icon id='compress' fixedWidth /></button>}\n <button type='button' aria-label={intl.formatMessage(messages.download)}>\n <a className='video-player__download__icon' href={this.props.src} download>\n <Icon id={'download'} fixedWidth />\n </a>\n </button>\n <button type='button' aria-label={intl.formatMessage(fullscreen ? messages.exit_fullscreen : messages.fullscreen)} onClick={this.toggleFullscreen}><Icon id={fullscreen ? 'compress' : 'arrows-alt'} fixedWidth /></button>\n\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport { fromJS, is } from 'immutable';\nimport { throttle } from 'lodash';\nimport classNames from 'classnames';\nimport { isFullscreen, requestFullscreen, exitFullscreen } from '../ui/util/fullscreen';\nimport { displayMedia, useBlurhash } from '../../initial_state';\nimport Icon from 'mastodon/components/icon';\nimport { decode } from 'blurhash';\n\nconst messages = defineMessages({\n play: { id: 'video.play', defaultMessage: 'Play' },\n pause: { id: 'video.pause', defaultMessage: 'Pause' },\n mute: { id: 'video.mute', defaultMessage: 'Mute sound' },\n unmute: { id: 'video.unmute', defaultMessage: 'Unmute sound' },\n hide: { id: 'video.hide', defaultMessage: 'Hide video' },\n expand: { id: 'video.expand', defaultMessage: 'Expand video' },\n close: { id: 'video.close', defaultMessage: 'Close video' },\n fullscreen: { id: 'video.fullscreen', defaultMessage: 'Full screen' },\n exit_fullscreen: { id: 'video.exit_fullscreen', defaultMessage: 'Exit full screen' },\n download: { id: 'video.download', defaultMessage: 'Download file' },\n});\n\nexport const formatTime = secondsNum => {\n let hours = Math.floor(secondsNum / 3600);\n let minutes = Math.floor((secondsNum - (hours * 3600)) / 60);\n let seconds = secondsNum - (hours * 3600) - (minutes * 60);\n\n if (hours < 10) hours = '0' + hours;\n if (minutes < 10) minutes = '0' + minutes;\n if (seconds < 10) seconds = '0' + seconds;\n\n return (hours === '00' ? '' : `${hours}:`) + `${minutes}:${seconds}`;\n};\n\nexport const findElementPosition = el => {\n let box;\n\n if (el.getBoundingClientRect && el.parentNode) {\n box = el.getBoundingClientRect();\n }\n\n if (!box) {\n return {\n left: 0,\n top: 0,\n };\n }\n\n const docEl = document.documentElement;\n const body = document.body;\n\n const clientLeft = docEl.clientLeft || body.clientLeft || 0;\n const scrollLeft = window.pageXOffset || body.scrollLeft;\n const left = (box.left + scrollLeft) - clientLeft;\n\n const clientTop = docEl.clientTop || body.clientTop || 0;\n const scrollTop = window.pageYOffset || body.scrollTop;\n const top = (box.top + scrollTop) - clientTop;\n\n return {\n left: Math.round(left),\n top: Math.round(top),\n };\n};\n\nexport const getPointerPosition = (el, event) => {\n const position = {};\n const box = findElementPosition(el);\n const boxW = el.offsetWidth;\n const boxH = el.offsetHeight;\n const boxY = box.top;\n const boxX = box.left;\n\n let pageY = event.pageY;\n let pageX = event.pageX;\n\n if (event.changedTouches) {\n pageX = event.changedTouches[0].pageX;\n pageY = event.changedTouches[0].pageY;\n }\n\n position.y = Math.max(0, Math.min(1, (pageY - boxY) / boxH));\n position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));\n\n return position;\n};\n\nexport default @injectIntl\nclass Video extends React.PureComponent {\n\n static propTypes = {\n preview: PropTypes.string,\n src: PropTypes.string.isRequired,\n alt: PropTypes.string,\n width: PropTypes.number,\n height: PropTypes.number,\n sensitive: PropTypes.bool,\n startTime: PropTypes.number,\n onOpenVideo: PropTypes.func,\n onCloseVideo: PropTypes.func,\n detailed: PropTypes.bool,\n inline: PropTypes.bool,\n editable: PropTypes.bool,\n cacheWidth: PropTypes.func,\n visible: PropTypes.bool,\n onToggleVisibility: PropTypes.func,\n intl: PropTypes.object.isRequired,\n blurhash: PropTypes.string,\n link: PropTypes.node,\n };\n\n state = {\n currentTime: 0,\n duration: 0,\n volume: 0.5,\n paused: true,\n dragging: false,\n containerWidth: this.props.width,\n fullscreen: false,\n hovered: false,\n muted: false,\n revealed: this.props.visible !== undefined ? this.props.visible : (displayMedia !== 'hide_all' && !this.props.sensitive || displayMedia === 'show_all'),\n };\n\n // Hard-coded in components.scss\n // Any way to get ::before values programatically?\n volWidth = 50;\n volOffset = 70;\n\n volHandleOffset = v => {\n const offset = v * this.volWidth + this.volOffset;\n\n return (offset > 110) ? 110 : offset;\n }\n\n setPlayerRef = c => {\n this.player = c;\n\n if (c) {\n if (this.props.cacheWidth) this.props.cacheWidth(this.player.offsetWidth);\n\n this.setState({\n containerWidth: c.offsetWidth,\n });\n }\n }\n\n setVideoRef = c => {\n this.video = c;\n\n if (this.video) {\n this.setState({ volume: this.video.volume, muted: this.video.muted });\n }\n }\n\n setSeekRef = c => {\n this.seek = c;\n }\n\n setVolumeRef = c => {\n this.volume = c;\n }\n\n setCanvasRef = c => {\n this.canvas = c;\n }\n\n handleClickRoot = e => e.stopPropagation();\n\n handlePlay = () => {\n this.setState({ paused: false });\n }\n\n handlePause = () => {\n this.setState({ paused: true });\n }\n\n handleTimeUpdate = () => {\n this.setState({\n currentTime: Math.floor(this.video.currentTime),\n duration: Math.floor(this.video.duration),\n });\n }\n\n handleVolumeMouseDown = e => {\n document.addEventListener('mousemove', this.handleMouseVolSlide, true);\n document.addEventListener('mouseup', this.handleVolumeMouseUp, true);\n document.addEventListener('touchmove', this.handleMouseVolSlide, true);\n document.addEventListener('touchend', this.handleVolumeMouseUp, true);\n\n this.handleMouseVolSlide(e);\n\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleVolumeMouseUp = () => {\n document.removeEventListener('mousemove', this.handleMouseVolSlide, true);\n document.removeEventListener('mouseup', this.handleVolumeMouseUp, true);\n document.removeEventListener('touchmove', this.handleMouseVolSlide, true);\n document.removeEventListener('touchend', this.handleVolumeMouseUp, true);\n }\n\n handleMouseVolSlide = throttle(e => {\n const rect = this.volume.getBoundingClientRect();\n const x = (e.clientX - rect.left) / this.volWidth; //x position within the element.\n\n if(!isNaN(x)) {\n let slideamt = x;\n\n if(x > 1) {\n slideamt = 1;\n } else if(x < 0) {\n slideamt = 0;\n }\n\n this.video.volume = slideamt;\n this.setState({ volume: slideamt });\n }\n }, 60);\n\n handleMouseDown = e => {\n document.addEventListener('mousemove', this.handleMouseMove, true);\n document.addEventListener('mouseup', this.handleMouseUp, true);\n document.addEventListener('touchmove', this.handleMouseMove, true);\n document.addEventListener('touchend', this.handleMouseUp, true);\n\n this.setState({ dragging: true });\n this.video.pause();\n this.handleMouseMove(e);\n\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleMouseUp = () => {\n document.removeEventListener('mousemove', this.handleMouseMove, true);\n document.removeEventListener('mouseup', this.handleMouseUp, true);\n document.removeEventListener('touchmove', this.handleMouseMove, true);\n document.removeEventListener('touchend', this.handleMouseUp, true);\n\n this.setState({ dragging: false });\n this.video.play();\n }\n\n handleMouseMove = throttle(e => {\n const { x } = getPointerPosition(this.seek, e);\n const currentTime = Math.floor(this.video.duration * x);\n\n if (!isNaN(currentTime)) {\n this.video.currentTime = currentTime;\n this.setState({ currentTime });\n }\n }, 60);\n\n togglePlay = () => {\n if (this.state.paused) {\n this.setState({ paused: false }, () => this.video.play());\n } else {\n this.setState({ paused: true }, () => this.video.pause());\n }\n }\n\n toggleFullscreen = () => {\n if (isFullscreen()) {\n exitFullscreen();\n } else {\n requestFullscreen(this.player);\n }\n }\n\n componentDidMount () {\n document.addEventListener('fullscreenchange', this.handleFullscreenChange, true);\n document.addEventListener('webkitfullscreenchange', this.handleFullscreenChange, true);\n document.addEventListener('mozfullscreenchange', this.handleFullscreenChange, true);\n document.addEventListener('MSFullscreenChange', this.handleFullscreenChange, true);\n\n window.addEventListener('scroll', this.handleScroll);\n\n if (this.props.blurhash) {\n this._decode();\n }\n }\n\n componentWillUnmount () {\n window.removeEventListener('scroll', this.handleScroll);\n\n document.removeEventListener('fullscreenchange', this.handleFullscreenChange, true);\n document.removeEventListener('webkitfullscreenchange', this.handleFullscreenChange, true);\n document.removeEventListener('mozfullscreenchange', this.handleFullscreenChange, true);\n document.removeEventListener('MSFullscreenChange', this.handleFullscreenChange, true);\n }\n\n componentWillReceiveProps (nextProps) {\n if (!is(nextProps.visible, this.props.visible) && nextProps.visible !== undefined) {\n this.setState({ revealed: nextProps.visible });\n }\n }\n\n componentDidUpdate (prevProps, prevState) {\n if (prevState.revealed && !this.state.revealed && this.video) {\n this.video.pause();\n }\n\n if (prevProps.blurhash !== this.props.blurhash && this.props.blurhash) {\n this._decode();\n }\n }\n\n _decode () {\n if (!useBlurhash) return;\n\n const hash = this.props.blurhash;\n const pixels = decode(hash, 32, 32);\n\n if (pixels) {\n const ctx = this.canvas.getContext('2d');\n const imageData = new ImageData(pixels, 32, 32);\n\n ctx.putImageData(imageData, 0, 0);\n }\n }\n\n handleScroll = throttle(() => {\n if (!this.video) {\n return;\n }\n\n const { top, height } = this.video.getBoundingClientRect();\n const inView = (top <= (window.innerHeight || document.documentElement.clientHeight)) && (top + height >= 0);\n\n if (!this.state.paused && !inView) {\n this.setState({ paused: true }, () => this.video.pause());\n }\n }, 150, { trailing: true })\n\n handleFullscreenChange = () => {\n this.setState({ fullscreen: isFullscreen() });\n }\n\n handleMouseEnter = () => {\n this.setState({ hovered: true });\n }\n\n handleMouseLeave = () => {\n this.setState({ hovered: false });\n }\n\n toggleMute = () => {\n const muted = !this.video.muted;\n\n this.setState({ muted }, () => {\n this.video.muted = muted;\n });\n }\n\n toggleReveal = () => {\n if (this.props.onToggleVisibility) {\n this.props.onToggleVisibility();\n } else {\n this.setState({ revealed: !this.state.revealed });\n }\n }\n\n handleLoadedData = () => {\n if (this.props.startTime) {\n this.video.currentTime = this.props.startTime;\n this.video.play();\n }\n }\n\n handleProgress = () => {\n if (this.video.buffered.length > 0) {\n this.setState({ buffer: this.video.buffered.end(0) / this.video.duration * 100 });\n }\n }\n\n handleVolumeChange = () => {\n this.setState({ volume: this.video.volume, muted: this.video.muted });\n }\n\n handleOpenVideo = () => {\n const { src, preview, width, height, alt } = this.props;\n\n const media = fromJS({\n type: 'video',\n url: src,\n preview_url: preview,\n description: alt,\n width,\n height,\n });\n\n this.video.pause();\n this.props.onOpenVideo(media, this.video.currentTime);\n }\n\n handleCloseVideo = () => {\n this.video.pause();\n this.props.onCloseVideo();\n }\n\n render () {\n const { preview, src, inline, startTime, onOpenVideo, onCloseVideo, intl, alt, detailed, sensitive, link, editable } = this.props;\n const { containerWidth, currentTime, duration, volume, buffer, dragging, paused, fullscreen, hovered, muted, revealed } = this.state;\n const progress = (currentTime / duration) * 100;\n\n const volumeWidth = (muted) ? 0 : volume * this.volWidth;\n const volumeHandleLoc = (muted) ? this.volHandleOffset(0) : this.volHandleOffset(volume);\n const playerStyle = {};\n\n let { width, height } = this.props;\n\n if (inline && containerWidth) {\n width = containerWidth;\n height = containerWidth / (16/9);\n\n playerStyle.height = height;\n }\n\n let preload;\n\n if (startTime || fullscreen || dragging) {\n preload = 'auto';\n } else if (detailed) {\n preload = 'metadata';\n } else {\n preload = 'none';\n }\n\n let warning;\n\n if (sensitive) {\n warning = <FormattedMessage id='status.sensitive_warning' defaultMessage='Sensitive content' />;\n } else {\n warning = <FormattedMessage id='status.media_hidden' defaultMessage='Media hidden' />;\n }\n\n return (\n <div\n role='menuitem'\n className={classNames('video-player', { inactive: !revealed, detailed, inline: inline && !fullscreen, fullscreen, editable })}\n style={playerStyle}\n ref={this.setPlayerRef}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n onClick={this.handleClickRoot}\n tabIndex={0}\n >\n <canvas width={32} height={32} ref={this.setCanvasRef} className={classNames('media-gallery__preview', { 'media-gallery__preview--hidden': revealed })} />\n\n {(revealed || editable) && <video\n ref={this.setVideoRef}\n src={src}\n poster={preview}\n preload={preload}\n role='button'\n tabIndex='0'\n aria-label={alt}\n title={alt}\n width={width}\n height={height}\n volume={volume}\n onClick={this.togglePlay}\n onPlay={this.handlePlay}\n onPause={this.handlePause}\n onTimeUpdate={this.handleTimeUpdate}\n onLoadedData={this.handleLoadedData}\n onProgress={this.handleProgress}\n onVolumeChange={this.handleVolumeChange}\n />}\n\n <div className={classNames('spoiler-button', { 'spoiler-button--hidden': revealed || editable })}>\n <button type='button' className='spoiler-button__overlay' onClick={this.toggleReveal}>\n <span className='spoiler-button__overlay__label'>{warning}</span>\n </button>\n </div>\n\n <div className={classNames('video-player__controls', { active: paused || hovered })}>\n <div className='video-player__seek' onMouseDown={this.handleMouseDown} ref={this.setSeekRef}>\n <div className='video-player__seek__buffer' style={{ width: `${buffer}%` }} />\n <div className='video-player__seek__progress' style={{ width: `${progress}%` }} />\n\n <span\n className={classNames('video-player__seek__handle', { active: dragging })}\n tabIndex='0'\n style={{ left: `${progress}%` }}\n />\n </div>\n\n <div className='video-player__buttons-bar'>\n <div className='video-player__buttons left'>\n <button type='button' aria-label={intl.formatMessage(paused ? messages.play : messages.pause)} onClick={this.togglePlay} autoFocus={detailed}><Icon id={paused ? 'play' : 'pause'} fixedWidth /></button>\n <button type='button' aria-label={intl.formatMessage(muted ? messages.unmute : messages.mute)} onClick={this.toggleMute}><Icon id={muted ? 'volume-off' : 'volume-up'} fixedWidth /></button>\n\n <div className='video-player__volume' onMouseDown={this.handleVolumeMouseDown} ref={this.setVolumeRef}>\n \n <div className='video-player__volume__current' style={{ width: `${volumeWidth}px` }} />\n <span\n className={classNames('video-player__volume__handle')}\n tabIndex='0'\n style={{ left: `${volumeHandleLoc}px` }}\n />\n </div>\n\n {(detailed || fullscreen) && (\n <span>\n <span className='video-player__time-current'>{formatTime(currentTime)}</span>\n <span className='video-player__time-sep'>/</span>\n <span className='video-player__time-total'>{formatTime(duration)}</span>\n </span>\n )}\n\n {link && <span className='video-player__link'>{link}</span>}\n </div>\n\n <div className='video-player__buttons right'>\n {(!onCloseVideo && !editable) && <button type='button' aria-label={intl.formatMessage(messages.hide)} onClick={this.toggleReveal}><Icon id='eye-slash' fixedWidth /></button>}\n {(!fullscreen && onOpenVideo) && <button type='button' aria-label={intl.formatMessage(messages.expand)} onClick={this.handleOpenVideo}><Icon id='expand' fixedWidth /></button>}\n {onCloseVideo && <button type='button' aria-label={intl.formatMessage(messages.close)} onClick={this.handleCloseVideo}><Icon id='compress' fixedWidth /></button>}\n <button type='button' aria-label={intl.formatMessage(messages.download)}><a className='video-player__download__icon' href={this.props.src} download><Icon id={'download'} fixedWidth /></a></button>\n <button type='button' aria-label={intl.formatMessage(fullscreen ? messages.exit_fullscreen : messages.fullscreen)} onClick={this.toggleFullscreen}><Icon id={fullscreen ? 'compress' : 'arrows-alt'} fixedWidth /></button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n}\n","// Like react-motion's Motion, but reduces all animations to cross-fades\n// for the benefit of users with motion sickness.\nimport React from 'react';\nimport Motion from 'react-motion/lib/Motion';\nimport PropTypes from 'prop-types';\n\nconst stylesToKeep = ['opacity', 'backgroundOpacity'];\n\nconst extractValue = (value) => {\n // This is either an object with a \"val\" property or it's a number\n return (typeof value === 'object' && value && 'val' in value) ? value.val : value;\n};\n\nclass ReducedMotion extends React.Component {\n\n static propTypes = {\n defaultStyle: PropTypes.object,\n style: PropTypes.object,\n children: PropTypes.func,\n }\n\n render() {\n\n const { style, defaultStyle, children } = this.props;\n\n Object.keys(style).forEach(key => {\n if (stylesToKeep.includes(key)) {\n return;\n }\n // If it's setting an x or height or scale or some other value, we need\n // to preserve the end-state value without actually animating it\n style[key] = defaultStyle[key] = extractValue(style[key]);\n });\n\n return (\n <Motion style={style} defaultStyle={defaultStyle}>\n {children}\n </Motion>\n );\n }\n\n}\n\nexport default ReducedMotion;\n","import { reduceMotion } from 'flavours/glitch/util/initial_state';\nimport ReducedMotion from './reduced_motion';\nimport Motion from 'react-motion/lib/Motion';\n\nexport default reduceMotion ? ReducedMotion : Motion;\n","// A mapping of unicode strings to an object containing the filename\n// (i.e. the svg filename) and a shortCode intended to be shown\n// as a \"title\" attribute in an HTML element (aka tooltip).\n\nconst [\n shortCodesToEmojiData,\n skins, // eslint-disable-line no-unused-vars\n categories, // eslint-disable-line no-unused-vars\n short_names, // eslint-disable-line no-unused-vars\n emojisWithoutShortCodes,\n] = require('./emoji_compressed');\nconst { unicodeToFilename } = require('./unicode_to_filename');\n\n// decompress\nconst unicodeMapping = {};\n\nfunction processEmojiMapData(emojiMapData, shortCode) {\n let [ native, filename ] = emojiMapData;\n if (!filename) {\n // filename name can be derived from unicodeToFilename\n filename = unicodeToFilename(native);\n }\n unicodeMapping[native] = {\n shortCode: shortCode,\n filename: filename,\n };\n}\n\nObject.keys(shortCodesToEmojiData).forEach((shortCode) => {\n let [ filenameData ] = shortCodesToEmojiData[shortCode];\n filenameData.forEach(emojiMapData => processEmojiMapData(emojiMapData, shortCode));\n});\nemojisWithoutShortCodes.forEach(emojiMapData => processEmojiMapData(emojiMapData));\n\nmodule.exports = unicodeMapping;\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _default = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nexports.default = _default;\nmodule.exports = exports[\"default\"];","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;","// Like react-motion's Motion, but reduces all animations to cross-fades\n// for the benefit of users with motion sickness.\nimport React from 'react';\nimport Motion from 'react-motion/lib/Motion';\nimport PropTypes from 'prop-types';\n\nconst stylesToKeep = ['opacity', 'backgroundOpacity'];\n\nconst extractValue = (value) => {\n // This is either an object with a \"val\" property or it's a number\n return (typeof value === 'object' && value && 'val' in value) ? value.val : value;\n};\n\nclass ReducedMotion extends React.Component {\n\n static propTypes = {\n defaultStyle: PropTypes.object,\n style: PropTypes.object,\n children: PropTypes.func,\n }\n\n render() {\n\n const { style, defaultStyle, children } = this.props;\n\n Object.keys(style).forEach(key => {\n if (stylesToKeep.includes(key)) {\n return;\n }\n // If it's setting an x or height or scale or some other value, we need\n // to preserve the end-state value without actually animating it\n style[key] = defaultStyle[key] = extractValue(style[key]);\n });\n\n return (\n <Motion style={style} defaultStyle={defaultStyle}>\n {children}\n </Motion>\n );\n }\n\n}\n\nexport default ReducedMotion;\n","import { reduceMotion } from '../../../initial_state';\nimport ReducedMotion from './reduced_motion';\nimport Motion from 'react-motion/lib/Motion';\n\nexport default reduceMotion ? ReducedMotion : Motion;\n","import React from 'react';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport PropTypes from 'prop-types';\n\nconst messages = defineMessages({\n just_now: { id: 'relative_time.just_now', defaultMessage: 'now' },\n seconds: { id: 'relative_time.seconds', defaultMessage: '{number}s' },\n minutes: { id: 'relative_time.minutes', defaultMessage: '{number}m' },\n hours: { id: 'relative_time.hours', defaultMessage: '{number}h' },\n days: { id: 'relative_time.days', defaultMessage: '{number}d' },\n moments_remaining: { id: 'time_remaining.moments', defaultMessage: 'Moments remaining' },\n seconds_remaining: { id: 'time_remaining.seconds', defaultMessage: '{number, plural, one {# second} other {# seconds}} left' },\n minutes_remaining: { id: 'time_remaining.minutes', defaultMessage: '{number, plural, one {# minute} other {# minutes}} left' },\n hours_remaining: { id: 'time_remaining.hours', defaultMessage: '{number, plural, one {# hour} other {# hours}} left' },\n days_remaining: { id: 'time_remaining.days', defaultMessage: '{number, plural, one {# day} other {# days}} left' },\n});\n\nconst dateFormatOptions = {\n hour12: false,\n year: 'numeric',\n month: 'short',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n};\n\nconst shortDateFormatOptions = {\n month: 'short',\n day: 'numeric',\n};\n\nconst SECOND = 1000;\nconst MINUTE = 1000 * 60;\nconst HOUR = 1000 * 60 * 60;\nconst DAY = 1000 * 60 * 60 * 24;\n\nconst MAX_DELAY = 2147483647;\n\nconst selectUnits = delta => {\n const absDelta = Math.abs(delta);\n\n if (absDelta < MINUTE) {\n return 'second';\n } else if (absDelta < HOUR) {\n return 'minute';\n } else if (absDelta < DAY) {\n return 'hour';\n }\n\n return 'day';\n};\n\nconst getUnitDelay = units => {\n switch (units) {\n case 'second':\n return SECOND;\n case 'minute':\n return MINUTE;\n case 'hour':\n return HOUR;\n case 'day':\n return DAY;\n default:\n return MAX_DELAY;\n }\n};\n\nexport const timeAgoString = (intl, date, now, year) => {\n const delta = now - date.getTime();\n\n let relativeTime;\n\n if (delta < 10 * SECOND) {\n relativeTime = intl.formatMessage(messages.just_now);\n } else if (delta < 7 * DAY) {\n if (delta < MINUTE) {\n relativeTime = intl.formatMessage(messages.seconds, { number: Math.floor(delta / SECOND) });\n } else if (delta < HOUR) {\n relativeTime = intl.formatMessage(messages.minutes, { number: Math.floor(delta / MINUTE) });\n } else if (delta < DAY) {\n relativeTime = intl.formatMessage(messages.hours, { number: Math.floor(delta / HOUR) });\n } else {\n relativeTime = intl.formatMessage(messages.days, { number: Math.floor(delta / DAY) });\n }\n } else if (date.getFullYear() === year) {\n relativeTime = intl.formatDate(date, shortDateFormatOptions);\n } else {\n relativeTime = intl.formatDate(date, { ...shortDateFormatOptions, year: 'numeric' });\n }\n\n return relativeTime;\n};\n\nconst timeRemainingString = (intl, date, now) => {\n const delta = date.getTime() - now;\n\n let relativeTime;\n\n if (delta < 10 * SECOND) {\n relativeTime = intl.formatMessage(messages.moments_remaining);\n } else if (delta < MINUTE) {\n relativeTime = intl.formatMessage(messages.seconds_remaining, { number: Math.floor(delta / SECOND) });\n } else if (delta < HOUR) {\n relativeTime = intl.formatMessage(messages.minutes_remaining, { number: Math.floor(delta / MINUTE) });\n } else if (delta < DAY) {\n relativeTime = intl.formatMessage(messages.hours_remaining, { number: Math.floor(delta / HOUR) });\n } else {\n relativeTime = intl.formatMessage(messages.days_remaining, { number: Math.floor(delta / DAY) });\n }\n\n return relativeTime;\n};\n\nexport default @injectIntl\nclass RelativeTimestamp extends React.Component {\n\n static propTypes = {\n intl: PropTypes.object.isRequired,\n timestamp: PropTypes.string.isRequired,\n year: PropTypes.number.isRequired,\n futureDate: PropTypes.bool,\n };\n\n state = {\n now: this.props.intl.now(),\n };\n\n static defaultProps = {\n year: (new Date()).getFullYear(),\n };\n\n shouldComponentUpdate (nextProps, nextState) {\n // As of right now the locale doesn't change without a new page load,\n // but we might as well check in case that ever changes.\n return this.props.timestamp !== nextProps.timestamp ||\n this.props.intl.locale !== nextProps.intl.locale ||\n this.state.now !== nextState.now;\n }\n\n componentWillReceiveProps (nextProps) {\n if (this.props.timestamp !== nextProps.timestamp) {\n this.setState({ now: this.props.intl.now() });\n }\n }\n\n componentDidMount () {\n this._scheduleNextUpdate(this.props, this.state);\n }\n\n componentWillUpdate (nextProps, nextState) {\n this._scheduleNextUpdate(nextProps, nextState);\n }\n\n componentWillUnmount () {\n clearTimeout(this._timer);\n }\n\n _scheduleNextUpdate (props, state) {\n clearTimeout(this._timer);\n\n const { timestamp } = props;\n const delta = (new Date(timestamp)).getTime() - state.now;\n const unitDelay = getUnitDelay(selectUnits(delta));\n const unitRemainder = Math.abs(delta % unitDelay);\n const updateInterval = 1000 * 10;\n const delay = delta < 0 ? Math.max(updateInterval, unitDelay - unitRemainder) : Math.max(updateInterval, unitRemainder);\n\n this._timer = setTimeout(() => {\n this.setState({ now: this.props.intl.now() });\n }, delay);\n }\n\n render () {\n const { timestamp, intl, year, futureDate } = this.props;\n\n const date = new Date(timestamp);\n const relativeTime = futureDate ? timeRemainingString(intl, date, this.state.now) : timeAgoString(intl, date, this.state.now, year);\n\n return (\n <time dateTime={timestamp} title={intl.formatDate(date, dateFormatOptions)}>\n {relativeTime}\n </time>\n );\n }\n\n}\n"],"sourceRoot":""} |