forked from AkkomaGang/akkoma
1 line
No EOL
1,019 KiB
Text
1 line
No EOL
1,019 KiB
Text
{"version":3,"sources":["webpack:///./node_modules/classnames/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/relative_timestamp.js","webpack:///./node_modules/dom-helpers/util/inDOM.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/mastodon/locales/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/is_mobile.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/html.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/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:///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/actions/importer/index.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/flavours/glitch/util/initial_state.js","webpack:///./node_modules/lodash/_baseGetTag.js","webpack:///./node_modules/lodash/isObjectLike.js","webpack:///./node_modules/lodash/_Symbol.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/actions/importer/index.js","webpack:///./node_modules/react-immutable-proptypes/dist/ImmutablePropTypes.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/@babel/runtime/helpers/esm/createClass.js","webpack:///./node_modules/symbol-observable/es/index.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/mastodon/initial_state.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/flavours/glitch/components/permalink.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.min.js","webpack:///./node_modules/symbol-observable/es/ponyfill.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/components/icon.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:///./node_modules/dom-helpers/transition/properties.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/icon.js","webpack:///./node_modules/lodash/_freeGlobal.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/permalink.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/util/idna.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/extended_video_player.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/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///./node_modules/raf/index.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/node_modules/is-buffer/index.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/helpers/parseHeaders.js","webpack:///./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack:///./node_modules/axios/lib/helpers/cookies.js","webpack:///./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack:///./node_modules/axios/lib/helpers/combineURLs.js","webpack:///./node_modules/react-motion/lib/spring.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/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/react-swipeable-views-core/lib/getDisplaySameSlide.js","webpack:///./node_modules/react-swipeable-views-core/lib/mod.js","webpack:///./node_modules/axios/lib/utils.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/components/icon_button.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/components/extended_video_player.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:///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/lodash/throttle.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:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/containers/media_container.js","webpack:///./node_modules/warning/warning.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/containers/media_container.js","webpack:///./node_modules/lodash/_root.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/api.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/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/mastodon/api.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/lodash/isObject.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/components/relative_timestamp.js"],"names":["hasOwn","hasOwnProperty","classNames","classes","i","arguments","length","arg","argType","push","Array","isArray","inner","apply","key","call","join","module","exports","default","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","__esModule","_default","window","document","createElement","Object","defineProperty","value","_extends","assign","target","source","prototype","_defineProperty","obj","enumerable","configurable","writable","showLoading","scope","undefined","DEFAULT_SCOPE","type","SHOW","payload","hideLoading","HIDE","resetLoading","RESET","loadingBarReducer","action","_ref$scope","_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","create","constructor","setPrototypeOf","__proto__","_inherits","defaultStyle","objectOf","oneOfType","object","isRequired","children","func","_props","cancel","renderedChildren","Children","only","LAYOUT_BREAKPOINT","isMobile","width","iOS","test","navigator","userAgent","MSStream","userTouching","listenerOptions","detectPassiveEvents","hasSupport","passive","isUserTouching","isIOS","addEventListener","touchListener","removeEventListener","unescapeHTML","html","wrapper","innerHTML","replace","textContent","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","get","slice","splice","indexOf","tryUnsubscribe","_ref","context","contextValue","subscription","previousState","getState","Context","Provider","EMPTY_ARRAY","NO_SUBSCRIPTION_ARRAY","storeStateUpdatesReducer","updateCount","initStateUpdates","useIsomorphicLayoutEffect","connectAdvanced","selectorFactory","_ref2","_ref2$getDisplayName","getDisplayName","name","_ref2$methodName","methodName","_ref2$renderCountProp","renderCountProp","_ref2$shouldHandleSta","shouldHandleStateChanges","_ref2$storeKey","storeKey","_ref2$withRef","withRef","_ref2$forwardRef","forwardRef","_ref2$context","connectOptions","WrappedComponent","wrappedComponentName","displayName","selectorFactoryOptions","pure","usePureOnlyMemo","ConnectFunction","_useMemo","forwardedRef","wrapperProps","propsContext","ContextToUse","Consumer","didStoreComeFromProps","didStoreComeFromContext","childPropsSelector","dispatch","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","options","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","domParser","DOMParser","makeEmojiMap","record","emojis","reduce","emoji","shortcode","normalizePoll","poll","normalPoll","emojiMap","map","option","index","voted","own_votes","includes","title_emojified","emojify","escapeTextContentForBrowser","ACCOUNT_IMPORT","ACCOUNTS_IMPORT","STATUS_IMPORT","STATUSES_IMPORT","POLLS_IMPORT","pushUnique","array","every","element","id","importPolls","polls","importFetchedAccount","account","importFetchedAccounts","accounts","normalAccounts","forEach","processAccount","display_name","trim","username","display_name_html","note_emojified","note","fields","pair","name_emojified","value_emojified","value_plain","moved","normalizeAccount","importAccounts","importFetchedStatus","status","importFetchedStatuses","statuses","normalStatuses","processStatus","normalOldStatus","normalStatus","reblog","search_index","contentHtml","spoilerHtml","spoilerText","spoiler_text","searchContent","content","concat","parseFromString","documentElement","normalizeStatus","getIn","importStatuses","importFetchedPoll","columns","forceSingleColumn","prop","getElementById","initialState","JSON","parse","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","Symbol","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","toStringTag","importAccount","importStatus","hidden","expandSpoilers","sensitive","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","componentName","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","ImmutablePureComponent","self","ReferenceError","_possibleConstructorReturn","getPrototypeOf","_this2","updateOnProps","p","updateOnStates","COMPATIBLE_ENCODING_PATTERN","WS_TRIM_PATTERN","WS_CHAR_PATTERN","WS_FOLD_PATTERN","DELIMITER_PATTERN","WS_DELIMITER_PATTERN","STATE","hasWhitespace","skipWhitespace","offset","needsQuotes","Link","refs","rel","links","attr","toLowerCase","link","has","end","uri","attrValue","isSingleOccurenceAttr","parseExtendedValue","toString","formatAttribute","isCompatibleEncoding","isTokenAttr","escapeQuotes","parts","exec","language","encoding","decodeURIComponent","formatExtendedAttribute","data","toUpperCase","Buffer","isBuffer","encodeURIComponent","item","_defineProperties","root","global","invitesEnabled","repository","source_url","version","decode_1","decode","encode_1","encode","baseGetTag","isObjectLike","symbolTag","Permalink","button","ctrlKey","metaKey","onInterceptClick","preventDefault","router","history","mastodonBackSteps","to","className","href","other","onClick","handleClick","PureComponent","PropTypes","on","node","eventName","handler","capture","attachEvent","event","srcElement","currentTarget","off","detachEvent","fn","thisArg","utils","url","params","paramsSerializer","serializedParams","isURLSearchParams","v","isDate","toISOString","isObject","stringify","hashmarkIndex","__CANCEL__","normalizeHeaderName","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","headers","isUndefined","adapter","defaults","process","XMLHttpRequest","transformRequest","isFormData","isArrayBuffer","isStream","isFile","isBlob","isArrayBufferView","buffer","transformResponse","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","validateStatus","common","method","merge","settle","buildURL","parseHeaders","isURLSameOrigin","createError","config","Promise","resolve","reject","requestData","requestHeaders","request","auth","password","Authorization","btoa","open","onreadystatechange","readyState","responseURL","responseHeaders","getAllResponseHeaders","response","responseType","responseText","statusText","onabort","onerror","ontimeout","isStandardBrowserEnv","cookies","xsrfValue","withCredentials","read","setRequestHeader","onDownloadProgress","onUploadProgress","upload","cancelToken","promise","then","abort","send","enhanceError","code","config1","config2","deepMerge","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","prevProps","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","height","backgroundColor","position","buildStyle","display","loading","shouldStart","shouldStop","propTypes","string","bool","defaultProps","polyfill","ConnectedLoadingBar","connect","loadingBar","digitCharacters","decode83","str","c","encode83","n","digit","pow","sRGBToLinear","linearTosRGB","min","round","sign","signPow","exp","RESISTANCE_COEF","UNCERTAINTY_THRESHOLD","unicodeToFilename","charCode","charCodeAt","t","r","l","m","d","o","u","h","f","handlers","un","random","substring","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","getOwnPropertyDescriptor","iterator","audioContext","offlineAudioContext","stateBehaviors","init","addOnAudioProcess","getPlayedPercents","getDuration","getCurrentTime","startPosition","getPlayedTime","removeOnAudioProcess","fireEvent","ac","supportsWebAudio","getAudioContext","lastPlay","scheduledPause","states","analyser","filters","gainNode","mergedPeaks","offlineAc","peaks","playbackRate","scriptNode","splitPeaks","explicitDuration","duration","Observer","AudioContext","webkitAudioContext","WaveSurferAudioContext","WaveSurferOfflineAudioContext","OfflineAudioContext","webkitOfflineAudioContext","createVolumeNode","createScriptNode","createAnalyserNode","setPlaybackRate","audioRate","setLength","disconnect","setFilters","disconnectFilters","audioScriptProcessor","createScriptProcessor","scriptBufferSize","createJavaScriptNode","destination","onaudioprocess","pause","createAnalyser","createGain","createGainNode","Audio","setSinkId","autoplay","createMediaStreamDestination","srcObject","stream","gain","setValueAtTime","getOfflineAudioContext","sampleRate","decodeAudioData","numberOfChannels","splitChannels","createBuffer","getChannelData","isPaused","unAll","disconnectSource","closeAudioContext","close","createSource","createBufferSource","noteGrainOn","noteOff","seekTo","resume","play","defaultParams","autoCenter","backend","barHeight","barGap","container","cursorColor","cursorWidth","dragSelection","fillParent","forceDecode","hideScrollbar","interact","loopSelection","maxCanvasWidth","mediaContainer","mediaControls","mediaType","minPxPerSec","normalize","partialRender","pixelRatio","devicePixelRatio","screen","deviceXDPI","logicalXDPI","plugins","progressColor","removeMediaElementOnDestroy","renderer","responsive","rtl","scrollParent","skipLength","waveColor","xhr","backends","MediaElement","WebAudio","util","extend","querySelector","setBackgroundColor","savedVolume","isMuted","tmpEvents","currentRequest","arraybuffer","drawer","peakCache","Drawer","Backend","initialisedPluginList","isDestroyed","isReady","_onResize","debounce","clientWidth","registerPlugins","createDrawer","createBackend","createPeakCache","addPlugin","deferInit","initPlugin","getOwnPropertyNames","destroyPlugin","destroy","drawBuffer","progress","getVolume","skip","seekAndCenter","recenter","isFinite","setVolume","getPlaybackRate","setMute","background","updateCursor","setHeight","getWidth","addRangeToPeakCache","getPeaks","drawPeaks","decodeArrayBuffer","loadDecodedBuffer","load","FileReader","onProgress","loadArrayBuffer","readAsArrayBuffer","empty","filter","console","warn","loadBuffer","loadMediaElement","once","getArrayBuffer","setPeaks","loadElt","src","fetchFile","lengthComputable","loaded","total","getImage","controller","cancelAjax","clearTmpEvents","setWidth","destroyAllPlugins","VERSION","Number","flush","stopPropagation","body","Headers","Request","AbortController","append","mode","credentials","cache","redirect","referrer","signal","fetch","Response","ReadableStream","ok","arrayBuffer","json","blob","text","catch","fetchRequest","_reader","getReader","parseInt","done","byteLength","enqueue","maxCanvasElementWidth","hasProgressCanvas","halfPixel","canvases","progressWave","EntryClass","overlap","ceil","createWrapper","createElements","appendChild","zIndex","left","top","bottom","overflow","boxSizing","borderRightStyle","pointerEvents","addCanvas","borderRightWidth","borderRightColor","removeCanvas","updateDimensions","clearWave","initWave","initProgress","wave","parentElement","removeChild","pop","prepareDraw","absmax","hasMinVals","offsetY","halfH","barWidth","fillRect","drawLine","setFillStyles","drawLines","x1","y1","x2","y2","fillRects","frame","some","all","lastPos","userSelect","webkitUserSelect","overflowX","overflowY","setupWrapperEvents","targetTouches","clientX","getBoundingClientRect","right","scrollLeft","scrollWidth","offsetHeight","clientHeight","clientY","handleEvent","drawBars","drawWave","recenterOnPosition","updateSize","updateProgress","parentNode","waveCtx","progressCtx","getContext","offsetLeft","clearRect","canvas","fillStyle","fillRectToContext","drawLineToContext","beginPath","moveTo","lineTo","closePath","fill","toBlob","toDataURL","Reflect","media","paused","volume","elementPosition","onPlayEnd","createTimer","controls","preload","_load","muted","seekable","clearPlayEnd","setPlayEnd","_onPlayEnd","clearPeakCache","peakCacheRanges","peakCacheLength","sort","symbolObservablePonyfill","observable","Icon","fixedWidth","role","isFullscreen","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","requestFullscreen","el","webkitRequestFullscreen","mozRequestFullScreen","attachFullscreenListener","detachFullscreenListener","animationEnd","animationDelay","animationTiming","animationName","transitionEnd","transitionDuration","transitionDelay","transitionTiming","transitionProperty","prefix","_inDOM","_getTransitionPropert","vendorMap","O","Moz","Webkit","ms","vendors","vendor","getTransitionProperties","property","timing","freeGlobal","mute","unmute","volWidth","volOffset","waveform","wavesurfer","toggleInteraction","handleMouseVolSlide","handleVolumeMouseUp","rect","isNaN","slideamt","_updateWaveform","componentDidUpdate","getComputedStyle","getPropertyValue","WaveSurfer","alt","editable","volumeWidth","volumeHandleLoc","volHandleOffset","aria-label","setWaveformRef","togglePlay","toggleMute","onMouseDown","handleVolumeMouseDown","setVolumeRef","tabIndex","formatTime","domain","part","punycode","ExtendedVideoPlayer","time","video","handleLoadedData","setRef","autoPlay","loop","MIN_SCALE","MAX_SCALE","getMidpoint","p1","p2","getDistance","sqrt","clamp","ZoomableImage","scale","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","getAttribute","handlePrevClick","handleNextClick","handleKeyDown","pathname","unlistenHistory","listen","onClose","goBack","pagination","leftNav","rightNav","handleChangeIndex","data-index","toggleNavigation","preview","blurhash","startTime","onCloseVideo","detailed","navigationClassName","containerStyle","alignItems","onChangeIndex","handleSwipe","onSwitching","handleSwitching","icon","handleStatusClick","defaultMessage","_objectWithoutPropertiesLoose","excluded","sourceKeys","suffix","raf","caf","last","queue","_now","cp","cancelled","handle","cancelAnimationFrame","originalModule","webpackPolyfill","Axios","mergeConfig","createInstance","defaultConfig","axios","instanceConfig","CancelToken","isCancel","promises","spread","InterceptorManager","dispatchRequest","interceptors","chain","interceptor","unshift","fulfilled","rejected","shift","getUri","use","eject","transformData","isAbsoluteURL","combineURLs","throwIfCancellationRequested","throwIfRequested","baseURL","reason","fns","normalizedName","isAxiosError","toJSON","description","fileName","lineNumber","columnNumber","ignoreDuplicateOf","parsed","line","substr","originURL","msie","urlParsingNode","resolveURL","setAttribute","protocol","host","search","hash","hostname","port","charAt","requestURL","isString","write","expires","path","secure","cookie","isNumber","toGMTString","remove","relativeURL","_presets","_presets2","noWobble","executor","resolvePromise","token","arr","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","_i","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","moduleLoadTime","nodeLoadTime","upTime","uptime","gentle","wobbly","stiff","base83_1","utils_1","decodeDC","intR","intG","intB","decodeAC","maximumValue","quantR","quantG","quantB","punch","sizeFlag","numY","numX","colors","bytesPerRow","pixels","Uint8ClampedArray","g","j","basis","color","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","styles","direction","WebkitFlexShrink","flexShrink","axisProperties","flexDirection","translate","rotationMatrix","scrollPosition","scrollLength","clientLength","createTransition","easeFunction","applyRotationMatrix","touch","axis","pageX","pageY","adaptMouse","rootNode","domTreeShapes","hasAttribute","nodeWhoClaimedTheScroll","startX","goingForward","areNotAtStart","areNotAtEnd","SwipeableViews","containerNode","ignoreNextScrollEvents","viewLength","lastX","vx","startY","isSwiping","started","startIndex","transitionListener","touchMoveListener","activeSlide","indexCurrent","firstRenderTimeout","setRootNode","setContainerNode","setActiveSlide","updateHeight","handleSwipeStart","computedStyle","transformValues","rootStyle","tranformNormalized","paddingLeft","paddingRight","handleSwipeMove","_this$props","ignoreNativeScroll","resistance","dx","dy","count","_computeIndex","computeIndex","setIndexCurrent","displaySameSlide","isDragging","handleSwipeEnd","indexNew","indexLatest","threshold","hysteresis","indexMax","handleTransitionEnd","onTouchStart","handleTouchEnd","onTouchEnd","handleMouseDown","persist","handleMouseUp","onMouseUp","handleMouseLeave","onMouseLeave","handleMouseMove","onMouseMove","handleScroll","onScroll","child","heightLatest","renderOnlyActive","disableLazyLoading","swipeableViews","slideUpdateHeight","_this3","disabled","getDisplaySameSlide","animateTransitions","onTransitionEnd","_this4","_this$props2","animateHeight","containerStyleProp","enableMouseEvents","slideStyleProp","slideStyle","slideClassName","springConfig","_this$state","touchEvents","mouseEvents","additionalTranstion","WebkitFlexDirection","indexChild","childContextTypes","objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_typeof","assertThisInitialized","_typeof2","_getPrototypeOf","_setPrototypeOf","_checkIndexBounds","_constant","_getDisplaySameSlide","_mod","newStartX","getChildrenKey","oldKey","q","isFunction","FormData","ArrayBuffer","isView","pipe","URLSearchParams","product","assignValue","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","entry","__iteratorUncached","fromJS","converter","fromJSWith","parentJSON","isPlainObj","fromJSDefault","toList","toMap","valueA","valueB","equals","deepEqual","__hash","notAssociative","entries","flipped","_","allEqual","bSize","Repeat","times","_value","Infinity","invariant","condition","Range","step","_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","nodeType","uniqueID","getIENodeHash","objHashUID","isExtensible","hashJSObj","WeakMap","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","__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","values","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","flatten","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","setProps","RecordTypePrototype","_name","_defaultValues","RecordPrototype","valueSeq","indexedIterable","recordName","defaultVal","_empty","makeRecord","likeRecord","emptySet","add","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","_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","first","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","factory","IconButton","onKeyPress","onKeyDown","fontSize","lineHeight","active","activeStyle","label","textAlign","animate","expanded","inverted","overlay","pressed","overlayed","rotateDeg","motionDefaultStyle","rotate","springOpts","motionStyle","spring","aria-pressed","aria-expanded","handleKeyPress","aria-hidden","ModalRoot","revealed","activeElement","keyCode","noEsc","focusable","querySelectorAll","shiftKey","focus","childNodes","handleKeyUp","createHistory","getSiblings","sibling","preventScroll","removeAttribute","handleModalClose","handleModalOpen","mastodonModalOpen","visible","cachedScrollbarWidth","getScrollbarWidth","scrollbarWidth","innerWidth","outer","visibility","getActualScrollbarWidth","vote","pollId","choices","voteRequest","api","post","voteSuccess","voteFail","fetchPoll","fetchPollRequest","fetchPollSuccess","fetchPollFail","closed","Poll","selected","expired","tmp","_setupTimer","renderOption","optionIndex","showResults","pollVotesCount","leading","titleEmojified","selectable","checked","onChange","handleOptionChange","checkbox","dangerouslySetInnerHTML","__html","timeRemaining","votesCount","handleVote","handleRefresh","matchHtmlRegExp","escape","lastIndex","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","FUNC_ERROR_TEXT","wait","trailing","toNumber","nativeMax","nativeMin","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","maxing","invokeFunc","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","timeWaiting","remainingWait","debounced","isInvoking","leadingEdge","noop","getLocale","localeData","addLocaleData","MEDIA_COMPONENTS","MediaGallery","Video","Card","Hashtag","MediaContainer","classList","marginRight","ImmutableList","components","component","card","hashtag","onOpenVideo","handleOpenVideo","onOpenMedia","handleOpenMedia","ReactDOM","createPortal","handleCloseMedia","warning","freeSelf","Function","require","shortCodesToEmojiData","emojisWithoutShortCodes","processEmojiMapData","emojiMapData","native","getLinks","LinkHeader","Exception","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","ctx","imageData","ImageData","putImageData","inline","letterbox","fullwidth","playerStyle","computedClass","inactive","setPlayerRef","tabindex","onMouseEnter","handleMouseEnter","handleMouseDownRoot","setVideoRef","poster","onPlay","handlePlay","onPause","handlePause","onTimeUpdate","handleTimeUpdate","onLoadedData","handleProgress","onVolumeChange","handleVolumeChange","toggleReveal","setSeekRef","handleCloseVideo","toggleFullscreen","handleClickRoot","stylesToKeep","ReducedMotion"],"mappings":"4EAAA;;;;;;;;;;;CAOA,WACE,aAEA,IAAIA,EAAS,GAAGC,eAEhB,SAASC,IAGP,IAFA,IAAIC,EAAU,GAELC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAAMF,UAAUD,GACpB,GAAKG,EAAL,CACA,IAAIC,SAAiBD,EAErB,GAAgB,WAAZC,GAAoC,WAAZA,EAC1BL,EAAQM,KAAKF,QACR,GAAIG,MAAMC,QAAQJ,IAAQA,EAAID,OAAQ,CAC3C,IAAIM,EAAQV,EAAWW,MAAM,KAAMN,GAE/BK,GACFT,EAAQM,KAAKG,QAEV,GAAgB,WAAZJ,EACT,IAAK,IAAIM,KAAOP,EACVP,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,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":["/*!\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 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\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\"];","'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)","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","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 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 _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, useEffect, useLayoutEffect, useRef, useReducer } from 'react';\nimport { isValidElementType, isContextConsumer } from 'react-is';\nimport Subscription from '../utils/Subscription';\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}; // 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 because we want\n// `connect` to perform sync updates to a ref to save the latest props after\n// a render is actually committed to the DOM.\n\n\nvar useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? useLayoutEffect : useEffect;\nexport default function connectAdvanced(\n/*\n selectorFactory is a func that is responsible for returning the selector function used to\n compute new props from state, props, and dispatch. For example:\n export default connectAdvanced((dispatch, options) => (state, props) => ({\n thing: state.things[props.thingId],\n saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),\n }))(YourComponent)\n Access to dispatch is provided to the factory so selectorFactories can bind actionCreators\n outside of their selector as an optimization. Options passed to connectAdvanced are passed to\n the selectorFactory, along with displayName and WrappedComponent, as the second argument.\n Note that selectorFactory is responsible for all caching/memoization of inbound and outbound\n props. Do not use connectAdvanced directly without memoizing results between calls to your\n selector, otherwise the Connect component will re-render on every state or props change.\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\n var didStoreComeFromProps = Boolean(props.store);\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.\"));\n var store = 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 latestStoreState: latestStoreState,\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/*\n connect is a facade over connectAdvanced. It turns its args into a compatible\n selectorFactory, which has the signature:\n\n (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps\n \n connect passes its args to connectAdvanced as options, which will in turn pass them to\n selectorFactory each time a Connect component instance is instantiated or hot reloaded.\n\n selectorFactory returns a final props selector from its mapStateToProps,\n mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,\n mergePropsFactories, and pure args.\n\n The resulting final props selector is called by the Connect component instance whenever\n it receives new props or store state.\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/**\n * A hook to access the value of the `ReactReduxContext`. This is a low-level\n * hook that you should usually not need to call directly.\n *\n * @returns {any} the value of the `ReactReduxContext`\n *\n * @example\n *\n * import React from 'react'\n * import { useReduxContext } from 'react-redux'\n *\n * export const CounterComponent = ({ value }) => {\n * const { store } = useReduxContext()\n * return <div>{store.getState()}</div>\n * }\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/**\n * Hook factory, which creates a `useStore` hook bound to a given context.\n *\n * @param {Function} [context=ReactReduxContext] Context passed to your `<Provider>`.\n * @returns {Function} A `useStore` hook bound to the specified context.\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/**\n * A hook to access the redux store.\n *\n * @returns {any} the redux store\n *\n * @example\n *\n * import React from 'react'\n * import { useStore } from 'react-redux'\n *\n * export const ExampleComponent = () => {\n * const store = useStore()\n * return <div>{store.getState()}</div>\n * }\n */\n\nexport var useStore = createStoreHook();","import { ReactReduxContext } from '../components/Context';\nimport { useStore as useDefaultStore, createStoreHook } from './useStore';\n/**\n * Hook factory, which creates a `useDispatch` hook bound to a given context.\n *\n * @param {Function} [context=ReactReduxContext] Context passed to your `<Provider>`.\n * @returns {Function} A `useDispatch` hook bound to the specified context.\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/**\n * A hook to access the redux `dispatch` function.\n *\n * @returns {any|function} redux store's `dispatch` function\n *\n * @example\n *\n * import React, { useCallback } from 'react'\n * import { useDispatch } from 'react-redux'\n *\n * export const CounterComponent = ({ value }) => {\n * const dispatch = useDispatch()\n * const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), [])\n * return (\n * <div>\n * <span>{value}</span>\n * <button onClick={increaseCounter}>Increase counter</button>\n * </div>\n * )\n * }\n */\n\nexport var useDispatch = createDispatchHook();","import { useReducer, useRef, useEffect, useMemo, useLayoutEffect, useContext } from 'react';\nimport invariant from 'invariant';\nimport { useReduxContext as useDefaultReduxContext } from './useReduxContext';\nimport Subscription from '../utils/Subscription';\nimport { ReactReduxContext } from '../components/Context'; // 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 useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\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 occured 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/**\n * Hook factory, which creates a `useSelector` hook bound to a given context.\n *\n * @param {Function} [context=ReactReduxContext] Context passed to your `<Provider>`.\n * @returns {Function} A `useSelector` hook bound to the specified context.\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/**\n * A hook to access the redux store's state. This hook takes a selector function\n * as an argument. The selector is called with the store state.\n *\n * This hook takes an optional equality comparison function as the second parameter\n * that allows you to customize the way the selected state is compared to determine\n * whether the component needs to be re-rendered.\n *\n * @param {Function} selector the selector function\n * @param {Function=} equalityFn the function that will be used to determine equality\n *\n * @returns {any} the selected state\n *\n * @example\n *\n * import React from 'react'\n * import { useSelector } from 'react-redux'\n *\n * export const CounterComponent = () => {\n * const counter = useSelector(state => state.counter)\n * return <div>{counter}</div>\n * }\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 };","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 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 { 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 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","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","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;","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 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","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","/**\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 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;","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}","/* 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;","// 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","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');\n\nexport const deleteOthersNotice = getRight('delete_others_notice');\n\nexport default initialState;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar decode_1 = require(\"./decode\");\n\nexports.decode = decode_1.default;\n\nvar encode_1 = require(\"./encode\");\n\nexports.encode = encode_1.default;","\"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;","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\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; // Only Node.JS has a process variable that is of [[Class]] process\n\n if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n } else if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\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 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 request.open(config.method.toUpperCase(), buildURL(config.url, 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 reject(createError('timeout of ' + config.timeout + 'ms exceeded', 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(config.url)) && 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 (config.withCredentials) {\n request.withCredentials = true;\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 utils.forEach(['url', 'method', 'params', 'data'], function valueFromConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n }\n });\n utils.forEach(['headers', 'auth', 'proxy'], 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(['baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken', 'socketPath'], 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 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","!function (e, t) {\n \"object\" == typeof exports && \"object\" == typeof module ? module.exports = t() : \"function\" == typeof define && define.amd ? define(\"WaveSurfer\", [], t) : \"object\" == typeof exports ? exports.WaveSurfer = t() : e.WaveSurfer = t();\n}(window, function () {\n return function (e) {\n var t = {};\n\n function r(n) {\n if (t[n]) return t[n].exports;\n var i = t[n] = {\n i: n,\n l: !1,\n exports: {}\n };\n return e[n].call(i.exports, i, i.exports, r), i.l = !0, i.exports;\n }\n\n return r.m = e, r.c = t, r.d = function (e, t, n) {\n r.o(e, t) || Object.defineProperty(e, t, {\n enumerable: !0,\n get: n\n });\n }, r.r = function (e) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n }, r.t = function (e, t) {\n if (1 & t && (e = r(e)), 8 & t) return e;\n if (4 & t && \"object\" == typeof e && e && e.__esModule) return e;\n var n = Object.create(null);\n if (r.r(n), Object.defineProperty(n, \"default\", {\n enumerable: !0,\n value: e\n }), 2 & t && \"string\" != typeof e) for (var i in e) {\n r.d(n, i, function (t) {\n return e[t];\n }.bind(null, i));\n }\n return n;\n }, r.n = function (e) {\n var t = e && e.__esModule ? function () {\n return e.default;\n } : function () {\n return e;\n };\n return r.d(t, \"a\", t), t;\n }, r.o = function (e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }, r.p = \"\", r(r.s = 6);\n }([function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), Object.defineProperty(t, \"ajax\", {\n enumerable: !0,\n get: function get() {\n return n.default;\n }\n }), Object.defineProperty(t, \"getId\", {\n enumerable: !0,\n get: function get() {\n return i.default;\n }\n }), Object.defineProperty(t, \"max\", {\n enumerable: !0,\n get: function get() {\n return a.default;\n }\n }), Object.defineProperty(t, \"min\", {\n enumerable: !0,\n get: function get() {\n return s.default;\n }\n }), Object.defineProperty(t, \"Observer\", {\n enumerable: !0,\n get: function get() {\n return o.default;\n }\n }), Object.defineProperty(t, \"extend\", {\n enumerable: !0,\n get: function get() {\n return u.default;\n }\n }), Object.defineProperty(t, \"style\", {\n enumerable: !0,\n get: function get() {\n return l.default;\n }\n }), Object.defineProperty(t, \"requestAnimationFrame\", {\n enumerable: !0,\n get: function get() {\n return c.default;\n }\n }), Object.defineProperty(t, \"frame\", {\n enumerable: !0,\n get: function get() {\n return h.default;\n }\n }), Object.defineProperty(t, \"debounce\", {\n enumerable: !0,\n get: function get() {\n return f.default;\n }\n }), Object.defineProperty(t, \"preventClick\", {\n enumerable: !0,\n get: function get() {\n return d.default;\n }\n }), Object.defineProperty(t, \"fetchFile\", {\n enumerable: !0,\n get: function get() {\n return p.default;\n }\n });\n var n = v(r(7)),\n i = v(r(2)),\n a = v(r(8)),\n s = v(r(9)),\n o = v(r(1)),\n u = v(r(10)),\n l = v(r(3)),\n c = v(r(4)),\n h = v(r(11)),\n f = v(r(12)),\n d = v(r(13)),\n p = v(r(14));\n\n function v(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n }, function (e, t, r) {\n \"use strict\";\n\n function n(e, t) {\n for (var r = 0; r < t.length; r++) {\n var n = t[r];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n }\n }\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n\n var i = function () {\n function e() {\n !function (e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, e), this.handlers = null;\n }\n\n var t, r, i;\n return t = e, (r = [{\n key: \"on\",\n value: function value(e, t) {\n var r = this;\n this.handlers || (this.handlers = {});\n var n = this.handlers[e];\n return n || (n = this.handlers[e] = []), n.push(t), {\n name: e,\n callback: t,\n un: function un(e, t) {\n return r.un(e, t);\n }\n };\n }\n }, {\n key: \"un\",\n value: function value(e, t) {\n if (this.handlers) {\n var r,\n n = this.handlers[e];\n if (n) if (t) for (r = n.length - 1; r >= 0; r--) {\n n[r] == t && n.splice(r, 1);\n } else n.length = 0;\n }\n }\n }, {\n key: \"unAll\",\n value: function value() {\n this.handlers = null;\n }\n }, {\n key: \"once\",\n value: function value(e, t) {\n var r = this;\n return this.on(e, function n() {\n for (var i = arguments.length, a = new Array(i), s = 0; s < i; s++) {\n a[s] = arguments[s];\n }\n\n t.apply(r, a), setTimeout(function () {\n r.un(e, n);\n }, 0);\n });\n }\n }, {\n key: \"fireEvent\",\n value: function value(e) {\n for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) {\n r[n - 1] = arguments[n];\n }\n\n if (this.handlers) {\n var i = this.handlers[e];\n i && i.forEach(function (e) {\n e.apply(void 0, r);\n });\n }\n }\n }]) && n(t.prototype, r), i && n(t, i), e;\n }();\n\n t.default = i, e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function (e) {\n void 0 === e && (e = \"wavesurfer_\");\n return e + Math.random().toString(32).substring(2);\n }, e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function (e, t) {\n return Object.keys(t).forEach(function (r) {\n e.style[r] !== t[r] && (e.style[r] = t[r]);\n }), e;\n }, e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n\n var n = (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (e, t) {\n return setTimeout(e, 1e3 / 60);\n }).bind(window);\n\n t.default = n, e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n\n var n = function (e) {\n if (e && e.__esModule) return e;\n var t = {};\n if (null != e) for (var r in e) {\n if (Object.prototype.hasOwnProperty.call(e, r)) {\n var n = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(e, r) : {};\n n.get || n.set ? Object.defineProperty(t, r, n) : t[r] = e[r];\n }\n }\n return t.default = e, t;\n }(r(0));\n\n function i(e) {\n return (i = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n return typeof e;\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n })(e);\n }\n\n function a(e, t, r) {\n return t in e ? Object.defineProperty(e, t, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[t] = r, e;\n }\n\n function s(e, t) {\n return !t || \"object\" !== i(t) && \"function\" != typeof t ? function (e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n }(e) : t;\n }\n\n function o(e) {\n return (o = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {\n return e.__proto__ || Object.getPrototypeOf(e);\n })(e);\n }\n\n function u(e, t) {\n for (var r = 0; r < t.length; r++) {\n var n = t[r];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n }\n }\n\n function l(e, t, r) {\n return t && u(e.prototype, t), r && u(e, r), e;\n }\n\n function c(e, t) {\n return (c = Object.setPrototypeOf || function (e, t) {\n return e.__proto__ = t, e;\n })(e, t);\n }\n\n var h = \"playing\",\n f = \"paused\",\n d = \"finished\",\n p = function (e) {\n function t(e) {\n var r, n, i;\n return function (e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, t), (i = s(this, o(t).call(this))).audioContext = null, i.offlineAudioContext = null, i.stateBehaviors = (a(r = {}, h, {\n init: function init() {\n this.addOnAudioProcess();\n },\n getPlayedPercents: function getPlayedPercents() {\n var e = this.getDuration();\n return this.getCurrentTime() / e || 0;\n },\n getCurrentTime: function getCurrentTime() {\n return this.startPosition + this.getPlayedTime();\n }\n }), a(r, f, {\n init: function init() {\n this.removeOnAudioProcess();\n },\n getPlayedPercents: function getPlayedPercents() {\n var e = this.getDuration();\n return this.getCurrentTime() / e || 0;\n },\n getCurrentTime: function getCurrentTime() {\n return this.startPosition;\n }\n }), a(r, d, {\n init: function init() {\n this.removeOnAudioProcess(), this.fireEvent(\"finish\");\n },\n getPlayedPercents: function getPlayedPercents() {\n return 1;\n },\n getCurrentTime: function getCurrentTime() {\n return this.getDuration();\n }\n }), r), i.params = e, i.ac = e.audioContext || (i.supportsWebAudio() ? i.getAudioContext() : {}), i.lastPlay = i.ac.currentTime, i.startPosition = 0, i.scheduledPause = null, i.states = (a(n = {}, h, Object.create(i.stateBehaviors[h])), a(n, f, Object.create(i.stateBehaviors[f])), a(n, d, Object.create(i.stateBehaviors[d])), n), i.analyser = null, i.buffer = null, i.filters = [], i.gainNode = null, i.mergedPeaks = null, i.offlineAc = null, i.peaks = null, i.playbackRate = 1, i.analyser = null, i.scriptNode = null, i.source = null, i.splitPeaks = [], i.state = null, i.explicitDuration = e.duration, i;\n }\n\n return function (e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\");\n e.prototype = Object.create(t && t.prototype, {\n constructor: {\n value: e,\n writable: !0,\n configurable: !0\n }\n }), t && c(e, t);\n }(t, n.Observer), l(t, [{\n key: \"supportsWebAudio\",\n value: function value() {\n return !(!window.AudioContext && !window.webkitAudioContext);\n }\n }, {\n key: \"getAudioContext\",\n value: function value() {\n return window.WaveSurferAudioContext || (window.WaveSurferAudioContext = new (window.AudioContext || window.webkitAudioContext)()), window.WaveSurferAudioContext;\n }\n }, {\n key: \"getOfflineAudioContext\",\n value: function value(e) {\n return window.WaveSurferOfflineAudioContext || (window.WaveSurferOfflineAudioContext = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 2, e)), window.WaveSurferOfflineAudioContext;\n }\n }]), l(t, [{\n key: \"init\",\n value: function value() {\n this.createVolumeNode(), this.createScriptNode(), this.createAnalyserNode(), this.setState(f), this.setPlaybackRate(this.params.audioRate), this.setLength(0);\n }\n }, {\n key: \"disconnectFilters\",\n value: function value() {\n this.filters && (this.filters.forEach(function (e) {\n e && e.disconnect();\n }), this.filters = null, this.analyser.connect(this.gainNode));\n }\n }, {\n key: \"setState\",\n value: function value(e) {\n this.state !== this.states[e] && (this.state = this.states[e], this.state.init.call(this));\n }\n }, {\n key: \"setFilter\",\n value: function value() {\n for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) {\n t[r] = arguments[r];\n }\n\n this.setFilters(t);\n }\n }, {\n key: \"setFilters\",\n value: function value(e) {\n this.disconnectFilters(), e && e.length && (this.filters = e, this.analyser.disconnect(), e.reduce(function (e, t) {\n return e.connect(t), t;\n }, this.analyser).connect(this.gainNode));\n }\n }, {\n key: \"createScriptNode\",\n value: function value() {\n this.params.audioScriptProcessor ? this.scriptNode = this.params.audioScriptProcessor : this.ac.createScriptProcessor ? this.scriptNode = this.ac.createScriptProcessor(t.scriptBufferSize) : this.scriptNode = this.ac.createJavaScriptNode(t.scriptBufferSize), this.scriptNode.connect(this.ac.destination);\n }\n }, {\n key: \"addOnAudioProcess\",\n value: function value() {\n var e = this;\n\n this.scriptNode.onaudioprocess = function () {\n var t = e.getCurrentTime();\n t >= e.getDuration() ? (e.setState(d), e.fireEvent(\"pause\")) : t >= e.scheduledPause ? e.pause() : e.state === e.states[h] && e.fireEvent(\"audioprocess\", t);\n };\n }\n }, {\n key: \"removeOnAudioProcess\",\n value: function value() {\n this.scriptNode.onaudioprocess = function () {};\n }\n }, {\n key: \"createAnalyserNode\",\n value: function value() {\n this.analyser = this.ac.createAnalyser(), this.analyser.connect(this.gainNode);\n }\n }, {\n key: \"createVolumeNode\",\n value: function value() {\n this.ac.createGain ? this.gainNode = this.ac.createGain() : this.gainNode = this.ac.createGainNode(), this.gainNode.connect(this.ac.destination);\n }\n }, {\n key: \"setSinkId\",\n value: function value(e) {\n if (e) {\n var t = new window.Audio();\n if (!t.setSinkId) return Promise.reject(new Error(\"setSinkId is not supported in your browser\"));\n t.autoplay = !0;\n var r = this.ac.createMediaStreamDestination();\n return this.gainNode.disconnect(), this.gainNode.connect(r), t.srcObject = r.stream, t.setSinkId(e);\n }\n\n return Promise.reject(new Error(\"Invalid deviceId: \" + e));\n }\n }, {\n key: \"setVolume\",\n value: function value(e) {\n this.gainNode.gain.setValueAtTime(e, this.ac.currentTime);\n }\n }, {\n key: \"getVolume\",\n value: function value() {\n return this.gainNode.gain.value;\n }\n }, {\n key: \"decodeArrayBuffer\",\n value: function value(e, t, r) {\n this.offlineAc || (this.offlineAc = this.getOfflineAudioContext(this.ac && this.ac.sampleRate ? this.ac.sampleRate : 44100)), this.offlineAc.decodeAudioData(e, function (e) {\n return t(e);\n }, r);\n }\n }, {\n key: \"setPeaks\",\n value: function value(e, t) {\n null != t && (this.explicitDuration = t), this.peaks = e;\n }\n }, {\n key: \"setLength\",\n value: function value(e) {\n if (!this.mergedPeaks || e != 2 * this.mergedPeaks.length - 1 + 2) {\n this.splitPeaks = [], this.mergedPeaks = [];\n var t,\n r = this.buffer ? this.buffer.numberOfChannels : 1;\n\n for (t = 0; t < r; t++) {\n this.splitPeaks[t] = [], this.splitPeaks[t][2 * (e - 1)] = 0, this.splitPeaks[t][2 * (e - 1) + 1] = 0;\n }\n\n this.mergedPeaks[2 * (e - 1)] = 0, this.mergedPeaks[2 * (e - 1) + 1] = 0;\n }\n }\n }, {\n key: \"getPeaks\",\n value: function value(e, t, r) {\n if (this.peaks) return this.peaks;\n if (!this.buffer) return [];\n if (t = t || 0, r = r || e - 1, this.setLength(e), !this.buffer) return this.params.splitChannels ? this.splitPeaks : this.mergedPeaks;\n\n if (!this.buffer.length) {\n var n = this.createBuffer(1, 4096, this.sampleRate);\n this.buffer = n.buffer;\n }\n\n var i,\n a = this.buffer.length / e,\n s = ~~(a / 10) || 1,\n o = this.buffer.numberOfChannels;\n\n for (i = 0; i < o; i++) {\n var u = this.splitPeaks[i],\n l = this.buffer.getChannelData(i),\n c = void 0;\n\n for (c = t; c <= r; c++) {\n var h = ~~(c * a),\n f = ~~(h + a),\n d = 0,\n p = 0,\n v = void 0;\n\n for (v = h; v < f; v += s) {\n var y = l[v];\n y > p && (p = y), y < d && (d = y);\n }\n\n u[2 * c] = p, u[2 * c + 1] = d, (0 == i || p > this.mergedPeaks[2 * c]) && (this.mergedPeaks[2 * c] = p), (0 == i || d < this.mergedPeaks[2 * c + 1]) && (this.mergedPeaks[2 * c + 1] = d);\n }\n }\n\n return this.params.splitChannels ? this.splitPeaks : this.mergedPeaks;\n }\n }, {\n key: \"getPlayedPercents\",\n value: function value() {\n return this.state.getPlayedPercents.call(this);\n }\n }, {\n key: \"disconnectSource\",\n value: function value() {\n this.source && this.source.disconnect();\n }\n }, {\n key: \"destroy\",\n value: function value() {\n this.isPaused() || this.pause(), this.unAll(), this.buffer = null, this.disconnectFilters(), this.disconnectSource(), this.gainNode.disconnect(), this.scriptNode.disconnect(), this.analyser.disconnect(), this.params.closeAudioContext && (\"function\" == typeof this.ac.close && \"closed\" != this.ac.state && this.ac.close(), this.ac = null, this.params.audioContext ? this.params.audioContext = null : window.WaveSurferAudioContext = null, window.WaveSurferOfflineAudioContext = null);\n }\n }, {\n key: \"load\",\n value: function value(e) {\n this.startPosition = 0, this.lastPlay = this.ac.currentTime, this.buffer = e, this.createSource();\n }\n }, {\n key: \"createSource\",\n value: function value() {\n this.disconnectSource(), this.source = this.ac.createBufferSource(), this.source.start = this.source.start || this.source.noteGrainOn, this.source.stop = this.source.stop || this.source.noteOff, this.source.playbackRate.setValueAtTime(this.playbackRate, this.ac.currentTime), this.source.buffer = this.buffer, this.source.connect(this.analyser);\n }\n }, {\n key: \"isPaused\",\n value: function value() {\n return this.state !== this.states[h];\n }\n }, {\n key: \"getDuration\",\n value: function value() {\n return this.explicitDuration ? this.explicitDuration : this.buffer ? this.buffer.duration : 0;\n }\n }, {\n key: \"seekTo\",\n value: function value(e, t) {\n if (this.buffer) return this.scheduledPause = null, null == e && (e = this.getCurrentTime()) >= this.getDuration() && (e = 0), null == t && (t = this.getDuration()), this.startPosition = e, this.lastPlay = this.ac.currentTime, this.state === this.states[d] && this.setState(f), {\n start: e,\n end: t\n };\n }\n }, {\n key: \"getPlayedTime\",\n value: function value() {\n return (this.ac.currentTime - this.lastPlay) * this.playbackRate;\n }\n }, {\n key: \"play\",\n value: function value(e, t) {\n if (this.buffer) {\n this.createSource();\n var r = this.seekTo(e, t);\n e = r.start, t = r.end, this.scheduledPause = t, this.source.start(0, e, t - e), \"suspended\" == this.ac.state && this.ac.resume && this.ac.resume(), this.setState(h), this.fireEvent(\"play\");\n }\n }\n }, {\n key: \"pause\",\n value: function value() {\n this.scheduledPause = null, this.startPosition += this.getPlayedTime(), this.source && this.source.stop(0), this.setState(f), this.fireEvent(\"pause\");\n }\n }, {\n key: \"getCurrentTime\",\n value: function value() {\n return this.state.getCurrentTime.call(this);\n }\n }, {\n key: \"getPlaybackRate\",\n value: function value() {\n return this.playbackRate;\n }\n }, {\n key: \"setPlaybackRate\",\n value: function value(e) {\n e = e || 1, this.isPaused() ? this.playbackRate = e : (this.pause(), this.playbackRate = e, this.play());\n }\n }]), t;\n }();\n\n t.default = p, p.scriptBufferSize = 256, e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n\n var n = function (e) {\n if (e && e.__esModule) return e;\n var t = {};\n if (null != e) for (var r in e) {\n if (Object.prototype.hasOwnProperty.call(e, r)) {\n var n = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(e, r) : {};\n n.get || n.set ? Object.defineProperty(t, r, n) : t[r] = e[r];\n }\n }\n return t.default = e, t;\n }(r(0)),\n i = u(r(15)),\n a = u(r(5)),\n s = u(r(18)),\n o = u(r(19));\n\n function u(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n\n function l(e) {\n return (l = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n return typeof e;\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n })(e);\n }\n\n function c(e, t) {\n return !t || \"object\" !== l(t) && \"function\" != typeof t ? f(e) : t;\n }\n\n function h(e) {\n return (h = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {\n return e.__proto__ || Object.getPrototypeOf(e);\n })(e);\n }\n\n function f(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n }\n\n function d(e, t) {\n return (d = Object.setPrototypeOf || function (e, t) {\n return e.__proto__ = t, e;\n })(e, t);\n }\n\n function p(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }\n\n function v(e, t) {\n for (var r = 0; r < t.length; r++) {\n var n = t[r];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n }\n }\n\n function y(e, t, r) {\n return t && v(e.prototype, t), r && v(e, r), e;\n }\n\n var m = function (e) {\n function t(e) {\n var r;\n if (p(this, t), (r = c(this, h(t).call(this))).defaultParams = {\n audioContext: null,\n audioScriptProcessor: null,\n audioRate: 1,\n autoCenter: !0,\n backend: \"WebAudio\",\n backgroundColor: null,\n barHeight: 1,\n barGap: null,\n container: null,\n cursorColor: \"#333\",\n cursorWidth: 1,\n dragSelection: !0,\n duration: null,\n fillParent: !0,\n forceDecode: !1,\n height: 128,\n hideScrollbar: !1,\n interact: !0,\n loopSelection: !0,\n maxCanvasWidth: 4e3,\n mediaContainer: null,\n mediaControls: !1,\n mediaType: \"audio\",\n minPxPerSec: 20,\n normalize: !1,\n partialRender: !1,\n pixelRatio: window.devicePixelRatio || screen.deviceXDPI / screen.logicalXDPI,\n plugins: [],\n progressColor: \"#555\",\n removeMediaElementOnDestroy: !0,\n renderer: i.default,\n responsive: !1,\n rtl: !1,\n scrollParent: !1,\n skipLength: 2,\n splitChannels: !1,\n waveColor: \"#999\",\n xhr: {}\n }, r.backends = {\n MediaElement: s.default,\n WebAudio: a.default\n }, r.util = n, r.params = n.extend({}, r.defaultParams, e), r.container = \"string\" == typeof e.container ? document.querySelector(r.params.container) : r.params.container, !r.container) throw new Error(\"Container element not found\");\n if (null == r.params.mediaContainer ? r.mediaContainer = r.container : \"string\" == typeof r.params.mediaContainer ? r.mediaContainer = document.querySelector(r.params.mediaContainer) : r.mediaContainer = r.params.mediaContainer, !r.mediaContainer) throw new Error(\"Media Container element not found\");\n if (r.params.maxCanvasWidth <= 1) throw new Error(\"maxCanvasWidth must be greater than 1\");\n if (r.params.maxCanvasWidth % 2 == 1) throw new Error(\"maxCanvasWidth must be an even number\");\n if (!0 === r.params.rtl && n.style(r.container, {\n transform: \"rotateY(180deg)\"\n }), r.params.backgroundColor && r.setBackgroundColor(r.params.backgroundColor), r.savedVolume = 0, r.isMuted = !1, r.tmpEvents = [], r.currentRequest = null, r.arraybuffer = null, r.drawer = null, r.backend = null, r.peakCache = null, \"function\" != typeof r.params.renderer) throw new Error(\"Renderer parameter is invalid\");\n r.Drawer = r.params.renderer, r.Backend = r.backends[r.params.backend], r.initialisedPluginList = {}, r.isDestroyed = !1, r.isReady = !1;\n var o = 0;\n return r._onResize = n.debounce(function () {\n o == r.drawer.wrapper.clientWidth || r.params.scrollParent || (o = r.drawer.wrapper.clientWidth, r.drawer.fireEvent(\"redraw\"));\n }, \"number\" == typeof r.params.responsive ? r.params.responsive : 100), c(r, f(r));\n }\n\n return function (e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\");\n e.prototype = Object.create(t && t.prototype, {\n constructor: {\n value: e,\n writable: !0,\n configurable: !0\n }\n }), t && d(e, t);\n }(t, n.Observer), y(t, null, [{\n key: \"create\",\n value: function value(e) {\n return new t(e).init();\n }\n }]), y(t, [{\n key: \"init\",\n value: function value() {\n return this.registerPlugins(this.params.plugins), this.createDrawer(), this.createBackend(), this.createPeakCache(), this;\n }\n }, {\n key: \"registerPlugins\",\n value: function value(e) {\n var t = this;\n return e.forEach(function (e) {\n return t.addPlugin(e);\n }), e.forEach(function (e) {\n e.deferInit || t.initPlugin(e.name);\n }), this.fireEvent(\"plugins-registered\", e), this;\n }\n }, {\n key: \"getActivePlugins\",\n value: function value() {\n return this.initialisedPluginList;\n }\n }, {\n key: \"addPlugin\",\n value: function value(e) {\n var t = this;\n if (!e.name) throw new Error(\"Plugin does not have a name!\");\n if (!e.instance) throw new Error(\"Plugin \".concat(e.name, \" does not have an instance property!\"));\n e.staticProps && Object.keys(e.staticProps).forEach(function (r) {\n t[r] = e.staticProps[r];\n });\n var r = e.instance;\n return Object.getOwnPropertyNames(n.Observer.prototype).forEach(function (e) {\n r.prototype[e] = n.Observer.prototype[e];\n }), this[e.name] = new r(e.params || {}, this), this.fireEvent(\"plugin-added\", e.name), this;\n }\n }, {\n key: \"initPlugin\",\n value: function value(e) {\n if (!this[e]) throw new Error(\"Plugin \".concat(e, \" has not been added yet!\"));\n return this.initialisedPluginList[e] && this.destroyPlugin(e), this[e].init(), this.initialisedPluginList[e] = !0, this.fireEvent(\"plugin-initialised\", e), this;\n }\n }, {\n key: \"destroyPlugin\",\n value: function value(e) {\n if (!this[e]) throw new Error(\"Plugin \".concat(e, \" has not been added yet and cannot be destroyed!\"));\n if (!this.initialisedPluginList[e]) throw new Error(\"Plugin \".concat(e, \" is not active and cannot be destroyed!\"));\n if (\"function\" != typeof this[e].destroy) throw new Error(\"Plugin \".concat(e, \" does not have a destroy function!\"));\n return this[e].destroy(), delete this.initialisedPluginList[e], this.fireEvent(\"plugin-destroyed\", e), this;\n }\n }, {\n key: \"destroyAllPlugins\",\n value: function value() {\n var e = this;\n Object.keys(this.initialisedPluginList).forEach(function (t) {\n return e.destroyPlugin(t);\n });\n }\n }, {\n key: \"createDrawer\",\n value: function value() {\n var e = this;\n this.drawer = new this.Drawer(this.container, this.params), this.drawer.init(), this.fireEvent(\"drawer-created\", this.drawer), !1 !== this.params.responsive && (window.addEventListener(\"resize\", this._onResize, !0), window.addEventListener(\"orientationchange\", this._onResize, !0)), this.drawer.on(\"redraw\", function () {\n e.drawBuffer(), e.drawer.progress(e.backend.getPlayedPercents());\n }), this.drawer.on(\"click\", function (t, r) {\n setTimeout(function () {\n return e.seekTo(r);\n }, 0);\n }), this.drawer.on(\"scroll\", function (t) {\n e.params.partialRender && e.drawBuffer(), e.fireEvent(\"scroll\", t);\n });\n }\n }, {\n key: \"createBackend\",\n value: function value() {\n var e = this;\n this.backend && this.backend.destroy(), \"AudioElement\" == this.params.backend && (this.params.backend = \"MediaElement\"), \"WebAudio\" != this.params.backend || this.Backend.prototype.supportsWebAudio.call(null) || (this.params.backend = \"MediaElement\"), this.backend = new this.Backend(this.params), this.backend.init(), this.fireEvent(\"backend-created\", this.backend), this.backend.on(\"finish\", function () {\n e.drawer.progress(e.backend.getPlayedPercents()), e.fireEvent(\"finish\");\n }), this.backend.on(\"play\", function () {\n return e.fireEvent(\"play\");\n }), this.backend.on(\"pause\", function () {\n return e.fireEvent(\"pause\");\n }), this.backend.on(\"audioprocess\", function (t) {\n e.drawer.progress(e.backend.getPlayedPercents()), e.fireEvent(\"audioprocess\", t);\n }), \"MediaElement\" === this.params.backend && (this.backend.on(\"seek\", function () {\n e.drawer.progress(e.backend.getPlayedPercents());\n }), this.backend.on(\"volume\", function () {\n var t = e.getVolume();\n e.fireEvent(\"volume\", t), e.backend.isMuted !== e.isMuted && (e.isMuted = e.backend.isMuted, e.fireEvent(\"mute\", e.isMuted));\n }));\n }\n }, {\n key: \"createPeakCache\",\n value: function value() {\n this.params.partialRender && (this.peakCache = new o.default());\n }\n }, {\n key: \"getDuration\",\n value: function value() {\n return this.backend.getDuration();\n }\n }, {\n key: \"getCurrentTime\",\n value: function value() {\n return this.backend.getCurrentTime();\n }\n }, {\n key: \"setCurrentTime\",\n value: function value(e) {\n e >= this.getDuration() ? this.seekTo(1) : this.seekTo(e / this.getDuration());\n }\n }, {\n key: \"play\",\n value: function value(e, t) {\n var r = this;\n return this.fireEvent(\"interaction\", function () {\n return r.play(e, t);\n }), this.backend.play(e, t);\n }\n }, {\n key: \"pause\",\n value: function value() {\n if (!this.backend.isPaused()) return this.backend.pause();\n }\n }, {\n key: \"playPause\",\n value: function value() {\n return this.backend.isPaused() ? this.play() : this.pause();\n }\n }, {\n key: \"isPlaying\",\n value: function value() {\n return !this.backend.isPaused();\n }\n }, {\n key: \"skipBackward\",\n value: function value(e) {\n this.skip(-e || -this.params.skipLength);\n }\n }, {\n key: \"skipForward\",\n value: function value(e) {\n this.skip(e || this.params.skipLength);\n }\n }, {\n key: \"skip\",\n value: function value(e) {\n var t = this.getDuration() || 1,\n r = this.getCurrentTime() || 0;\n r = Math.max(0, Math.min(t, r + (e || 0))), this.seekAndCenter(r / t);\n }\n }, {\n key: \"seekAndCenter\",\n value: function value(e) {\n this.seekTo(e), this.drawer.recenter(e);\n }\n }, {\n key: \"seekTo\",\n value: function value(e) {\n var t = this;\n if (\"number\" != typeof e || !isFinite(e) || e < 0 || e > 1) throw new Error(\"Error calling wavesurfer.seekTo, parameter must be a number between 0 and 1!\");\n this.fireEvent(\"interaction\", function () {\n return t.seekTo(e);\n });\n var r = this.backend.isPaused();\n r || this.backend.pause();\n var n = this.params.scrollParent;\n this.params.scrollParent = !1, this.backend.seekTo(e * this.getDuration()), this.drawer.progress(e), r || this.backend.play(), this.params.scrollParent = n, this.fireEvent(\"seek\", e);\n }\n }, {\n key: \"stop\",\n value: function value() {\n this.pause(), this.seekTo(0), this.drawer.progress(0);\n }\n }, {\n key: \"setSinkId\",\n value: function value(e) {\n return this.backend.setSinkId(e);\n }\n }, {\n key: \"setVolume\",\n value: function value(e) {\n this.backend.setVolume(e), this.fireEvent(\"volume\", e);\n }\n }, {\n key: \"getVolume\",\n value: function value() {\n return this.backend.getVolume();\n }\n }, {\n key: \"setPlaybackRate\",\n value: function value(e) {\n this.backend.setPlaybackRate(e);\n }\n }, {\n key: \"getPlaybackRate\",\n value: function value() {\n return this.backend.getPlaybackRate();\n }\n }, {\n key: \"toggleMute\",\n value: function value() {\n this.setMute(!this.isMuted);\n }\n }, {\n key: \"setMute\",\n value: function value(e) {\n e !== this.isMuted ? (e ? (this.savedVolume = this.backend.getVolume(), this.backend.setVolume(0), this.isMuted = !0, this.fireEvent(\"volume\", 0)) : (this.backend.setVolume(this.savedVolume), this.isMuted = !1, this.fireEvent(\"volume\", this.savedVolume)), this.fireEvent(\"mute\", this.isMuted)) : this.fireEvent(\"mute\", this.isMuted);\n }\n }, {\n key: \"getMute\",\n value: function value() {\n return this.isMuted;\n }\n }, {\n key: \"getFilters\",\n value: function value() {\n return this.backend.filters || [];\n }\n }, {\n key: \"toggleScroll\",\n value: function value() {\n this.params.scrollParent = !this.params.scrollParent, this.drawBuffer();\n }\n }, {\n key: \"toggleInteraction\",\n value: function value() {\n this.params.interact = !this.params.interact;\n }\n }, {\n key: \"getWaveColor\",\n value: function value() {\n return this.params.waveColor;\n }\n }, {\n key: \"setWaveColor\",\n value: function value(e) {\n this.params.waveColor = e, this.drawBuffer();\n }\n }, {\n key: \"getProgressColor\",\n value: function value() {\n return this.params.progressColor;\n }\n }, {\n key: \"setProgressColor\",\n value: function value(e) {\n this.params.progressColor = e, this.drawBuffer();\n }\n }, {\n key: \"getBackgroundColor\",\n value: function value() {\n return this.params.backgroundColor;\n }\n }, {\n key: \"setBackgroundColor\",\n value: function value(e) {\n this.params.backgroundColor = e, n.style(this.container, {\n background: this.params.backgroundColor\n });\n }\n }, {\n key: \"getCursorColor\",\n value: function value() {\n return this.params.cursorColor;\n }\n }, {\n key: \"setCursorColor\",\n value: function value(e) {\n this.params.cursorColor = e, this.drawer.updateCursor();\n }\n }, {\n key: \"getHeight\",\n value: function value() {\n return this.params.height;\n }\n }, {\n key: \"setHeight\",\n value: function value(e) {\n this.params.height = e, this.drawer.setHeight(e * this.params.pixelRatio), this.drawBuffer();\n }\n }, {\n key: \"drawBuffer\",\n value: function value() {\n var e,\n t = Math.round(this.getDuration() * this.params.minPxPerSec * this.params.pixelRatio),\n r = this.drawer.getWidth(),\n n = t,\n i = 0,\n a = Math.max(i + r, n);\n\n if (this.params.fillParent && (!this.params.scrollParent || t < r) && (i = 0, a = n = r), this.params.partialRender) {\n var s,\n o = this.peakCache.addRangeToPeakCache(n, i, a);\n\n for (s = 0; s < o.length; s++) {\n e = this.backend.getPeaks(n, o[s][0], o[s][1]), this.drawer.drawPeaks(e, n, o[s][0], o[s][1]);\n }\n } else e = this.backend.getPeaks(n, i, a), this.drawer.drawPeaks(e, n, i, a);\n\n this.fireEvent(\"redraw\", e, n);\n }\n }, {\n key: \"zoom\",\n value: function value(e) {\n e ? (this.params.minPxPerSec = e, this.params.scrollParent = !0) : (this.params.minPxPerSec = this.defaultParams.minPxPerSec, this.params.scrollParent = !1), this.drawBuffer(), this.drawer.progress(this.backend.getPlayedPercents()), this.drawer.recenter(this.getCurrentTime() / this.getDuration()), this.fireEvent(\"zoom\", e);\n }\n }, {\n key: \"loadArrayBuffer\",\n value: function value(e) {\n var t = this;\n this.decodeArrayBuffer(e, function (e) {\n t.isDestroyed || t.loadDecodedBuffer(e);\n });\n }\n }, {\n key: \"loadDecodedBuffer\",\n value: function value(e) {\n this.backend.load(e), this.drawBuffer(), this.fireEvent(\"ready\"), this.isReady = !0;\n }\n }, {\n key: \"loadBlob\",\n value: function value(e) {\n var t = this,\n r = new FileReader();\n r.addEventListener(\"progress\", function (e) {\n return t.onProgress(e);\n }), r.addEventListener(\"load\", function (e) {\n return t.loadArrayBuffer(e.target.result);\n }), r.addEventListener(\"error\", function () {\n return t.fireEvent(\"error\", \"Error reading file\");\n }), r.readAsArrayBuffer(e), this.empty();\n }\n }, {\n key: \"load\",\n value: function value(e, t, r, n) {\n if (this.empty(), r) {\n var i = {\n \"Preload is not 'auto', 'none' or 'metadata'\": -1 === [\"auto\", \"metadata\", \"none\"].indexOf(r),\n \"Peaks are not provided\": !t,\n \"Backend is not of type MediaElement\": \"MediaElement\" !== this.params.backend,\n \"Url is not of type string\": \"string\" != typeof e\n },\n a = Object.keys(i).filter(function (e) {\n return i[e];\n });\n a.length && (console.warn(\"Preload parameter of wavesurfer.load will be ignored because:\\n\\t- \" + a.join(\"\\n\\t- \")), r = null);\n }\n\n switch (this.params.backend) {\n case \"WebAudio\":\n return this.loadBuffer(e, t, n);\n\n case \"MediaElement\":\n return this.loadMediaElement(e, t, r, n);\n }\n }\n }, {\n key: \"loadBuffer\",\n value: function value(e, t, r) {\n var n = this,\n i = function i(t) {\n return t && n.tmpEvents.push(n.once(\"ready\", t)), n.getArrayBuffer(e, function (e) {\n return n.loadArrayBuffer(e);\n });\n };\n\n if (!t) return i();\n this.backend.setPeaks(t, r), this.drawBuffer(), this.tmpEvents.push(this.once(\"interaction\", i));\n }\n }, {\n key: \"loadMediaElement\",\n value: function value(e, t, r, n) {\n var i = this,\n a = e;\n if (\"string\" == typeof e) this.backend.load(a, this.mediaContainer, t, r);else {\n var s = e;\n this.backend.loadElt(s, t), a = s.src;\n }\n this.tmpEvents.push(this.backend.once(\"canplay\", function () {\n i.drawBuffer(), i.fireEvent(\"ready\"), i.isReady = !0;\n }), this.backend.once(\"error\", function (e) {\n return i.fireEvent(\"error\", e);\n })), t && this.backend.setPeaks(t, n), t && !this.params.forceDecode || !this.backend.supportsWebAudio() || this.getArrayBuffer(a, function (e) {\n i.decodeArrayBuffer(e, function (e) {\n i.backend.buffer = e, i.backend.setPeaks(null), i.drawBuffer(), i.fireEvent(\"waveform-ready\");\n });\n });\n }\n }, {\n key: \"decodeArrayBuffer\",\n value: function value(e, t) {\n var r = this;\n this.arraybuffer = e, this.backend.decodeArrayBuffer(e, function (n) {\n r.isDestroyed || r.arraybuffer != e || (t(n), r.arraybuffer = null);\n }, function () {\n return r.fireEvent(\"error\", \"Error decoding audiobuffer\");\n });\n }\n }, {\n key: \"getArrayBuffer\",\n value: function value(e, t) {\n var r = this,\n i = n.extend({\n url: e,\n responseType: \"arraybuffer\"\n }, this.params.xhr),\n a = n.fetchFile(i);\n return this.currentRequest = a, this.tmpEvents.push(a.on(\"progress\", function (e) {\n r.onProgress(e);\n }), a.on(\"success\", function (e) {\n t(e), r.currentRequest = null;\n }), a.on(\"error\", function (e) {\n r.fireEvent(\"error\", \"fetch error: \" + e.message), r.currentRequest = null;\n })), a;\n }\n }, {\n key: \"onProgress\",\n value: function value(e) {\n var t;\n t = e.lengthComputable ? e.loaded / e.total : e.loaded / (e.loaded + 1e6), this.fireEvent(\"loading\", Math.round(100 * t), e.target);\n }\n }, {\n key: \"exportPCM\",\n value: function value(e, t, r, n) {\n e = e || 1024, n = n || 0, t = t || 1e4, r = r || !1;\n var i = this.backend.getPeaks(e, n),\n a = [].map.call(i, function (e) {\n return Math.round(e * t) / t;\n }),\n s = JSON.stringify(a);\n return r || window.open(\"data:application/json;charset=utf-8,\" + encodeURIComponent(s)), s;\n }\n }, {\n key: \"exportImage\",\n value: function value(e, t, r) {\n return e || (e = \"image/png\"), t || (t = 1), r || (r = \"dataURL\"), this.drawer.getImage(e, t, r);\n }\n }, {\n key: \"cancelAjax\",\n value: function value() {\n this.currentRequest && this.currentRequest.controller && (this.currentRequest.controller.abort(), this.currentRequest = null);\n }\n }, {\n key: \"clearTmpEvents\",\n value: function value() {\n this.tmpEvents.forEach(function (e) {\n return e.un();\n });\n }\n }, {\n key: \"empty\",\n value: function value() {\n this.backend.isPaused() || (this.stop(), this.backend.disconnectSource()), this.isReady = !1, this.cancelAjax(), this.clearTmpEvents(), this.drawer.progress(0), this.drawer.setWidth(0), this.drawer.drawPeaks({\n length: this.drawer.getWidth()\n }, 0);\n }\n }, {\n key: \"destroy\",\n value: function value() {\n this.destroyAllPlugins(), this.fireEvent(\"destroy\"), this.cancelAjax(), this.clearTmpEvents(), this.unAll(), !1 !== this.params.responsive && (window.removeEventListener(\"resize\", this._onResize, !0), window.removeEventListener(\"orientationchange\", this._onResize, !0)), this.backend.destroy(), this.drawer.destroy(), this.isDestroyed = !0, this.isReady = !1, this.arraybuffer = null;\n }\n }]), t;\n }();\n\n t.default = m, m.VERSION = \"3.0.0\", m.util = n, e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function (e) {\n var t = new i.default(),\n r = new XMLHttpRequest(),\n n = !1;\n r.open(e.method || \"GET\", e.url, !0), r.responseType = e.responseType || \"json\", e.xhr && (e.xhr.requestHeaders && e.xhr.requestHeaders.forEach(function (e) {\n r.setRequestHeader(e.key, e.value);\n }), e.xhr.withCredentials && (r.withCredentials = !0));\n return r.addEventListener(\"progress\", function (e) {\n t.fireEvent(\"progress\", e), e.lengthComputable && e.loaded == e.total && (n = !0);\n }), r.addEventListener(\"load\", function (e) {\n n || t.fireEvent(\"progress\", e), t.fireEvent(\"load\", e), 200 == r.status || 206 == r.status ? t.fireEvent(\"success\", r.response, e) : t.fireEvent(\"error\", e);\n }), r.addEventListener(\"error\", function (e) {\n return t.fireEvent(\"error\", e);\n }), r.send(), t.xhr = r, t;\n };\n var n,\n i = (n = r(1)) && n.__esModule ? n : {\n default: n\n };\n e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function (e) {\n var t = -1 / 0;\n return Object.keys(e).forEach(function (r) {\n e[r] > t && (t = e[r]);\n }), t;\n }, e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function (e) {\n var t = Number(1 / 0);\n return Object.keys(e).forEach(function (r) {\n e[r] < t && (t = e[r]);\n }), t;\n }, e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function (e) {\n for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) {\n r[n - 1] = arguments[n];\n }\n\n return r.forEach(function (t) {\n Object.keys(t).forEach(function (r) {\n e[r] = t[r];\n });\n }), e;\n }, e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function (e) {\n return function () {\n for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++) {\n r[n] = arguments[n];\n }\n\n return (0, i.default)(function () {\n return e.apply(void 0, r);\n });\n };\n };\n var n,\n i = (n = r(4)) && n.__esModule ? n : {\n default: n\n };\n e.exports = t.default;\n }, function (e, t) {\n function r(e, t, r) {\n var n, i, a, s, o;\n\n function u() {\n var l = Date.now() - s;\n l < t && l >= 0 ? n = setTimeout(u, t - l) : (n = null, r || (o = e.apply(a, i), a = i = null));\n }\n\n null == t && (t = 100);\n\n var l = function l() {\n a = this, i = arguments, s = Date.now();\n var l = r && !n;\n return n || (n = setTimeout(u, t)), l && (o = e.apply(a, i), a = i = null), o;\n };\n\n return l.clear = function () {\n n && (clearTimeout(n), n = null);\n }, l.flush = function () {\n n && (o = e.apply(a, i), a = i = null, clearTimeout(n), n = null);\n }, l;\n }\n\n r.debounce = r, e.exports = r;\n }, function (e, t, r) {\n \"use strict\";\n\n function n(e) {\n e.stopPropagation(), document.body.removeEventListener(\"click\", n, !0);\n }\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function (e) {\n document.body.addEventListener(\"click\", n, !0);\n }, e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function (e) {\n if (!e) throw new Error(\"fetch options missing\");\n if (!e.url) throw new Error(\"fetch url missing\");\n var t = new i.default(),\n r = new Headers(),\n n = new Request(e.url);\n t.controller = new AbortController(), e && e.requestHeaders && e.requestHeaders.forEach(function (e) {\n r.append(e.key, e.value);\n });\n var a = e.responseType || \"json\",\n o = {\n method: e.method || \"GET\",\n headers: r,\n mode: e.mode || \"cors\",\n credentials: e.credentials || \"same-origin\",\n cache: e.cache || \"default\",\n redirect: e.redirect || \"follow\",\n referrer: e.referrer || \"client\",\n signal: t.controller.signal\n };\n return fetch(n, o).then(function (e) {\n t.response = e;\n var r = !0;\n e.body || (r = !1);\n var n = e.headers.get(\"content-length\");\n return null === n && (r = !1), r ? (t.onProgress = function (e) {\n t.fireEvent(\"progress\", e);\n }, new Response(new ReadableStream(new s(t, n, e)), o)) : e;\n }).then(function (e) {\n var t;\n if (e.ok) switch (a) {\n case \"arraybuffer\":\n return e.arrayBuffer();\n\n case \"json\":\n return e.json();\n\n case \"blob\":\n return e.blob();\n\n case \"text\":\n return e.text();\n\n default:\n t = \"Unknown responseType: \" + a;\n }\n throw t || (t = \"HTTP error status: \" + e.status), new Error(t);\n }).then(function (e) {\n t.fireEvent(\"success\", e);\n }).catch(function (e) {\n t.fireEvent(\"error\", e);\n }), t.fetchRequest = n, t;\n };\n var n,\n i = (n = r(1)) && n.__esModule ? n : {\n default: n\n };\n\n function a(e, t) {\n for (var r = 0; r < t.length; r++) {\n var n = t[r];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n }\n }\n\n var s = function () {\n function e(t, r, n) {\n !function (e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, e), this.instance = t, this.instance._reader = n.body.getReader(), this.total = parseInt(r, 10), this.loaded = 0;\n }\n\n var t, r, n;\n return t = e, (r = [{\n key: \"start\",\n value: function value(e) {\n var t = this;\n !function r() {\n t.instance._reader.read().then(function (n) {\n var i = n.done,\n a = n.value;\n if (i) return 0 === t.total && t.instance.onProgress.call(t.instance, {\n loaded: t.loaded,\n total: t.total,\n lengthComputable: !1\n }), void e.close();\n t.loaded += a.byteLength, t.instance.onProgress.call(t.instance, {\n loaded: t.loaded,\n total: t.total,\n lengthComputable: !(0 === t.total)\n }), e.enqueue(a), r();\n }).catch(function (t) {\n e.error(t);\n });\n }();\n }\n }]) && a(t.prototype, r), n && a(t, n), e;\n }();\n\n e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n\n var n = s(r(16)),\n i = function (e) {\n if (e && e.__esModule) return e;\n var t = {};\n if (null != e) for (var r in e) {\n if (Object.prototype.hasOwnProperty.call(e, r)) {\n var n = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(e, r) : {};\n n.get || n.set ? Object.defineProperty(t, r, n) : t[r] = e[r];\n }\n }\n return t.default = e, t;\n }(r(0)),\n a = s(r(17));\n\n function s(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n\n function o(e) {\n return (o = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n return typeof e;\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n })(e);\n }\n\n function u(e, t) {\n for (var r = 0; r < t.length; r++) {\n var n = t[r];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n }\n }\n\n function l(e, t) {\n return !t || \"object\" !== o(t) && \"function\" != typeof t ? function (e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n }(e) : t;\n }\n\n function c(e) {\n return (c = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {\n return e.__proto__ || Object.getPrototypeOf(e);\n })(e);\n }\n\n function h(e, t) {\n return (h = Object.setPrototypeOf || function (e, t) {\n return e.__proto__ = t, e;\n })(e, t);\n }\n\n var f = function (e) {\n function t(e, r) {\n var n;\n return function (e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, t), (n = l(this, c(t).call(this, e, r))).maxCanvasWidth = r.maxCanvasWidth, n.maxCanvasElementWidth = Math.round(r.maxCanvasWidth / r.pixelRatio), n.hasProgressCanvas = r.waveColor != r.progressColor, n.halfPixel = .5 / r.pixelRatio, n.canvases = [], n.progressWave = null, n.EntryClass = a.default, n.overlap = 2 * Math.ceil(r.pixelRatio / 2), n;\n }\n\n var r, s, o;\n return function (e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\");\n e.prototype = Object.create(t && t.prototype, {\n constructor: {\n value: e,\n writable: !0,\n configurable: !0\n }\n }), t && h(e, t);\n }(t, n.default), r = t, (s = [{\n key: \"init\",\n value: function value() {\n this.createWrapper(), this.createElements();\n }\n }, {\n key: \"createElements\",\n value: function value() {\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 })), this.addCanvas(), this.updateCursor();\n }\n }, {\n key: \"updateCursor\",\n value: function value() {\n this.style(this.progressWave, {\n borderRightWidth: this.params.cursorWidth + \"px\",\n borderRightColor: this.params.cursorColor\n });\n }\n }, {\n key: \"updateSize\",\n value: function value() {\n for (var e = this, t = Math.round(this.width / this.params.pixelRatio), r = Math.ceil(t / (this.maxCanvasElementWidth + this.overlap)); this.canvases.length < r;) {\n this.addCanvas();\n }\n\n for (; this.canvases.length > r;) {\n this.removeCanvas();\n }\n\n var n = this.maxCanvasWidth + this.overlap,\n i = this.canvases.length - 1;\n this.canvases.forEach(function (t, r) {\n r == i && (n = e.width - e.maxCanvasWidth * i), e.updateDimensions(t, n, e.height), t.clearWave();\n });\n }\n }, {\n key: \"addCanvas\",\n value: function value() {\n var e = new this.EntryClass();\n e.hasProgressCanvas = this.hasProgressCanvas, e.halfPixel = this.halfPixel;\n var t = this.maxCanvasElementWidth * this.canvases.length;\n e.initWave(this.wrapper.appendChild(this.style(document.createElement(\"canvas\"), {\n position: \"absolute\",\n zIndex: 2,\n left: t + \"px\",\n top: 0,\n bottom: 0,\n height: \"100%\",\n pointerEvents: \"none\"\n }))), this.hasProgressCanvas && e.initProgress(this.progressWave.appendChild(this.style(document.createElement(\"canvas\"), {\n position: \"absolute\",\n left: t + \"px\",\n top: 0,\n bottom: 0,\n height: \"100%\"\n }))), this.canvases.push(e);\n }\n }, {\n key: \"removeCanvas\",\n value: function value() {\n var e = this.canvases[this.canvases.length - 1];\n e.wave.parentElement.removeChild(e.wave), this.hasProgressCanvas && e.progress.parentElement.removeChild(e.progress), e && (e.destroy(), e = null), this.canvases.pop();\n }\n }, {\n key: \"updateDimensions\",\n value: function value(e, t, r) {\n var n = Math.round(t / this.params.pixelRatio),\n i = Math.round(this.width / this.params.pixelRatio);\n e.updateDimensions(n, i, t, r), this.style(this.progressWave, {\n display: \"block\"\n });\n }\n }, {\n key: \"clearWave\",\n value: function value() {\n this.canvases.forEach(function (e) {\n return e.clearWave();\n });\n }\n }, {\n key: \"drawBars\",\n value: function value(e, t, r, n) {\n var i = this;\n return this.prepareDraw(e, t, r, n, function (e) {\n var t = e.absmax,\n a = e.hasMinVals,\n s = (e.height, e.offsetY),\n o = e.halfH,\n u = e.peaks;\n if (void 0 !== r) for (var l = a ? 2 : 1, c = u.length / l, h = i.params.barWidth * i.params.pixelRatio, f = h + (null === i.params.barGap ? Math.max(i.params.pixelRatio, ~~(h / 2)) : Math.max(i.params.pixelRatio, i.params.barGap * i.params.pixelRatio)), d = c / i.width, p = n, v = r; v < p; v += f) {\n var y = u[Math.floor(v * d * l)] || 0,\n m = Math.round(y / t * o);\n i.fillRect(v + i.halfPixel, o - m + s, h + i.halfPixel, 2 * m);\n }\n });\n }\n }, {\n key: \"drawWave\",\n value: function value(e, t, r, n) {\n var i = this;\n return this.prepareDraw(e, t, r, n, function (e) {\n var t = e.absmax,\n a = e.hasMinVals,\n s = (e.height, e.offsetY),\n o = e.halfH,\n u = e.peaks;\n\n if (!a) {\n for (var l = [], c = u.length, h = 0; h < c; h++) {\n l[2 * h] = u[h], l[2 * h + 1] = -u[h];\n }\n\n u = l;\n }\n\n void 0 !== r && i.drawLine(u, t, o, s, r, n), i.fillRect(0, o + s - i.halfPixel, i.width, i.halfPixel);\n });\n }\n }, {\n key: \"drawLine\",\n value: function value(e, t, r, n, i, a) {\n var s = this;\n this.canvases.forEach(function (o) {\n s.setFillStyles(o), o.drawLines(e, t, r, n, i, a);\n });\n }\n }, {\n key: \"fillRect\",\n value: function value(e, t, r, n) {\n for (var i = Math.floor(e / this.maxCanvasWidth), a = Math.min(Math.ceil((e + r) / this.maxCanvasWidth) + 1, this.canvases.length), s = i; s < a; s++) {\n var o = this.canvases[s],\n u = s * this.maxCanvasWidth,\n l = {\n x1: Math.max(e, s * this.maxCanvasWidth),\n y1: t,\n x2: Math.min(e + r, s * this.maxCanvasWidth + o.wave.width),\n y2: t + n\n };\n l.x1 < l.x2 && (this.setFillStyles(o), o.fillRects(l.x1 - u, l.y1, l.x2 - l.x1, l.y2 - l.y1));\n }\n }\n }, {\n key: \"prepareDraw\",\n value: function value(e, t, r, n, a) {\n var s = this;\n return i.frame(function () {\n if (e[0] instanceof Array) {\n var o = e;\n if (s.params.splitChannels) return s.setHeight(o.length * s.params.height * s.params.pixelRatio), o.forEach(function (e, t) {\n return s.prepareDraw(e, t, r, n, a);\n });\n e = o[0];\n }\n\n var u = 1 / s.params.barHeight;\n\n if (s.params.normalize) {\n var l = i.max(e),\n c = i.min(e);\n u = -c > l ? -c : l;\n }\n\n var h = [].some.call(e, function (e) {\n return e < 0;\n }),\n f = s.params.height * s.params.pixelRatio;\n return a({\n absmax: u,\n hasMinVals: h,\n height: f,\n offsetY: f * t || 0,\n halfH: f / 2,\n peaks: e\n });\n })();\n }\n }, {\n key: \"setFillStyles\",\n value: function value(e) {\n e.setFillStyles(this.params.waveColor, this.params.progressColor);\n }\n }, {\n key: \"getImage\",\n value: function value(e, t, r) {\n if (\"blob\" === r) return Promise.all(this.canvases.map(function (n) {\n return n.getImage(e, t, r);\n }));\n\n if (\"dataURL\" === r) {\n var n = this.canvases.map(function (n) {\n return n.getImage(e, t, r);\n });\n return n.length > 1 ? n : n[0];\n }\n }\n }, {\n key: \"updateProgress\",\n value: function value(e) {\n this.style(this.progressWave, {\n width: e + \"px\"\n });\n }\n }]) && u(r.prototype, s), o && u(r, o), t;\n }();\n\n t.default = f, e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n\n var n = function (e) {\n if (e && e.__esModule) return e;\n var t = {};\n if (null != e) for (var r in e) {\n if (Object.prototype.hasOwnProperty.call(e, r)) {\n var n = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(e, r) : {};\n n.get || n.set ? Object.defineProperty(t, r, n) : t[r] = e[r];\n }\n }\n return t.default = e, t;\n }(r(0));\n\n function i(e) {\n return (i = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n return typeof e;\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n })(e);\n }\n\n function a(e, t) {\n for (var r = 0; r < t.length; r++) {\n var n = t[r];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n }\n }\n\n function s(e, t) {\n return !t || \"object\" !== i(t) && \"function\" != typeof t ? function (e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n }(e) : t;\n }\n\n function o(e) {\n return (o = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {\n return e.__proto__ || Object.getPrototypeOf(e);\n })(e);\n }\n\n function u(e, t) {\n return (u = Object.setPrototypeOf || function (e, t) {\n return e.__proto__ = t, e;\n })(e, t);\n }\n\n var l = function (e) {\n function t(e, r) {\n var n;\n return function (e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, t), (n = s(this, o(t).call(this))).container = e, n.params = r, n.width = 0, n.height = r.height * n.params.pixelRatio, n.lastPos = 0, n.wrapper = null, n;\n }\n\n var r, i, l;\n return function (e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\");\n e.prototype = Object.create(t && t.prototype, {\n constructor: {\n value: e,\n writable: !0,\n configurable: !0\n }\n }), t && u(e, t);\n }(t, n.Observer), r = t, (i = [{\n key: \"style\",\n value: function value(e, t) {\n return n.style(e, t);\n }\n }, {\n key: \"createWrapper\",\n value: function value() {\n this.wrapper = this.container.appendChild(document.createElement(\"wave\")), this.style(this.wrapper, {\n display: \"block\",\n position: \"relative\",\n userSelect: \"none\",\n webkitUserSelect: \"none\",\n height: this.params.height + \"px\"\n }), (this.params.fillParent || this.params.scrollParent) && this.style(this.wrapper, {\n width: \"100%\",\n overflowX: this.params.hideScrollbar ? \"hidden\" : \"auto\",\n overflowY: \"hidden\"\n }), this.setupWrapperEvents();\n }\n }, {\n key: \"handleEvent\",\n value: function value(e, t) {\n !t && e.preventDefault();\n var r,\n n = e.targetTouches ? e.targetTouches[0].clientX : e.clientX,\n i = this.wrapper.getBoundingClientRect(),\n a = this.width,\n s = this.getWidth();\n return !this.params.fillParent && a < s ? (r = (this.params.rtl ? i.right - n : n - i.left) * (this.params.pixelRatio / a) || 0) > 1 && (r = 1) : r = ((this.params.rtl ? i.right - n : n - i.left) + this.wrapper.scrollLeft) / this.wrapper.scrollWidth || 0, r;\n }\n }, {\n key: \"setupWrapperEvents\",\n value: function value() {\n var e = this;\n this.wrapper.addEventListener(\"click\", function (t) {\n var r = e.wrapper.offsetHeight - e.wrapper.clientHeight;\n\n if (0 != r) {\n var n = e.wrapper.getBoundingClientRect();\n if (t.clientY >= n.bottom - r) return;\n }\n\n e.params.interact && e.fireEvent(\"click\", t, e.handleEvent(t));\n }), this.wrapper.addEventListener(\"scroll\", function (t) {\n return e.fireEvent(\"scroll\", t);\n });\n }\n }, {\n key: \"drawPeaks\",\n value: function value(e, t, r, n) {\n this.setWidth(t) || this.clearWave(), this.params.barWidth ? this.drawBars(e, 0, r, n) : this.drawWave(e, 0, r, n);\n }\n }, {\n key: \"resetScroll\",\n value: function value() {\n null !== this.wrapper && (this.wrapper.scrollLeft = 0);\n }\n }, {\n key: \"recenter\",\n value: function value(e) {\n var t = this.wrapper.scrollWidth * e;\n this.recenterOnPosition(t, !0);\n }\n }, {\n key: \"recenterOnPosition\",\n value: function value(e, t) {\n var r = this.wrapper.scrollLeft,\n n = ~~(this.wrapper.clientWidth / 2),\n i = this.wrapper.scrollWidth - this.wrapper.clientWidth,\n a = e - n,\n s = a - r;\n\n if (0 != i) {\n if (!t && -n <= s && s < n) {\n a = r + (s = Math.max(-5, Math.min(5, s)));\n }\n\n (a = Math.max(0, Math.min(i, a))) != r && (this.wrapper.scrollLeft = a);\n }\n }\n }, {\n key: \"getScrollX\",\n value: function value() {\n var e = 0;\n\n if (this.wrapper) {\n var t = this.params.pixelRatio;\n\n if (e = Math.round(this.wrapper.scrollLeft * t), this.params.scrollParent) {\n var r = ~~(this.wrapper.scrollWidth * t - this.getWidth());\n e = Math.min(r, Math.max(0, e));\n }\n }\n\n return e;\n }\n }, {\n key: \"getWidth\",\n value: function value() {\n return Math.round(this.container.clientWidth * this.params.pixelRatio);\n }\n }, {\n key: \"setWidth\",\n value: function value(e) {\n return this.width != e && (this.width = e, this.params.fillParent || this.params.scrollParent ? this.style(this.wrapper, {\n width: \"\"\n }) : this.style(this.wrapper, {\n width: ~~(this.width / this.params.pixelRatio) + \"px\"\n }), this.updateSize(), !0);\n }\n }, {\n key: \"setHeight\",\n value: function value(e) {\n return e != this.height && (this.height = e, this.style(this.wrapper, {\n height: ~~(this.height / this.params.pixelRatio) + \"px\"\n }), this.updateSize(), !0);\n }\n }, {\n key: \"progress\",\n value: function value(e) {\n var t = 1 / this.params.pixelRatio,\n r = Math.round(e * this.width) * t;\n\n if (r < this.lastPos || r - this.lastPos >= t) {\n if (this.lastPos = r, this.params.scrollParent && this.params.autoCenter) {\n var n = ~~(this.wrapper.scrollWidth * e);\n this.recenterOnPosition(n);\n }\n\n this.updateProgress(r);\n }\n }\n }, {\n key: \"destroy\",\n value: function value() {\n this.unAll(), this.wrapper && (this.wrapper.parentNode == this.container && this.container.removeChild(this.wrapper), this.wrapper = null);\n }\n }, {\n key: \"updateCursor\",\n value: function value() {}\n }, {\n key: \"updateSize\",\n value: function value() {}\n }, {\n key: \"drawBars\",\n value: function value(e, t, r, n) {}\n }, {\n key: \"drawWave\",\n value: function value(e, t, r, n) {}\n }, {\n key: \"clearWave\",\n value: function value() {}\n }, {\n key: \"updateProgress\",\n value: function value(e) {}\n }]) && a(r.prototype, i), l && a(r, l), t;\n }();\n\n t.default = l, e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n var n = a(r(3)),\n i = a(r(2));\n\n function a(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n\n function s(e, t) {\n for (var r = 0; r < t.length; r++) {\n var n = t[r];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n }\n }\n\n var o = function () {\n function e() {\n !function (e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, e), this.wave = null, this.waveCtx = null, this.progress = null, this.progressCtx = null, this.start = 0, this.end = 1, this.id = (0, i.default)(this.constructor.name.toLowerCase() + \"_\");\n }\n\n var t, r, a;\n return t = e, (r = [{\n key: \"initWave\",\n value: function value(e) {\n this.wave = e, this.waveCtx = this.wave.getContext(\"2d\");\n }\n }, {\n key: \"initProgress\",\n value: function value(e) {\n this.progress = e, this.progressCtx = this.progress.getContext(\"2d\");\n }\n }, {\n key: \"updateDimensions\",\n value: function value(e, t, r, i) {\n this.start = this.wave.offsetLeft / t || 0, this.end = this.start + e / t, this.wave.width = r, this.wave.height = i;\n var a = {\n width: e + \"px\"\n };\n (0, n.default)(this.wave, a), this.hasProgressCanvas && (this.progress.width = r, this.progress.height = i, (0, n.default)(this.progress, a));\n }\n }, {\n key: \"clearWave\",\n value: function value() {\n this.waveCtx.clearRect(0, 0, this.waveCtx.canvas.width, this.waveCtx.canvas.height), this.hasProgressCanvas && this.progressCtx.clearRect(0, 0, this.progressCtx.canvas.width, this.progressCtx.canvas.height);\n }\n }, {\n key: \"setFillStyles\",\n value: function value(e, t) {\n this.waveCtx.fillStyle = e, this.hasProgressCanvas && (this.progressCtx.fillStyle = t);\n }\n }, {\n key: \"fillRects\",\n value: function value(e, t, r, n) {\n this.fillRectToContext(this.waveCtx, e, t, r, n), this.hasProgressCanvas && this.fillRectToContext(this.progressCtx, e, t, r, n);\n }\n }, {\n key: \"fillRectToContext\",\n value: function value(e, t, r, n, i) {\n e && e.fillRect(t, r, n, i);\n }\n }, {\n key: \"drawLines\",\n value: function value(e, t, r, n, i, a) {\n this.drawLineToContext(this.waveCtx, e, t, r, n, i, a), this.hasProgressCanvas && this.drawLineToContext(this.progressCtx, e, t, r, n, i, a);\n }\n }, {\n key: \"drawLineToContext\",\n value: function value(e, t, r, n, i, a, s) {\n if (e) {\n var o,\n u,\n l,\n c = t.length / 2,\n h = Math.round(c * this.start),\n f = h,\n d = Math.round(c * this.end) + 1,\n p = this.wave.width / (d - f - 1),\n v = n + i,\n y = r / n;\n\n for (e.beginPath(), e.moveTo((f - h) * p, v), e.lineTo((f - h) * p, v - Math.round((t[2 * f] || 0) / y)), o = f; o < d; o++) {\n u = t[2 * o] || 0, l = Math.round(u / y), e.lineTo((o - h) * p + this.halfPixel, v - l);\n }\n\n for (var m = d - 1; m >= f; m--) {\n u = t[2 * m + 1] || 0, l = Math.round(u / y), e.lineTo((m - h) * p + this.halfPixel, v - l);\n }\n\n e.lineTo((f - h) * p, v - Math.round((t[2 * f + 1] || 0) / y)), e.closePath(), e.fill();\n }\n }\n }, {\n key: \"destroy\",\n value: function value() {\n this.waveCtx = null, this.wave = null, this.progressCtx = null, this.progress = null;\n }\n }, {\n key: \"getImage\",\n value: function value(e, t, r) {\n var n = this;\n return \"blob\" === r ? new Promise(function (r) {\n n.wave.toBlob(r, e, t);\n }) : \"dataURL\" === r ? this.wave.toDataURL(e, t) : void 0;\n }\n }]) && s(t.prototype, r), a && s(t, a), e;\n }();\n\n t.default = o, e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n\n var n,\n i = (n = r(5)) && n.__esModule ? n : {\n default: n\n },\n a = function (e) {\n if (e && e.__esModule) return e;\n var t = {};\n if (null != e) for (var r in e) {\n if (Object.prototype.hasOwnProperty.call(e, r)) {\n var n = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(e, r) : {};\n n.get || n.set ? Object.defineProperty(t, r, n) : t[r] = e[r];\n }\n }\n return t.default = e, t;\n }(r(0));\n\n function s(e) {\n return (s = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n return typeof e;\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n })(e);\n }\n\n function o(e, t) {\n for (var r = 0; r < t.length; r++) {\n var n = t[r];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n }\n }\n\n function u(e, t) {\n return !t || \"object\" !== s(t) && \"function\" != typeof t ? function (e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n }(e) : t;\n }\n\n function l(e, t, r) {\n return (l = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get : function (e, t, r) {\n var n = function (e, t) {\n for (; !Object.prototype.hasOwnProperty.call(e, t) && null !== (e = c(e));) {\n ;\n }\n\n return e;\n }(e, t);\n\n if (n) {\n var i = Object.getOwnPropertyDescriptor(n, t);\n return i.get ? i.get.call(r) : i.value;\n }\n })(e, t, r || e);\n }\n\n function c(e) {\n return (c = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {\n return e.__proto__ || Object.getPrototypeOf(e);\n })(e);\n }\n\n function h(e, t) {\n return (h = Object.setPrototypeOf || function (e, t) {\n return e.__proto__ = t, e;\n })(e, t);\n }\n\n var f = function (e) {\n function t(e) {\n var r;\n return function (e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, t), (r = u(this, c(t).call(this, e))).params = e, r.media = {\n currentTime: 0,\n duration: 0,\n paused: !0,\n playbackRate: 1,\n play: function play() {},\n pause: function pause() {},\n volume: 0\n }, r.mediaType = e.mediaType.toLowerCase(), r.elementPosition = e.elementPosition, r.peaks = null, r.playbackRate = 1, r.volume = 1, r.isMuted = !1, r.buffer = null, r.onPlayEnd = null, r;\n }\n\n var r, n, s;\n return function (e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\");\n e.prototype = Object.create(t && t.prototype, {\n constructor: {\n value: e,\n writable: !0,\n configurable: !0\n }\n }), t && h(e, t);\n }(t, i.default), r = t, (n = [{\n key: \"init\",\n value: function value() {\n this.setPlaybackRate(this.params.audioRate), this.createTimer();\n }\n }, {\n key: \"createTimer\",\n value: function value() {\n var e = this;\n this.on(\"play\", function t() {\n e.isPaused() || (e.fireEvent(\"audioprocess\", e.getCurrentTime()), a.frame(t)());\n }), this.on(\"pause\", function () {\n e.fireEvent(\"audioprocess\", e.getCurrentTime());\n });\n }\n }, {\n key: \"load\",\n value: function value(e, t, r, n) {\n var i = document.createElement(this.mediaType);\n i.controls = this.params.mediaControls, i.autoplay = this.params.autoplay || !1, i.preload = null == n ? \"auto\" : n, i.src = e, i.style.width = \"100%\";\n var a = t.querySelector(this.mediaType);\n a && t.removeChild(a), t.appendChild(i), this._load(i, r);\n }\n }, {\n key: \"loadElt\",\n value: function value(e, t) {\n e.controls = this.params.mediaControls, e.autoplay = this.params.autoplay || !1, this._load(e, t);\n }\n }, {\n key: \"_load\",\n value: function value(e, t) {\n var r = this;\n \"function\" == typeof e.load && e.load(), e.addEventListener(\"error\", function () {\n r.fireEvent(\"error\", \"Error loading media element\");\n }), e.addEventListener(\"canplay\", function () {\n r.fireEvent(\"canplay\");\n }), e.addEventListener(\"ended\", function () {\n r.fireEvent(\"finish\");\n }), e.addEventListener(\"play\", function () {\n r.fireEvent(\"play\");\n }), e.addEventListener(\"pause\", function () {\n r.fireEvent(\"pause\");\n }), e.addEventListener(\"seeked\", function (e) {\n r.fireEvent(\"seek\");\n }), e.addEventListener(\"volumechange\", function (t) {\n r.isMuted = e.muted, r.isMuted ? r.volume = 0 : r.volume = e.volume, r.fireEvent(\"volume\");\n }), this.media = e, this.peaks = t, this.onPlayEnd = null, this.buffer = null, this.isMuted = e.muted, this.setPlaybackRate(this.playbackRate), this.setVolume(this.volume);\n }\n }, {\n key: \"isPaused\",\n value: function value() {\n return !this.media || this.media.paused;\n }\n }, {\n key: \"getDuration\",\n value: function value() {\n if (this.explicitDuration) return this.explicitDuration;\n var e = (this.buffer || this.media).duration;\n return e >= 1 / 0 && (e = this.media.seekable.end(0)), e;\n }\n }, {\n key: \"getCurrentTime\",\n value: function value() {\n return this.media && this.media.currentTime;\n }\n }, {\n key: \"getPlayedPercents\",\n value: function value() {\n return this.getCurrentTime() / this.getDuration() || 0;\n }\n }, {\n key: \"getPlaybackRate\",\n value: function value() {\n return this.playbackRate || this.media.playbackRate;\n }\n }, {\n key: \"setPlaybackRate\",\n value: function value(e) {\n this.playbackRate = e || 1, this.media.playbackRate = this.playbackRate;\n }\n }, {\n key: \"seekTo\",\n value: function value(e) {\n null != e && (this.media.currentTime = e), this.clearPlayEnd();\n }\n }, {\n key: \"play\",\n value: function value(e, t) {\n this.seekTo(e);\n var r = this.media.play();\n return t && this.setPlayEnd(t), r;\n }\n }, {\n key: \"pause\",\n value: function value() {\n var e;\n return this.media && (e = this.media.pause()), this.clearPlayEnd(), e;\n }\n }, {\n key: \"setPlayEnd\",\n value: function value(e) {\n var t = this;\n this._onPlayEnd = function (r) {\n r >= e && (t.pause(), t.seekTo(e));\n }, this.on(\"audioprocess\", this._onPlayEnd);\n }\n }, {\n key: \"clearPlayEnd\",\n value: function value() {\n this._onPlayEnd && (this.un(\"audioprocess\", this._onPlayEnd), this._onPlayEnd = null);\n }\n }, {\n key: \"getPeaks\",\n value: function value(e, r, n) {\n return this.buffer ? l(c(t.prototype), \"getPeaks\", this).call(this, e, r, n) : this.peaks || [];\n }\n }, {\n key: \"setSinkId\",\n value: function value(e) {\n return e ? this.media.setSinkId ? this.media.setSinkId(e) : Promise.reject(new Error(\"setSinkId is not supported in your browser\")) : Promise.reject(new Error(\"Invalid deviceId: \" + e));\n }\n }, {\n key: \"getVolume\",\n value: function value() {\n return this.volume;\n }\n }, {\n key: \"setVolume\",\n value: function value(e) {\n this.volume = e, this.media.volume !== this.volume && (this.media.volume = this.volume);\n }\n }, {\n key: \"destroy\",\n value: function value() {\n this.pause(), this.unAll(), this.params.removeMediaElementOnDestroy && this.media && this.media.parentNode && this.media.parentNode.removeChild(this.media), this.media = null;\n }\n }]) && o(r.prototype, n), s && o(r, s), t;\n }();\n\n t.default = f, e.exports = t.default;\n }, function (e, t, r) {\n \"use strict\";\n\n function n(e, t) {\n for (var r = 0; r < t.length; r++) {\n var n = t[r];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n }\n }\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n\n var i = function () {\n function e() {\n !function (e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, e), this.clearPeakCache();\n }\n\n var t, r, i;\n return t = e, (r = [{\n key: \"clearPeakCache\",\n value: function value() {\n this.peakCacheRanges = [], this.peakCacheLength = -1;\n }\n }, {\n key: \"addRangeToPeakCache\",\n value: function value(e, t, r) {\n e != this.peakCacheLength && (this.clearPeakCache(), this.peakCacheLength = e);\n\n for (var n = [], i = 0; i < this.peakCacheRanges.length && this.peakCacheRanges[i] < t;) {\n i++;\n }\n\n for (i % 2 == 0 && n.push(t); i < this.peakCacheRanges.length && this.peakCacheRanges[i] <= r;) {\n n.push(this.peakCacheRanges[i]), i++;\n }\n\n i % 2 == 0 && n.push(r), n = n.filter(function (e, t, r) {\n return 0 == t ? e != r[t + 1] : t == r.length - 1 ? e != r[t - 1] : e != r[t - 1] && e != r[t + 1];\n }), this.peakCacheRanges = this.peakCacheRanges.concat(n), this.peakCacheRanges = this.peakCacheRanges.sort(function (e, t) {\n return e - t;\n }).filter(function (e, t, r) {\n return 0 == t ? e != r[t + 1] : t == r.length - 1 ? e != r[t - 1] : e != r[t - 1] && e != r[t + 1];\n });\n var a = [];\n\n for (i = 0; i < n.length; i += 2) {\n a.push([n[i], n[i + 1]]);\n }\n\n return a;\n }\n }, {\n key: \"getCacheRanges\",\n value: function value() {\n var e,\n t = [];\n\n for (e = 0; e < this.peakCacheRanges.length; e += 2) {\n t.push([this.peakCacheRanges[e], this.peakCacheRanges[e + 1]]);\n }\n\n return t;\n }\n }]) && n(t.prototype, r), i && n(t, i), e;\n }();\n\n t.default = i, e.exports = t.default;\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;","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","// 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","\"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}","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","/** 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 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","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});\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 <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 </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});\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 <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 </div>\n </div>\n </div>\n );\n }\n\n}\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\nexport default class ExtendedVideoPlayer 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 time: PropTypes.number,\n controls: PropTypes.bool.isRequired,\n muted: PropTypes.bool.isRequired,\n onClick: PropTypes.func,\n };\n\n handleLoadedData = () => {\n if (this.props.time) {\n this.video.currentTime = this.props.time;\n }\n }\n\n componentDidMount () {\n this.video.addEventListener('loadeddata', this.handleLoadedData);\n }\n\n componentWillUnmount () {\n this.video.removeEventListener('loadeddata', this.handleLoadedData);\n }\n\n setRef = (c) => {\n this.video = c;\n }\n\n handleClick = e => {\n e.stopPropagation();\n const handler = this.props.onClick;\n if (handler) handler();\n }\n\n render () {\n const { src, muted, controls, alt } = this.props;\n\n return (\n <div className='extended-video-player'>\n <video\n ref={this.setRef}\n src={src}\n autoPlay\n role='button'\n tabIndex='0'\n aria-label={alt}\n title={alt}\n muted={muted}\n controls={controls}\n loop={!controls}\n onClick={this.handleClick}\n />\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 'mastodon/features/video';\nimport ExtendedVideoPlayer from 'mastodon/components/extended_video_player';\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';\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 <ExtendedVideoPlayer\n src={image.get('url')}\n muted\n controls={false}\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}><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","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}","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};","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;","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */\nmodule.exports = function isBuffer(obj) {\n return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);\n};","'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);\n config.method = config.method ? config.method.toLowerCase() : 'get'; // Hook up interceptors middleware\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\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\n\nvar combineURLs = require('./../helpers/combineURLs');\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); // Support baseURL config\n\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n } // Ensure headers exist\n\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 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\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 (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\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/**\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\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\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);","// 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 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 punch = punch | 1;\n\n if (blurhash.length < 6) {\n console.error('too short blurhash');\n return null;\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 var quantisedMaximumValue = base83_1.decode83(blurhash[1]);\n var maximumValue = (quantisedMaximumValue + 1) / 166;\n\n if (blurhash.length !== 4 + 2 * numX * numY) {\n console.error('blurhash length mismatch', blurhash.length, 4 + 2 * numX * numY);\n return null;\n }\n\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 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(\"BlurHash must have between 1 and 9 components\");\n }\n\n if (width * height * 4 !== pixels.length) {\n throw new Error(\"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.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 _this.viewLength = _this.rootNode.getBoundingClientRect()[axisProperties.length[axis]];\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 rootStyle = window.getComputedStyle(_this.rootNode);\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 - parseInt(rootStyle.paddingLeft, 10) - parseInt(rootStyle.paddingRight, 10)) || 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) {\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 event.preventDefault(); // Low Pass filter.\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 _this.props.onTouchStart(event);\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 transition end events.\n\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: \"componentWillUnmount\",\n value: function componentWillUnmount() {\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;\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$props2 = this.props,\n action = _this$props2.action,\n animateHeight = _this$props2.animateHeight,\n animateTransitions = _this$props2.animateTransitions,\n axis = _this$props2.axis,\n children = _this$props2.children,\n containerStyleProp = _this$props2.containerStyle,\n disabled = _this$props2.disabled,\n disableLazyLoading = _this$props2.disableLazyLoading,\n enableMouseEvents = _this$props2.enableMouseEvents,\n hysteresis = _this$props2.hysteresis,\n ignoreNativeScroll = _this$props2.ignoreNativeScroll,\n index = _this$props2.index,\n onChangeIndex = _this$props2.onChangeIndex,\n onSwitching = _this$props2.onSwitching,\n onTransitionEnd = _this$props2.onTransitionEnd,\n resistance = _this$props2.resistance,\n slideStyleProp = _this$props2.slideStyle,\n slideClassName = _this$props2.slideClassName,\n springConfig = _this$props2.springConfig,\n style = _this$props2.style,\n threshold = _this$props2.threshold,\n other = (0, _objectWithoutProperties2.default)(_this$props2, [\"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 }; // Apply the styles for SSR considerations\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 _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;","'use strict';\n\nvar bind = require('./helpers/bind');\n\nvar isBuffer = require('is-buffer');\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 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 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 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 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});","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 flip: 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 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 animate,\n className,\n disabled,\n expanded,\n icon,\n inverted,\n flip,\n overlay,\n pressed,\n tabIndex,\n title,\n } = this.props;\n\n const classes = classNames(className, 'icon-button', {\n active,\n disabled,\n inverted,\n overlayed: overlay,\n });\n\n const flipDeg = flip ? -180 : -360;\n const rotateDeg = active ? flipDeg : 0;\n\n const motionDefaultStyle = {\n rotate: rotateDeg,\n };\n\n const springOpts = {\n stiffness: this.props.flip ? 60 : 120,\n damping: 7,\n };\n const motionStyle = {\n rotate: animate ? spring(rotateDeg, springOpts) : 0,\n };\n\n if (!animate) {\n // Perf optimization: avoid unnecessary <Motion> components unless\n // we actually need to animate.\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 return (\n <Motion defaultStyle={motionDefaultStyle} style={motionStyle}>\n {({ rotate }) =>\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} style={{ transform: `rotate(${rotate}deg)` }} fixedWidth aria-hidden='true' />\n {this.props.label}\n </button>)\n }\n </Motion>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\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 if (!nextProps.children && !!this.props.children) {\n this.activeElement.focus({ preventScroll: true });\n this.activeElement = null;\n }\n }\n\n componentDidUpdate (prevProps) {\n if (!this.props.children && !!prevProps.children) {\n this.getSiblings().forEach(sibling => sibling.removeAttribute('inert'));\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';\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 if (!nextProps.children && !!this.props.children) {\n this.activeElement.focus();\n this.activeElement = null;\n }\n }\n\n componentDidUpdate (prevProps) {\n if (!this.props.children && !!prevProps.children) {\n this.getSiblings().forEach(sibling => sibling.removeAttribute('inert'));\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\nexport default class ExtendedVideoPlayer 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 time: PropTypes.number,\n controls: PropTypes.bool.isRequired,\n muted: PropTypes.bool.isRequired,\n onClick: PropTypes.func,\n };\n\n handleLoadedData = () => {\n if (this.props.time) {\n this.video.currentTime = this.props.time;\n }\n }\n\n componentDidMount () {\n this.video.addEventListener('loadeddata', this.handleLoadedData);\n }\n\n componentWillUnmount () {\n this.video.removeEventListener('loadeddata', this.handleLoadedData);\n }\n\n setRef = (c) => {\n this.video = c;\n }\n\n handleClick = e => {\n e.stopPropagation();\n const handler = this.props.onClick;\n if (handler) handler();\n }\n\n render () {\n const { src, muted, controls, alt } = this.props;\n\n return (\n <div className='extended-video-player'>\n <video\n ref={this.setRef}\n src={src}\n autoPlay\n role='button'\n tabIndex='0'\n aria-label={alt}\n title={alt}\n muted={muted}\n controls={controls}\n loop={!controls}\n onClick={this.handleClick}\n />\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 ExtendedVideoPlayer from 'flavours/glitch/components/extended_video_player';\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';\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 <ExtendedVideoPlayer\n src={image.get('url')}\n muted\n controls={false}\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}><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 expired = poll.get('expired') || (new Date(poll.get('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 handleOptionChange = e => {\n const { target: { value } } = e;\n\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 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 && <span className={classNames('poll__input', { checkbox: poll.get('multiple'), active })} />}\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 Motion from '../features/ui/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\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 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 animate,\n className,\n disabled,\n expanded,\n icon,\n inverted,\n overlay,\n pressed,\n tabIndex,\n title,\n } = this.props;\n\n const classes = classNames(className, 'icon-button', {\n active,\n disabled,\n inverted,\n overlayed: overlay,\n });\n\n if (!animate) {\n // Perf optimization: avoid unnecessary <Motion> components unless\n // we actually need to animate.\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 return (\n <Motion defaultStyle={{ rotate: active ? -360 : 0 }} style={{ rotate: animate ? spring(active ? -360 : 0, { stiffness: 120, damping: 7 }) : 0 }}>\n {({ rotate }) => (\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} style={{ transform: `rotate(${rotate}deg)` }} fixedWidth aria-hidden='true' />\n </button>\n )}\n </Motion>\n );\n }\n\n}\n","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;","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;","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","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","/**\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;","import React, { PureComponent, Fragment } from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { IntlProvider, addLocaleData } from 'react-intl';\nimport { getLocale } from 'mastodon/locales';\nimport MediaGallery from 'flavours/glitch/components/media_gallery';\nimport Video from 'flavours/glitch/features/video';\nimport Card from 'flavours/glitch/features/status/components/card';\nimport Poll from 'flavours/glitch/components/poll';\nimport Hashtag from 'flavours/glitch/components/hashtag';\nimport Audio from 'flavours/glitch/features/audio';\nimport ModalRoot from 'flavours/glitch/components/modal_root';\nimport MediaModal from 'flavours/glitch/features/ui/components/media_modal';\nimport { List as ImmutableList, fromJS } from 'immutable';\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 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 this.setState({ media, time });\n }\n\n handleCloseMedia = () => {\n document.body.classList.remove('with-modals--active');\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","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;","// 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 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 $$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#subscribe(listener) 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#subscribe(listener) for more details.');\n }\n\n isSubscribed = false;\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\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 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});\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}><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 <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(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","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});\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 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) {\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\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 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 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 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 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.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 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}><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 <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(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","// 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 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","// 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","/**\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;","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":""} |