(our hidden element)\n // react-dom in dev mode will warn about this. There doesn't seem to be a way to render arbitrary\n // user Head without hitting this issue (our hidden element could be just \"new Document()\", but\n // this can only have 1 child, and we don't control what is being rendered so that's not an option)\n // instead we continue to render to
, and just silence warnings for and elements\n // https://github.com/facebook/react/blob/e2424f33b3ad727321fc12e75c5e94838e84c2b5/packages/react-dom-bindings/src/client/validateDOMNesting.js#L498-L520\n const originalConsoleError = console.error.bind(console)\n console.error = (...args) => {\n if (\n Array.isArray(args) &&\n args.length >= 2 &&\n args[0]?.includes?.(`validateDOMNesting(...): %s cannot appear as`) &&\n (args[1] === `` || args[1] === ``)\n ) {\n return undefined\n }\n return originalConsoleError(...args)\n }\n\n /* We set up observer to be able to regenerate after react-refresh\n updates our hidden element.\n */\n const observer = new MutationObserver(onHeadRendered)\n observer.observe(hiddenRoot, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true,\n })\n}\n\nexport function headHandlerForBrowser({\n pageComponent,\n staticQueryResults,\n pageComponentProps,\n}) {\n useEffect(() => {\n if (pageComponent?.Head) {\n headExportValidator(pageComponent.Head)\n\n const { render } = reactDOMUtils()\n\n const HeadElement = (\n \n )\n\n const WrapHeadElement = apiRunner(\n `wrapRootElement`,\n { element: HeadElement },\n HeadElement,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n render(\n // just a hack to call the callback after react has done first render\n // Note: In dev, we call onHeadRendered twice( in FireCallbackInEffect and after mutualution observer dectects initail render into hiddenRoot) this is for hot reloading\n // In Prod we only call onHeadRendered in FireCallbackInEffect to render to head\n \n \n {WrapHeadElement}\n \n ,\n hiddenRoot\n )\n }\n\n return () => {\n removePrevHeadElements()\n removeHtmlAndBodyAttributes(keysOfHtmlAndBodyAttributes)\n }\n })\n}\n","import React, { Suspense, createElement } from \"react\"\nimport PropTypes from \"prop-types\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport { grabMatchParams } from \"./find-path\"\nimport { headHandlerForBrowser } from \"./head/head-export-handler-for-browser\"\n\n// Renders page\nfunction PageRenderer(props) {\n const pageComponentProps = {\n ...props,\n params: {\n ...grabMatchParams(props.location.pathname),\n ...props.pageResources.json.pageContext.__params,\n },\n }\n\n const preferDefault = m => (m && m.default) || m\n\n let pageElement\n if (props.pageResources.partialHydration) {\n pageElement = props.pageResources.partialHydration\n } else {\n pageElement = createElement(preferDefault(props.pageResources.component), {\n ...pageComponentProps,\n key: props.path || props.pageResources.page.path,\n })\n }\n\n const pageComponent = props.pageResources.head\n\n headHandlerForBrowser({\n pageComponent,\n staticQueryResults: props.pageResources.staticQueryResults,\n pageComponentProps,\n })\n\n const wrappedPage = apiRunner(\n `wrapPageElement`,\n {\n element: pageElement,\n props: pageComponentProps,\n },\n pageElement,\n ({ result }) => {\n return { element: result, props: pageComponentProps }\n }\n ).pop()\n\n return wrappedPage\n}\n\nPageRenderer.propTypes = {\n location: PropTypes.object.isRequired,\n pageResources: PropTypes.object.isRequired,\n data: PropTypes.object,\n pageContext: PropTypes.object.isRequired,\n}\n\nexport default PageRenderer\n","// This is extracted to separate module because it's shared\n// between browser and SSR code\nexport const RouteAnnouncerProps = {\n id: `gatsby-announcer`,\n style: {\n position: `absolute`,\n top: 0,\n width: 1,\n height: 1,\n padding: 0,\n overflow: `hidden`,\n clip: `rect(0, 0, 0, 0)`,\n whiteSpace: `nowrap`,\n border: 0,\n },\n \"aria-live\": `assertive`,\n \"aria-atomic\": `true`,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport { maybeGetBrowserRedirect } from \"./redirect-utils.js\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport emitter from \"./emitter\"\nimport { RouteAnnouncerProps } from \"./route-announcer-props\"\nimport {\n navigate as reachNavigate,\n globalHistory,\n} from \"@gatsbyjs/reach-router\"\nimport { parsePath } from \"gatsby-link\"\n\nfunction maybeRedirect(pathname) {\n const redirect = maybeGetBrowserRedirect(pathname)\n const { hash, search } = window.location\n\n if (redirect != null) {\n window.___replace(redirect.toPath + search + hash)\n return true\n } else {\n return false\n }\n}\n\n// Catch unhandled chunk loading errors and force a restart of the app.\nlet nextRoute = ``\n\nwindow.addEventListener(`unhandledrejection`, event => {\n if (/loading chunk \\d* failed./i.test(event.reason)) {\n if (nextRoute) {\n window.location.pathname = nextRoute\n }\n }\n})\n\nconst onPreRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n nextRoute = location.pathname\n apiRunner(`onPreRouteUpdate`, { location, prevLocation })\n }\n}\n\nconst onRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onRouteUpdate`, { location, prevLocation })\n if (\n process.env.GATSBY_QUERY_ON_DEMAND &&\n process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`\n ) {\n emitter.emit(`onRouteUpdate`, { location, prevLocation })\n }\n }\n}\n\nconst navigate = (to, options = {}) => {\n // Support forward/backward navigation with numbers\n // navigate(-2) (jumps back 2 history steps)\n // navigate(2) (jumps forward 2 history steps)\n if (typeof to === `number`) {\n globalHistory.navigate(to)\n return\n }\n\n const { pathname, search, hash } = parsePath(to)\n const redirect = maybeGetBrowserRedirect(pathname)\n\n // If we're redirecting, just replace the passed in pathname\n // to the one we want to redirect to.\n if (redirect) {\n to = redirect.toPath + search + hash\n }\n\n // If we had a service worker update, no matter the path, reload window and\n // reset the pathname whitelist\n if (window.___swUpdated) {\n window.location = pathname + search + hash\n return\n }\n\n // Start a timer to wait for a second before transitioning and showing a\n // loader in case resources aren't around yet.\n const timeoutId = setTimeout(() => {\n emitter.emit(`onDelayedLoadPageResources`, { pathname })\n apiRunner(`onRouteUpdateDelayed`, {\n location: window.location,\n })\n }, 1000)\n\n loader.loadPage(pathname + search).then(pageResources => {\n // If no page resources, then refresh the page\n // Do this, rather than simply `window.location.reload()`, so that\n // pressing the back/forward buttons work - otherwise when pressing\n // back, the browser will just change the URL and expect JS to handle\n // the change, which won't always work since it might not be a Gatsby\n // page.\n if (!pageResources || pageResources.status === PageResourceStatus.Error) {\n window.history.replaceState({}, ``, location.href)\n window.location = pathname\n clearTimeout(timeoutId)\n return\n }\n\n // If the loaded page has a different compilation hash to the\n // window, then a rebuild has occurred on the server. Reload.\n if (process.env.NODE_ENV === `production` && pageResources) {\n if (\n pageResources.page.webpackCompilationHash !==\n window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n window.location = pathname + search + hash\n }\n }\n reachNavigate(to, options)\n clearTimeout(timeoutId)\n })\n}\n\nfunction shouldUpdateScroll(prevRouterProps, { location }) {\n const { pathname, hash } = location\n const results = apiRunner(`shouldUpdateScroll`, {\n prevRouterProps,\n // `pathname` for backwards compatibility\n pathname,\n routerProps: { location },\n getSavedScrollPosition: args => [\n 0,\n // FIXME this is actually a big code smell, we should fix this\n // eslint-disable-next-line @babel/no-invalid-this\n this._stateStorage.read(args, args.key),\n ],\n })\n if (results.length > 0) {\n // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration\n // @see https://github.com/gatsbyjs/gatsby/issues/12038\n return results[results.length - 1]\n }\n\n if (prevRouterProps) {\n const {\n location: { pathname: oldPathname },\n } = prevRouterProps\n if (oldPathname === pathname) {\n // Scroll to element if it exists, if it doesn't, or no hash is provided,\n // scroll to top.\n return hash ? decodeURI(hash.slice(1)) : [0, 0]\n }\n }\n return true\n}\n\nfunction init() {\n // The \"scroll-behavior\" package expects the \"action\" to be on the location\n // object so let's copy it over.\n globalHistory.listen(args => {\n args.location.action = args.action\n })\n\n window.___push = to => navigate(to, { replace: false })\n window.___replace = to => navigate(to, { replace: true })\n window.___navigate = (to, options) => navigate(to, options)\n}\n\nclass RouteAnnouncer extends React.Component {\n constructor(props) {\n super(props)\n this.announcementRef = React.createRef()\n }\n\n componentDidUpdate(prevProps, nextProps) {\n requestAnimationFrame(() => {\n let pageName = `new page at ${this.props.location.pathname}`\n if (document.title) {\n pageName = document.title\n }\n const pageHeadings = document.querySelectorAll(`#gatsby-focus-wrapper h1`)\n if (pageHeadings && pageHeadings.length) {\n pageName = pageHeadings[0].textContent\n }\n const newAnnouncement = `Navigated to ${pageName}`\n if (this.announcementRef.current) {\n const oldAnnouncement = this.announcementRef.current.innerText\n if (oldAnnouncement !== newAnnouncement) {\n this.announcementRef.current.innerText = newAnnouncement\n }\n }\n })\n }\n\n render() {\n return \n }\n}\n\nconst compareLocationProps = (prevLocation, nextLocation) => {\n if (prevLocation.href !== nextLocation.href) {\n return true\n }\n\n if (prevLocation?.state?.key !== nextLocation?.state?.key) {\n return true\n }\n\n return false\n}\n\n// Fire on(Pre)RouteUpdate APIs\nclass RouteUpdates extends React.Component {\n constructor(props) {\n super(props)\n onPreRouteUpdate(props.location, null)\n }\n\n componentDidMount() {\n onRouteUpdate(this.props.location, null)\n }\n\n shouldComponentUpdate(nextProps) {\n if (compareLocationProps(this.props.location, nextProps.location)) {\n onPreRouteUpdate(nextProps.location, this.props.location)\n return true\n }\n return false\n }\n\n componentDidUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onRouteUpdate(this.props.location, prevProps.location)\n }\n }\n\n render() {\n return (\n \n {this.props.children}\n \n \n )\n }\n}\n\nRouteUpdates.propTypes = {\n location: PropTypes.object.isRequired,\n}\n\nexport { init, shouldUpdateScroll, RouteUpdates, maybeGetBrowserRedirect }\n","// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) return true;\n }for (var _i in b) {\n if (a[_i] !== b[_i]) return true;\n }return false;\n}\n\nexport default (function (instance, nextProps, nextState) {\n return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);\n});","import React from \"react\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport shallowCompare from \"shallow-compare\"\n\nclass EnsureResources extends React.Component {\n constructor(props) {\n super()\n const { location, pageResources } = props\n this.state = {\n location: { ...location },\n pageResources:\n pageResources ||\n loader.loadPageSync(location.pathname + location.search, {\n withErrorDetails: true,\n }),\n }\n }\n\n static getDerivedStateFromProps({ location }, prevState) {\n if (prevState.location.href !== location.href) {\n const pageResources = loader.loadPageSync(\n location.pathname + location.search,\n {\n withErrorDetails: true,\n }\n )\n\n return {\n pageResources,\n location: { ...location },\n }\n }\n\n return {\n location: { ...location },\n }\n }\n\n loadResources(rawPath) {\n loader.loadPage(rawPath).then(pageResources => {\n if (pageResources && pageResources.status !== PageResourceStatus.Error) {\n this.setState({\n location: { ...window.location },\n pageResources,\n })\n } else {\n window.history.replaceState({}, ``, location.href)\n window.location = rawPath\n }\n })\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n // Always return false if we're missing resources.\n if (!nextState.pageResources) {\n this.loadResources(\n nextProps.location.pathname + nextProps.location.search\n )\n return false\n }\n\n if (\n process.env.BUILD_STAGE === `develop` &&\n nextState.pageResources.stale\n ) {\n this.loadResources(\n nextProps.location.pathname + nextProps.location.search\n )\n return false\n }\n\n // Check if the component or json have changed.\n if (this.state.pageResources !== nextState.pageResources) {\n return true\n }\n if (\n this.state.pageResources.component !== nextState.pageResources.component\n ) {\n return true\n }\n\n if (this.state.pageResources.json !== nextState.pageResources.json) {\n return true\n }\n // Check if location has changed on a page using internal routing\n // via matchPath configuration.\n if (\n this.state.location.key !== nextState.location.key &&\n nextState.pageResources.page &&\n (nextState.pageResources.page.matchPath ||\n nextState.pageResources.page.path)\n ) {\n return true\n }\n return shallowCompare(this, nextProps, nextState)\n }\n\n render() {\n if (\n process.env.NODE_ENV !== `production` &&\n (!this.state.pageResources ||\n this.state.pageResources.status === PageResourceStatus.Error)\n ) {\n const message = `EnsureResources was not able to find resources for path: \"${this.props.location.pathname}\"\nThis typically means that an issue occurred building components for that path.\nRun \\`gatsby clean\\` to remove any cached elements.`\n if (this.state.pageResources?.error) {\n console.error(message)\n throw this.state.pageResources.error\n }\n\n throw new Error(message)\n }\n\n return this.props.children(this.state)\n }\n}\n\nexport default EnsureResources\n","import { apiRunner, apiRunnerAsync } from \"./api-runner-browser\"\nimport React from \"react\"\nimport { Router, navigate, Location, BaseContext } from \"@gatsbyjs/reach-router\"\nimport { ScrollContext } from \"gatsby-react-router-scroll\"\nimport { StaticQueryContext } from \"./static-query\"\nimport {\n SlicesMapContext,\n SlicesContext,\n SlicesResultsContext,\n} from \"./slice/context\"\nimport {\n shouldUpdateScroll,\n init as navigationInit,\n RouteUpdates,\n} from \"./navigation\"\nimport emitter from \"./emitter\"\nimport PageRenderer from \"./page-renderer\"\nimport asyncRequires from \"$virtual/async-requires\"\nimport {\n setLoader,\n ProdLoader,\n publicLoader,\n PageResourceStatus,\n getStaticQueryResults,\n getSliceResults,\n} from \"./loader\"\nimport EnsureResources from \"./ensure-resources\"\nimport stripPrefix from \"./strip-prefix\"\n\n// Generated during bootstrap\nimport matchPaths from \"$virtual/match-paths.json\"\nimport { reactDOMUtils } from \"./react-dom-utils\"\n\nconst loader = new ProdLoader(asyncRequires, matchPaths, window.pageData)\nsetLoader(loader)\nloader.setApiRunner(apiRunner)\n\nconst { render, hydrate } = reactDOMUtils()\n\nwindow.asyncRequires = asyncRequires\nwindow.___emitter = emitter\nwindow.___loader = publicLoader\n\nnavigationInit()\n\nconst reloadStorageKey = `gatsby-reload-compilation-hash-match`\n\napiRunnerAsync(`onClientEntry`).then(() => {\n // Let plugins register a service worker. The plugin just needs\n // to return true.\n if (apiRunner(`registerServiceWorker`).filter(Boolean).length > 0) {\n require(`./register-service-worker`)\n }\n\n // In gatsby v2 if Router is used in page using matchPaths\n // paths need to contain full path.\n // For example:\n // - page have `/app/*` matchPath\n // - inside template user needs to use `/app/xyz` as path\n // Resetting `basepath`/`baseuri` keeps current behaviour\n // to not introduce breaking change.\n // Remove this in v3\n const RouteHandler = props => (\n \n \n \n )\n\n const DataContext = React.createContext({})\n\n const slicesContext = {\n renderEnvironment: `browser`,\n }\n\n class GatsbyRoot extends React.Component {\n render() {\n const { children } = this.props\n return (\n \n {({ location }) => (\n \n {({ pageResources, location }) => {\n const staticQueryResults = getStaticQueryResults()\n const sliceResults = getSliceResults()\n\n return (\n \n \n \n \n \n {children}\n \n \n \n \n \n )\n }}\n \n )}\n \n )\n }\n }\n\n class LocationHandler extends React.Component {\n render() {\n return (\n \n {({ pageResources, location }) => (\n \n \n \n \n \n \n \n )}\n \n )\n }\n }\n\n const { pagePath, location: browserLoc } = window\n\n // Explicitly call navigate if the canonical path (window.pagePath)\n // is different to the browser path (window.location.pathname). SSR\n // page paths might include search params, while SSG and DSG won't.\n // If page path include search params we also compare query params.\n // But only if NONE of the following conditions hold:\n //\n // - The url matches a client side route (page.matchPath)\n // - it's a 404 page\n // - it's the offline plugin shell (/offline-plugin-app-shell-fallback/)\n if (\n pagePath &&\n __BASE_PATH__ + pagePath !==\n browserLoc.pathname + (pagePath.includes(`?`) ? browserLoc.search : ``) &&\n !(\n loader.findMatchPath(stripPrefix(browserLoc.pathname, __BASE_PATH__)) ||\n pagePath.match(/^\\/(404|500)(\\/?|.html)$/) ||\n pagePath.match(/^\\/offline-plugin-app-shell-fallback\\/?$/)\n )\n ) {\n navigate(\n __BASE_PATH__ +\n pagePath +\n (!pagePath.includes(`?`) ? browserLoc.search : ``) +\n browserLoc.hash,\n {\n replace: true,\n }\n )\n }\n\n // It's possible that sessionStorage can throw an exception if access is not granted, see https://github.com/gatsbyjs/gatsby/issues/34512\n const getSessionStorage = () => {\n try {\n return sessionStorage\n } catch {\n return null\n }\n }\n\n publicLoader.loadPage(browserLoc.pathname + browserLoc.search).then(page => {\n const sessionStorage = getSessionStorage()\n\n if (\n page?.page?.webpackCompilationHash &&\n page.page.webpackCompilationHash !== window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n // We have not matching html + js (inlined `window.___webpackCompilationHash`)\n // with our data (coming from `app-data.json` file). This can cause issues such as\n // errors trying to load static queries (as list of static queries is inside `page-data`\n // which might not match to currently loaded `.js` scripts).\n // We are making attempt to reload if hashes don't match, but we also have to handle case\n // when reload doesn't fix it (possibly broken deploy) so we don't end up in infinite reload loop\n if (sessionStorage) {\n const isReloaded = sessionStorage.getItem(reloadStorageKey) === `1`\n\n if (!isReloaded) {\n sessionStorage.setItem(reloadStorageKey, `1`)\n window.location.reload(true)\n return\n }\n }\n }\n\n if (sessionStorage) {\n sessionStorage.removeItem(reloadStorageKey)\n }\n\n if (!page || page.status === PageResourceStatus.Error) {\n const message = `page resources for ${browserLoc.pathname} not found. Not rendering React`\n\n // if the chunk throws an error we want to capture the real error\n // This should help with https://github.com/gatsbyjs/gatsby/issues/19618\n if (page && page.error) {\n console.error(message)\n throw page.error\n }\n\n throw new Error(message)\n }\n\n const SiteRoot = apiRunner(\n `wrapRootElement`,\n { element: },\n ,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n const App = function App() {\n const onClientEntryRanRef = React.useRef(false)\n\n React.useEffect(() => {\n if (!onClientEntryRanRef.current) {\n onClientEntryRanRef.current = true\n if (performance.mark) {\n performance.mark(`onInitialClientRender`)\n }\n\n apiRunner(`onInitialClientRender`)\n }\n }, [])\n\n return {SiteRoot}\n }\n\n const focusEl = document.getElementById(`gatsby-focus-wrapper`)\n\n // Client only pages have any empty body so we just do a normal\n // render to avoid React complaining about hydration mis-matches.\n let defaultRenderer = render\n if (focusEl && focusEl.children.length) {\n defaultRenderer = hydrate\n }\n\n const renderer = apiRunner(\n `replaceHydrateFunction`,\n undefined,\n defaultRenderer\n )[0]\n\n function runRender() {\n const rootElement =\n typeof window !== `undefined`\n ? document.getElementById(`___gatsby`)\n : null\n\n renderer(, rootElement)\n }\n\n // https://github.com/madrobby/zepto/blob/b5ed8d607f67724788ec9ff492be297f64d47dfc/src/zepto.js#L439-L450\n // TODO remove IE 10 support\n const doc = document\n if (\n doc.readyState === `complete` ||\n (doc.readyState !== `loading` && !doc.documentElement.doScroll)\n ) {\n setTimeout(function () {\n runRender()\n }, 0)\n } else {\n const handler = function () {\n doc.removeEventListener(`DOMContentLoaded`, handler, false)\n window.removeEventListener(`load`, handler, false)\n\n runRender()\n }\n\n doc.addEventListener(`DOMContentLoaded`, handler, false)\n window.addEventListener(`load`, handler, false)\n }\n\n return\n })\n})\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport loader from \"./loader\"\nimport InternalPageRenderer from \"./page-renderer\"\n\nconst ProdPageRenderer = ({ location }) => {\n const pageResources = loader.loadPageSync(location.pathname)\n if (!pageResources) {\n return null\n }\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n","const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","const map = new WeakMap()\n\nexport function reactDOMUtils() {\n const reactDomClient = require(`react-dom/client`)\n\n const render = (Component, el) => {\n let root = map.get(el)\n if (!root) {\n map.set(el, (root = reactDomClient.createRoot(el)))\n }\n root.render(Component)\n }\n\n const hydrate = (Component, el) => reactDomClient.hydrateRoot(el, Component)\n\n return { render, hydrate }\n}\n","import redirects from \"./redirects.json\"\n\n// Convert to a map for faster lookup in maybeRedirect()\n\nconst redirectMap = new Map()\nconst redirectIgnoreCaseMap = new Map()\n\nredirects.forEach(redirect => {\n if (redirect.ignoreCase) {\n redirectIgnoreCaseMap.set(redirect.fromPath, redirect)\n } else {\n redirectMap.set(redirect.fromPath, redirect)\n }\n})\n\nexport function maybeGetBrowserRedirect(pathname) {\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n return redirect\n}\n","import { apiRunner } from \"./api-runner-browser\"\n\nif (\n window.location.protocol !== `https:` &&\n window.location.hostname !== `localhost`\n) {\n console.error(\n `Service workers can only be used over HTTPS, or on localhost for development`\n )\n} else if (`serviceWorker` in navigator) {\n navigator.serviceWorker\n .register(`${__BASE_PATH__}/sw.js`)\n .then(function (reg) {\n reg.addEventListener(`updatefound`, () => {\n apiRunner(`onServiceWorkerUpdateFound`, { serviceWorker: reg })\n // The updatefound event implies that reg.installing is set; see\n // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event\n const installingWorker = reg.installing\n console.log(`installingWorker`, installingWorker)\n installingWorker.addEventListener(`statechange`, () => {\n switch (installingWorker.state) {\n case `installed`:\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and the fresh content will\n // have been added to the cache.\n\n // We set a flag so Gatsby Link knows to refresh the page on next navigation attempt\n window.___swUpdated = true\n // We call the onServiceWorkerUpdateReady API so users can show update prompts.\n apiRunner(`onServiceWorkerUpdateReady`, { serviceWorker: reg })\n\n // If resources failed for the current page, reload.\n if (window.___failedResources) {\n console.log(`resources failed, SW updated - reloading`)\n window.location.reload()\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a \"Content is cached for offline use.\" message.\n console.log(`Content is now available offline!`)\n\n // Post to service worker that install is complete.\n // Delay to allow time for the event listener to be added --\n // otherwise fetch is called too soon and resources aren't cached.\n apiRunner(`onServiceWorkerInstalled`, { serviceWorker: reg })\n }\n break\n\n case `redundant`:\n console.error(`The installing service worker became redundant.`)\n apiRunner(`onServiceWorkerRedundant`, { serviceWorker: reg })\n break\n\n case `activated`:\n apiRunner(`onServiceWorkerActive`, { serviceWorker: reg })\n break\n }\n })\n })\n })\n .catch(function (e) {\n console.error(`Error during service worker registration:`, e)\n })\n}\n","import React from \"react\"\n\nconst SlicesResultsContext = React.createContext({})\nconst SlicesContext = React.createContext({})\nconst SlicesMapContext = React.createContext({})\nconst SlicesPropsContext = React.createContext({})\n\nexport {\n SlicesResultsContext,\n SlicesContext,\n SlicesMapContext,\n SlicesPropsContext,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { createServerOrClientContext } from \"./context-utils\"\n\nconst StaticQueryContext = createServerOrClientContext(`StaticQuery`, {})\n\nfunction StaticQueryDataRenderer({ staticQueryData, data, query, render }) {\n const finalData = data\n ? data.data\n : staticQueryData[query] && staticQueryData[query].data\n\n return (\n \n {finalData && render(finalData)}\n {!finalData &&
Loading (StaticQuery)
}\n \n )\n}\n\nlet warnedAboutStaticQuery = false\n\n// TODO(v6): Remove completely\nconst StaticQuery = props => {\n const { data, query, render, children } = props\n\n if (process.env.NODE_ENV === `development` && !warnedAboutStaticQuery) {\n console.warn(\n `The component is deprecated and will be removed in Gatsby v6. Use useStaticQuery instead. Refer to the migration guide for more information: https://gatsby.dev/migrating-4-to-5/#staticquery--is-deprecated`\n )\n warnedAboutStaticQuery = true\n }\n\n return (\n \n {staticQueryData => (\n \n )}\n \n )\n}\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n // TODO(v5): Remove since we require React >= 18\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n\n const context = React.useContext(StaticQueryContext)\n\n // query is a stringified number like `3303882` when wrapped with graphql, If a user forgets\n // to wrap the query in a grqphql, then casting it to a Number results in `NaN` allowing us to\n // catch the misuse of the API and give proper direction\n if (isNaN(Number(query))) {\n throw new Error(`useStaticQuery was called with a string but expects to be called using \\`graphql\\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\\`${query}\\`);\n`)\n }\n\n if (context[query]?.data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\n}\n\nexport { StaticQuery, StaticQueryContext, useStaticQuery }\n","import React from \"react\"\n\n// Ensure serverContext is not created more than once as React will throw when creating it more than once\n// https://github.com/facebook/react/blob/dd2d6522754f52c70d02c51db25eb7cbd5d1c8eb/packages/react/src/ReactServerContext.js#L101\nconst createServerContext = (name, defaultValue = null) => {\n /* eslint-disable no-undef */\n if (!globalThis.__SERVER_CONTEXT) {\n globalThis.__SERVER_CONTEXT = {}\n }\n\n if (!globalThis.__SERVER_CONTEXT[name]) {\n globalThis.__SERVER_CONTEXT[name] = React.createServerContext(\n name,\n defaultValue\n )\n }\n\n return globalThis.__SERVER_CONTEXT[name]\n}\n\nfunction createServerOrClientContext(name, defaultValue) {\n if (React.createServerContext) {\n return createServerContext(name, defaultValue)\n }\n\n return React.createContext(defaultValue)\n}\n\nexport { createServerOrClientContext }\n","/**\n * Remove a prefix from a string. Return the input string if the given prefix\n * isn't found.\n */\n\nexport default function stripPrefix(str, prefix = ``) {\n if (!prefix) {\n return str\n }\n\n if (str === prefix) {\n return `/`\n }\n\n if (str.startsWith(`${prefix}/`)) {\n return str.slice(prefix.length)\n }\n\n return str\n}\n","import * as css from \"@css/components/LanguageButton.module.styl\";\nimport { langState } from \"@status\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useRecoilState } from \"recoil\";\n\nimport LangEnSVG from \"@images/GlobalHeader__btn__lange-en.svg\";\nimport LangJpSVG from \"@images/GlobalHeader__btn__lange-jp.svg\";\n\nconst LanguageButton = () => {\n\tconst [currentLang, setCurrentLang] = useRecoilState(langState);\n\tconst { i18n } = useTranslation();\n\n\tconst onClickHandler = () => {\n\t\tsetCurrentLang(currentLang === \"ja\" ? \"en\" : \"ja\");\n\t};\n\n\tReact.useEffect(() => {\n\t\ti18n.changeLanguage(currentLang);\n\t}, [currentLang]);\n\n\treturn (\n\t\t
\n\t\t\t{currentLang === \"ja\" ? : }\n\t\t
\n\t);\n};\n\nexport default LanguageButton;\n","// extracted by mini-css-extract-plugin\nexport var container = \"LanguageButton-module--container--a5bd2\";","import Link from \"@components/Link\";\nimport {} from \"@hooks/useMediaQuery\";\nimport { useMenuLink } from \"@hooks/useURL\";\nimport {} from \"gatsby\";\n\nimport * as css from \"@css/components/blocks/global/HeaderSp.module.styl\";\nimport LogoSvg from \"@images/Global__logo__miraicomachi.svg\";\n\nexport default function GlobalHeaderSp() {\n\tconst menuLinks = useMenuLink();\n\n\treturn (\n\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t
{/* */}
\n\t\t\t
\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport var container = \"HeaderSp-module--container--3edfc\";\nexport var inner = \"HeaderSp-module--inner--1b8fc\";\nexport var lange = \"HeaderSp-module--lange--f67ca\";\nexport var logo = \"HeaderSp-module--logo--cc30a\";","import React from 'react'\n\n\n// Hook\nconst useEventLock = (contentId = \"root-container\") =>\n{\n if (typeof window === 'undefined') {\n return null\n }\n const content = document.getElementById(contentId)\n return {\n on: ()=>{\n if( content ){\n content.style.pointerEvents = 'none'\n }\n },\n off: ()=>{\n if( content ){\n content.style.pointerEvents = 'auto'\n }\n }\n }\n}\n\nexport { useEventLock }","// extracted by mini-css-extract-plugin\nexport var child = \"ModalMenu-module--child--e2b1e\";\nexport var container = \"ModalMenu-module--container--1f2ab\";\nexport var cover = \"ModalMenu-module--cover--3bdb3\";\nexport var inner = \"ModalMenu-module--inner--10306\";\nexport var item = \"ModalMenu-module--item--ebb7c\";\nexport var item2 = \"ModalMenu-module--item2--6d456\";\nexport var label = \"ModalMenu-module--label--19b2c\";\nexport var lange = \"ModalMenu-module--lange--d5e10\";\nexport var logo = \"ModalMenu-module--logo--9124b\";\nexport var menu = \"ModalMenu-module--menu--dc2c6\";\nexport var menuButton = \"ModalMenu-module--menuButton--e4659\";\nexport var sns = \"ModalMenu-module--sns--ccea2\";","import Link from \"@components/Link\";\n// import { useGsapPlugins } from '@hooks/useGsapPlugins'\nimport { useEventLock } from \"@hooks/useEventLock\";\nimport { useMenuLink, useURL } from \"@hooks/useURL\";\n// import Image from \"gatsby-image\"\nimport browser from \"browser-detect\";\nimport { graphql, useStaticQuery } from \"gatsby\";\nimport { Elastic, Power4, gsap } from \"gsap\";\nimport React from \"react\";\n\nimport * as css from \"@css/components/blocks/global/ModalMenu.module.styl\";\n\nimport CloseButtonSVG from \"@images/GlobalModalMenu__btn__menu-close.svg\";\nimport MenuButtonSVG from \"@images/GlobalModalMenu__btn__menu.svg\";\nimport TwitterButtonSVG from \"@images/GlobalModalMenu__btn__x.svg\";\nimport YoutubeButtonSVG from \"@images/GlobalModalMenu__btn__youtube.svg\";\n// import LangJpSVG from \"@images/GlobalModalMenu__btn__lange-jp.svg\"\nimport LogoSvg from \"@images/Global__logo__miraicomachi.svg\";\nimport { ModalMenuState, isWebGlState, transitionCurrentState } from \"@status\";\nimport { useRecoilState, useRecoilValue } from \"recoil\";\n\nexport default function GlobalModalMenu() {\n\tconst q = useStaticQuery(graphql`\n query {\n bg : file(relativePath: { eq: \"GlobalHeader__img__bg.svg\" }) {\n publicURL\n }\n }\n `);\n\n\tconst eventLock = useEventLock();\n\tconst [buttonMode, setButtonMode] = React.useState(\"open\");\n\tconst _isWebGlState = useRecoilValue(isWebGlState);\n\tconst _transitionCurrentState = useRecoilValue(transitionCurrentState);\n\tconst [_modalMenuState, setModalMenuState] = useRecoilState(ModalMenuState);\n\n\tconst browsed = React.useRef(browser());\n\tlet isWebGl = true;\n\tif (browsed.current.name === \"ie\" || !_isWebGlState) {\n\t\tisWebGl = false;\n\t}\n\t// const { isOpenModalMenu, isNowModalAnimation } = _modalMenuState;\n\n\tconst menuRef = React.useRef();\n\tconst menuListRef = React.useRef();\n\tconst menuButtonRef = React.useRef();\n\tconst logoRef = React.useRef();\n\tconst snsRef = React.useRef();\n\tconst langRef = React.useRef();\n\n\tconst urls = useURL();\n\tconst menuLinks = useMenuLink();\n\n\t// const animationTimeline = React.useMemo( () => {\n\t// return new TimelineMax({paused:true})\n\t// .to(menuButtonRef.current, 0.3, {\n\t// opacity: 1,\n\t// ease: customEase01,\n\t// })\n\t// .add('a')\n\t// .to(menuButtonRef.current, 0.3, {\n\t// opacity: 0,\n\t// ease: customEase01,\n\t// })\n\t// .add('b')\n\t// })\n\n\tconst onClickHandler = () => {\n\t\tif (\n\t\t\t_transitionCurrentState !== \"none\" ||\n\t\t\t_modalMenuState.isNowModalAnimation === true\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (_modalMenuState.isOpenModalMenu) {\n\t\t\tsetModalMenuState({\n\t\t\t\t..._modalMenuState,\n\t\t\t\tisNowModalAnimation: true,\n\t\t\t\tisOpenModalMenu: false,\n\t\t\t});\n\t\t\tif (window.locomotiveScroll) {\n\t\t\t\twindow.locomotiveScroll.myShow();\n\t\t\t}\n\t\t} else {\n\t\t\tsetModalMenuState({\n\t\t\t\t..._modalMenuState,\n\t\t\t\tisNowModalAnimation: true,\n\t\t\t\tisOpenModalMenu: true,\n\t\t\t});\n\t\t\tif (window.locomotiveScroll) {\n\t\t\t\twindow.locomotiveScroll.myHide();\n\t\t\t}\n\t\t}\n\t};\n\n\tconst ani01 = (target, spd, delay, callback) => {\n\t\tgsap.fromTo(\n\t\t\ttarget,\n\t\t\t{\n\t\t\t\tduration: spd,\n\t\t\t\topacity: 0,\n\t\t\t\tx: `100%`,\n\t\t\t\tskewX: -45,\n\t\t\t},\n\t\t\t{\n\t\t\t\tease: Power4.easeOut,\n\t\t\t\tdelay: delay,\n\t\t\t\topacity: 1,\n\t\t\t\tx: `0%`,\n\t\t\t\tskewX: 0,\n\t\t\t\tonComplete: () => {\n\t\t\t\t\tcallback && callback();\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t};\n\tconst ani02 = (target, spd, delay, callback) => {\n\t\tgsap.fromTo(\n\t\t\ttarget,\n\t\t\t{\n\t\t\t\tduration: spd,\n\t\t\t\topacity: 1,\n\t\t\t\tx: `0%`,\n\t\t\t\tskewX: 0,\n\t\t\t},\n\t\t\t{\n\t\t\t\tduration: spd,\n\t\t\t\tease: Power4.easeIn,\n\t\t\t\tdelay: delay,\n\t\t\t\topacity: 0,\n\t\t\t\tx: `-100%`,\n\t\t\t\tskewX: -45,\n\t\t\t\tonComplete: () => {\n\t\t\t\t\tcallback && callback();\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t};\n\n\tconst background = isWebGl\n\t\t? {}\n\t\t: {\n\t\t\t\tbackground: \"#FF7400\",\n\t\t\t};\n\tReact.useEffect(() => {\n\t\tconst spd = 0.6;\n\t\tconst ease2 = Elastic.easeOut.config(1, 2.0);\n\t\tconst ease1 = Power4.easeInOut;\n\t\tif (_modalMenuState.isOpenModalMenu) {\n\t\t\t// eventLock.off()\n\t\t\t//open\n\t\t\t//button\n\t\t\tgsap.to(menuButtonRef.current, {\n\t\t\t\tduration: spd / 2,\n\t\t\t\tease: ease2,\n\t\t\t\topacity: 0,\n\t\t\t\tscale: 0.5,\n\t\t\t\tonComplete: () => {\n\t\t\t\t\tsetButtonMode(\"close\");\n\t\t\t\t\tgsap.to(menuButtonRef.current, {\n\t\t\t\t\t\tduration: spd / 2,\n\t\t\t\t\t\tease: ease1,\n\t\t\t\t\t\tdelay: spd + 0.9,\n\t\t\t\t\t\topacity: 1.0,\n\t\t\t\t\t\tscale: 1.0,\n\t\t\t\t\t\tonComplete: () => {},\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t});\n\t\t\t//container\n\t\t\tgsap.fromTo(\n\t\t\t\tmenuRef.current,\n\t\t\t\t{\n\t\t\t\t\tduration: spd,\n\t\t\t\t\tdisplay: \"none\",\n\t\t\t\t\tx: `150%`,\n\t\t\t\t\tskewX: -15,\n\t\t\t\t\t...background,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tduration: spd,\n\t\t\t\t\tease: Power4.easeOut,\n\t\t\t\t\tx: `0%`,\n\t\t\t\t\tdisplay: \"block\",\n\t\t\t\t\tskewX: 0,\n\t\t\t\t},\n\t\t\t);\n\n\t\t\t//list\n\t\t\tlet ci = 0;\n\t\t\tfor (const item of menuListRef.current.children) {\n\t\t\t\tconst $child = item.querySelector(`.${css.child}`);\n\t\t\t\tif (!$child) {\n\t\t\t\t\tgsap.fromTo(\n\t\t\t\t\t\titem,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\tx: `100%`,\n\t\t\t\t\t\t\tskewX: -45,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\t\tease: Power4.easeOut,\n\t\t\t\t\t\t\tdelay: spd + ci * 0.1,\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\tx: `0%`,\n\t\t\t\t\t\t\tdisplay: \"block\",\n\t\t\t\t\t\t\tskewX: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\tconst cover = item.children[0];\n\t\t\t\t\tgsap.fromTo(\n\t\t\t\t\t\tcover,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\t\tscaleX: 1.0,\n\t\t\t\t\t\t\ttransformOrigin: \"left\",\n\t\t\t\t\t\t\tdisplay: \"block\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\t\tease: Power4.easeOut,\n\t\t\t\t\t\t\tdelay: spd + ci * 0.15,\n\t\t\t\t\t\t\tscaleX: 0,\n\t\t\t\t\t\t\tdisplay: \"none\",\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tlet cy = 1;\n\t\t\t\t\tconst label = item.children[0];\n\t\t\t\t\tgsap.fromTo(\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\tx: `100%`,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\t\tease: Power4.easeOut,\n\t\t\t\t\t\t\tdelay: spd + ci * 0.15,\n\t\t\t\t\t\t\topacity: 0.5,\n\t\t\t\t\t\t\tx: `0%`,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\tfor (const item of $child.children) {\n\t\t\t\t\t\tgsap.fromTo(\n\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\tx: `100%`,\n\t\t\t\t\t\t\t\tskewX: -45,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\t\t\tease: Power4.easeOut,\n\t\t\t\t\t\t\t\tdelay: spd + ci * 0.1 + cy * 0.1,\n\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\tx: `0%`,\n\t\t\t\t\t\t\t\tdisplay: \"block\",\n\t\t\t\t\t\t\t\tskewX: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst cover = item.children[0];\n\t\t\t\t\t\tgsap.fromTo(\n\t\t\t\t\t\t\tcover,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\t\t\tscaleX: 1.0,\n\t\t\t\t\t\t\t\ttransformOrigin: \"left\",\n\t\t\t\t\t\t\t\tdisplay: \"block\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\t\t\tease: Power4.easeOut,\n\t\t\t\t\t\t\t\tdelay: spd + ci * 0.15 + cy * 0.1,\n\t\t\t\t\t\t\t\tscaleX: 0,\n\t\t\t\t\t\t\t\tdisplay: \"none\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t);\n\t\t\t\t\t\tcy++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tci++;\n\t\t\t}\n\t\t\tconst d = spd + 0.15 * ci;\n\t\t\tani01(langRef.current, spd, d + 0.1);\n\t\t\tani01(logoRef.current, spd, d + 0.2);\n\t\t\tani01(snsRef.current.children[0], spd, d + 0.3);\n\t\t\tani01(snsRef.current.children[1], spd, d + 0.4, () => {\n\t\t\t\tsetModalMenuState({\n\t\t\t\t\t..._modalMenuState,\n\t\t\t\t\tisNowModalAnimation: false,\n\t\t\t\t});\n\t\t\t});\n\t\t} else {\n\t\t\t//close\n\t\t\t//button\n\t\t\t// eventLock.on()\n\t\t\tgsap.to(menuButtonRef.current, {\n\t\t\t\tduration: spd / 2,\n\t\t\t\tease: ease2,\n\t\t\t\topacity: 0,\n\t\t\t\tscale: 0.5,\n\t\t\t\tonComplete: () => {\n\t\t\t\t\tsetButtonMode(\"open\");\n\t\t\t\t\tgsap.to(menuButtonRef.current, spd / 2, {\n\t\t\t\t\t\tdelay: spd + 0.9,\n\t\t\t\t\t\tease: ease1,\n\t\t\t\t\t\topacity: 1.0,\n\t\t\t\t\t\tscale: 1.0,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t});\n\t\t\t//container\n\t\t\tgsap.to(menuRef.current, {\n\t\t\t\tduration: spd,\n\t\t\t\tease: Power4.easeIn,\n\t\t\t\tdelay: spd + 0.3,\n\t\t\t\tx: `-150%`,\n\t\t\t\tskewX: -15,\n\t\t\t\tdisplay: \"none\",\n\t\t\t\tonComplete: () => {\n\t\t\t\t\tsetModalMenuState({\n\t\t\t\t\t\t..._modalMenuState,\n\t\t\t\t\t\tisNowModalAnimation: false,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t});\n\t\t\t//list\n\t\t\tlet ci = 0;\n\t\t\tfor (const item of menuListRef.current.children) {\n\t\t\t\tconst $child = item.querySelector(`.${css.child}`);\n\t\t\t\tif (!$child) {\n\t\t\t\t\tgsap.fromTo(\n\t\t\t\t\t\titem,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\tx: `0%`,\n\t\t\t\t\t\t\tskewX: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\t\tease: Power4.easeIn,\n\t\t\t\t\t\t\tdelay: ci * 0.1,\n\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\tx: `-100%`,\n\t\t\t\t\t\t\tdisplay: \"block\",\n\t\t\t\t\t\t\tskewX: -45,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\n\t\t\t\t\tconst cover = item.children[0];\n\t\t\t\t\tgsap.fromTo(\n\t\t\t\t\t\tcover,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduration: spd / 2,\n\t\t\t\t\t\t\tscaleX: 0.0,\n\t\t\t\t\t\t\ttransformOrigin: \"right\",\n\t\t\t\t\t\t\tdisplay: \"block\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduration: spd / 2,\n\t\t\t\t\t\t\tease: Power4.easeIn,\n\t\t\t\t\t\t\tdelay: ci * 0.15,\n\t\t\t\t\t\t\tscaleX: 1.0,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tlet cy = 1;\n\t\t\t\t\tconst label = item.children[0];\n\t\t\t\t\tgsap.to(label, {\n\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\tease: Power4.easeIn,\n\t\t\t\t\t\tdelay: ci * 0.15,\n\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\tx: `-100%`,\n\t\t\t\t\t});\n\t\t\t\t\tfor (const item of $child.children) {\n\t\t\t\t\t\tgsap.fromTo(\n\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\tx: `0%`,\n\t\t\t\t\t\t\t\tskewX: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tduration: spd,\n\t\t\t\t\t\t\t\tease: Power4.easeIn,\n\t\t\t\t\t\t\t\tdelay: ci * 0.1 + cy * 0.1,\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\tx: `-100%`,\n\t\t\t\t\t\t\t\tdisplay: \"block\",\n\t\t\t\t\t\t\t\tskewX: -45,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst cover = item.children[0];\n\t\t\t\t\t\tgsap.fromTo(\n\t\t\t\t\t\t\tcover,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tduration: spd / 2,\n\t\t\t\t\t\t\t\tscaleX: 0.0,\n\t\t\t\t\t\t\t\ttransformOrigin: \"right\",\n\t\t\t\t\t\t\t\tdisplay: \"block\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tduration: spd / 2,\n\t\t\t\t\t\t\t\tease: Power4.easeIn,\n\t\t\t\t\t\t\t\tdelay: ci * 0.15 + cy * 0.1,\n\t\t\t\t\t\t\t\tscaleX: 1.0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t);\n\t\t\t\t\t\tcy++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tci++;\n\t\t\t}\n\t\t\tconst d = 0.15;\n\t\t\tani02(langRef.current, spd, d + 0.4, () => {\n\t\t\t\tsetModalMenuState({\n\t\t\t\t\t..._modalMenuState,\n\t\t\t\t\tisNowModalAnimation: false,\n\t\t\t\t});\n\t\t\t});\n\t\t\tani02(logoRef.current, spd, d + 0.3);\n\t\t\tani02(snsRef.current.children[0], spd, d + 0.2);\n\t\t\tani02(snsRef.current.children[1], spd, d + 0.1);\n\t\t}\n\t}, [_modalMenuState.isOpenModalMenu]);\n\n\treturn (\n\t\t\n\t\t\t
\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport var block = \"Loading-module--block--dbd07\";\nexport var container = \"Loading-module--container--ccc7f\";\nexport var content = \"Loading-module--content--f8beb\";\nexport var logo = \"Loading-module--logo--7a885\";","import Cookies from 'js-cookie';\nexport { default as Cookies } from 'js-cookie';\nimport React, { Component } from 'react';\n\n/**\r\n * A function to wrap elements with a \"wrapper\" on a condition\r\n * @param {object} wrappingOptions\r\n * condition == boolean condition, when to wrap\r\n * wrapper == style to wrap. e.g
{children}
\r\n * children == react passes whatever is between tags as children. Don't supply this yourself.\r\n */\nvar ConditionalWrapper = function ConditionalWrapper(_ref) {\n var condition = _ref.condition,\n wrapper = _ref.wrapper,\n children = _ref.children;\n return condition ? wrapper(children) : children;\n};\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\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 return target;\n}\n\nvar POSITION_OPTIONS = {\n TOP: \"top\",\n BOTTOM: \"bottom\",\n NONE: \"none\"\n};\n\nvar SAME_SITE_OPTIONS;\n(function (SAME_SITE_OPTIONS) {\n SAME_SITE_OPTIONS[\"STRICT\"] = \"strict\";\n SAME_SITE_OPTIONS[\"LAX\"] = \"lax\";\n SAME_SITE_OPTIONS[\"NONE\"] = \"none\";\n})(SAME_SITE_OPTIONS || (SAME_SITE_OPTIONS = {}));\n\nvar VISIBILITY_OPTIONS = {\n HIDDEN: \"hidden\",\n SHOW: \"show\",\n BY_COOKIE_VALUE: \"byCookieValue\"\n};\n\nvar defaultCookieConsentName = \"CookieConsent\";\n\nvar _excluded = [\"children\"];\nvar DefaultButtonComponent = function DefaultButtonComponent(_ref) {\n var children = _ref.children,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n return React.createElement(\"button\", Object.assign({}, props), children);\n};\nvar defaultCookieConsentProps = {\n disableStyles: false,\n hideOnAccept: true,\n hideOnDecline: true,\n location: POSITION_OPTIONS.BOTTOM,\n visible: VISIBILITY_OPTIONS.BY_COOKIE_VALUE,\n onAccept: function onAccept(_acceptedByScrolling) {},\n onDecline: function onDecline() {},\n cookieName: defaultCookieConsentName,\n cookieValue: \"true\",\n declineCookieValue: \"false\",\n setDeclineCookie: true,\n buttonText: \"I understand\",\n declineButtonText: \"I decline\",\n debug: false,\n expires: 365,\n containerClasses: \"CookieConsent\",\n contentClasses: \"\",\n buttonClasses: \"\",\n buttonWrapperClasses: \"\",\n declineButtonClasses: \"\",\n buttonId: \"rcc-confirm-button\",\n declineButtonId: \"rcc-decline-button\",\n extraCookieOptions: {},\n disableButtonStyles: false,\n enableDeclineButton: false,\n flipButtons: false,\n sameSite: SAME_SITE_OPTIONS.LAX,\n ButtonComponent: DefaultButtonComponent,\n overlay: false,\n overlayClasses: \"\",\n onOverlayClick: function onOverlayClick() {},\n acceptOnOverlayClick: false,\n ariaAcceptLabel: \"Accept cookies\",\n ariaDeclineLabel: \"Decline cookies\",\n acceptOnScroll: false,\n acceptOnScrollPercentage: 25,\n customContentAttributes: {},\n customContainerAttributes: {},\n customButtonProps: {},\n customDeclineButtonProps: {},\n customButtonWrapperAttributes: {},\n style: {},\n buttonStyle: {},\n declineButtonStyle: {},\n contentStyle: {},\n overlayStyle: {}\n};\n\nvar defaultState = {\n visible: false,\n style: {\n alignItems: \"baseline\",\n background: \"#353535\",\n color: \"white\",\n display: \"flex\",\n flexWrap: \"wrap\",\n justifyContent: \"space-between\",\n left: \"0\",\n position: \"fixed\",\n width: \"100%\",\n zIndex: \"999\"\n },\n buttonStyle: {\n background: \"#ffd42d\",\n border: \"0\",\n borderRadius: \"0px\",\n boxShadow: \"none\",\n color: \"black\",\n cursor: \"pointer\",\n flex: \"0 0 auto\",\n padding: \"5px 10px\",\n margin: \"15px\"\n },\n declineButtonStyle: {\n background: \"#c12a2a\",\n border: \"0\",\n borderRadius: \"0px\",\n boxShadow: \"none\",\n color: \"#e5e5e5\",\n cursor: \"pointer\",\n flex: \"0 0 auto\",\n padding: \"5px 10px\",\n margin: \"15px\"\n },\n contentStyle: {\n flex: \"1 0 300px\",\n margin: \"15px\"\n },\n overlayStyle: {\n position: \"fixed\",\n left: 0,\n top: 0,\n width: \"100%\",\n height: \"100%\",\n zIndex: \"999\",\n backgroundColor: \"rgba(0,0,0,0.3)\"\n }\n};\n\n/**\r\n * Returns the value of the consent cookie\r\n * Retrieves the regular value first and if not found the legacy one according\r\n * to: https://web.dev/samesite-cookie-recipes/#handling-incompatible-clients\r\n * @param {*} name optional name of the cookie\r\n */\nvar getCookieConsentValue = function getCookieConsentValue(name) {\n if (name === void 0) {\n name = defaultCookieConsentName;\n }\n var cookieValue = Cookies.get(name);\n // if the cookieValue is undefined check for the legacy cookie\n if (cookieValue === undefined) {\n return Cookies.get(getLegacyCookieName(name));\n }\n return cookieValue;\n};\n/**\r\n * Reset the consent cookie\r\n * Remove the cookie on browser in order to allow user to change their consent\r\n * @param {*} name optional name of the cookie\r\n */\nvar resetCookieConsentValue = function resetCookieConsentValue(name) {\n if (name === void 0) {\n name = defaultCookieConsentName;\n }\n Cookies.remove(name);\n};\n/**\r\n * Get the legacy cookie name by the regular cookie name\r\n * @param {string} name of cookie to get\r\n */\nvar getLegacyCookieName = function getLegacyCookieName(name) {\n return name + \"-legacy\";\n};\n\nvar CookieConsent = /*#__PURE__*/function (_Component) {\n _inheritsLoose(CookieConsent, _Component);\n function CookieConsent() {\n var _this;\n _this = _Component.apply(this, arguments) || this;\n _this.state = defaultState;\n /**\r\n * checks whether scroll has exceeded set amount and fire accept if so.\r\n */\n _this.handleScroll = function () {\n var _defaultCookieConsent = _extends({}, defaultCookieConsentProps, _this.props),\n acceptOnScrollPercentage = _defaultCookieConsent.acceptOnScrollPercentage;\n // (top / height) - height * 100\n var rootNode = document.documentElement;\n var body = document.body;\n var top = \"scrollTop\";\n var height = \"scrollHeight\";\n var percentage = (rootNode[top] || body[top]) / ((rootNode[height] || body[height]) - rootNode.clientHeight) * 100;\n if (percentage > acceptOnScrollPercentage) {\n _this.accept(true);\n }\n };\n _this.removeScrollListener = function () {\n var acceptOnScroll = _this.props.acceptOnScroll;\n if (acceptOnScroll) {\n window.removeEventListener(\"scroll\", _this.handleScroll);\n }\n };\n return _this;\n }\n var _proto = CookieConsent.prototype;\n _proto.componentDidMount = function componentDidMount() {\n var debug = this.props.debug;\n // if cookie undefined or debug\n if (this.getCookieValue() === undefined || debug) {\n this.setState({\n visible: true\n });\n // if acceptOnScroll is set to true and (cookie is undefined or debug is set to true), add a listener.\n if (this.props.acceptOnScroll) {\n window.addEventListener(\"scroll\", this.handleScroll, {\n passive: true\n });\n }\n }\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n // remove listener if still set\n this.removeScrollListener();\n }\n /**\r\n * Set a persistent accept cookie\r\n */;\n _proto.accept = function accept(acceptedByScrolling) {\n var _acceptedByScrolling;\n if (acceptedByScrolling === void 0) {\n acceptedByScrolling = false;\n }\n var _defaultCookieConsent2 = _extends({}, defaultCookieConsentProps, this.props),\n cookieName = _defaultCookieConsent2.cookieName,\n cookieValue = _defaultCookieConsent2.cookieValue,\n hideOnAccept = _defaultCookieConsent2.hideOnAccept,\n onAccept = _defaultCookieConsent2.onAccept;\n this.setCookie(cookieName, cookieValue);\n onAccept((_acceptedByScrolling = acceptedByScrolling) != null ? _acceptedByScrolling : false);\n if (hideOnAccept) {\n this.setState({\n visible: false\n });\n this.removeScrollListener();\n }\n }\n /**\r\n * Handle a click on the overlay\r\n */;\n _proto.overlayClick = function overlayClick() {\n var _defaultCookieConsent3 = _extends({}, defaultCookieConsentProps, this.props),\n acceptOnOverlayClick = _defaultCookieConsent3.acceptOnOverlayClick,\n onOverlayClick = _defaultCookieConsent3.onOverlayClick;\n if (acceptOnOverlayClick) {\n this.accept();\n }\n onOverlayClick();\n }\n /**\r\n * Set a persistent decline cookie\r\n */;\n _proto.decline = function decline() {\n var _defaultCookieConsent4 = _extends({}, defaultCookieConsentProps, this.props),\n cookieName = _defaultCookieConsent4.cookieName,\n declineCookieValue = _defaultCookieConsent4.declineCookieValue,\n hideOnDecline = _defaultCookieConsent4.hideOnDecline,\n onDecline = _defaultCookieConsent4.onDecline,\n setDeclineCookie = _defaultCookieConsent4.setDeclineCookie;\n if (setDeclineCookie) {\n this.setCookie(cookieName, declineCookieValue);\n }\n onDecline();\n if (hideOnDecline) {\n this.setState({\n visible: false\n });\n }\n }\n /**\r\n * Function to set the consent cookie based on the provided variables\r\n * Sets two cookies to handle incompatible browsers, more details:\r\n * https://web.dev/samesite-cookie-recipes/#handling-incompatible-clients\r\n */;\n _proto.setCookie = function setCookie(cookieName, cookieValue) {\n var _this$props = this.props,\n extraCookieOptions = _this$props.extraCookieOptions,\n expires = _this$props.expires,\n sameSite = _this$props.sameSite;\n var cookieSecurity = this.props.cookieSecurity;\n if (cookieSecurity === undefined) {\n cookieSecurity = window.location ? window.location.protocol === \"https:\" : true;\n }\n var cookieOptions = _extends({\n expires: expires\n }, extraCookieOptions, {\n sameSite: sameSite,\n secure: cookieSecurity\n });\n // Fallback for older browsers where can not set SameSite=None,\n // SEE: https://web.dev/samesite-cookie-recipes/#handling-incompatible-clients\n if (sameSite === SAME_SITE_OPTIONS.NONE) {\n Cookies.set(getLegacyCookieName(cookieName), cookieValue, cookieOptions);\n }\n // set the regular cookie\n Cookies.set(cookieName, cookieValue, cookieOptions);\n }\n /**\r\n * Returns the value of the consent cookie\r\n * Retrieves the regular value first and if not found the legacy one according\r\n * to: https://web.dev/samesite-cookie-recipes/#handling-incompatible-clients\r\n */;\n _proto.getCookieValue = function getCookieValue() {\n var cookieName = this.props.cookieName;\n return getCookieConsentValue(cookieName);\n };\n _proto.render = function render() {\n var _this2 = this;\n // If the bar shouldn't be visible don't render anything.\n switch (this.props.visible) {\n case VISIBILITY_OPTIONS.HIDDEN:\n return null;\n case VISIBILITY_OPTIONS.BY_COOKIE_VALUE:\n if (!this.state.visible) {\n return null;\n }\n break;\n }\n var _this$props2 = this.props,\n location = _this$props2.location,\n style = _this$props2.style,\n buttonStyle = _this$props2.buttonStyle,\n declineButtonStyle = _this$props2.declineButtonStyle,\n contentStyle = _this$props2.contentStyle,\n disableStyles = _this$props2.disableStyles,\n buttonText = _this$props2.buttonText,\n declineButtonText = _this$props2.declineButtonText,\n containerClasses = _this$props2.containerClasses,\n contentClasses = _this$props2.contentClasses,\n buttonClasses = _this$props2.buttonClasses,\n buttonWrapperClasses = _this$props2.buttonWrapperClasses,\n declineButtonClasses = _this$props2.declineButtonClasses,\n buttonId = _this$props2.buttonId,\n declineButtonId = _this$props2.declineButtonId,\n disableButtonStyles = _this$props2.disableButtonStyles,\n enableDeclineButton = _this$props2.enableDeclineButton,\n flipButtons = _this$props2.flipButtons,\n ButtonComponent = _this$props2.ButtonComponent,\n overlay = _this$props2.overlay,\n overlayClasses = _this$props2.overlayClasses,\n overlayStyle = _this$props2.overlayStyle,\n ariaAcceptLabel = _this$props2.ariaAcceptLabel,\n ariaDeclineLabel = _this$props2.ariaDeclineLabel,\n customContainerAttributes = _this$props2.customContainerAttributes,\n customContentAttributes = _this$props2.customContentAttributes,\n customButtonProps = _this$props2.customButtonProps,\n customDeclineButtonProps = _this$props2.customDeclineButtonProps,\n customButtonWrapperAttributes = _this$props2.customButtonWrapperAttributes;\n var myStyle = {};\n var myButtonStyle = {};\n var myDeclineButtonStyle = {};\n var myContentStyle = {};\n var myOverlayStyle = {};\n if (disableStyles) {\n // if styles are disabled use the provided styles (or none)\n myStyle = Object.assign({}, style);\n myButtonStyle = Object.assign({}, buttonStyle);\n myDeclineButtonStyle = Object.assign({}, declineButtonStyle);\n myContentStyle = Object.assign({}, contentStyle);\n myOverlayStyle = Object.assign({}, overlayStyle);\n } else {\n // if styles aren't disabled merge them with the styles that are provided (or use default styles)\n myStyle = Object.assign({}, _extends({}, this.state.style, style));\n myContentStyle = Object.assign({}, _extends({}, this.state.contentStyle, contentStyle));\n myOverlayStyle = Object.assign({}, _extends({}, this.state.overlayStyle, overlayStyle));\n // switch to disable JUST the button styles\n if (disableButtonStyles) {\n myButtonStyle = Object.assign({}, buttonStyle);\n myDeclineButtonStyle = Object.assign({}, declineButtonStyle);\n } else {\n myButtonStyle = Object.assign({}, _extends({}, this.state.buttonStyle, buttonStyle));\n myDeclineButtonStyle = Object.assign({}, _extends({}, this.state.declineButtonStyle, declineButtonStyle));\n }\n }\n // syntactic sugar to enable user to easily select top / bottom\n switch (location) {\n case POSITION_OPTIONS.TOP:\n myStyle.top = \"0\";\n break;\n case POSITION_OPTIONS.BOTTOM:\n myStyle.bottom = \"0\";\n break;\n }\n var buttonsToRender = [];\n // add decline button\n enableDeclineButton && buttonsToRender.push(React.createElement(ButtonComponent, Object.assign({\n key: \"declineButton\",\n style: myDeclineButtonStyle,\n className: declineButtonClasses,\n id: declineButtonId,\n \"aria-label\": ariaDeclineLabel,\n onClick: function onClick() {\n _this2.decline();\n }\n }, customDeclineButtonProps), declineButtonText));\n // add accept button\n buttonsToRender.push(React.createElement(ButtonComponent, Object.assign({\n key: \"acceptButton\",\n style: myButtonStyle,\n className: buttonClasses,\n id: buttonId,\n \"aria-label\": ariaAcceptLabel,\n onClick: function onClick() {\n _this2.accept();\n }\n }, customButtonProps), buttonText));\n if (flipButtons) {\n buttonsToRender.reverse();\n }\n return React.createElement(ConditionalWrapper, {\n condition: overlay,\n wrapper: function wrapper(children) {\n return React.createElement(\"div\", {\n style: myOverlayStyle,\n className: overlayClasses,\n onClick: function onClick() {\n _this2.overlayClick();\n }\n }, children);\n }\n }, React.createElement(\"div\", Object.assign({\n className: \"\" + containerClasses,\n style: myStyle\n }, customContainerAttributes), React.createElement(\"div\", Object.assign({\n style: myContentStyle,\n className: contentClasses\n }, customContentAttributes), this.props.children), React.createElement(\"div\", Object.assign({\n className: \"\" + buttonWrapperClasses\n }, customButtonWrapperAttributes), buttonsToRender.map(function (button) {\n return button;\n }))));\n };\n return CookieConsent;\n}(Component);\nCookieConsent.defaultProps = defaultCookieConsentProps;\n\nexport default CookieConsent;\nexport { ConditionalWrapper, CookieConsent, POSITION_OPTIONS as OPTIONS, POSITION_OPTIONS, SAME_SITE_OPTIONS, VISIBILITY_OPTIONS, VISIBILITY_OPTIONS as VISIBLE_OPTIONS, defaultCookieConsentName, getCookieConsentValue, getLegacyCookieName, resetCookieConsentValue };\n//# sourceMappingURL=react-cookie-consent.esm.js.map\n","import Header from \"@components/blocks/global/Header\";\nimport { useEventListener } from \"@hooks/useEventListener\";\nimport { useGsapPlugins } from \"@hooks/useGsapPlugins\";\n// import ContentModal from \"@components/ContentModalSlider\"\nimport useLanguage from \"@hooks/useLanguage\";\nimport { duration, useTransition } from \"@hooks/useTransitionStatus\";\nimport loadable from \"@loadable/component\";\nimport browser from \"browser-detect\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport LocomotiveScroll from \"locomotive-scroll\";\nimport React from \"react\";\nimport \"@css/style.styl\";\nimport Link from \"@components/Link\";\nimport Loading from \"@components/Loading\";\nimport { isPopState, isWebGlState, langState, scrollState } from \"@status\";\nimport CookieConsent from \"react-cookie-consent\";\nimport { useRecoilState, useRecoilValue } from \"recoil\";\n\nconst _duration = 0.6;\nconst delay = duration;\nconst ease = { ease: [0.75, 0.0, 0.25, 1.0] };\nconst ThreeJs = loadable(() => import(\"@three/Main.js\"));\n\nconst mainVars = {\n\tinitial: {\n\t\t// position: 'relative',\n\t\topacity: 0,\n\t},\n\tenter: {\n\t\ttransition: {\n\t\t\tduration: _duration,\n\t\t\tdelay: delay,\n\t\t\t// when: 'beforeChildren',\n\t\t},\n\t\topacity: 1,\n\t},\n\texit: {\n\t\ttransition: { duration: _duration },\n\t\topacity: 0,\n\t},\n};\n\nconst coverVars = (isFirst) => {\n\treturn {\n\t\tinitial: {\n\t\t\tzIndex: 10,\n\t\t\tbackground: \"#DF4661\",\n\t\t\tposition: \"fixed\",\n\t\t\twidth: \"100%\",\n\t\t\theight: \"100%\",\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\tx: `${isFirst ? \"100%\" : \"0%\"}`, //初期表示を早くするため\n\t\t},\n\t\tenter: {\n\t\t\ttransition: {\n\t\t\t\tduration: _duration,\n\t\t\t\tdelay: delay,\n\t\t\t\twhen: \"afterChildren\",\n\t\t\t\t...ease,\n\t\t\t},\n\t\t\tx: \"100%\",\n\t\t},\n\t\texit: {\n\t\t\ttransition: {\n\t\t\t\tduration: _duration,\n\t\t\t\t// tims: [duration/2,duration/2],\n\t\t\t\t...ease,\n\t\t\t},\n\t\t\tx: [\"-100%\", \"0%\"],\n\t\t},\n\t};\n};\n\n// Particleでトランジションを管理しているよ!\nexport default function TransitionLayout({ children, location, ...props }) {\n\t// const [_locomotiveScrollState, setLocomotiveScrollState] = useRecoilState(locomotiveScrollState)\n\tconst _langState = useRecoilValue(langState);\n\tconst [_scrollState, setScrollState] = useRecoilState(scrollState);\n\tconst _isPopState = useRecoilValue(isPopState);\n\tconst _isWebGlState = useRecoilValue(isWebGlState);\n\t// const [browsed, setBrowsed] = React.useState()\n\tconst wrapRef = React.useRef();\n\tconst containerRef = React.useRef();\n\tconst { customEase01 } = useGsapPlugins();\n\tconst transition = useTransition({ isStayEnd: true });\n\tconst [resize, setResize] = React.useState(0);\n\tconst locomotiveScroll = React.useRef();\n\tuseLanguage();\n\n\tuseEventListener(\"popstate\", () => {\n\t\tif (_isPopState) {\n\t\t\ttransition.start();\n\t\t}\n\t});\n\n\tuseEventListener(\"resize\", () => {\n\t\tsetResize(resize + 1);\n\t});\n\n\tconst browsed = React.useRef(browser());\n\tlet isWebGl = true;\n\tif (browsed.current.name === \"ie\" || !_isWebGlState) {\n\t\tisWebGl = false;\n\t}\n\n\tReact.useEffect(() => {\n\t\twindow._scroll = {\n\t\t\tcurrentScrollTop: 0,\n\t\t\tcurrentScrollRaito: 0,\n\t\t\tpreScrollTop: 0,\n\t\t\tcurrentScrollTarget: null,\n\t\t};\n\n\t\tif (!isWebGl) {\n\t\t\tdocument.body.style.height = \"auto\";\n\t\t\tdocument.body.style.overflow = \"auto\";\n\t\t\treturn;\n\t\t}\n\t\tif (typeof window === \"undefined\") {\n\t\t\treturn;\n\t\t}\n\n\t\twrapRef.current.classList.add(\"wrap-scroll\");\n\t\tcontainerRef.current.classList.add(\"root-container-scroll\");\n\n\t\tif (locomotiveScroll.current) {\n\t\t\tlocomotiveScroll.current.update();\n\t\t\treturn;\n\t\t}\n\n\t\tlocomotiveScroll.current = new LocomotiveScroll({\n\t\t\tel: containerRef.current,\n\t\t\tsmooth: true,\n\t\t\tlerp: 0.09,\n\t\t\tmultiplier: 1.1,\n\t\t\ttouchMultiplier: 1.9,\n\t\t\tsmartphone: {\n\t\t\t\tsmooth: true,\n\t\t\t},\n\t\t\ttablet: {\n\t\t\t\tsmooth: true,\n\t\t\t},\n\t\t});\n\t\tlocomotiveScroll.current.update();\n\n\t\tlocomotiveScroll.current.myHide = () => {\n\t\t\tconst doms = document.getElementsByClassName(\"c-scrollbar\");\n\t\t\tfor (const dom of doms) {\n\t\t\t\tdom.classList.add(\"hide-scrollbar\");\n\t\t\t}\n\t\t};\n\n\t\tlocomotiveScroll.current.myShow = () => {\n\t\t\tconst doms = document.getElementsByClassName(\"c-scrollbar\");\n\t\t\tfor (const dom of doms) {\n\t\t\t\tdom.classList.remove(\"hide-scrollbar\");\n\t\t\t}\n\t\t};\n\n\t\t// appStore.locomotiveScroll = locomotiveScroll;\n\t\twindow.locomotiveScroll = locomotiveScroll.current;\n\n\t\treturn () => {\n\t\t\tif (locomotiveScroll) locomotiveScroll.current.destroy();\n\t\t};\n\t}, []);\n\n\tReact.useEffect(() => {\n\t\tif (locomotiveScroll.current) {\n\t\t\tlocomotiveScroll.current.update();\n\t\t}\n\t}, [resize]);\n\n\tReact.useEffect(() => {\n\t\tif (locomotiveScroll.current) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tlocomotiveScroll.current.update();\n\t\t\t}, 100);\n\t\t}\n\t}, [_langState]);\n\n\treturn (\n\t\t
;\n\t\t}\n\t});\n}\n","import wrapWithLayout from \"./wrap-with-layout\";\nimport wrapWithProvider from \"./wrap-with-provider\";\n\nimport \"prismjs/themes/prism-tomorrow.css\";\nimport \"prismjs/plugins/command-line/prism-command-line.css\";\n\n//mobx\nexport const wrapRootElement = wrapWithProvider;\nexport const wrapPageElement = wrapWithLayout;\n\n// ES5 way\n// exports.onClientEntry = () => {\n// ES6 way\nexport const onClientEntry = () => {\n\t// IntersectionObserver polyfill for gatsby-background-image (Safari, IE)\n\tif (typeof window.IntersectionObserver === \"undefined\") {\n\t\trequire(\"intersection-observer\");\n\t\tconsole.log(\"# IntersectionObserver is polyfilled!\");\n\t}\n};\n\n//transition Layout\n\nconst transitionDelay = 1200;\n\nexport const shouldUpdateScroll = ({\n\trouterProps: { location },\n\tgetSavedScrollPosition,\n}) => {\n\t//#用\n\tif (location.hash !== \"\") {\n\t\treturn false;\n\t}\n\n\t//overflow: hiddenしているため\n\tconst rootContainer = document.getElementById(\"root-container\");\n\n\tif (location.action === \"PUSH\") {\n\t\twindow.setTimeout(() => window.scrollTo(0, 0), transitionDelay);\n\t\tif (rootContainer) {\n\t\t\twindow.setTimeout(() => rootContainer.scrollTo(0, 0), transitionDelay);\n\t\t}\n\t} else {\n\t\tconst savedPosition = getSavedScrollPosition(location);\n\t\twindow.setTimeout(\n\t\t\t() => window.scrollTo(...(savedPosition || [0, 0])),\n\t\t\ttransitionDelay,\n\t\t);\n\n\t\tif (rootContainer) {\n\t\t\twindow.setTimeout(\n\t\t\t\t() => rootContainer.scrollTo(0, 0) || [0, 0],\n\t\t\t\ttransitionDelay,\n\t\t\t);\n\t\t}\n\t}\n\treturn false;\n};\n\n//ブラウザバックのイベント取得できる\n// export const onInitialClientRender = () => {\n// window.addEventListener('popstate', () =>\n// console.log('===============================',window.location.href)\n// // window.location.href = window.location.href\n// )\n// }\n","// import { Provider} from 'mobx-react'\n\n// eslint-disable-next-line react/display-name,react/prop-types\n// export default ({ element }) => {element};\nimport { RecoilRoot } from 'recoil'\nexport default ({ element }) => {\n return \n {element}\n \n}\n","import Layout from \"./src/layouts/TransitionLayout\";\n\nexport default ({ props, element }) => {\n\treturn {element};\n};\n","import escapeStringRegexp from \"escape-string-regexp\";\nimport { withPrefix } from \"gatsby\";\nexport const userIsForcingNavigation = event => event.button !== 0 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;\n\n// IE does not include leading slash in anchor.pathname\nexport const slashedPathname = pathname => pathname[0] === `/` ? pathname : `/${pathname}`;\nexport const navigationWasHandledElsewhere = event => event.defaultPrevented;\nexport const findClosestAnchor = node => {\n for (; node.parentNode; node = node.parentNode) {\n if (node.nodeName.toLowerCase() === `a`) {\n return node;\n }\n }\n return null;\n};\nexport const anchorsTargetIsEquivalentToSelf = anchor => /* If target attribute is not present it's treated as _self */\nanchor.hasAttribute(`target`) === false ||\n/**\n * The browser defaults to _self, but, not all browsers set\n * a.target to the string value `_self` by default\n */\n\n/**\n * Assumption: some browsers use null/undefined for default\n * attribute values\n */\nanchor.target == null ||\n/**\n * Some browsers use the empty string to mean _self, check\n * for actual `_self`\n */\n[`_self`, ``].includes(anchor.target) ||\n/**\n * As per https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n */\nanchor.target === `_parent` && (!anchor.ownerDocument.defaultView.parent ||\n// Assumption: This can be falsey\nanchor.ownerDocument.defaultView.parent === anchor.ownerDocument.defaultView) || anchor.target === `_top` && (!anchor.ownerDocument.defaultView.top ||\n// Assumption: This can be falsey\nanchor.ownerDocument.defaultView.top === anchor.ownerDocument.defaultView);\nexport const authorIsForcingNavigation = anchor =>\n/**\n * HTML5 attribute that informs the browser to handle the\n * href as a downloadable file; let the browser handle it\n */\nanchor.hasAttribute(`download`) === true ||\n/**\n * Let the browser handle anything that doesn't look like a\n * target=\"_self\" anchor\n */\nanchorsTargetIsEquivalentToSelf(anchor) === false;\n\n// https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy\nexport const urlsAreOnSameOrigin = (origin, destination) => origin.protocol === destination.protocol && /* a.host includes both hostname and port in the expected format host:port */\norigin.host === destination.host;\nexport const pathIsNotHandledByApp = (destination, pathStartRegEx) => {\n const pathFileExtensionRegEx = /^.*\\.((?!htm)[a-z0-9]{1,5})$/i;\n return (\n /**\n * For when pathPrefix is used in an app and there happens to be a link\n * pointing to the same domain but outside of the app's pathPrefix. For\n * example, a Gatsby app lives at https://example.com/myapp/, with the\n * pathPrefix set to `/myapp`. When adding an absolute link to the same\n * domain but outside of the /myapp path, for example, `` the plugin won't catch it and\n * will navigate to an external link instead of doing a pushState resulting\n * in `https://example.com/myapp/https://example.com/not-my-app`\n */\n pathStartRegEx.test(slashedPathname(destination.pathname)) === false ||\n /**\n * Don't catch links pointed at what look like file extensions (other than\n * .htm/html extensions).\n */\n destination.pathname.search(pathFileExtensionRegEx) !== -1\n );\n};\nexport const hashShouldBeFollowed = (origin, destination) => destination.hash !== `` && (\n/**\n * Dynamically created anchor links (href=\"#my-anchor\") do not always\n * have pathname on IE\n */\ndestination.pathname === `` || /* Don't catch links pointed to the same page but with a hash. */\ndestination.pathname === origin.pathname);\nexport const routeThroughBrowserOrApp = (hrefHandler, pluginOptions) => event => {\n if (window.___failedResources) return true;\n if (userIsForcingNavigation(event)) return true;\n if (navigationWasHandledElsewhere(event)) return true;\n const clickedAnchor = findClosestAnchor(event.target);\n if (clickedAnchor == null) return true;\n if (authorIsForcingNavigation(clickedAnchor)) return true;\n\n // IE clears the host value if the anchor href changed after creation, e.g.\n // in React. Creating a new anchor element to ensure host value is present\n const destination = document.createElement(`a`);\n\n // https://html.spec.whatwg.org/multipage/links.html#concept-hyperlink-url-set\n // If clickedAnchor has no href attribute like `example`, the href getter returns empty string.\n if (clickedAnchor.href !== ``) {\n destination.href = clickedAnchor.href;\n }\n if (`SVGAnimatedString` in window && clickedAnchor.href instanceof SVGAnimatedString) {\n destination.href = clickedAnchor.href.animVal;\n }\n\n // In IE, the default port is included in the anchor host but excluded from\n // the location host. This affects the ability to directly compare\n // location host to anchor host. For example: http://example.com would\n // have a location.host of 'example.com' and an destination.host of\n // 'example.com:80' Creating anchor from the location.href to normalize the\n // host value.\n const origin = document.createElement(`a`);\n origin.href = window.location.href;\n if (urlsAreOnSameOrigin(origin, destination) === false) return true;\n\n // Regex to test pathname against pathPrefix\n const pathStartRegEx = new RegExp(`^${escapeStringRegexp(withPrefix(`/`))}`);\n if (pathIsNotHandledByApp(destination, pathStartRegEx)) return true;\n if (hashShouldBeFollowed(origin, destination)) return true;\n if (pluginOptions.excludePattern) {\n const excludeRegex = new RegExp(pluginOptions.excludePattern);\n if (excludeRegex.test(destination.pathname)) {\n return true;\n }\n }\n event.preventDefault();\n\n // See issue #8907: destination.pathname already includes pathPrefix added\n // by gatsby-transformer-remark but gatsby-link.navigate needs href without\n const destinationPathname = slashedPathname(destination.pathname).replace(pathStartRegEx, `/`);\n hrefHandler(`${destinationPathname}${destination.search}${destination.hash}`);\n return false;\n};\nexport default function (root, pluginOptions, cb) {\n const clickHandler = routeThroughBrowserOrApp(cb, pluginOptions);\n root.addEventListener(`click`, clickHandler);\n return () => root.removeEventListener(`click`, clickHandler);\n}","import { navigate } from \"gatsby\";\nimport catchLinks from \"./catch-links\";\nexport const onClientEntry = (_, pluginOptions = {}) => {\n catchLinks(window, pluginOptions, href => {\n navigate(href);\n });\n};","const listOfMetricsSend = new Set();\nfunction debounce(fn, timeout) {\n let timer = null;\n return function (...args) {\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(fn, timeout, ...args);\n };\n}\nfunction sendWebVitals() {\n function sendData(data) {\n if (listOfMetricsSend.has(data.name)) {\n return;\n }\n listOfMetricsSend.add(data.name);\n sendToGoogleAnalytics(data);\n }\n return import(`web-vitals/base`).then(({\n getLCP,\n getFID,\n getCLS\n }) => {\n const debouncedCLS = debounce(sendData, 3000);\n // we don't need to debounce FID - we send it when it happens\n const debouncedFID = sendData;\n // LCP can occur multiple times so we debounce it\n const debouncedLCP = debounce(sendData, 3000);\n\n // With the true flag, we measure all previous occurences too, in case we start listening to late.\n getCLS(debouncedCLS, true);\n getFID(debouncedFID, true);\n getLCP(debouncedLCP, true);\n });\n}\nfunction sendToGoogleAnalytics({\n name,\n value,\n id\n}) {\n window.ga(`send`, `event`, {\n eventCategory: `Web Vitals`,\n eventAction: name,\n // The `id` value will be unique to the current page load. When sending\n // multiple values from the same page (e.g. for CLS), Google Analytics can\n // compute a total by grouping on this ID (note: requires `eventLabel` to\n // be a dimension in your report).\n eventLabel: id,\n // Google Analytics metrics must be integers, so the value is rounded.\n // For CLS the value is first multiplied by 1000 for greater precision\n // (note: increase the multiplier for greater precision if needed).\n eventValue: Math.round(name === `CLS` ? value * 1000 : value),\n // Use a non-interaction event to avoid affecting bounce rate.\n nonInteraction: true,\n // Use `sendBeacon()` if the browser supports it.\n transport: `beacon`\n });\n}\nexport const onRouteUpdate = ({\n location\n}, pluginOptions = {}) => {\n const ga = window.ga;\n if (process.env.NODE_ENV !== `production` || typeof ga !== `function`) {\n return null;\n }\n const pathIsExcluded = location && typeof window.excludeGAPaths !== `undefined` && window.excludeGAPaths.some(rx => rx.test(location.pathname));\n if (pathIsExcluded) return null;\n\n // wrap inside a timeout to make sure react-helmet is done with it's changes (https://github.com/gatsbyjs/gatsby/issues/9139)\n // reactHelmet is using requestAnimationFrame: https://github.com/nfl/react-helmet/blob/5.2.0/src/HelmetUtils.js#L296-L299\n const sendPageView = () => {\n const pagePath = location ? location.pathname + location.search + location.hash : undefined;\n ga(`set`, `page`, pagePath);\n ga(`send`, `pageview`);\n };\n\n // Minimum delay for reactHelmet's requestAnimationFrame\n const delay = Math.max(32, pluginOptions.pageTransitionDelay || 0);\n setTimeout(sendPageView, delay);\n return null;\n};\nexport function onInitialClientRender(_, pluginOptions) {\n if (process.env.NODE_ENV === `production` && typeof ga === `function` && pluginOptions.enableWebVitalsTracking) {\n sendWebVitals();\n }\n}","\"use strict\";\n\nexports.onRouteUpdate = function (_ref, pluginOptions) {\n var location = _ref.location;\n if (pluginOptions === void 0) {\n pluginOptions = {};\n }\n if (process.env.NODE_ENV !== \"production\" || typeof gtag !== \"function\") {\n return null;\n }\n var pluginConfig = pluginOptions.pluginConfig || {};\n var pathIsExcluded = location && typeof window.excludeGtagPaths !== \"undefined\" && window.excludeGtagPaths.some(function (rx) {\n return rx.test(location.pathname);\n });\n if (pathIsExcluded) return null;\n\n // wrap inside a timeout to make sure react-helmet is done with its changes (https://github.com/gatsbyjs/gatsby/issues/11592)\n var sendPageView = function sendPageView() {\n var pagePath = location ? location.pathname + location.search + location.hash : undefined;\n window.gtag(\"event\", \"page_view\", {\n page_path: pagePath\n });\n };\n var _pluginConfig$delayOn = pluginConfig.delayOnRouteUpdate,\n delayOnRouteUpdate = _pluginConfig$delayOn === void 0 ? 0 : _pluginConfig$delayOn;\n if (\"requestAnimationFrame\" in window) {\n requestAnimationFrame(function () {\n requestAnimationFrame(function () {\n return setTimeout(sendPageView, delayOnRouteUpdate);\n });\n });\n } else {\n // Delay by 32ms to simulate 2 requestOnAnimationFrame calls\n setTimeout(sendPageView, 32 + delayOnRouteUpdate);\n }\n return null;\n};","/* global __MANIFEST_PLUGIN_HAS_LOCALISATION__ */\nimport { withPrefix } from \"gatsby\";\nimport getManifestForPathname from \"./get-manifest-pathname\";\n\n// when we don't have localisation in our manifest, we tree shake everything away\nexport const onRouteUpdate = function onRouteUpdate({\n location\n}, pluginOptions) {\n if (__MANIFEST_PLUGIN_HAS_LOCALISATION__) {\n const {\n localize\n } = pluginOptions;\n const manifestFilename = getManifestForPathname(location.pathname, localize, true);\n const manifestEl = document.head.querySelector(`link[rel=\"manifest\"]`);\n if (manifestEl) {\n manifestEl.setAttribute(`href`, withPrefix(manifestFilename));\n }\n }\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _gatsby = require(\"gatsby\");\n/**\n * Get a manifest filename depending on localized pathname\n *\n * @param {string} pathname\n * @param {Array<{start_url: string, lang: string}>} localizedManifests\n * @param {boolean} shouldPrependPathPrefix\n * @return string\n */\nvar _default = (pathname, localizedManifests, shouldPrependPathPrefix = false) => {\n const defaultFilename = `manifest.webmanifest`;\n if (!Array.isArray(localizedManifests)) {\n return defaultFilename;\n }\n const localizedManifest = localizedManifests.find(app => {\n let startUrl = app.start_url;\n if (shouldPrependPathPrefix) {\n startUrl = (0, _gatsby.withPrefix)(startUrl);\n }\n return pathname.startsWith(startUrl);\n });\n if (!localizedManifest) {\n return defaultFilename;\n }\n return `manifest_${localizedManifest.lang}.webmanifest`;\n};\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _styledComponents = require(\"styled-components\");\n// eslint-disable-next-line react/prop-types,react/display-name\nexports.wrapRootElement = function (_ref, pluginOptions) {\n var element = _ref.element;\n return /*#__PURE__*/_react.default.createElement(_styledComponents.StyleSheetManager, {\n disableVendorPrefixes: (pluginOptions === null || pluginOptions === void 0 ? void 0 : pluginOptions.disableVendorPrefixes) === true\n }, element);\n};","const WebFont = require('webfontloader')\n\nexports.onInitialClientRender = (a, options) => {\n\toptions = { ...options }\n\tdelete options.plugins\n\tWebFont.load(options)\n}","import type { GatsbyImageProps } from \"gatsby-plugin-image\"\nimport React from \"react\"\nimport ReactDOM from \"react-dom/client\"\n\nlet hydrateRef\n\nexport function onRouteUpdate(): void {\n if (`requestIdleCallback` in window) {\n if (hydrateRef) {\n // @ts-ignore cancelIdleCallback is on window object\n cancelIdleCallback(hydrateRef)\n }\n\n // @ts-ignore requestIdleCallback is on window object\n hydrateRef = requestIdleCallback(hydrateImages)\n } else {\n if (hydrateRef) {\n clearTimeout(hydrateRef)\n }\n hydrateRef = setTimeout(hydrateImages)\n }\n}\n\nfunction hydrateImages(): void {\n const doc = document\n const inlineWPimages: Array = Array.from(\n doc.querySelectorAll(`[data-wp-inline-image]`)\n )\n\n if (!inlineWPimages.length) {\n return\n }\n\n import(\n /* webpackChunkName: \"gatsby-plugin-image\" */ `gatsby-plugin-image`\n ).then(mod => {\n inlineWPimages.forEach(image => {\n // usually this is the right element to hydrate on\n const grandParentIsGatsbyImage =\n // @ts-ignore-next-line classList is on HTMLElement\n image?.parentNode?.parentNode?.classList?.contains(\n `gatsby-image-wrapper`\n )\n\n // but sometimes this is the right element\n const parentIsGatsbyImage =\n // @ts-ignore-next-line classList is on HTMLElement\n image?.parentNode?.classList?.contains(`gatsby-image-wrapper`)\n\n if (!grandParentIsGatsbyImage && !parentIsGatsbyImage) {\n return\n }\n\n const gatsbyImageHydrationElement = grandParentIsGatsbyImage\n ? image.parentNode.parentNode\n : image.parentNode\n\n if (\n image.dataset &&\n image.dataset.wpInlineImage &&\n gatsbyImageHydrationElement\n ) {\n const hydrationData = doc.querySelector(\n `script[data-wp-inline-image-hydration=\"${image.dataset.wpInlineImage}\"]`\n )\n\n if (hydrationData) {\n const imageProps: GatsbyImageProps = JSON.parse(\n hydrationData.innerHTML\n )\n\n // @ts-ignore - TODO: Fix me\n const root = ReactDOM.createRoot(gatsbyImageHydrationElement)\n root.render(React.createElement(mod.GatsbyImage, imageProps))\n }\n }\n })\n })\n}\n","/*!\n * ScrollToPlugin 3.4.2\n * https://greensock.com\n *\n * @license Copyright 2008-2020, GreenSock. All rights reserved.\n * Subject to the terms at https://greensock.com/standard-license or for\n * Club GreenSock members, the agreement issued with that membership.\n * @author: Jack Doyle, jack@greensock.com\n*/\n\n/* eslint-disable */\nvar gsap,\n _coreInitted,\n _window,\n _docEl,\n _body,\n _toArray,\n _config,\n _windowExists = function _windowExists() {\n return typeof window !== \"undefined\";\n},\n _getGSAP = function _getGSAP() {\n return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap;\n},\n _isString = function _isString(value) {\n return typeof value === \"string\";\n},\n _max = function _max(element, axis) {\n var dim = axis === \"x\" ? \"Width\" : \"Height\",\n scroll = \"scroll\" + dim,\n client = \"client\" + dim;\n return element === _window || element === _docEl || element === _body ? Math.max(_docEl[scroll], _body[scroll]) - (_window[\"inner\" + dim] || _docEl[client] || _body[client]) : element[scroll] - element[\"offset\" + dim];\n},\n _buildGetter = function _buildGetter(e, axis) {\n //pass in an element and an axis (\"x\" or \"y\") and it'll return a getter function for the scroll position of that element (like scrollTop or scrollLeft, although if the element is the window, it'll use the pageXOffset/pageYOffset or the documentElement's scrollTop/scrollLeft or document.body's. Basically this streamlines things and makes a very fast getter across browsers.\n var p = \"scroll\" + (axis === \"x\" ? \"Left\" : \"Top\");\n\n if (e === _window) {\n if (e.pageXOffset != null) {\n p = \"page\" + axis.toUpperCase() + \"Offset\";\n } else {\n e = _docEl[p] != null ? _docEl : _body;\n }\n }\n\n return function () {\n return e[p];\n };\n},\n _getOffset = function _getOffset(element, container) {\n var rect = _toArray(element)[0].getBoundingClientRect(),\n isRoot = !container || container === _window || container === _body,\n cRect = isRoot ? {\n top: _docEl.clientTop - (_window.pageYOffset || _docEl.scrollTop || _body.scrollTop || 0),\n left: _docEl.clientLeft - (_window.pageXOffset || _docEl.scrollLeft || _body.scrollLeft || 0)\n } : container.getBoundingClientRect(),\n offsets = {\n x: rect.left - cRect.left,\n y: rect.top - cRect.top\n };\n\n if (!isRoot && container) {\n //only add the current scroll position if it's not the window/body.\n offsets.x += _buildGetter(container, \"x\")();\n offsets.y += _buildGetter(container, \"y\")();\n }\n\n return offsets;\n},\n _parseVal = function _parseVal(value, target, axis, currentVal) {\n return !isNaN(value) && typeof value !== \"object\" ? parseFloat(value) : _isString(value) && value.charAt(1) === \"=\" ? parseFloat(value.substr(2)) * (value.charAt(0) === \"-\" ? -1 : 1) + currentVal : value === \"max\" ? _max(target, axis) : Math.min(_max(target, axis), _getOffset(value, target)[axis]);\n},\n _initCore = function _initCore() {\n gsap = _getGSAP();\n\n if (_windowExists() && gsap && document.body) {\n _window = window;\n _body = document.body;\n _docEl = document.documentElement;\n _toArray = gsap.utils.toArray;\n gsap.config({\n autoKillThreshold: 7\n });\n _config = gsap.config();\n _coreInitted = 1;\n }\n};\n\nexport var ScrollToPlugin = {\n version: \"3.4.2\",\n name: \"scrollTo\",\n rawVars: 1,\n register: function register(core) {\n gsap = core;\n\n _initCore();\n },\n init: function init(target, value, tween, index, targets) {\n if (!_coreInitted) {\n _initCore();\n }\n\n var data = this;\n data.isWin = target === _window;\n data.target = target;\n data.tween = tween;\n\n if (typeof value !== \"object\") {\n value = {\n y: value\n }; //if we don't receive an object as the parameter, assume the user intends \"y\".\n\n if (_isString(value.y) && value.y !== \"max\" && value.y.charAt(1) !== \"=\") {\n value.x = value.y;\n }\n } else if (value.nodeType) {\n value = {\n y: value,\n x: value\n };\n }\n\n data.vars = value;\n data.autoKill = !!value.autoKill;\n data.getX = _buildGetter(target, \"x\");\n data.getY = _buildGetter(target, \"y\");\n data.x = data.xPrev = data.getX();\n data.y = data.yPrev = data.getY();\n\n if (value.x != null) {\n data.add(data, \"x\", data.x, _parseVal(value.x, target, \"x\", data.x) - (value.offsetX || 0), index, targets, Math.round);\n\n data._props.push(\"scrollTo_x\");\n } else {\n data.skipX = 1;\n }\n\n if (value.y != null) {\n data.add(data, \"y\", data.y, _parseVal(value.y, target, \"y\", data.y) - (value.offsetY || 0), index, targets, Math.round);\n\n data._props.push(\"scrollTo_y\");\n } else {\n data.skipY = 1;\n }\n },\n render: function render(ratio, data) {\n var pt = data._pt,\n target = data.target,\n tween = data.tween,\n autoKill = data.autoKill,\n xPrev = data.xPrev,\n yPrev = data.yPrev,\n isWin = data.isWin,\n x,\n y,\n yDif,\n xDif,\n threshold;\n\n while (pt) {\n pt.r(ratio, pt.d);\n pt = pt._next;\n }\n\n x = isWin || !data.skipX ? data.getX() : xPrev;\n y = isWin || !data.skipY ? data.getY() : yPrev;\n yDif = y - yPrev;\n xDif = x - xPrev;\n threshold = _config.autoKillThreshold;\n\n if (data.x < 0) {\n //can't scroll to a position less than 0! Might happen if someone uses a Back.easeOut or Elastic.easeOut when scrolling back to the top of the page (for example)\n data.x = 0;\n }\n\n if (data.y < 0) {\n data.y = 0;\n }\n\n if (autoKill) {\n //note: iOS has a bug that throws off the scroll by several pixels, so we need to check if it's within 7 pixels of the previous one that we set instead of just looking for an exact match.\n if (!data.skipX && (xDif > threshold || xDif < -threshold) && x < _max(target, \"x\")) {\n data.skipX = 1; //if the user scrolls separately, we should stop tweening!\n }\n\n if (!data.skipY && (yDif > threshold || yDif < -threshold) && y < _max(target, \"y\")) {\n data.skipY = 1; //if the user scrolls separately, we should stop tweening!\n }\n\n if (data.skipX && data.skipY) {\n tween.kill();\n\n if (data.vars.onAutoKill) {\n data.vars.onAutoKill.apply(tween, data.vars.onAutoKillParams || []);\n }\n }\n }\n\n if (isWin) {\n _window.scrollTo(!data.skipX ? data.x : x, !data.skipY ? data.y : y);\n } else {\n if (!data.skipY) {\n target.scrollTop = data.y;\n }\n\n if (!data.skipX) {\n target.scrollLeft = data.x;\n }\n }\n\n data.xPrev = data.x;\n data.yPrev = data.y;\n },\n kill: function kill(property) {\n var both = property === \"scrollTo\";\n\n if (both || property === \"scrollTo_x\") {\n this.skipX = 1;\n }\n\n if (both || property === \"scrollTo_y\") {\n this.skipY = 1;\n }\n }\n};\nScrollToPlugin.max = _max;\nScrollToPlugin.getOffset = _getOffset;\nScrollToPlugin.buildGetter = _buildGetter;\n_getGSAP() && gsap.registerPlugin(ScrollToPlugin);\nexport { ScrollToPlugin as default };","import React from 'react'\nimport { gsap, TweenMax, TimelineMax } from \"gsap\"\nimport { CustomEase } from \"gsap/CustomEase\"\nimport { ScrollToPlugin } from \"gsap/ScrollToPlugin\"\nimport browser from 'browser-detect'\nimport { useRecoilState } from 'recoil'\nimport { scrollState } from '@status'\n\n\ngsap.registerPlugin(CustomEase)\ngsap.registerPlugin(ScrollToPlugin)\nlet customEase = CustomEase.create(\"custom\", \"M0,0 C0.356,-0.002 0.298,0.608 0.4,0.8 0.506,1 0.764,1 1,1\")\n\n// Hook\nfunction SmoothScroll(targetId, offset = 100)\n{\n const [_scrollState, setScrollState] = useRecoilState(scrollState)\n let spOffset = 0\n const { mobile } = browser()\n\n if( mobile ){\n spOffset = 64\n }\n\n if(!targetId) return\n\n let t = document.getElementById(targetId.replace( /#/g , '' ))\n\n // console.log(targetId,t.offsetTop)\n if( t ){\n const y = t.offsetTop - offset + spOffset\n TweenMax.to('.container', 0.6,{\n scrollTo: y,\n ease: customEase,\n onComplete: () => {\n setScrollState({\n ..._scrollState,\n currentScrollRaito: 1.5\n })\n }\n })\n let p = { value: 0 }\n TweenMax.to(p, 3.0,{\n value: 1.5,\n ease: customEase,\n onUpdate: () => {\n setScrollState({\n ..._scrollState,\n currentScrollRaito: p.value\n })\n }\n })\n }\n}\n\nexport { SmoothScroll }","// import scrollTo from 'gatsby-plugin-smoothscroll';\n// import { animateScroll as scroll } from 'react-scroll'\nimport { SmoothScroll } from \"@hooks/useSmoothScroll\";\nimport { globalHistory } from \"@reach/router\";\nimport {\n\tModalContentState,\n\tModalMenuState,\n\tloadState,\n\ttransitionCurrentState,\n} from \"@status\";\nimport Browser from \"browser-detect\";\nimport { navigate } from \"gatsby\";\nimport React from \"react\";\nimport { useRecoilState } from \"recoil\";\n\nimport { useTransition } from \"@hooks/useTransitionStatus\";\n\nexport default function Link({\n\tchildren,\n\tonClick = () => {},\n\tto = null,\n\tscrollTarget = null,\n\tdelay = 0,\n\ttarget,\n\tdisableMode = false,\n\tisHtml = false,\n\t...props\n}) {\n\tconst [_loadState, setLoadState] = useRecoilState(loadState);\n\tconst [_modalContentState, setModalContentState] =\n\t\tuseRecoilState(ModalContentState);\n\tconst [_modalMenuState, setModalMenuState] = useRecoilState(ModalMenuState);\n\tconst [_transitionCurrentState, setTransitionCurrentState] = useRecoilState(\n\t\ttransitionCurrentState,\n\t);\n\tconst transition = useTransition({ isStayEnd: true });\n\tconst browser = React.useRef(Browser());\n\n\tconst { className, key } = props;\n\n\tlet offset = -100;\n\tif (browser.current.mobile) {\n\t\toffset = -64;\n\t}\n\n\tconst handleClick = (e) => {\n\t\te.stopPropagation();\n\t\te.preventDefault();\n\t\tif (_transitionCurrentState !== \"none\") {\n\t\t\treturn;\n\t\t}\n\n\t\tconst pathname = globalHistory.location\n\t\t\t? globalHistory.location.pathname\n\t\t\t: null;\n\n\t\tif (pathname === to) {\n\t\t\t//遷移させない\n\t\t\tif (scrollTarget) {\n\t\t\t\t// navigate(`${to}${scrollTarget}`)\n\t\t\t\tif (_modalMenuState.isOpenModalMenu) {\n\t\t\t\t\tsetModalMenuState({\n\t\t\t\t\t\t..._modalMenuState,\n\t\t\t\t\t\tisNowModalAnimation: true,\n\t\t\t\t\t\tisOpenModalMenu: false,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (window.locomotiveScroll) {\n\t\t\t\t\twindow.locomotiveScroll.scrollTo(scrollTarget, {\n\t\t\t\t\t\toffset: offset,\n\t\t\t\t\t\tduration: 600,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tSmoothScroll(scrollTarget, offset);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t//遷移する\n\t\t\tif (_modalMenuState.isOpenModalMenu) {\n\t\t\t\tsetModalMenuState({\n\t\t\t\t\t..._modalMenuState,\n\t\t\t\t\tisModalMenuTransition: true,\n\t\t\t\t\tisOpenModalMenu: false,\n\t\t\t\t});\n\t\t\t}\n\t\t\ttransition.start();\n\n\t\t\tif (onClick) {\n\t\t\t\tonClick(e);\n\t\t\t}\n\t\t\tif (!scrollTarget) {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tnavigate(to);\n\t\t\t\t}, delay);\n\t\t\t} else {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tnavigate(`${to}`);\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tif (window.locomotiveScroll) {\n\t\t\t\t\t\t\twindow.locomotiveScroll.scrollTo(scrollTarget, {\n\t\t\t\t\t\t\t\toffset: offset,\n\t\t\t\t\t\t\t\tduration: 600,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSmoothScroll(scrollTarget);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 3000);\n\t\t\t\t}, delay);\n\t\t\t}\n\t\t}\n\t};\n\n\t// const [isDisable, setIsDisable] = React.useState(false)\n\n\t// React.useEffect(()=>{\n\t// \tlet pathname = globalHistory.location ? globalHistory.location.pathname : null\n\t// \tif( disableMode === false ){\n\t// \t\tsetIsDisable(true)\n\t// \t}\n\t// \tif( pathname === to || pathname === `/recruit${to}` || pathname === `/recruit${to}/` ){\n\t// \t\tsetIsDisable(true)\n\t// \t} else {\n\t// \t\tsetIsDisable(false)\n\t// \t}\n\t// })\n\n\treturn (\n\t\t\n\t\t\t{to && !to.match(/http/) ? (\n\t\t\t\t!isHtml ? (\n\t\t\t\t\t handleClick(e)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t\n\t\t\t\t) : (\n\t\t\t\t\t handleClick(e)}\n\t\t\t\t\t\tdangerouslySetInnerHTML={{ __html: children }}\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t) : !isHtml ? (\n\t\t\t\t\n\t\t\t\t\t{children}\n\t\t\t\t\n\t\t\t) : (\n\t\t\t\t\n\t\t\t)}\n\t\t\n\t);\n}\n","import React, { useEffect, useRef} from 'react'\n\n// Hook\nfunction useEventListener(eventName, handler, element = typeof window === \"undefined\" ? null : window)\n{\n // Create a ref that stores handler\n const savedHandler = useRef()\n\n // Update ref.current value if handler changes.\n // This allows our effect below to always get latest handler ...\n // ... without us needing to pass it in effect deps array ...\n // ... and potentially cause effect to re-run every render.\n useEffect(() => {\n if( !element ){\n return\n }\n savedHandler.current = handler\n }, [handler])\n\n useEffect( () => {\n if( !element ){\n return\n }\n // Make sure element supports addEventListener\n // On\n const isSupported = element && element.addEventListener\n if (!isSupported){\n console.log('no supported')\n return\n }\n // Create event listener that calls handler function stored in ref\n const eventListener = event => savedHandler.current(event)\n\n // Add event listener\n element.addEventListener(eventName, eventListener, true)\n // Remove event listener on cleanup\n return () => {\n element.removeEventListener(eventName, eventListener)\n }\n },\n [eventName, element] // Re-run if eventName or element changes\n )\n}\n\nexport { useEventListener }","\nimport React from 'react'\nimport { gsap } from \"gsap\"\nimport { CustomEase } from \"gsap/CustomEase\"\n\n\nfunction useGsapPlugins()\n{\n gsap.registerPlugin(CustomEase)\n\n const plugins = React.useCallback(()=>{\n return {\n CustomEase: CustomEase,\n customEase01: CustomEase.create(\"custom\", \"M0,0 C0.356,-0.002 0.298,0.608 0.4,0.8 0.506,1 0.764,1 1,1\"),\n }\n },[])\n\n return plugins\n}\n\nexport { useGsapPlugins }","import { ModalContentState, transitionCurrentState } from \"@status\";\nimport React from \"react\";\nimport { useRecoilState } from \"recoil\";\n// current : none start middle end\nconst duration = 1.6;\nconst Status = React.createContext({\n\tcurrent: \"none\",\n\tstartActions: [() => {}],\n\tmiddleActions: [() => {}],\n\tendActions: [() => {}],\n});\n\nconst useTransitionStatus = () => {\n\tconst status = React.useContext(Status);\n\treturn status;\n};\n\nconst useTransition = ({ isStayEnd }) => {\n\tconst [_transitionCurrentState, setTransitionCurrentState] = useRecoilState(\n\t\ttransitionCurrentState,\n\t);\n\tconst [_modalContentState, setModalContentState] =\n\t\tuseRecoilState(ModalContentState);\n\tconst [_modalMenuState, setModalMenuState] =\n\t\tuseRecoilState(ModalContentState);\n\tconst intervalRef = React.useRef(null);\n\tconst [isStatyStart, setIsStayStart] = React.useState(false);\n\tconst d = duration * 1000;\n\n\tconst start = () => {\n\t\t//start\n\t\tconsole.log(\"===========start\");\n\t\tsetModalContentState({\n\t\t\t..._modalContentState,\n\t\t\tisContentModal: false,\n\t\t\tdataList: [],\n\t\t});\n\t\tsetTransitionCurrentState(\"start\");\n\n\t\tsetTimeout(() => {\n\t\t\tconsole.log(\"===========middle\");\n\t\t\tsetTransitionCurrentState(\"middle\");\n\t\t\tsetModalMenuState({\n\t\t\t\t..._modalMenuState,\n\t\t\t\tisModalMenuTransition: false,\n\t\t\t});\n\t\t}, d * 1);\n\n\t\tif (!isStayEnd) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tconsole.log(\"===========end\");\n\t\t\t\tsetTransitionCurrentState(\"end\");\n\t\t\t}, d * 2);\n\t\t} else {\n\t\t\tsetTimeout(() => {\n\t\t\t\tconsole.log(\"===========stay\");\n\t\t\t\tsetTransitionCurrentState(\"stay\");\n\t\t\t}, d * 2);\n\t\t}\n\t};\n\n\tReact.useEffect(() => {\n\t\tconsole.log(\"==== ch effect\");\n\t\tclearInterval(intervalRef.current);\n\t\tif (!isStatyStart) {\n\t\t\t// setIsStayStart(true)\n\t\t\tintervalRef.current = setInterval(async () => {\n\t\t\t\tconsole.log(\"============ check ts\", _transitionCurrentState);\n\t\t\t\tif (_transitionCurrentState === \"stay\") {\n\t\t\t\t\tconsole.log(\"===========end\");\n\t\t\t\t\tsetTransitionCurrentState(\"end\");\n\t\t\t\t\tclearInterval(intervalRef.current);\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetTransitionCurrentState(\"none\");\n\t\t\t\t\t}, d / 2);\n\t\t\t\t} else {\n\t\t\t\t\tclearInterval(intervalRef.current);\n\t\t\t\t\tconsole.log(\"============ ch over\", _transitionCurrentState);\n\t\t\t\t}\n\t\t\t}, 300);\n\t\t} else {\n\t\t}\n\t}, [_transitionCurrentState]);\n\n\tconst stayStart = () => {\n\t\tif (!isStatyStart) {\n\t\t\t// setIsStayStart(true)\n\t\t}\n\t};\n\n\treturn {\n\t\tstatus: React.useContext(Status),\n\t\tduration: duration,\n\t\tstart,\n\t\tstayStart,\n\t};\n};\n\nexport { useTransition, duration, Status };\n","import { useTranslation } from \"react-i18next\";\n\n// Hook\n\nconst useMenuLink = () => {\n\treturn [\n\t\t// {\n\t\t// label: 'About',\n\t\t// to: '/',\n\t\t// target: '#about'\n\t\t// },\n\t\t{\n\t\t\tlabel: \"NEWS\",\n\t\t\tto: \"/news/\",\n\t\t\ttarget: null,\n\t\t},\n\t\t{\n\t\t\tlabel: \"OFFICIAL WORKS\",\n\t\t\tto: \"/gallery/\",\n\t\t\tchild: [\n\t\t\t\t{\n\t\t\t\t\tlabel: \"ILLUST\",\n\t\t\t\t\tto: \"/illust/\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: \"COMICS\",\n\t\t\t\t\tto: \"/comics/\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: \"SONGS\",\n\t\t\t\t\tto: \"/songs/\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: \"LABO\",\n\t\t\t\t\tto: \"/labo/\",\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tlabel: \"GOODS\",\n\t\t\tto: \"/goods/\",\n\t\t\tchild: [\n\t\t\t\t{\n\t\t\t\t\tlabel: \"VOCALOID™\",\n\t\t\t\t\tto: \"/vocaloid/\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: \"LINE STICKERS\",\n\t\t\t\t\tto: \"/linestickers/\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: \"HOT ITEMS\",\n\t\t\t\t\tto: \"/hotitems/\",\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t// {\n\t\t// \tlabel: \"SHOP\",\n\t\t// \tto: \"https://mangahack.myshopify.com/?sc_cid=txt_tw_20211021\",\n\t\t// \tblank: true,\n\t\t// \ttarget: null,\n\t\t// },\n\t\t{\n\t\t\tlabel: \"DOWNLOAD\",\n\t\t\tto: \"/download/\",\n\t\t\ttarget: null,\n\t\t},\n\t\t{\n\t\t\tlabel: \"CONTACT\",\n\t\t\tto: \"/\",\n\t\t\ttarget: \"#contact\",\n\t\t},\n\t];\n};\n\nconst useFooterLink = () => {\n\tconst { t } = useTranslation();\n\treturn [\n\t\t{\n\t\t\tlabel: t(\"footer__privacy\"),\n\t\t\tto: \"/privacy-policy/\",\n\t\t},\n\t];\n};\n\nconst useURL = () => {\n\treturn {\n\t\ttwitter: \"https://twitter.com/miraikomachi_pr\",\n\t\tyoutube: \"https://www.youtube.com/channel/UCxxn_H4NADHRHKS8qMsWjDA/\",\n\n\t\tbandainamuco: \"https://www.bandainamco-mirai.com\",\n\t\tprivacy: \"https://www.bandainamco-mirai.com/privacy/\",\n\t\tstore: \"https://www.vocaloid.com/products/show/v4l_komachi\",\n\n\t\tmodelUnityZip:\n\t\t\t\"https://github.com/Miraikomachi/MiraikomachiUnity/archive/master.zip\",\n\t\tmodelUnityRepo: \"https://github.com/Miraikomachi/MiraikomachiUnity\",\n\t\tmodelUnityZip201904:\n\t\t\t\"https://github.com/Miraikomachi/MiraikomachiUnityUTS/archive/main.zip\",\n\t\tmodelUnityRepo201904:\n\t\t\t\"https://github.com/Miraikomachi/MiraikomachiUnityUTS\",\n\t\tmodelVrmZip:\n\t\t\t\"https://github.com/Miraikomachi/MiraikomachiVRM/archive/master.zip\",\n\t\tmodelVrmRepo: \"https://github.com/Miraikomachi/MiraikomachiVRM\",\n\t\tmodelMmdZip:\n\t\t\t\"https://github.com/Miraikomachi/MiraikomachiPMX/archive/master.zip\",\n\t\tmodelMmdRepo: \"https://github.com/Miraikomachi/MiraikomachiPMX\",\n\t\tmodelBlenderZip:\n\t\t\t\"https://github.com/Miraikomachi/MiraikomachiForBlender/archive/refs/heads/main.zip\",\n\t\tmodelBlenderRepo: \"https://github.com/Miraikomachi/MiraikomachiForBlender\",\n\t\tvoiceZip:\n\t\t\t\"https://github.com/Miraikomachi/AIVoiceSamples/archive/refs/heads/main.zip\",\n\t\tvoiceRepo: \"https://github.com/Miraikomachi/AIVoiceSamples\",\n\n\t\tshop: \"https://mangahack.myshopify.com/?sc_cid=txt_tw_20211021\",\n\t};\n};\n\nexport { useMenuLink, useFooterLink, useURL };\n","import { atom } from 'recoil'\nimport { WEBGL } from 'three/examples/jsm/WebGL.js'\n\n\nexport const scrollState = atom({\n key: 'scrollState',\n default: {\n preScrollTop: 0,\n currentScrollTarget: 0,\n currentScrollTop:0,\n currentScrollRaito:0\n }\n});\n\nexport const isPopState = atom({\n key: 'isPopState',\n default: true\n});\n\nexport const langState = atom({\n key: 'LangState',\n default: \"ja\"\n});\n\n\nexport const locomotiveScrollState = atom({\n key: 'locomotiveScrollState',\n default: null\n});\n\nexport const isWebGlState = atom({\n key: 'isWebGlState',\n default: WEBGL.isWebGLAvailable()\n});\n\nexport const loadState = atom({\n key: 'loadState',\n default: {\n \tisLoadedModelData: false,\n isLoaded: false,\n isLoadedAnimated: false,\n isLoadedParticleAnimated: false,\n }\n});\n\nexport const transitionCurrentState = atom({\n key: 'transitionCurrentState',\n default: \"none\"\n});\n\nexport const ModalMenuState = atom({\n key: 'ModalMenuState',\n default: {\n isOpenModalMenu: false,\n isNowModalAnimation: false,\n isModalMenuTransition: false,\n isModalMenuSmoothScroll: false,\n }\n});\n\nexport const ModalContentState = atom({\n key: 'ModalContentState',\n default: {\n data:null,\n dataList: null,\n dataListCurrentId: null,\n isContentModal: false,\n isContentModalDetail: false,\n }\n});\n","/*!\n * paths 3.4.2\n * https://greensock.com\n *\n * Copyright 2008-2020, GreenSock. All rights reserved.\n * Subject to the terms at https://greensock.com/standard-license or for\n * Club GreenSock members, the agreement issued with that membership.\n * @author: Jack Doyle, jack@greensock.com\n*/\n\n/* eslint-disable */\nvar _svgPathExp = /[achlmqstvz]|(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[0-9]/ig,\n _numbersExp = /(?:(-)?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[0-9]/ig,\n _scientific = /[\\+\\-]?\\d*\\.?\\d+e[\\+\\-]?\\d+/ig,\n _selectorExp = /(^[#\\.][a-z]|[a-y][a-z])/i,\n _DEG2RAD = Math.PI / 180,\n _RAD2DEG = 180 / Math.PI,\n _sin = Math.sin,\n _cos = Math.cos,\n _abs = Math.abs,\n _sqrt = Math.sqrt,\n _atan2 = Math.atan2,\n _largeNum = 1e8,\n _isString = function _isString(value) {\n return typeof value === \"string\";\n},\n _isNumber = function _isNumber(value) {\n return typeof value === \"number\";\n},\n _isUndefined = function _isUndefined(value) {\n return typeof value === \"undefined\";\n},\n _temp = {},\n _temp2 = {},\n _roundingNum = 1e5,\n _wrapProgress = function _wrapProgress(progress) {\n return Math.round((progress + _largeNum) % 1 * _roundingNum) / _roundingNum || (progress < 0 ? 0 : 1);\n},\n //if progress lands on 1, the % will make it 0 which is why we || 1, but not if it's negative because it makes more sense for motion to end at 0 in that case.\n_round = function _round(value) {\n return Math.round(value * _roundingNum) / _roundingNum || 0;\n},\n _splitSegment = function _splitSegment(rawPath, segIndex, i, t) {\n var segment = rawPath[segIndex],\n shift = t === 1 ? 6 : subdivideSegment(segment, i, t);\n\n if (shift && shift + i + 2 < segment.length) {\n rawPath.splice(segIndex, 0, segment.slice(0, i + shift + 2));\n segment.splice(0, i + shift);\n return 1;\n }\n},\n _reverseRawPath = function _reverseRawPath(rawPath, skipOuter) {\n var i = rawPath.length;\n\n if (!skipOuter) {\n rawPath.reverse();\n }\n\n while (i--) {\n if (!rawPath[i].reversed) {\n reverseSegment(rawPath[i]);\n }\n }\n},\n _copyMetaData = function _copyMetaData(source, copy) {\n copy.totalLength = source.totalLength;\n\n if (source.samples) {\n //segment\n copy.samples = source.samples.slice(0);\n copy.lookup = source.lookup.slice(0);\n copy.minLength = source.minLength;\n copy.resolution = source.resolution;\n } else {\n //rawPath\n copy.totalPoints = source.totalPoints;\n }\n\n return copy;\n},\n //pushes a new segment into a rawPath, but if its starting values match the ending values of the last segment, it'll merge it into that same segment (to reduce the number of segments)\n_appendOrMerge = function _appendOrMerge(rawPath, segment) {\n var index = rawPath.length,\n prevSeg = rawPath[index - 1] || [],\n l = prevSeg.length;\n\n if (segment[0] === prevSeg[l - 2] && segment[1] === prevSeg[l - 1]) {\n segment = prevSeg.concat(segment.slice(2));\n index--;\n }\n\n rawPath[index] = segment;\n},\n _bestDistance;\n/* TERMINOLOGY\n - RawPath - an array of arrays, one for each Segment. A single RawPath could have multiple \"M\" commands, defining Segments (paths aren't always connected).\n - Segment - an array containing a sequence of Cubic Bezier coordinates in alternating x, y, x, y format. Starting anchor, then control point 1, control point 2, and ending anchor, then the next control point 1, control point 2, anchor, etc. Uses less memory than an array with a bunch of {x, y} points.\n - Bezier - a single cubic Bezier with a starting anchor, two control points, and an ending anchor.\n - the variable \"t\" is typically the position along an individual Bezier path (time) and it's NOT linear, meaning it could accelerate/decelerate based on the control points whereas the \"p\" or \"progress\" value is linearly mapped to the whole path, so it shouldn't really accelerate/decelerate based on control points. So a progress of 0.2 would be almost exactly 20% along the path. \"t\" is ONLY in an individual Bezier piece.\n */\n//accepts basic selector text, a path instance, a RawPath instance, or a Segment and returns a RawPath (makes it easy to homogenize things). If an element or selector text is passed in, it'll also cache the value so that if it's queried again, it'll just take the path data from there instead of parsing it all over again (as long as the path data itself hasn't changed - it'll check).\n\n\nexport function getRawPath(value) {\n value = _isString(value) && _selectorExp.test(value) ? document.querySelector(value) || value : value;\n var e = value.getAttribute ? value : 0,\n rawPath;\n\n if (e && (value = value.getAttribute(\"d\"))) {\n //implements caching\n if (!e._gsPath) {\n e._gsPath = {};\n }\n\n rawPath = e._gsPath[value];\n return rawPath && !rawPath._dirty ? rawPath : e._gsPath[value] = stringToRawPath(value);\n }\n\n return !value ? console.warn(\"Expecting a element or an SVG path data string\") : _isString(value) ? stringToRawPath(value) : _isNumber(value[0]) ? [value] : value;\n} //copies a RawPath WITHOUT the length meta data (for speed)\n\nexport function copyRawPath(rawPath) {\n var a = [],\n i = 0;\n\n for (; i < rawPath.length; i++) {\n a[i] = _copyMetaData(rawPath[i], rawPath[i].slice(0));\n }\n\n return _copyMetaData(rawPath, a);\n}\nexport function reverseSegment(segment) {\n var i = 0,\n y;\n segment.reverse(); //this will invert the order y, x, y, x so we must flip it back.\n\n for (; i < segment.length; i += 2) {\n y = segment[i];\n segment[i] = segment[i + 1];\n segment[i + 1] = y;\n }\n\n segment.reversed = !segment.reversed;\n}\n\nvar _createPath = function _createPath(e, ignore) {\n var path = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\"),\n attr = [].slice.call(e.attributes),\n i = attr.length,\n name;\n ignore = \",\" + ignore + \",\";\n\n while (--i > -1) {\n name = attr[i].nodeName.toLowerCase(); //in Microsoft Edge, if you don't set the attribute with a lowercase name, it doesn't render correctly! Super weird.\n\n if (ignore.indexOf(\",\" + name + \",\") < 0) {\n path.setAttributeNS(null, name, attr[i].nodeValue);\n }\n }\n\n return path;\n},\n _typeAttrs = {\n rect: \"rx,ry,x,y,width,height\",\n circle: \"r,cx,cy\",\n ellipse: \"rx,ry,cx,cy\",\n line: \"x1,x2,y1,y2\"\n},\n _attrToObj = function _attrToObj(e, attrs) {\n var props = attrs ? attrs.split(\",\") : [],\n obj = {},\n i = props.length;\n\n while (--i > -1) {\n obj[props[i]] = +e.getAttribute(props[i]) || 0;\n }\n\n return obj;\n}; //converts an SVG shape like , , , , , etc. to a , swapping it in and copying the attributes to match.\n\n\nexport function convertToPath(element, swap) {\n var type = element.tagName.toLowerCase(),\n circ = 0.552284749831,\n data,\n x,\n y,\n r,\n ry,\n path,\n rcirc,\n rycirc,\n points,\n w,\n h,\n x2,\n x3,\n x4,\n x5,\n x6,\n y2,\n y3,\n y4,\n y5,\n y6,\n attr;\n\n if (type === \"path\" || !element.getBBox) {\n return element;\n }\n\n path = _createPath(element, \"x,y,width,height,cx,cy,rx,ry,r,x1,x2,y1,y2,points\");\n attr = _attrToObj(element, _typeAttrs[type]);\n\n if (type === \"rect\") {\n r = attr.rx;\n ry = attr.ry || r;\n x = attr.x;\n y = attr.y;\n w = attr.width - r * 2;\n h = attr.height - ry * 2;\n\n if (r || ry) {\n //if there are rounded corners, render cubic beziers\n x2 = x + r * (1 - circ);\n x3 = x + r;\n x4 = x3 + w;\n x5 = x4 + r * circ;\n x6 = x4 + r;\n y2 = y + ry * (1 - circ);\n y3 = y + ry;\n y4 = y3 + h;\n y5 = y4 + ry * circ;\n y6 = y4 + ry;\n data = \"M\" + x6 + \",\" + y3 + \" V\" + y4 + \" C\" + [x6, y5, x5, y6, x4, y6, x4 - (x4 - x3) / 3, y6, x3 + (x4 - x3) / 3, y6, x3, y6, x2, y6, x, y5, x, y4, x, y4 - (y4 - y3) / 3, x, y3 + (y4 - y3) / 3, x, y3, x, y2, x2, y, x3, y, x3 + (x4 - x3) / 3, y, x4 - (x4 - x3) / 3, y, x4, y, x5, y, x6, y2, x6, y3].join(\",\") + \"z\";\n } else {\n data = \"M\" + (x + w) + \",\" + y + \" v\" + h + \" h\" + -w + \" v\" + -h + \" h\" + w + \"z\";\n }\n } else if (type === \"circle\" || type === \"ellipse\") {\n if (type === \"circle\") {\n r = ry = attr.r;\n rycirc = r * circ;\n } else {\n r = attr.rx;\n ry = attr.ry;\n rycirc = ry * circ;\n }\n\n x = attr.cx;\n y = attr.cy;\n rcirc = r * circ;\n data = \"M\" + (x + r) + \",\" + y + \" C\" + [x + r, y + rycirc, x + rcirc, y + ry, x, y + ry, x - rcirc, y + ry, x - r, y + rycirc, x - r, y, x - r, y - rycirc, x - rcirc, y - ry, x, y - ry, x + rcirc, y - ry, x + r, y - rycirc, x + r, y].join(\",\") + \"z\";\n } else if (type === \"line\") {\n data = \"M\" + attr.x1 + \",\" + attr.y1 + \" L\" + attr.x2 + \",\" + attr.y2; //previously, we just converted to \"Mx,y Lx,y\" but Safari has bugs that cause that not to render properly when using a stroke-dasharray that's not fully visible! Using a cubic bezier fixes that issue.\n } else if (type === \"polyline\" || type === \"polygon\") {\n points = (element.getAttribute(\"points\") + \"\").match(_numbersExp) || [];\n x = points.shift();\n y = points.shift();\n data = \"M\" + x + \",\" + y + \" L\" + points.join(\",\");\n\n if (type === \"polygon\") {\n data += \",\" + x + \",\" + y + \"z\";\n }\n }\n\n path.setAttribute(\"d\", rawPathToString(path._gsRawPath = stringToRawPath(data)));\n\n if (swap && element.parentNode) {\n element.parentNode.insertBefore(path, element);\n element.parentNode.removeChild(element);\n }\n\n return path;\n} //returns the rotation (in degrees) at a particular progress on a rawPath (the slope of the tangent)\n\nexport function getRotationAtProgress(rawPath, progress) {\n var d = getProgressData(rawPath, progress >= 1 ? 1 - 1e-9 : progress ? progress : 1e-9);\n return getRotationAtBezierT(d.segment, d.i, d.t);\n}\n\nfunction getRotationAtBezierT(segment, i, t) {\n var a = segment[i],\n b = segment[i + 2],\n c = segment[i + 4],\n x;\n a += (b - a) * t;\n b += (c - b) * t;\n a += (b - a) * t;\n x = b + (c + (segment[i + 6] - c) * t - b) * t - a;\n a = segment[i + 1];\n b = segment[i + 3];\n c = segment[i + 5];\n a += (b - a) * t;\n b += (c - b) * t;\n a += (b - a) * t;\n return _round(_atan2(b + (c + (segment[i + 7] - c) * t - b) * t - a, x) * _RAD2DEG);\n}\n\nexport function sliceRawPath(rawPath, start, end) {\n if (_isUndefined(end)) {\n end = 1;\n }\n\n start = start || 0;\n var reverse = start > end,\n loops = Math.max(0, ~~(_abs(end - start) - 1e-8));\n\n if (reverse) {\n reverse = end;\n end = start;\n start = reverse;\n reverse = 1;\n loops -= loops ? 1 : 0;\n }\n\n if (start < 0 || end < 0) {\n var offset = ~~Math.min(start, end) + 1;\n start += offset;\n end += offset;\n }\n\n var path = copyRawPath(rawPath.totalLength ? rawPath : cacheRawPathMeasurements(rawPath)),\n wrap = end > 1,\n s = getProgressData(path, start, _temp, true),\n e = getProgressData(path, end, _temp2),\n eSeg = e.segment,\n sSeg = s.segment,\n eSegIndex = e.segIndex,\n sSegIndex = s.segIndex,\n ei = e.i,\n si = s.i,\n sameSegment = sSegIndex === eSegIndex,\n sameBezier = ei === si && sameSegment,\n invertedOrder = sameSegment && si > ei || sameBezier && s.t > e.t,\n sShift,\n eShift,\n i,\n copy,\n totalSegments,\n l,\n j;\n\n if (wrap || loops) {\n if (_splitSegment(path, sSegIndex, si, s.t)) {\n sShift = 1;\n sSegIndex++;\n\n if (sameBezier) {\n if (invertedOrder) {\n e.t /= s.t;\n } else {\n e.t = (e.t - s.t) / (1 - s.t);\n eSegIndex++;\n ei = 0;\n }\n } else if (sSegIndex <= eSegIndex + 1 && !invertedOrder) {\n eSegIndex++;\n\n if (sameSegment) {\n ei -= si;\n }\n }\n }\n\n if (!e.t) {\n eSegIndex--;\n\n if (reverse) {\n sSegIndex--;\n }\n } else if (_splitSegment(path, eSegIndex, ei, e.t)) {\n if (invertedOrder && sShift) {\n sSegIndex++;\n }\n\n if (reverse) {\n eSegIndex++;\n }\n }\n\n copy = [];\n totalSegments = path.length;\n l = 1 + totalSegments * loops;\n j = sSegIndex;\n\n if (reverse) {\n eSegIndex = (eSegIndex || totalSegments) - 1;\n l += (totalSegments - eSegIndex + sSegIndex) % totalSegments;\n\n for (i = 0; i < l; i++) {\n _appendOrMerge(copy, path[j]);\n\n j = (j || totalSegments) - 1;\n }\n } else {\n l += (totalSegments - sSegIndex + eSegIndex) % totalSegments;\n\n for (i = 0; i < l; i++) {\n _appendOrMerge(copy, path[j++ % totalSegments]);\n }\n }\n\n path = copy;\n } else {\n eShift = e.t === 1 ? 6 : subdivideSegment(eSeg, ei, e.t);\n\n if (start !== end) {\n sShift = subdivideSegment(sSeg, si, sameBezier ? s.t / e.t : s.t);\n\n if (sameSegment) {\n eShift += sShift;\n }\n\n eSeg.splice(ei + eShift + 2);\n\n if (sShift || si) {\n sSeg.splice(0, si + sShift);\n }\n\n i = path.length;\n\n while (i--) {\n //chop off any extra segments\n if (i < sSegIndex || i > eSegIndex) {\n path.splice(i, 1);\n }\n }\n } else {\n eSeg.angle = getRotationAtBezierT(eSeg, ei + eShift, 0); //record the value before we chop because it'll be impossible to determine the angle after its length is 0!\n\n ei += eShift;\n s = eSeg[ei];\n e = eSeg[ei + 1];\n eSeg.length = eSeg.totalLength = 0;\n eSeg.totalPoints = path.totalPoints = 8;\n eSeg.push(s, e, s, e, s, e, s, e);\n }\n }\n\n if (reverse) {\n _reverseRawPath(path, wrap || loops);\n }\n\n path.totalLength = 0;\n return path;\n} //measures a Segment according to its resolution (so if segment.resolution is 6, for example, it'll take 6 samples equally across each Bezier) and create/populate a \"samples\" array that has the length up to each of those sample points (always increasing from the start) as well as a \"lookup\" array that's broken up according to the smallest distance between 2 samples. This gives us a very fast way of looking up a progress position rather than looping through all the points/Beziers. You can optionally have it only measure a subset, starting at startIndex and going for a specific number of beziers (remember, there are 3 x/y pairs each, for a total of 6 elements for each Bezier). It will also populate a \"totalLength\" property, but that's not generally super accurate because by default it'll only take 6 samples per Bezier. But for performance reasons, it's perfectly adequate for measuring progress values along the path. If you need a more accurate totalLength, either increase the resolution or use the more advanced bezierToPoints() method which keeps adding points until they don't deviate by more than a certain precision value.\n\nfunction measureSegment(segment, startIndex, bezierQty) {\n startIndex = startIndex || 0;\n\n if (!segment.samples) {\n segment.samples = [];\n segment.lookup = [];\n }\n\n var resolution = ~~segment.resolution || 12,\n inc = 1 / resolution,\n endIndex = bezierQty ? startIndex + bezierQty * 6 + 1 : segment.length,\n x1 = segment[startIndex],\n y1 = segment[startIndex + 1],\n samplesIndex = startIndex ? startIndex / 6 * resolution : 0,\n samples = segment.samples,\n lookup = segment.lookup,\n min = (startIndex ? segment.minLength : _largeNum) || _largeNum,\n prevLength = samples[samplesIndex + bezierQty * resolution - 1],\n length = startIndex ? samples[samplesIndex - 1] : 0,\n i,\n j,\n x4,\n x3,\n x2,\n xd,\n xd1,\n y4,\n y3,\n y2,\n yd,\n yd1,\n inv,\n t,\n lengthIndex,\n l,\n segLength;\n samples.length = lookup.length = 0;\n\n for (j = startIndex + 2; j < endIndex; j += 6) {\n x4 = segment[j + 4] - x1;\n x3 = segment[j + 2] - x1;\n x2 = segment[j] - x1;\n y4 = segment[j + 5] - y1;\n y3 = segment[j + 3] - y1;\n y2 = segment[j + 1] - y1;\n xd = xd1 = yd = yd1 = 0;\n\n if (_abs(x4) < 1e-5 && _abs(y4) < 1e-5 && _abs(x2) + _abs(y2) < 1e-5) {\n //dump points that are sufficiently close (basically right on top of each other, making a bezier super tiny or 0 length)\n if (segment.length > 8) {\n segment.splice(j, 6);\n j -= 6;\n endIndex -= 6;\n }\n } else {\n for (i = 1; i <= resolution; i++) {\n t = inc * i;\n inv = 1 - t;\n xd = xd1 - (xd1 = (t * t * x4 + 3 * inv * (t * x3 + inv * x2)) * t);\n yd = yd1 - (yd1 = (t * t * y4 + 3 * inv * (t * y3 + inv * y2)) * t);\n l = _sqrt(yd * yd + xd * xd);\n\n if (l < min) {\n min = l;\n }\n\n length += l;\n samples[samplesIndex++] = length;\n }\n }\n\n x1 += x4;\n y1 += y4;\n }\n\n if (prevLength) {\n prevLength -= length;\n\n for (; samplesIndex < samples.length; samplesIndex++) {\n samples[samplesIndex] += prevLength;\n }\n }\n\n if (samples.length && min) {\n segment.totalLength = segLength = samples[samples.length - 1] || 0;\n segment.minLength = min;\n l = lengthIndex = 0;\n\n for (i = 0; i < segLength; i += min) {\n lookup[l++] = samples[lengthIndex] < i ? ++lengthIndex : lengthIndex;\n }\n } else {\n segment.totalLength = samples[0] = 0;\n }\n\n return startIndex ? length - samples[startIndex / 2 - 1] : length;\n}\n\nexport function cacheRawPathMeasurements(rawPath, resolution) {\n var pathLength, points, i;\n\n for (i = pathLength = points = 0; i < rawPath.length; i++) {\n rawPath[i].resolution = ~~resolution || 12; //steps per Bezier curve (anchor, 2 control points, to anchor)\n\n points += rawPath[i].length;\n pathLength += measureSegment(rawPath[i]);\n }\n\n rawPath.totalPoints = points;\n rawPath.totalLength = pathLength;\n return rawPath;\n} //divide segment[i] at position t (value between 0 and 1, progress along that particular cubic bezier segment that starts at segment[i]). Returns how many elements were spliced into the segment array (either 0 or 6)\n\nexport function subdivideSegment(segment, i, t) {\n if (t <= 0 || t >= 1) {\n return 0;\n }\n\n var ax = segment[i],\n ay = segment[i + 1],\n cp1x = segment[i + 2],\n cp1y = segment[i + 3],\n cp2x = segment[i + 4],\n cp2y = segment[i + 5],\n bx = segment[i + 6],\n by = segment[i + 7],\n x1a = ax + (cp1x - ax) * t,\n x2 = cp1x + (cp2x - cp1x) * t,\n y1a = ay + (cp1y - ay) * t,\n y2 = cp1y + (cp2y - cp1y) * t,\n x1 = x1a + (x2 - x1a) * t,\n y1 = y1a + (y2 - y1a) * t,\n x2a = cp2x + (bx - cp2x) * t,\n y2a = cp2y + (by - cp2y) * t;\n x2 += (x2a - x2) * t;\n y2 += (y2a - y2) * t;\n segment.splice(i + 2, 4, _round(x1a), //first control point\n _round(y1a), _round(x1), //second control point\n _round(y1), _round(x1 + (x2 - x1) * t), //new fabricated anchor on line\n _round(y1 + (y2 - y1) * t), _round(x2), //third control point\n _round(y2), _round(x2a), //fourth control point\n _round(y2a));\n segment.samples && segment.samples.splice(i / 6 * segment.resolution | 0, 0, 0, 0, 0, 0, 0, 0);\n return 6;\n} // returns an object {path, segment, segIndex, i, t}\n\nfunction getProgressData(rawPath, progress, decoratee, pushToNextIfAtEnd) {\n decoratee = decoratee || {};\n rawPath.totalLength || cacheRawPathMeasurements(rawPath);\n\n if (progress < 0 || progress > 1) {\n progress = _wrapProgress(progress);\n }\n\n var segIndex = 0,\n segment = rawPath[0],\n samples,\n resolution,\n length,\n min,\n max,\n i,\n t;\n\n if (rawPath.length > 1) {\n //speed optimization: most of the time, there's only one segment so skip the recursion.\n length = rawPath.totalLength * progress;\n max = i = 0;\n\n while ((max += rawPath[i++].totalLength) < length) {\n segIndex = i;\n }\n\n segment = rawPath[segIndex];\n min = max - segment.totalLength;\n progress = (length - min) / (max - min) || 0;\n }\n\n samples = segment.samples;\n resolution = segment.resolution; //how many samples per cubic bezier chunk\n\n length = segment.totalLength * progress;\n i = segment.lookup[~~(length / segment.minLength)] || 0;\n min = i ? samples[i - 1] : 0;\n max = samples[i];\n\n if (max < length) {\n min = max;\n max = samples[++i];\n }\n\n t = 1 / resolution * ((length - min) / (max - min) + i % resolution);\n i = ~~(i / resolution) * 6;\n\n if (pushToNextIfAtEnd && t === 1) {\n if (i + 6 < segment.length) {\n i += 6;\n t = 0;\n } else if (segIndex + 1 < rawPath.length) {\n i = t = 0;\n segment = rawPath[++segIndex];\n }\n }\n\n decoratee.t = t;\n decoratee.i = i;\n decoratee.path = rawPath;\n decoratee.segment = segment;\n decoratee.segIndex = segIndex;\n return decoratee;\n}\n\nexport function getPositionOnPath(rawPath, progress, includeAngle, point) {\n var segment = rawPath[0],\n result = point || {},\n samples,\n resolution,\n length,\n min,\n max,\n i,\n t,\n a,\n inv;\n\n if (progress < 0 || progress > 1) {\n progress = _wrapProgress(progress);\n }\n\n if (rawPath.length > 1) {\n //speed optimization: most of the time, there's only one segment so skip the recursion.\n length = rawPath.totalLength * progress;\n max = i = 0;\n\n while ((max += rawPath[i++].totalLength) < length) {\n segment = rawPath[i];\n }\n\n min = max - segment.totalLength;\n progress = (length - min) / (max - min) || 0;\n }\n\n samples = segment.samples;\n resolution = segment.resolution;\n length = segment.totalLength * progress;\n i = segment.lookup[~~(length / segment.minLength)] || 0;\n min = i ? samples[i - 1] : 0;\n max = samples[i];\n\n if (max < length) {\n min = max;\n max = samples[++i];\n }\n\n t = 1 / resolution * ((length - min) / (max - min) + i % resolution) || 0;\n inv = 1 - t;\n i = ~~(i / resolution) * 6;\n a = segment[i];\n result.x = _round((t * t * (segment[i + 6] - a) + 3 * inv * (t * (segment[i + 4] - a) + inv * (segment[i + 2] - a))) * t + a);\n result.y = _round((t * t * (segment[i + 7] - (a = segment[i + 1])) + 3 * inv * (t * (segment[i + 5] - a) + inv * (segment[i + 3] - a))) * t + a);\n\n if (includeAngle) {\n result.angle = segment.totalLength ? getRotationAtBezierT(segment, i, t >= 1 ? 1 - 1e-9 : t ? t : 1e-9) : segment.angle || 0;\n }\n\n return result;\n} //applies a matrix transform to RawPath (or a segment in a RawPath) and returns whatever was passed in (it transforms the values in the array(s), not a copy).\n\nexport function transformRawPath(rawPath, a, b, c, d, tx, ty) {\n var j = rawPath.length,\n segment,\n l,\n i,\n x,\n y;\n\n while (--j > -1) {\n segment = rawPath[j];\n l = segment.length;\n\n for (i = 0; i < l; i += 2) {\n x = segment[i];\n y = segment[i + 1];\n segment[i] = x * a + y * c + tx;\n segment[i + 1] = x * b + y * d + ty;\n }\n }\n\n rawPath._dirty = 1;\n return rawPath;\n} // translates SVG arc data into a segment (cubic beziers). Angle is in degrees.\n\nfunction arcToSegment(lastX, lastY, rx, ry, angle, largeArcFlag, sweepFlag, x, y) {\n if (lastX === x && lastY === y) {\n return;\n }\n\n rx = _abs(rx);\n ry = _abs(ry);\n\n var angleRad = angle % 360 * _DEG2RAD,\n cosAngle = _cos(angleRad),\n sinAngle = _sin(angleRad),\n PI = Math.PI,\n TWOPI = PI * 2,\n dx2 = (lastX - x) / 2,\n dy2 = (lastY - y) / 2,\n x1 = cosAngle * dx2 + sinAngle * dy2,\n y1 = -sinAngle * dx2 + cosAngle * dy2,\n x1_sq = x1 * x1,\n y1_sq = y1 * y1,\n radiiCheck = x1_sq / (rx * rx) + y1_sq / (ry * ry);\n\n if (radiiCheck > 1) {\n rx = _sqrt(radiiCheck) * rx;\n ry = _sqrt(radiiCheck) * ry;\n }\n\n var rx_sq = rx * rx,\n ry_sq = ry * ry,\n sq = (rx_sq * ry_sq - rx_sq * y1_sq - ry_sq * x1_sq) / (rx_sq * y1_sq + ry_sq * x1_sq);\n\n if (sq < 0) {\n sq = 0;\n }\n\n var coef = (largeArcFlag === sweepFlag ? -1 : 1) * _sqrt(sq),\n cx1 = coef * (rx * y1 / ry),\n cy1 = coef * -(ry * x1 / rx),\n sx2 = (lastX + x) / 2,\n sy2 = (lastY + y) / 2,\n cx = sx2 + (cosAngle * cx1 - sinAngle * cy1),\n cy = sy2 + (sinAngle * cx1 + cosAngle * cy1),\n ux = (x1 - cx1) / rx,\n uy = (y1 - cy1) / ry,\n vx = (-x1 - cx1) / rx,\n vy = (-y1 - cy1) / ry,\n temp = ux * ux + uy * uy,\n angleStart = (uy < 0 ? -1 : 1) * Math.acos(ux / _sqrt(temp)),\n angleExtent = (ux * vy - uy * vx < 0 ? -1 : 1) * Math.acos((ux * vx + uy * vy) / _sqrt(temp * (vx * vx + vy * vy)));\n\n isNaN(angleExtent) && (angleExtent = PI); //rare edge case. Math.cos(-1) is NaN.\n\n if (!sweepFlag && angleExtent > 0) {\n angleExtent -= TWOPI;\n } else if (sweepFlag && angleExtent < 0) {\n angleExtent += TWOPI;\n }\n\n angleStart %= TWOPI;\n angleExtent %= TWOPI;\n\n var segments = Math.ceil(_abs(angleExtent) / (TWOPI / 4)),\n rawPath = [],\n angleIncrement = angleExtent / segments,\n controlLength = 4 / 3 * _sin(angleIncrement / 2) / (1 + _cos(angleIncrement / 2)),\n ma = cosAngle * rx,\n mb = sinAngle * rx,\n mc = sinAngle * -ry,\n md = cosAngle * ry,\n i;\n\n for (i = 0; i < segments; i++) {\n angle = angleStart + i * angleIncrement;\n x1 = _cos(angle);\n y1 = _sin(angle);\n ux = _cos(angle += angleIncrement);\n uy = _sin(angle);\n rawPath.push(x1 - controlLength * y1, y1 + controlLength * x1, ux + controlLength * uy, uy - controlLength * ux, ux, uy);\n } //now transform according to the actual size of the ellipse/arc (the beziers were noramlized, between 0 and 1 on a circle).\n\n\n for (i = 0; i < rawPath.length; i += 2) {\n x1 = rawPath[i];\n y1 = rawPath[i + 1];\n rawPath[i] = x1 * ma + y1 * mc + cx;\n rawPath[i + 1] = x1 * mb + y1 * md + cy;\n }\n\n rawPath[i - 2] = x; //always set the end to exactly where it's supposed to be\n\n rawPath[i - 1] = y;\n return rawPath;\n} //Spits back a RawPath with absolute coordinates. Each segment starts with a \"moveTo\" command (x coordinate, then y) and then 2 control points (x, y, x, y), then anchor. The goal is to minimize memory and maximize speed.\n\n\nexport function stringToRawPath(d) {\n var a = (d + \"\").replace(_scientific, function (m) {\n var n = +m;\n return n < 0.0001 && n > -0.0001 ? 0 : n;\n }).match(_svgPathExp) || [],\n //some authoring programs spit out very small numbers in scientific notation like \"1e-5\", so make sure we round that down to 0 first.\n path = [],\n relativeX = 0,\n relativeY = 0,\n twoThirds = 2 / 3,\n elements = a.length,\n points = 0,\n errorMessage = \"ERROR: malformed path: \" + d,\n i,\n j,\n x,\n y,\n command,\n isRelative,\n segment,\n startX,\n startY,\n difX,\n difY,\n beziers,\n prevCommand,\n flag1,\n flag2,\n line = function line(sx, sy, ex, ey) {\n difX = (ex - sx) / 3;\n difY = (ey - sy) / 3;\n segment.push(sx + difX, sy + difY, ex - difX, ey - difY, ex, ey);\n };\n\n if (!d || !isNaN(a[0]) || isNaN(a[1])) {\n console.log(errorMessage);\n return path;\n }\n\n for (i = 0; i < elements; i++) {\n prevCommand = command;\n\n if (isNaN(a[i])) {\n command = a[i].toUpperCase();\n isRelative = command !== a[i]; //lower case means relative\n } else {\n //commands like \"C\" can be strung together without any new command characters between.\n i--;\n }\n\n x = +a[i + 1];\n y = +a[i + 2];\n\n if (isRelative) {\n x += relativeX;\n y += relativeY;\n }\n\n if (!i) {\n startX = x;\n startY = y;\n } // \"M\" (move)\n\n\n if (command === \"M\") {\n if (segment) {\n if (segment.length < 8) {\n //if the path data was funky and just had a M with no actual drawing anywhere, skip it.\n path.length -= 1;\n } else {\n points += segment.length;\n }\n }\n\n relativeX = startX = x;\n relativeY = startY = y;\n segment = [x, y];\n path.push(segment);\n i += 2;\n command = \"L\"; //an \"M\" with more than 2 values gets interpreted as \"lineTo\" commands (\"L\").\n // \"C\" (cubic bezier)\n } else if (command === \"C\") {\n if (!segment) {\n segment = [0, 0];\n }\n\n if (!isRelative) {\n relativeX = relativeY = 0;\n } //note: \"*1\" is just a fast/short way to cast the value as a Number. WAAAY faster in Chrome, slightly slower in Firefox.\n\n\n segment.push(x, y, relativeX + a[i + 3] * 1, relativeY + a[i + 4] * 1, relativeX += a[i + 5] * 1, relativeY += a[i + 6] * 1);\n i += 6; // \"S\" (continuation of cubic bezier)\n } else if (command === \"S\") {\n difX = relativeX;\n difY = relativeY;\n\n if (prevCommand === \"C\" || prevCommand === \"S\") {\n difX += relativeX - segment[segment.length - 4];\n difY += relativeY - segment[segment.length - 3];\n }\n\n if (!isRelative) {\n relativeX = relativeY = 0;\n }\n\n segment.push(difX, difY, x, y, relativeX += a[i + 3] * 1, relativeY += a[i + 4] * 1);\n i += 4; // \"Q\" (quadratic bezier)\n } else if (command === \"Q\") {\n difX = relativeX + (x - relativeX) * twoThirds;\n difY = relativeY + (y - relativeY) * twoThirds;\n\n if (!isRelative) {\n relativeX = relativeY = 0;\n }\n\n relativeX += a[i + 3] * 1;\n relativeY += a[i + 4] * 1;\n segment.push(difX, difY, relativeX + (x - relativeX) * twoThirds, relativeY + (y - relativeY) * twoThirds, relativeX, relativeY);\n i += 4; // \"T\" (continuation of quadratic bezier)\n } else if (command === \"T\") {\n difX = relativeX - segment[segment.length - 4];\n difY = relativeY - segment[segment.length - 3];\n segment.push(relativeX + difX, relativeY + difY, x + (relativeX + difX * 1.5 - x) * twoThirds, y + (relativeY + difY * 1.5 - y) * twoThirds, relativeX = x, relativeY = y);\n i += 2; // \"H\" (horizontal line)\n } else if (command === \"H\") {\n line(relativeX, relativeY, relativeX = x, relativeY);\n i += 1; // \"V\" (vertical line)\n } else if (command === \"V\") {\n //adjust values because the first (and only one) isn't x in this case, it's y.\n line(relativeX, relativeY, relativeX, relativeY = x + (isRelative ? relativeY - relativeX : 0));\n i += 1; // \"L\" (line) or \"Z\" (close)\n } else if (command === \"L\" || command === \"Z\") {\n if (command === \"Z\") {\n x = startX;\n y = startY;\n segment.closed = true;\n }\n\n if (command === \"L\" || _abs(relativeX - x) > 0.5 || _abs(relativeY - y) > 0.5) {\n line(relativeX, relativeY, x, y);\n\n if (command === \"L\") {\n i += 2;\n }\n }\n\n relativeX = x;\n relativeY = y; // \"A\" (arc)\n } else if (command === \"A\") {\n flag1 = a[i + 4];\n flag2 = a[i + 5];\n difX = a[i + 6];\n difY = a[i + 7];\n j = 7;\n\n if (flag1.length > 1) {\n // for cases when the flags are merged, like \"a8 8 0 018 8\" (the 0 and 1 flags are WITH the x value of 8, but it could also be \"a8 8 0 01-8 8\" so it may include x or not)\n if (flag1.length < 3) {\n difY = difX;\n difX = flag2;\n j--;\n } else {\n difY = flag2;\n difX = flag1.substr(2);\n j -= 2;\n }\n\n flag2 = flag1.charAt(1);\n flag1 = flag1.charAt(0);\n }\n\n beziers = arcToSegment(relativeX, relativeY, +a[i + 1], +a[i + 2], +a[i + 3], +flag1, +flag2, (isRelative ? relativeX : 0) + difX * 1, (isRelative ? relativeY : 0) + difY * 1);\n i += j;\n\n if (beziers) {\n for (j = 0; j < beziers.length; j++) {\n segment.push(beziers[j]);\n }\n }\n\n relativeX = segment[segment.length - 2];\n relativeY = segment[segment.length - 1];\n } else {\n console.log(errorMessage);\n }\n }\n\n i = segment.length;\n\n if (i < 6) {\n //in case there's odd SVG like a M0,0 command at the very end.\n path.pop();\n i = 0;\n } else if (segment[0] === segment[i - 2] && segment[1] === segment[i - 1]) {\n segment.closed = true;\n }\n\n path.totalPoints = points + i;\n return path;\n} //populates the points array in alternating x/y values (like [x, y, x, y...] instead of individual point objects [{x, y}, {x, y}...] to conserve memory and stay in line with how we're handling segment arrays\n\nexport function bezierToPoints(x1, y1, x2, y2, x3, y3, x4, y4, threshold, points, index) {\n var x12 = (x1 + x2) / 2,\n y12 = (y1 + y2) / 2,\n x23 = (x2 + x3) / 2,\n y23 = (y2 + y3) / 2,\n x34 = (x3 + x4) / 2,\n y34 = (y3 + y4) / 2,\n x123 = (x12 + x23) / 2,\n y123 = (y12 + y23) / 2,\n x234 = (x23 + x34) / 2,\n y234 = (y23 + y34) / 2,\n x1234 = (x123 + x234) / 2,\n y1234 = (y123 + y234) / 2,\n dx = x4 - x1,\n dy = y4 - y1,\n d2 = _abs((x2 - x4) * dy - (y2 - y4) * dx),\n d3 = _abs((x3 - x4) * dy - (y3 - y4) * dx),\n length;\n\n if (!points) {\n points = [x1, y1, x4, y4];\n index = 2;\n }\n\n points.splice(index || points.length - 2, 0, x1234, y1234);\n\n if ((d2 + d3) * (d2 + d3) > threshold * (dx * dx + dy * dy)) {\n length = points.length;\n bezierToPoints(x1, y1, x12, y12, x123, y123, x1234, y1234, threshold, points, index);\n bezierToPoints(x1234, y1234, x234, y234, x34, y34, x4, y4, threshold, points, index + 2 + (points.length - length));\n }\n\n return points;\n}\n/*\nfunction getAngleBetweenPoints(x0, y0, x1, y1, x2, y2) { //angle between 3 points in radians\n\tvar dx1 = x1 - x0,\n\t\tdy1 = y1 - y0,\n\t\tdx2 = x2 - x1,\n\t\tdy2 = y2 - y1,\n\t\tdx3 = x2 - x0,\n\t\tdy3 = y2 - y0,\n\t\ta = dx1 * dx1 + dy1 * dy1,\n\t\tb = dx2 * dx2 + dy2 * dy2,\n\t\tc = dx3 * dx3 + dy3 * dy3;\n\treturn Math.acos( (a + b - c) / _sqrt(4 * a * b) );\n},\n*/\n//pointsToSegment() doesn't handle flat coordinates (where y is always 0) the way we need (the resulting control points are always right on top of the anchors), so this function basically makes the control points go directly up and down, varying in length based on the curviness (more curvy, further control points)\n\nexport function flatPointsToSegment(points, curviness) {\n if (curviness === void 0) {\n curviness = 1;\n }\n\n var x = points[0],\n y = 0,\n segment = [x, y],\n i = 2;\n\n for (; i < points.length; i += 2) {\n segment.push(x, y, points[i], y = (points[i] - x) * curviness / 2, x = points[i], -y);\n }\n\n return segment;\n} //points is an array of x/y points, like [x, y, x, y, x, y]\n\nexport function pointsToSegment(points, curviness, cornerThreshold) {\n //points = simplifyPoints(points, tolerance);\n var l = points.length - 2,\n x = +points[0],\n y = +points[1],\n nextX = +points[2],\n nextY = +points[3],\n segment = [x, y, x, y],\n dx2 = nextX - x,\n dy2 = nextY - y,\n closed = Math.abs(points[l] - x) < 0.001 && Math.abs(points[l + 1] - y) < 0.001,\n prevX,\n prevY,\n angle,\n slope,\n i,\n dx1,\n dx3,\n dy1,\n dy3,\n d1,\n d2,\n a,\n b,\n c;\n\n if (isNaN(cornerThreshold)) {\n cornerThreshold = Math.PI / 10;\n }\n\n if (closed) {\n // if the start and end points are basically on top of each other, close the segment by adding the 2nd point to the end, and the 2nd-to-last point to the beginning (we'll remove them at the end, but this allows the curvature to look perfect)\n points.push(nextX, nextY);\n nextX = x;\n nextY = y;\n x = points[l - 2];\n y = points[l - 1];\n points.unshift(x, y);\n l += 4;\n }\n\n curviness = curviness || curviness === 0 ? +curviness : 1;\n\n for (i = 2; i < l; i += 2) {\n prevX = x;\n prevY = y;\n x = nextX;\n y = nextY;\n nextX = +points[i + 2];\n nextY = +points[i + 3];\n dx1 = dx2;\n dy1 = dy2;\n dx2 = nextX - x;\n dy2 = nextY - y;\n dx3 = nextX - prevX;\n dy3 = nextY - prevY;\n a = dx1 * dx1 + dy1 * dy1;\n b = dx2 * dx2 + dy2 * dy2;\n c = dx3 * dx3 + dy3 * dy3;\n angle = Math.acos((a + b - c) / _sqrt(4 * a * b)); //angle between the 3 points\n\n d2 = angle / Math.PI * curviness; //temporary precalculation for speed (reusing d2 variable)\n\n d1 = _sqrt(a) * d2; //the tighter the angle, the shorter we make the handles in proportion.\n\n d2 *= _sqrt(b);\n\n if (x !== prevX || y !== prevY) {\n if (angle > cornerThreshold) {\n slope = _atan2(dy3, dx3);\n segment.push(_round(x - _cos(slope) * d1), //first control point\n _round(y - _sin(slope) * d1), _round(x), //anchor\n _round(y), _round(x + _cos(slope) * d2), //second control point\n _round(y + _sin(slope) * d2));\n } else {\n slope = _atan2(dy1, dx1);\n segment.push(_round(x - _cos(slope) * d1), //first control point\n _round(y - _sin(slope) * d1));\n slope = _atan2(dy2, dx2);\n segment.push(_round(x), //anchor\n _round(y), _round(x + _cos(slope) * d2), //second control point\n _round(y + _sin(slope) * d2));\n }\n }\n }\n\n segment.push(_round(nextX), _round(nextY), _round(nextX), _round(nextY));\n\n if (closed) {\n segment.splice(0, 6);\n segment.length = segment.length - 6;\n }\n\n return segment;\n} //returns the squared distance between an x/y coordinate and a segment between x1/y1 and x2/y2\n\nfunction pointToSegDist(x, y, x1, y1, x2, y2) {\n var dx = x2 - x1,\n dy = y2 - y1,\n t;\n\n if (dx || dy) {\n t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n\n if (t > 1) {\n x1 = x2;\n y1 = y2;\n } else if (t > 0) {\n x1 += dx * t;\n y1 += dy * t;\n }\n }\n\n return Math.pow(x - x1, 2) + Math.pow(y - y1, 2);\n}\n\nfunction simplifyStep(points, first, last, tolerance, simplified) {\n var maxSqDist = tolerance,\n firstX = points[first],\n firstY = points[first + 1],\n lastX = points[last],\n lastY = points[last + 1],\n index,\n i,\n d;\n\n for (i = first + 2; i < last; i += 2) {\n d = pointToSegDist(points[i], points[i + 1], firstX, firstY, lastX, lastY);\n\n if (d > maxSqDist) {\n index = i;\n maxSqDist = d;\n }\n }\n\n if (maxSqDist > tolerance) {\n if (index - first > 2) {\n simplifyStep(points, first, index, tolerance, simplified);\n }\n\n simplified.push(points[index], points[index + 1]);\n\n if (last - index > 2) {\n simplifyStep(points, index, last, tolerance, simplified);\n }\n }\n} //points is an array of x/y values like [x, y, x, y, x, y]\n\n\nexport function simplifyPoints(points, tolerance) {\n var prevX = parseFloat(points[0]),\n prevY = parseFloat(points[1]),\n temp = [prevX, prevY],\n l = points.length - 2,\n i,\n x,\n y,\n dx,\n dy,\n result,\n last;\n tolerance = Math.pow(tolerance || 1, 2);\n\n for (i = 2; i < l; i += 2) {\n x = parseFloat(points[i]);\n y = parseFloat(points[i + 1]);\n dx = prevX - x;\n dy = prevY - y;\n\n if (dx * dx + dy * dy > tolerance) {\n temp.push(x, y);\n prevX = x;\n prevY = y;\n }\n }\n\n temp.push(parseFloat(points[l]), parseFloat(points[l + 1]));\n last = temp.length - 2;\n result = [temp[0], temp[1]];\n simplifyStep(temp, 0, last, tolerance, result);\n result.push(temp[last], temp[last + 1]);\n return result;\n}\n\nfunction getClosestProgressOnBezier(iterations, px, py, start, end, slices, x0, y0, x1, y1, x2, y2, x3, y3) {\n var inc = (end - start) / slices,\n best = 0,\n t = start,\n x,\n y,\n d,\n dx,\n dy,\n inv;\n _bestDistance = _largeNum;\n\n while (t <= end) {\n inv = 1 - t;\n x = inv * inv * inv * x0 + 3 * inv * inv * t * x1 + 3 * inv * t * t * x2 + t * t * t * x3;\n y = inv * inv * inv * y0 + 3 * inv * inv * t * y1 + 3 * inv * t * t * y2 + t * t * t * y3;\n dx = x - px;\n dy = y - py;\n d = dx * dx + dy * dy;\n\n if (d < _bestDistance) {\n _bestDistance = d;\n best = t;\n }\n\n t += inc;\n }\n\n return iterations > 1 ? getClosestProgressOnBezier(iterations - 1, px, py, Math.max(best - inc, 0), Math.min(best + inc, 1), slices, x0, y0, x1, y1, x2, y2, x3, y3) : best;\n}\n\nexport function getClosestData(rawPath, x, y, slices) {\n //returns an object with the closest j, i, and t (j is the segment index, i is the index of the point in that segment, and t is the time/progress along that bezier)\n var closest = {\n j: 0,\n i: 0,\n t: 0\n },\n bestDistance = _largeNum,\n i,\n j,\n t,\n segment;\n\n for (j = 0; j < rawPath.length; j++) {\n segment = rawPath[j];\n\n for (i = 0; i < segment.length; i += 6) {\n t = getClosestProgressOnBezier(1, x, y, 0, 1, slices || 20, segment[i], segment[i + 1], segment[i + 2], segment[i + 3], segment[i + 4], segment[i + 5], segment[i + 6], segment[i + 7]);\n\n if (bestDistance > _bestDistance) {\n bestDistance = _bestDistance;\n closest.j = j;\n closest.i = i;\n closest.t = t;\n }\n }\n }\n\n return closest;\n} //subdivide a Segment closest to a specific x,y coordinate\n\nexport function subdivideSegmentNear(x, y, segment, slices, iterations) {\n var l = segment.length,\n bestDistance = _largeNum,\n bestT = 0,\n bestSegmentIndex = 0,\n t,\n i;\n slices = slices || 20;\n iterations = iterations || 3;\n\n for (i = 0; i < l; i += 6) {\n t = getClosestProgressOnBezier(1, x, y, 0, 1, slices, segment[i], segment[i + 1], segment[i + 2], segment[i + 3], segment[i + 4], segment[i + 5], segment[i + 6], segment[i + 7]);\n\n if (bestDistance > _bestDistance) {\n bestDistance = _bestDistance;\n bestT = t;\n bestSegmentIndex = i;\n }\n }\n\n t = getClosestProgressOnBezier(iterations, x, y, bestT - 0.05, bestT + 0.05, slices, segment[bestSegmentIndex], segment[bestSegmentIndex + 1], segment[bestSegmentIndex + 2], segment[bestSegmentIndex + 3], segment[bestSegmentIndex + 4], segment[bestSegmentIndex + 5], segment[bestSegmentIndex + 6], segment[bestSegmentIndex + 7]);\n subdivideSegment(segment, bestSegmentIndex, t);\n return bestSegmentIndex + 6;\n}\n/*\nTakes any of the following and converts it to an all Cubic Bezier SVG data string:\n- A data string like \"M0,0 L2,4 v20,15 H100\"\n- A RawPath, like [[x, y, x, y, x, y, x, y][[x, y, x, y, x, y, x, y]]\n- A Segment, like [x, y, x, y, x, y, x, y]\n\nNote: all numbers are rounded down to the closest 0.001 to minimize memory, maximize speed, and avoid odd numbers like 1e-13\n*/\n\nexport function rawPathToString(rawPath) {\n if (_isNumber(rawPath[0])) {\n //in case a segment is passed in instead\n rawPath = [rawPath];\n }\n\n var result = \"\",\n l = rawPath.length,\n sl,\n s,\n i,\n segment;\n\n for (s = 0; s < l; s++) {\n segment = rawPath[s];\n result += \"M\" + _round(segment[0]) + \",\" + _round(segment[1]) + \" C\";\n sl = segment.length;\n\n for (i = 2; i < sl; i++) {\n result += _round(segment[i++]) + \",\" + _round(segment[i++]) + \" \" + _round(segment[i++]) + \",\" + _round(segment[i++]) + \" \" + _round(segment[i++]) + \",\" + _round(segment[i]) + \" \";\n }\n\n if (segment.closed) {\n result += \"z\";\n }\n }\n\n return result;\n}\n/*\n// takes a segment with coordinates [x, y, x, y, ...] and converts the control points into angles and lengths [x, y, angle, length, angle, length, x, y, angle, length, ...] so that it animates more cleanly and avoids odd breaks/kinks. For example, if you animate from 1 o'clock to 6 o'clock, it'd just go directly/linearly rather than around. So the length would be very short in the middle of the tween.\nexport function cpCoordsToAngles(segment, copy) {\n\tvar result = copy ? segment.slice(0) : segment,\n\t\tx, y, i;\n\tfor (i = 0; i < segment.length; i+=6) {\n\t\tx = segment[i+2] - segment[i];\n\t\ty = segment[i+3] - segment[i+1];\n\t\tresult[i+2] = Math.atan2(y, x);\n\t\tresult[i+3] = Math.sqrt(x * x + y * y);\n\t\tx = segment[i+6] - segment[i+4];\n\t\ty = segment[i+7] - segment[i+5];\n\t\tresult[i+4] = Math.atan2(y, x);\n\t\tresult[i+5] = Math.sqrt(x * x + y * y);\n\t}\n\treturn result;\n}\n\n// takes a segment that was converted with cpCoordsToAngles() to have angles and lengths instead of coordinates for the control points, and converts it BACK into coordinates.\nexport function cpAnglesToCoords(segment, copy) {\n\tvar result = copy ? segment.slice(0) : segment,\n\t\tlength = segment.length,\n\t\trnd = 1000,\n\t\tangle, l, i, j;\n\tfor (i = 0; i < length; i+=6) {\n\t\tangle = segment[i+2];\n\t\tl = segment[i+3]; //length\n\t\tresult[i+2] = (((segment[i] + Math.cos(angle) * l) * rnd) | 0) / rnd;\n\t\tresult[i+3] = (((segment[i+1] + Math.sin(angle) * l) * rnd) | 0) / rnd;\n\t\tangle = segment[i+4];\n\t\tl = segment[i+5]; //length\n\t\tresult[i+4] = (((segment[i+6] - Math.cos(angle) * l) * rnd) | 0) / rnd;\n\t\tresult[i+5] = (((segment[i+7] - Math.sin(angle) * l) * rnd) | 0) / rnd;\n\t}\n\treturn result;\n}\n\n//adds an \"isSmooth\" array to each segment and populates it with a boolean value indicating whether or not it's smooth (the control points have basically the same slope). For any smooth control points, it converts the coordinates into angle (x, in radians) and length (y) and puts them into the same index value in a smoothData array.\nexport function populateSmoothData(rawPath) {\n\tlet j = rawPath.length,\n\t\tsmooth, segment, x, y, x2, y2, i, l, a, a2, isSmooth, smoothData;\n\twhile (--j > -1) {\n\t\tsegment = rawPath[j];\n\t\tisSmooth = segment.isSmooth = segment.isSmooth || [0, 0, 0, 0];\n\t\tsmoothData = segment.smoothData = segment.smoothData || [0, 0, 0, 0];\n\t\tisSmooth.length = 4;\n\t\tl = segment.length - 2;\n\t\tfor (i = 6; i < l; i += 6) {\n\t\t\tx = segment[i] - segment[i - 2];\n\t\t\ty = segment[i + 1] - segment[i - 1];\n\t\t\tx2 = segment[i + 2] - segment[i];\n\t\t\ty2 = segment[i + 3] - segment[i + 1];\n\t\t\ta = _atan2(y, x);\n\t\t\ta2 = _atan2(y2, x2);\n\t\t\tsmooth = (Math.abs(a - a2) < 0.09);\n\t\t\tif (smooth) {\n\t\t\t\tsmoothData[i - 2] = a;\n\t\t\t\tsmoothData[i + 2] = a2;\n\t\t\t\tsmoothData[i - 1] = _sqrt(x * x + y * y);\n\t\t\t\tsmoothData[i + 3] = _sqrt(x2 * x2 + y2 * y2);\n\t\t\t}\n\t\t\tisSmooth.push(smooth, smooth, 0, 0, smooth, smooth);\n\t\t}\n\t\t//if the first and last points are identical, check to see if there's a smooth transition. We must handle this a bit differently due to their positions in the array.\n\t\tif (segment[l] === segment[0] && segment[l+1] === segment[1]) {\n\t\t\tx = segment[0] - segment[l-2];\n\t\t\ty = segment[1] - segment[l-1];\n\t\t\tx2 = segment[2] - segment[0];\n\t\t\ty2 = segment[3] - segment[1];\n\t\t\ta = _atan2(y, x);\n\t\t\ta2 = _atan2(y2, x2);\n\t\t\tif (Math.abs(a - a2) < 0.09) {\n\t\t\t\tsmoothData[l-2] = a;\n\t\t\t\tsmoothData[2] = a2;\n\t\t\t\tsmoothData[l-1] = _sqrt(x * x + y * y);\n\t\t\t\tsmoothData[3] = _sqrt(x2 * x2 + y2 * y2);\n\t\t\t\tisSmooth[l-2] = isSmooth[l-1] = true; //don't change indexes 2 and 3 because we'll trigger everything from the END, and this will optimize file size a bit.\n\t\t\t}\n\t\t}\n\t}\n\treturn rawPath;\n}\nexport function pointToScreen(svgElement, point) {\n\tif (arguments.length < 2) { //by default, take the first set of coordinates in the path as the point\n\t\tlet rawPath = getRawPath(svgElement);\n\t\tpoint = svgElement.ownerSVGElement.createSVGPoint();\n\t\tpoint.x = rawPath[0][0];\n\t\tpoint.y = rawPath[0][1];\n\t}\n\treturn point.matrixTransform(svgElement.getScreenCTM());\n}\n\n*/","/*!\n * CustomEase 3.4.2\n * https://greensock.com\n *\n * @license Copyright 2008-2020, GreenSock. All rights reserved.\n * Subject to the terms at https://greensock.com/standard-license or for\n * Club GreenSock members, the agreement issued with that membership.\n * @author: Jack Doyle, jack@greensock.com\n*/\n\n/* eslint-disable */\nimport { stringToRawPath, rawPathToString, transformRawPath } from \"./utils/paths.js\";\n\nvar gsap,\n _coreInitted,\n _getGSAP = function _getGSAP() {\n return gsap || typeof window !== \"undefined\" && (gsap = window.gsap) && gsap.registerPlugin && gsap;\n},\n _initCore = function _initCore() {\n gsap = _getGSAP();\n\n if (gsap) {\n gsap.registerEase(\"_CE\", CustomEase.create);\n _coreInitted = 1;\n } else {\n console.warn(\"Please gsap.registerPlugin(CustomEase)\");\n }\n},\n _bigNum = 1e20,\n _round = function _round(value) {\n return ~~(value * 1000 + (value < 0 ? -.5 : .5)) / 1000;\n},\n _bonusValidated = 1,\n //CustomEase\n_numExp = /[-+=\\.]*\\d+[\\.e\\-\\+]*\\d*[e\\-\\+]*\\d*/gi,\n //finds any numbers, including ones that start with += or -=, negative numbers, and ones in scientific notation like 1e-8.\n_needsParsingExp = /[cLlsSaAhHvVtTqQ]/g,\n _findMinimum = function _findMinimum(values) {\n var l = values.length,\n min = _bigNum,\n i;\n\n for (i = 1; i < l; i += 6) {\n if (+values[i] < min) {\n min = +values[i];\n }\n }\n\n return min;\n},\n //takes all the points and translates/scales them so that the x starts at 0 and ends at 1.\n_normalize = function _normalize(values, height, originY) {\n if (!originY && originY !== 0) {\n originY = Math.max(+values[values.length - 1], +values[1]);\n }\n\n var tx = +values[0] * -1,\n ty = -originY,\n l = values.length,\n sx = 1 / (+values[l - 2] + tx),\n sy = -height || (Math.abs(+values[l - 1] - +values[1]) < 0.01 * (+values[l - 2] - +values[0]) ? _findMinimum(values) + ty : +values[l - 1] + ty),\n i;\n\n if (sy) {\n //typically y ends at 1 (so that the end values are reached)\n sy = 1 / sy;\n } else {\n //in case the ease returns to its beginning value, scale everything proportionally\n sy = -sx;\n }\n\n for (i = 0; i < l; i += 2) {\n values[i] = (+values[i] + tx) * sx;\n values[i + 1] = (+values[i + 1] + ty) * sy;\n }\n},\n //note that this function returns point objects like {x, y} rather than working with segments which are arrays with alternating x, y values as in the similar function in paths.js\n_bezierToPoints = function _bezierToPoints(x1, y1, x2, y2, x3, y3, x4, y4, threshold, points, index) {\n var x12 = (x1 + x2) / 2,\n y12 = (y1 + y2) / 2,\n x23 = (x2 + x3) / 2,\n y23 = (y2 + y3) / 2,\n x34 = (x3 + x4) / 2,\n y34 = (y3 + y4) / 2,\n x123 = (x12 + x23) / 2,\n y123 = (y12 + y23) / 2,\n x234 = (x23 + x34) / 2,\n y234 = (y23 + y34) / 2,\n x1234 = (x123 + x234) / 2,\n y1234 = (y123 + y234) / 2,\n dx = x4 - x1,\n dy = y4 - y1,\n d2 = Math.abs((x2 - x4) * dy - (y2 - y4) * dx),\n d3 = Math.abs((x3 - x4) * dy - (y3 - y4) * dx),\n length;\n\n if (!points) {\n points = [{\n x: x1,\n y: y1\n }, {\n x: x4,\n y: y4\n }];\n index = 1;\n }\n\n points.splice(index || points.length - 1, 0, {\n x: x1234,\n y: y1234\n });\n\n if ((d2 + d3) * (d2 + d3) > threshold * (dx * dx + dy * dy)) {\n length = points.length;\n\n _bezierToPoints(x1, y1, x12, y12, x123, y123, x1234, y1234, threshold, points, index);\n\n _bezierToPoints(x1234, y1234, x234, y234, x34, y34, x4, y4, threshold, points, index + 1 + (points.length - length));\n }\n\n return points;\n};\n\nexport var CustomEase = /*#__PURE__*/function () {\n function CustomEase(id, data, config) {\n if (!_coreInitted) {\n _initCore();\n }\n\n this.id = id;\n\n if (_bonusValidated) {\n this.setData(data, config);\n }\n }\n\n var _proto = CustomEase.prototype;\n\n _proto.setData = function setData(data, config) {\n config = config || {};\n data = data || \"0,0,1,1\";\n var values = data.match(_numExp),\n closest = 1,\n points = [],\n lookup = [],\n precision = config.precision || 1,\n fast = precision <= 1,\n l,\n a1,\n a2,\n i,\n inc,\n j,\n point,\n prevPoint,\n p;\n this.data = data;\n\n if (_needsParsingExp.test(data) || ~data.indexOf(\"M\") && data.indexOf(\"C\") < 0) {\n values = stringToRawPath(data)[0];\n }\n\n l = values.length;\n\n if (l === 4) {\n values.unshift(0, 0);\n values.push(1, 1);\n l = 8;\n } else if ((l - 2) % 6) {\n throw \"Invalid CustomEase\";\n }\n\n if (+values[0] !== 0 || +values[l - 2] !== 1) {\n _normalize(values, config.height, config.originY);\n }\n\n this.segment = values;\n\n for (i = 2; i < l; i += 6) {\n a1 = {\n x: +values[i - 2],\n y: +values[i - 1]\n };\n a2 = {\n x: +values[i + 4],\n y: +values[i + 5]\n };\n points.push(a1, a2);\n\n _bezierToPoints(a1.x, a1.y, +values[i], +values[i + 1], +values[i + 2], +values[i + 3], a2.x, a2.y, 1 / (precision * 200000), points, points.length - 1);\n }\n\n l = points.length;\n\n for (i = 0; i < l; i++) {\n point = points[i];\n prevPoint = points[i - 1] || point;\n\n if (point.x > prevPoint.x || prevPoint.y !== point.y && prevPoint.x === point.x || point === prevPoint) {\n //if a point goes BACKWARD in time or is a duplicate, just drop it.\n prevPoint.cx = point.x - prevPoint.x; //change in x between this point and the next point (performance optimization)\n\n prevPoint.cy = point.y - prevPoint.y;\n prevPoint.n = point;\n prevPoint.nx = point.x; //next point's x value (performance optimization, making lookups faster in getRatio()). Remember, the lookup will always land on a spot where it's either this point or the very next one (never beyond that)\n\n if (fast && i > 1 && Math.abs(prevPoint.cy / prevPoint.cx - points[i - 2].cy / points[i - 2].cx) > 2) {\n //if there's a sudden change in direction, prioritize accuracy over speed. Like a bounce ease - you don't want to risk the sampling chunks landing on each side of the bounce anchor and having it clipped off.\n fast = 0;\n }\n\n if (prevPoint.cx < closest) {\n if (!prevPoint.cx) {\n prevPoint.cx = 0.001; //avoids math problems in getRatio() (dividing by zero)\n\n if (i === l - 1) {\n //in case the final segment goes vertical RIGHT at the end, make sure we end at the end.\n prevPoint.x -= 0.001;\n closest = Math.min(closest, 0.001);\n fast = 0;\n }\n } else {\n closest = prevPoint.cx;\n }\n }\n } else {\n points.splice(i--, 1);\n l--;\n }\n }\n\n l = 1 / closest + 1 | 0;\n inc = 1 / l;\n j = 0;\n point = points[0];\n\n if (fast) {\n for (i = 0; i < l; i++) {\n //for fastest lookups, we just sample along the path at equal x (time) distance. Uses more memory and is slightly less accurate for anchors that don't land on the sampling points, but for the vast majority of eases it's excellent (and fast).\n p = i * inc;\n\n if (point.nx < p) {\n point = points[++j];\n }\n\n a1 = point.y + (p - point.x) / point.cx * point.cy;\n lookup[i] = {\n x: p,\n cx: inc,\n y: a1,\n cy: 0,\n nx: 9\n };\n\n if (i) {\n lookup[i - 1].cy = a1 - lookup[i - 1].y;\n }\n }\n\n lookup[l - 1].cy = points[points.length - 1].y - a1;\n } else {\n //this option is more accurate, ensuring that EVERY anchor is hit perfectly. Clipping across a bounce, for example, would never happen.\n for (i = 0; i < l; i++) {\n //build a lookup table based on the smallest distance so that we can instantly find the appropriate point (well, it'll either be that point or the very next one). We'll look up based on the linear progress. So it's it's 0.5 and the lookup table has 100 elements, it'd be like lookup[Math.floor(0.5 * 100)]\n if (point.nx < i * inc) {\n point = points[++j];\n }\n\n lookup[i] = point;\n }\n\n if (j < points.length - 1) {\n lookup[i - 1] = points[points.length - 2];\n }\n } //this._calcEnd = (points[points.length-1].y !== 1 || points[0].y !== 0); //ensures that we don't run into floating point errors. As long as we're starting at 0 and ending at 1, tell GSAP to skip the final calculation and use 0/1 as the factor.\n\n\n this.ease = function (p) {\n var point = lookup[p * l | 0] || lookup[l - 1];\n\n if (point.nx < p) {\n point = point.n;\n }\n\n return point.y + (p - point.x) / point.cx * point.cy;\n };\n\n this.ease.custom = this;\n\n if (this.id) {\n gsap.registerEase(this.id, this.ease);\n }\n\n return this;\n };\n\n _proto.getSVGData = function getSVGData(config) {\n return CustomEase.getSVGData(this, config);\n };\n\n CustomEase.create = function create(id, data, config) {\n return new CustomEase(id, data, config).ease;\n };\n\n CustomEase.register = function register(core) {\n gsap = core;\n\n _initCore();\n };\n\n CustomEase.get = function get(id) {\n return gsap.parseEase(id);\n };\n\n CustomEase.getSVGData = function getSVGData(ease, config) {\n config = config || {};\n var width = config.width || 100,\n height = config.height || 100,\n x = config.x || 0,\n y = (config.y || 0) + height,\n e = gsap.utils.toArray(config.path)[0],\n a,\n slope,\n i,\n inc,\n tx,\n ty,\n precision,\n threshold,\n prevX,\n prevY;\n\n if (config.invert) {\n height = -height;\n y = 0;\n }\n\n if (typeof ease === \"string\") {\n ease = gsap.parseEase(ease);\n }\n\n if (ease.custom) {\n ease = ease.custom;\n }\n\n if (ease instanceof CustomEase) {\n a = rawPathToString(transformRawPath([ease.segment], width, 0, 0, -height, x, y));\n } else {\n a = [x, y];\n precision = Math.max(5, (config.precision || 1) * 200);\n inc = 1 / precision;\n precision += 2;\n threshold = 5 / precision;\n prevX = _round(x + inc * width);\n prevY = _round(y + ease(inc) * -height);\n slope = (prevY - y) / (prevX - x);\n\n for (i = 2; i < precision; i++) {\n tx = _round(x + i * inc * width);\n ty = _round(y + ease(i * inc) * -height);\n\n if (Math.abs((ty - prevY) / (tx - prevX) - slope) > threshold || i === precision - 1) {\n //only add points when the slope changes beyond the threshold\n a.push(prevX, prevY);\n slope = (ty - prevY) / (tx - prevX);\n }\n\n prevX = tx;\n prevY = ty;\n }\n\n a = \"M\" + a.join(\",\");\n }\n\n if (e) {\n e.setAttribute(\"d\", a);\n }\n\n return a;\n };\n\n return CustomEase;\n}();\n_getGSAP() && gsap.registerPlugin(CustomEase);\nCustomEase.version = \"3.4.2\";\nexport { CustomEase as default };","function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n/*!\n * GSAP 3.4.2\n * https://greensock.com\n *\n * @license Copyright 2008-2020, GreenSock. All rights reserved.\n * Subject to the terms at https://greensock.com/standard-license or for\n * Club GreenSock members, the agreement issued with that membership.\n * @author: Jack Doyle, jack@greensock.com\n*/\n\n/* eslint-disable */\nvar _config = {\n autoSleep: 120,\n force3D: \"auto\",\n nullTargetWarn: 1,\n units: {\n lineHeight: \"\"\n }\n},\n _defaults = {\n duration: .5,\n overwrite: false,\n delay: 0\n},\n _bigNum = 1e8,\n _tinyNum = 1 / _bigNum,\n _2PI = Math.PI * 2,\n _HALF_PI = _2PI / 4,\n _gsID = 0,\n _sqrt = Math.sqrt,\n _cos = Math.cos,\n _sin = Math.sin,\n _isString = function _isString(value) {\n return typeof value === \"string\";\n},\n _isFunction = function _isFunction(value) {\n return typeof value === \"function\";\n},\n _isNumber = function _isNumber(value) {\n return typeof value === \"number\";\n},\n _isUndefined = function _isUndefined(value) {\n return typeof value === \"undefined\";\n},\n _isObject = function _isObject(value) {\n return typeof value === \"object\";\n},\n _isNotFalse = function _isNotFalse(value) {\n return value !== false;\n},\n _windowExists = function _windowExists() {\n return typeof window !== \"undefined\";\n},\n _isFuncOrString = function _isFuncOrString(value) {\n return _isFunction(value) || _isString(value);\n},\n _isArray = Array.isArray,\n _strictNumExp = /(?:-?\\.?\\d|\\.)+/gi,\n //only numbers (including negatives and decimals) but NOT relative values.\n_numExp = /[-+=.]*\\d+[.e\\-+]*\\d*[e\\-\\+]*\\d*/g,\n //finds any numbers, including ones that start with += or -=, negative numbers, and ones in scientific notation like 1e-8.\n_numWithUnitExp = /[-+=.]*\\d+[.e-]*\\d*[a-z%]*/g,\n _complexStringNumExp = /[-+=.]*\\d+(?:\\.|e-|e)*\\d*/gi,\n //duplicate so that while we're looping through matches from exec(), it doesn't contaminate the lastIndex of _numExp which we use to search for colors too.\n_parenthesesExp = /\\(([^()]+)\\)/i,\n //finds the string between parentheses.\n_relExp = /[+-]=-?[\\.\\d]+/,\n _delimitedValueExp = /[#\\-+.]*\\b[a-z\\d-=+%.]+/gi,\n _globalTimeline,\n _win,\n _coreInitted,\n _doc,\n _globals = {},\n _installScope = {},\n _coreReady,\n _install = function _install(scope) {\n return (_installScope = _merge(scope, _globals)) && gsap;\n},\n _missingPlugin = function _missingPlugin(property, value) {\n return console.warn(\"Invalid property\", property, \"set to\", value, \"Missing plugin? gsap.registerPlugin()\");\n},\n _warn = function _warn(message, suppress) {\n return !suppress && console.warn(message);\n},\n _addGlobal = function _addGlobal(name, obj) {\n return name && (_globals[name] = obj) && _installScope && (_installScope[name] = obj) || _globals;\n},\n _emptyFunc = function _emptyFunc() {\n return 0;\n},\n _reservedProps = {},\n _lazyTweens = [],\n _lazyLookup = {},\n _lastRenderedFrame,\n _plugins = {},\n _effects = {},\n _nextGCFrame = 30,\n _harnessPlugins = [],\n _callbackNames = \"\",\n _harness = function _harness(targets) {\n var target = targets[0],\n harnessPlugin,\n i;\n\n if (!_isObject(target) && !_isFunction(target)) {\n targets = [targets];\n }\n\n if (!(harnessPlugin = (target._gsap || {}).harness)) {\n i = _harnessPlugins.length;\n\n while (i-- && !_harnessPlugins[i].targetTest(target)) {}\n\n harnessPlugin = _harnessPlugins[i];\n }\n\n i = targets.length;\n\n while (i--) {\n targets[i] && (targets[i]._gsap || (targets[i]._gsap = new GSCache(targets[i], harnessPlugin))) || targets.splice(i, 1);\n }\n\n return targets;\n},\n _getCache = function _getCache(target) {\n return target._gsap || _harness(toArray(target))[0]._gsap;\n},\n _getProperty = function _getProperty(target, property) {\n var currentValue = target[property];\n return _isFunction(currentValue) ? target[property]() : _isUndefined(currentValue) && target.getAttribute(property) || currentValue;\n},\n _forEachName = function _forEachName(names, func) {\n return (names = names.split(\",\")).forEach(func) || names;\n},\n //split a comma-delimited list of names into an array, then run a forEach() function and return the split array (this is just a way to consolidate/shorten some code).\n_round = function _round(value) {\n return Math.round(value * 100000) / 100000 || 0;\n},\n _arrayContainsAny = function _arrayContainsAny(toSearch, toFind) {\n //searches one array to find matches for any of the items in the toFind array. As soon as one is found, it returns true. It does NOT return all the matches; it's simply a boolean search.\n var l = toFind.length,\n i = 0;\n\n for (; toSearch.indexOf(toFind[i]) < 0 && ++i < l;) {}\n\n return i < l;\n},\n _parseVars = function _parseVars(params, type, parent) {\n //reads the arguments passed to one of the key methods and figures out if the user is defining things with the OLD/legacy syntax where the duration is the 2nd parameter, and then it adjusts things accordingly and spits back the corrected vars object (with the duration added if necessary, as well as runBackwards or startAt or immediateRender). type 0 = to()/staggerTo(), 1 = from()/staggerFrom(), 2 = fromTo()/staggerFromTo()\n var isLegacy = _isNumber(params[1]),\n varsIndex = (isLegacy ? 2 : 1) + (type < 2 ? 0 : 1),\n vars = params[varsIndex],\n irVars;\n\n if (isLegacy) {\n vars.duration = params[1];\n }\n\n vars.parent = parent;\n\n if (type) {\n irVars = vars;\n\n while (parent && !(\"immediateRender\" in irVars)) {\n // inheritance hasn't happened yet, but someone may have set a default in an ancestor timeline. We could do vars.immediateRender = _isNotFalse(_inheritDefaults(vars).immediateRender) but that'd exact a slight performance penalty because _inheritDefaults() also runs in the Tween constructor. We're paying a small kb price here to gain speed.\n irVars = parent.vars.defaults || {};\n parent = _isNotFalse(parent.vars.inherit) && parent.parent;\n }\n\n vars.immediateRender = _isNotFalse(irVars.immediateRender);\n\n if (type < 2) {\n vars.runBackwards = 1;\n } else {\n vars.startAt = params[varsIndex - 1]; // \"from\" vars\n }\n }\n\n return vars;\n},\n _lazyRender = function _lazyRender() {\n var l = _lazyTweens.length,\n a = _lazyTweens.slice(0),\n i,\n tween;\n\n _lazyLookup = {};\n _lazyTweens.length = 0;\n\n for (i = 0; i < l; i++) {\n tween = a[i];\n tween && tween._lazy && (tween.render(tween._lazy[0], tween._lazy[1], true)._lazy = 0);\n }\n},\n _lazySafeRender = function _lazySafeRender(animation, time, suppressEvents, force) {\n _lazyTweens.length && _lazyRender();\n animation.render(time, suppressEvents, force);\n _lazyTweens.length && _lazyRender(); //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render.\n},\n _numericIfPossible = function _numericIfPossible(value) {\n var n = parseFloat(value);\n return (n || n === 0) && (value + \"\").match(_delimitedValueExp).length < 2 ? n : value;\n},\n _passThrough = function _passThrough(p) {\n return p;\n},\n _setDefaults = function _setDefaults(obj, defaults) {\n for (var p in defaults) {\n p in obj || (obj[p] = defaults[p]);\n }\n\n return obj;\n},\n _setKeyframeDefaults = function _setKeyframeDefaults(obj, defaults) {\n for (var p in defaults) {\n if (!(p in obj) && p !== \"duration\" && p !== \"ease\") {\n obj[p] = defaults[p];\n }\n }\n},\n _merge = function _merge(base, toMerge) {\n for (var p in toMerge) {\n base[p] = toMerge[p];\n }\n\n return base;\n},\n _mergeDeep = function _mergeDeep(base, toMerge) {\n for (var p in toMerge) {\n base[p] = _isObject(toMerge[p]) ? _mergeDeep(base[p] || (base[p] = {}), toMerge[p]) : toMerge[p];\n }\n\n return base;\n},\n _copyExcluding = function _copyExcluding(obj, excluding) {\n var copy = {},\n p;\n\n for (p in obj) {\n p in excluding || (copy[p] = obj[p]);\n }\n\n return copy;\n},\n _inheritDefaults = function _inheritDefaults(vars) {\n var parent = vars.parent || _globalTimeline,\n func = vars.keyframes ? _setKeyframeDefaults : _setDefaults;\n\n if (_isNotFalse(vars.inherit)) {\n while (parent) {\n func(vars, parent.vars.defaults);\n parent = parent.parent || parent._dp;\n }\n }\n\n return vars;\n},\n _arraysMatch = function _arraysMatch(a1, a2) {\n var i = a1.length,\n match = i === a2.length;\n\n while (match && i-- && a1[i] === a2[i]) {}\n\n return i < 0;\n},\n _addLinkedListItem = function _addLinkedListItem(parent, child, firstProp, lastProp, sortBy) {\n if (firstProp === void 0) {\n firstProp = \"_first\";\n }\n\n if (lastProp === void 0) {\n lastProp = \"_last\";\n }\n\n var prev = parent[lastProp],\n t;\n\n if (sortBy) {\n t = child[sortBy];\n\n while (prev && prev[sortBy] > t) {\n prev = prev._prev;\n }\n }\n\n if (prev) {\n child._next = prev._next;\n prev._next = child;\n } else {\n child._next = parent[firstProp];\n parent[firstProp] = child;\n }\n\n if (child._next) {\n child._next._prev = child;\n } else {\n parent[lastProp] = child;\n }\n\n child._prev = prev;\n child.parent = child._dp = parent;\n return child;\n},\n _removeLinkedListItem = function _removeLinkedListItem(parent, child, firstProp, lastProp) {\n if (firstProp === void 0) {\n firstProp = \"_first\";\n }\n\n if (lastProp === void 0) {\n lastProp = \"_last\";\n }\n\n var prev = child._prev,\n next = child._next;\n\n if (prev) {\n prev._next = next;\n } else if (parent[firstProp] === child) {\n parent[firstProp] = next;\n }\n\n if (next) {\n next._prev = prev;\n } else if (parent[lastProp] === child) {\n parent[lastProp] = prev;\n }\n\n child._next = child._prev = child.parent = null; // don't delete the _dp just so we can revert if necessary. But parent should be null to indicate the item isn't in a linked list.\n},\n _removeFromParent = function _removeFromParent(child, onlyIfParentHasAutoRemove) {\n child.parent && (!onlyIfParentHasAutoRemove || child.parent.autoRemoveChildren) && child.parent.remove(child);\n child._act = 0;\n},\n _uncache = function _uncache(animation) {\n var a = animation;\n\n while (a) {\n a._dirty = 1;\n a = a.parent;\n }\n\n return animation;\n},\n _recacheAncestors = function _recacheAncestors(animation) {\n var parent = animation.parent;\n\n while (parent && parent.parent) {\n //sometimes we must force a re-sort of all children and update the duration/totalDuration of all ancestor timelines immediately in case, for example, in the middle of a render loop, one tween alters another tween's timeScale which shoves its startTime before 0, forcing the parent timeline to shift around and shiftChildren() which could affect that next tween's render (startTime). Doesn't matter for the root timeline though.\n parent._dirty = 1;\n parent.totalDuration();\n parent = parent.parent;\n }\n\n return animation;\n},\n _hasNoPausedAncestors = function _hasNoPausedAncestors(animation) {\n return !animation || animation._ts && _hasNoPausedAncestors(animation.parent);\n},\n _elapsedCycleDuration = function _elapsedCycleDuration(animation) {\n return animation._repeat ? _animationCycle(animation._tTime, animation = animation.duration() + animation._rDelay) * animation : 0;\n},\n // feed in the totalTime and cycleDuration and it'll return the cycle (iteration minus 1) and if the playhead is exactly at the very END, it will NOT bump up to the next cycle.\n_animationCycle = function _animationCycle(tTime, cycleDuration) {\n return (tTime /= cycleDuration) && ~~tTime === tTime ? ~~tTime - 1 : ~~tTime;\n},\n _parentToChildTotalTime = function _parentToChildTotalTime(parentTime, child) {\n return (parentTime - child._start) * child._ts + (child._ts >= 0 ? 0 : child._dirty ? child.totalDuration() : child._tDur);\n},\n _setEnd = function _setEnd(animation) {\n return animation._end = _round(animation._start + (animation._tDur / Math.abs(animation._ts || animation._rts || _tinyNum) || 0));\n},\n _alignPlayhead = function _alignPlayhead(animation, totalTime) {\n // adjusts the animation's _start and _end according to the provided totalTime (only if the parent's smoothChildTiming is true and the animation isn't paused). It doesn't do any rendering or forcing things back into parent timelines, etc. - that's what totalTime() is for.\n var parent = animation._dp;\n\n if (parent && parent.smoothChildTiming && animation._ts) {\n animation._start = _round(animation._dp._time - (animation._ts > 0 ? totalTime / animation._ts : ((animation._dirty ? animation.totalDuration() : animation._tDur) - totalTime) / -animation._ts));\n\n _setEnd(animation);\n\n parent._dirty || _uncache(parent); //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here.\n }\n\n return animation;\n},\n\n/*\n_totalTimeToTime = (clampedTotalTime, duration, repeat, repeatDelay, yoyo) => {\n\tlet cycleDuration = duration + repeatDelay,\n\t\ttime = _round(clampedTotalTime % cycleDuration);\n\tif (time > duration) {\n\t\ttime = duration;\n\t}\n\treturn (yoyo && (~~(clampedTotalTime / cycleDuration) & 1)) ? duration - time : time;\n},\n*/\n_postAddChecks = function _postAddChecks(timeline, child) {\n var t;\n\n if (child._time || child._initted && !child._dur) {\n //in case, for example, the _start is moved on a tween that has already rendered. Imagine it's at its end state, then the startTime is moved WAY later (after the end of this timeline), it should render at its beginning.\n t = _parentToChildTotalTime(timeline.rawTime(), child);\n\n if (!child._dur || _clamp(0, child.totalDuration(), t) - child._tTime > _tinyNum) {\n child.render(t, true);\n }\n } //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate.\n\n\n if (_uncache(timeline)._dp && timeline._initted && timeline._time >= timeline._dur && timeline._ts) {\n //in case any of the ancestors had completed but should now be enabled...\n if (timeline._dur < timeline.duration()) {\n t = timeline;\n\n while (t._dp) {\n t.rawTime() >= 0 && t.totalTime(t._tTime); //moves the timeline (shifts its startTime) if necessary, and also enables it. If it's currently zero, though, it may not be scheduled to render until later so there's no need to force it to align with the current playhead position. Only move to catch up with the playhead.\n\n t = t._dp;\n }\n }\n\n timeline._zTime = -_tinyNum; // helps ensure that the next render() will be forced (crossingStart = true in render()), even if the duration hasn't changed (we're adding a child which would need to get rendered). Definitely an edge case. Note: we MUST do this AFTER the loop above where the totalTime() might trigger a render() because this _addToTimeline() method gets called from the Animation constructor, BEFORE tweens even record their targets, etc. so we wouldn't want things to get triggered in the wrong order.\n }\n},\n _addToTimeline = function _addToTimeline(timeline, child, position, skipChecks) {\n child.parent && _removeFromParent(child);\n child._start = _round(position + child._delay);\n child._end = _round(child._start + (child.totalDuration() / Math.abs(child.timeScale()) || 0));\n\n _addLinkedListItem(timeline, child, \"_first\", \"_last\", timeline._sort ? \"_start\" : 0);\n\n timeline._recent = child;\n skipChecks || _postAddChecks(timeline, child);\n return timeline;\n},\n _scrollTrigger = function _scrollTrigger(animation, trigger) {\n return (_globals.ScrollTrigger || _missingPlugin(\"scrollTrigger\", trigger)) && _globals.ScrollTrigger.create(trigger, animation);\n},\n _attemptInitTween = function _attemptInitTween(tween, totalTime, force, suppressEvents) {\n _initTween(tween, totalTime);\n\n if (!tween._initted) {\n return 1;\n }\n\n if (!force && tween._pt && (tween._dur && tween.vars.lazy !== false || !tween._dur && tween.vars.lazy) && _lastRenderedFrame !== _ticker.frame) {\n _lazyTweens.push(tween);\n\n tween._lazy = [totalTime, suppressEvents];\n return 1;\n }\n},\n _renderZeroDurationTween = function _renderZeroDurationTween(tween, totalTime, suppressEvents, force) {\n var prevRatio = tween.ratio,\n ratio = totalTime < 0 || !totalTime && prevRatio && !tween._start && tween._zTime > _tinyNum && !tween._dp._lock || tween._ts < 0 || tween._dp._ts < 0 ? 0 : 1,\n // check parent's _lock because when a timeline repeats/yoyos and does its artificial wrapping, we shouldn't force the ratio back to 0. Also, if the tween or its parent is reversed and the totalTime is 0, we should go to a ratio of 0.\n repeatDelay = tween._rDelay,\n tTime = 0,\n pt,\n iteration,\n prevIteration;\n\n if (repeatDelay && tween._repeat) {\n // in case there's a zero-duration tween that has a repeat with a repeatDelay\n tTime = _clamp(0, tween._tDur, totalTime);\n iteration = _animationCycle(tTime, repeatDelay);\n prevIteration = _animationCycle(tween._tTime, repeatDelay);\n\n if (iteration !== prevIteration) {\n prevRatio = 1 - ratio;\n tween.vars.repeatRefresh && tween._initted && tween.invalidate();\n }\n }\n\n if (!tween._initted && _attemptInitTween(tween, totalTime, force, suppressEvents)) {\n // if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately.\n return;\n }\n\n if (ratio !== prevRatio || force || tween._zTime === _tinyNum || !totalTime && tween._zTime) {\n prevIteration = tween._zTime;\n tween._zTime = totalTime || (suppressEvents ? _tinyNum : 0); // when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect.\n\n suppressEvents || (suppressEvents = totalTime && !prevIteration); // if it was rendered previously at exactly 0 (_zTime) and now the playhead is moving away, DON'T fire callbacks otherwise they'll seem like duplicates.\n\n tween.ratio = ratio;\n tween._from && (ratio = 1 - ratio);\n tween._time = 0;\n tween._tTime = tTime;\n suppressEvents || _callback(tween, \"onStart\");\n pt = tween._pt;\n\n while (pt) {\n pt.r(ratio, pt.d);\n pt = pt._next;\n }\n\n tween._startAt && totalTime < 0 && tween._startAt.render(totalTime, true, true);\n tween._onUpdate && !suppressEvents && _callback(tween, \"onUpdate\");\n tTime && tween._repeat && !suppressEvents && tween.parent && _callback(tween, \"onRepeat\");\n\n if ((totalTime >= tween._tDur || totalTime < 0) && tween.ratio === ratio) {\n ratio && _removeFromParent(tween, 1);\n\n if (!suppressEvents) {\n _callback(tween, ratio ? \"onComplete\" : \"onReverseComplete\", true);\n\n tween._prom && tween._prom();\n }\n }\n } else if (!tween._zTime) {\n tween._zTime = totalTime;\n }\n},\n _findNextPauseTween = function _findNextPauseTween(animation, prevTime, time) {\n var child;\n\n if (time > prevTime) {\n child = animation._first;\n\n while (child && child._start <= time) {\n if (!child._dur && child.data === \"isPause\" && child._start > prevTime) {\n return child;\n }\n\n child = child._next;\n }\n } else {\n child = animation._last;\n\n while (child && child._start >= time) {\n if (!child._dur && child.data === \"isPause\" && child._start < prevTime) {\n return child;\n }\n\n child = child._prev;\n }\n }\n},\n _setDuration = function _setDuration(animation, duration, skipUncache) {\n var repeat = animation._repeat,\n dur = _round(duration) || 0;\n animation._dur = dur;\n animation._tDur = !repeat ? dur : repeat < 0 ? 1e10 : _round(dur * (repeat + 1) + animation._rDelay * repeat);\n\n if (animation._time > dur) {\n animation._time = dur;\n animation._tTime = Math.min(animation._tTime, animation._tDur);\n }\n\n !skipUncache && _uncache(animation.parent);\n animation.parent && _setEnd(animation);\n return animation;\n},\n _onUpdateTotalDuration = function _onUpdateTotalDuration(animation) {\n return animation instanceof Timeline ? _uncache(animation) : _setDuration(animation, animation._dur);\n},\n _zeroPosition = {\n _start: 0,\n endTime: _emptyFunc\n},\n _parsePosition = function _parsePosition(animation, position) {\n var labels = animation.labels,\n recent = animation._recent || _zeroPosition,\n clippedDuration = animation.duration() >= _bigNum ? recent.endTime(false) : animation._dur,\n //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead.\n i,\n offset;\n\n if (_isString(position) && (isNaN(position) || position in labels)) {\n //if the string is a number like \"1\", check to see if there's a label with that name, otherwise interpret it as a number (absolute value).\n i = position.charAt(0);\n\n if (i === \"<\" || i === \">\") {\n return (i === \"<\" ? recent._start : recent.endTime(recent._repeat >= 0)) + (parseFloat(position.substr(1)) || 0);\n }\n\n i = position.indexOf(\"=\");\n\n if (i < 0) {\n position in labels || (labels[position] = clippedDuration);\n return labels[position];\n }\n\n offset = +(position.charAt(i - 1) + position.substr(i + 1));\n return i > 1 ? _parsePosition(animation, position.substr(0, i - 1)) + offset : clippedDuration + offset;\n }\n\n return position == null ? clippedDuration : +position;\n},\n _conditionalReturn = function _conditionalReturn(value, func) {\n return value || value === 0 ? func(value) : func;\n},\n _clamp = function _clamp(min, max, value) {\n return value < min ? min : value > max ? max : value;\n},\n getUnit = function getUnit(value) {\n return (value + \"\").substr((parseFloat(value) + \"\").length);\n},\n clamp = function clamp(min, max, value) {\n return _conditionalReturn(value, function (v) {\n return _clamp(min, max, v);\n });\n},\n _slice = [].slice,\n _isArrayLike = function _isArrayLike(value, nonEmpty) {\n return value && _isObject(value) && \"length\" in value && (!nonEmpty && !value.length || value.length - 1 in value && _isObject(value[0])) && !value.nodeType && value !== _win;\n},\n _flatten = function _flatten(ar, leaveStrings, accumulator) {\n if (accumulator === void 0) {\n accumulator = [];\n }\n\n return ar.forEach(function (value) {\n var _accumulator;\n\n return _isString(value) && !leaveStrings || _isArrayLike(value, 1) ? (_accumulator = accumulator).push.apply(_accumulator, toArray(value)) : accumulator.push(value);\n }) || accumulator;\n},\n //takes any value and returns an array. If it's a string (and leaveStrings isn't true), it'll use document.querySelectorAll() and convert that to an array. It'll also accept iterables like jQuery objects.\ntoArray = function toArray(value, leaveStrings) {\n return _isString(value) && !leaveStrings && (_coreInitted || !_wake()) ? _slice.call(_doc.querySelectorAll(value), 0) : _isArray(value) ? _flatten(value, leaveStrings) : _isArrayLike(value) ? _slice.call(value, 0) : value ? [value] : [];\n},\n shuffle = function shuffle(a) {\n return a.sort(function () {\n return .5 - Math.random();\n });\n},\n // alternative that's a bit faster and more reliably diverse but bigger: for (let j, v, i = a.length; i; j = Math.floor(Math.random() * i), v = a[--i], a[i] = a[j], a[j] = v); return a;\n//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following\ndistribute = function distribute(v) {\n if (_isFunction(v)) {\n return v;\n }\n\n var vars = _isObject(v) ? v : {\n each: v\n },\n //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total \"amount\" that's chunked out among them all.\n ease = _parseEase(vars.ease),\n from = vars.from || 0,\n base = parseFloat(vars.base) || 0,\n cache = {},\n isDecimal = from > 0 && from < 1,\n ratios = isNaN(from) || isDecimal,\n axis = vars.axis,\n ratioX = from,\n ratioY = from;\n\n if (_isString(from)) {\n ratioX = ratioY = {\n center: .5,\n edges: .5,\n end: 1\n }[from] || 0;\n } else if (!isDecimal && ratios) {\n ratioX = from[0];\n ratioY = from[1];\n }\n\n return function (i, target, a) {\n var l = (a || vars).length,\n distances = cache[l],\n originX,\n originY,\n x,\n y,\n d,\n j,\n max,\n min,\n wrapAt;\n\n if (!distances) {\n wrapAt = vars.grid === \"auto\" ? 0 : (vars.grid || [1, _bigNum])[1];\n\n if (!wrapAt) {\n max = -_bigNum;\n\n while (max < (max = a[wrapAt++].getBoundingClientRect().left) && wrapAt < l) {}\n\n wrapAt--;\n }\n\n distances = cache[l] = [];\n originX = ratios ? Math.min(wrapAt, l) * ratioX - .5 : from % wrapAt;\n originY = ratios ? l * ratioY / wrapAt - .5 : from / wrapAt | 0;\n max = 0;\n min = _bigNum;\n\n for (j = 0; j < l; j++) {\n x = j % wrapAt - originX;\n y = originY - (j / wrapAt | 0);\n distances[j] = d = !axis ? _sqrt(x * x + y * y) : Math.abs(axis === \"y\" ? y : x);\n d > max && (max = d);\n d < min && (min = d);\n }\n\n from === \"random\" && shuffle(distances);\n distances.max = max - min;\n distances.min = min;\n distances.v = l = (parseFloat(vars.amount) || parseFloat(vars.each) * (wrapAt > l ? l - 1 : !axis ? Math.max(wrapAt, l / wrapAt) : axis === \"y\" ? l / wrapAt : wrapAt) || 0) * (from === \"edges\" ? -1 : 1);\n distances.b = l < 0 ? base - l : base;\n distances.u = getUnit(vars.amount || vars.each) || 0; //unit\n\n ease = ease && l < 0 ? _invertEase(ease) : ease;\n }\n\n l = (distances[i] - distances.min) / distances.max || 0;\n return _round(distances.b + (ease ? ease(l) : l) * distances.v) + distances.u; //round in order to work around floating point errors\n };\n},\n _roundModifier = function _roundModifier(v) {\n //pass in 0.1 get a function that'll round to the nearest tenth, or 5 to round to the closest 5, or 0.001 to the closest 1000th, etc.\n var p = v < 1 ? Math.pow(10, (v + \"\").length - 2) : 1; //to avoid floating point math errors (like 24 * 0.1 == 2.4000000000000004), we chop off at a specific number of decimal places (much faster than toFixed()\n\n return function (raw) {\n return Math.floor(Math.round(parseFloat(raw) / v) * v * p) / p + (_isNumber(raw) ? 0 : getUnit(raw));\n };\n},\n snap = function snap(snapTo, value) {\n var isArray = _isArray(snapTo),\n radius,\n is2D;\n\n if (!isArray && _isObject(snapTo)) {\n radius = isArray = snapTo.radius || _bigNum;\n\n if (snapTo.values) {\n snapTo = toArray(snapTo.values);\n\n if (is2D = !_isNumber(snapTo[0])) {\n radius *= radius; //performance optimization so we don't have to Math.sqrt() in the loop.\n }\n } else {\n snapTo = _roundModifier(snapTo.increment);\n }\n }\n\n return _conditionalReturn(value, !isArray ? _roundModifier(snapTo) : _isFunction(snapTo) ? function (raw) {\n is2D = snapTo(raw);\n return Math.abs(is2D - raw) <= radius ? is2D : raw;\n } : function (raw) {\n var x = parseFloat(is2D ? raw.x : raw),\n y = parseFloat(is2D ? raw.y : 0),\n min = _bigNum,\n closest = 0,\n i = snapTo.length,\n dx,\n dy;\n\n while (i--) {\n if (is2D) {\n dx = snapTo[i].x - x;\n dy = snapTo[i].y - y;\n dx = dx * dx + dy * dy;\n } else {\n dx = Math.abs(snapTo[i] - x);\n }\n\n if (dx < min) {\n min = dx;\n closest = i;\n }\n }\n\n closest = !radius || min <= radius ? snapTo[closest] : raw;\n return is2D || closest === raw || _isNumber(raw) ? closest : closest + getUnit(raw);\n });\n},\n random = function random(min, max, roundingIncrement, returnFunction) {\n return _conditionalReturn(_isArray(min) ? !max : roundingIncrement === true ? !!(roundingIncrement = 0) : !returnFunction, function () {\n return _isArray(min) ? min[~~(Math.random() * min.length)] : (roundingIncrement = roundingIncrement || 1e-5) && (returnFunction = roundingIncrement < 1 ? Math.pow(10, (roundingIncrement + \"\").length - 2) : 1) && Math.floor(Math.round((min + Math.random() * (max - min)) / roundingIncrement) * roundingIncrement * returnFunction) / returnFunction;\n });\n},\n pipe = function pipe() {\n for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) {\n functions[_key] = arguments[_key];\n }\n\n return function (value) {\n return functions.reduce(function (v, f) {\n return f(v);\n }, value);\n };\n},\n unitize = function unitize(func, unit) {\n return function (value) {\n return func(parseFloat(value)) + (unit || getUnit(value));\n };\n},\n normalize = function normalize(min, max, value) {\n return mapRange(min, max, 0, 1, value);\n},\n _wrapArray = function _wrapArray(a, wrapper, value) {\n return _conditionalReturn(value, function (index) {\n return a[~~wrapper(index)];\n });\n},\n wrap = function wrap(min, max, value) {\n // NOTE: wrap() CANNOT be an arrow function! A very odd compiling bug causes problems (unrelated to GSAP).\n var range = max - min;\n return _isArray(min) ? _wrapArray(min, wrap(0, min.length), max) : _conditionalReturn(value, function (value) {\n return (range + (value - min) % range) % range + min;\n });\n},\n wrapYoyo = function wrapYoyo(min, max, value) {\n var range = max - min,\n total = range * 2;\n return _isArray(min) ? _wrapArray(min, wrapYoyo(0, min.length - 1), max) : _conditionalReturn(value, function (value) {\n value = (total + (value - min) % total) % total || 0;\n return min + (value > range ? total - value : value);\n });\n},\n _replaceRandom = function _replaceRandom(value) {\n //replaces all occurrences of random(...) in a string with the calculated random value. can be a range like random(-100, 100, 5) or an array like random([0, 100, 500])\n var prev = 0,\n s = \"\",\n i,\n nums,\n end,\n isArray;\n\n while (~(i = value.indexOf(\"random(\", prev))) {\n end = value.indexOf(\")\", i);\n isArray = value.charAt(i + 7) === \"[\";\n nums = value.substr(i + 7, end - i - 7).match(isArray ? _delimitedValueExp : _strictNumExp);\n s += value.substr(prev, i - prev) + random(isArray ? nums : +nums[0], +nums[1], +nums[2] || 1e-5);\n prev = end + 1;\n }\n\n return s + value.substr(prev, value.length - prev);\n},\n mapRange = function mapRange(inMin, inMax, outMin, outMax, value) {\n var inRange = inMax - inMin,\n outRange = outMax - outMin;\n return _conditionalReturn(value, function (value) {\n return outMin + ((value - inMin) / inRange * outRange || 0);\n });\n},\n interpolate = function interpolate(start, end, progress, mutate) {\n var func = isNaN(start + end) ? 0 : function (p) {\n return (1 - p) * start + p * end;\n };\n\n if (!func) {\n var isString = _isString(start),\n master = {},\n p,\n i,\n interpolators,\n l,\n il;\n\n progress === true && (mutate = 1) && (progress = null);\n\n if (isString) {\n start = {\n p: start\n };\n end = {\n p: end\n };\n } else if (_isArray(start) && !_isArray(end)) {\n interpolators = [];\n l = start.length;\n il = l - 2;\n\n for (i = 1; i < l; i++) {\n interpolators.push(interpolate(start[i - 1], start[i])); //build the interpolators up front as a performance optimization so that when the function is called many times, it can just reuse them.\n }\n\n l--;\n\n func = function func(p) {\n p *= l;\n var i = Math.min(il, ~~p);\n return interpolators[i](p - i);\n };\n\n progress = end;\n } else if (!mutate) {\n start = _merge(_isArray(start) ? [] : {}, start);\n }\n\n if (!interpolators) {\n for (p in end) {\n _addPropTween.call(master, start, p, \"get\", end[p]);\n }\n\n func = function func(p) {\n return _renderPropTweens(p, master) || (isString ? start.p : start);\n };\n }\n }\n\n return _conditionalReturn(progress, func);\n},\n _getLabelInDirection = function _getLabelInDirection(timeline, fromTime, backward) {\n //used for nextLabel() and previousLabel()\n var labels = timeline.labels,\n min = _bigNum,\n p,\n distance,\n label;\n\n for (p in labels) {\n distance = labels[p] - fromTime;\n\n if (distance < 0 === !!backward && distance && min > (distance = Math.abs(distance))) {\n label = p;\n min = distance;\n }\n }\n\n return label;\n},\n _callback = function _callback(animation, type, executeLazyFirst) {\n var v = animation.vars,\n callback = v[type],\n params,\n scope;\n\n if (!callback) {\n return;\n }\n\n params = v[type + \"Params\"];\n scope = v.callbackScope || animation;\n executeLazyFirst && _lazyTweens.length && _lazyRender(); //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values.\n\n return params ? callback.apply(scope, params) : callback.call(scope);\n},\n _interrupt = function _interrupt(animation) {\n _removeFromParent(animation);\n\n if (animation.progress() < 1) {\n _callback(animation, \"onInterrupt\");\n }\n\n return animation;\n},\n _quickTween,\n _createPlugin = function _createPlugin(config) {\n config = !config.name && config[\"default\"] || config; //UMD packaging wraps things oddly, so for example MotionPathHelper becomes {MotionPathHelper:MotionPathHelper, default:MotionPathHelper}.\n\n var name = config.name,\n isFunc = _isFunction(config),\n Plugin = name && !isFunc && config.init ? function () {\n this._props = [];\n } : config,\n //in case someone passes in an object that's not a plugin, like CustomEase\n instanceDefaults = {\n init: _emptyFunc,\n render: _renderPropTweens,\n add: _addPropTween,\n kill: _killPropTweensOf,\n modifier: _addPluginModifier,\n rawVars: 0\n },\n statics = {\n targetTest: 0,\n get: 0,\n getSetter: _getSetter,\n aliases: {},\n register: 0\n };\n\n _wake();\n\n if (config !== Plugin) {\n if (_plugins[name]) {\n return;\n }\n\n _setDefaults(Plugin, _setDefaults(_copyExcluding(config, instanceDefaults), statics)); //static methods\n\n\n _merge(Plugin.prototype, _merge(instanceDefaults, _copyExcluding(config, statics))); //instance methods\n\n\n _plugins[Plugin.prop = name] = Plugin;\n\n if (config.targetTest) {\n _harnessPlugins.push(Plugin);\n\n _reservedProps[name] = 1;\n }\n\n name = (name === \"css\" ? \"CSS\" : name.charAt(0).toUpperCase() + name.substr(1)) + \"Plugin\"; //for the global name. \"motionPath\" should become MotionPathPlugin\n }\n\n _addGlobal(name, Plugin);\n\n if (config.register) {\n config.register(gsap, Plugin, PropTween);\n }\n},\n\n/*\n * --------------------------------------------------------------------------------------\n * COLORS\n * --------------------------------------------------------------------------------------\n */\n_255 = 255,\n _colorLookup = {\n aqua: [0, _255, _255],\n lime: [0, _255, 0],\n silver: [192, 192, 192],\n black: [0, 0, 0],\n maroon: [128, 0, 0],\n teal: [0, 128, 128],\n blue: [0, 0, _255],\n navy: [0, 0, 128],\n white: [_255, _255, _255],\n olive: [128, 128, 0],\n yellow: [_255, _255, 0],\n orange: [_255, 165, 0],\n gray: [128, 128, 128],\n purple: [128, 0, 128],\n green: [0, 128, 0],\n red: [_255, 0, 0],\n pink: [_255, 192, 203],\n cyan: [0, _255, _255],\n transparent: [_255, _255, _255, 0]\n},\n _hue = function _hue(h, m1, m2) {\n h = h < 0 ? h + 1 : h > 1 ? h - 1 : h;\n return (h * 6 < 1 ? m1 + (m2 - m1) * h * 6 : h < .5 ? m2 : h * 3 < 2 ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * _255 + .5 | 0;\n},\n splitColor = function splitColor(v, toHSL, forceAlpha) {\n var a = !v ? _colorLookup.black : _isNumber(v) ? [v >> 16, v >> 8 & _255, v & _255] : 0,\n r,\n g,\n b,\n h,\n s,\n l,\n max,\n min,\n d,\n wasHSL;\n\n if (!a) {\n if (v.substr(-1) === \",\") {\n //sometimes a trailing comma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:\"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)\" - in this example \"blue,\" has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value.\n v = v.substr(0, v.length - 1);\n }\n\n if (_colorLookup[v]) {\n a = _colorLookup[v];\n } else if (v.charAt(0) === \"#\") {\n if (v.length === 4) {\n //for shorthand like #9F0\n r = v.charAt(1);\n g = v.charAt(2);\n b = v.charAt(3);\n v = \"#\" + r + r + g + g + b + b;\n }\n\n v = parseInt(v.substr(1), 16);\n a = [v >> 16, v >> 8 & _255, v & _255];\n } else if (v.substr(0, 3) === \"hsl\") {\n a = wasHSL = v.match(_strictNumExp);\n\n if (!toHSL) {\n h = +a[0] % 360 / 360;\n s = +a[1] / 100;\n l = +a[2] / 100;\n g = l <= .5 ? l * (s + 1) : l + s - l * s;\n r = l * 2 - g;\n\n if (a.length > 3) {\n a[3] *= 1; //cast as number\n }\n\n a[0] = _hue(h + 1 / 3, r, g);\n a[1] = _hue(h, r, g);\n a[2] = _hue(h - 1 / 3, r, g);\n } else if (~v.indexOf(\"=\")) {\n //if relative values are found, just return the raw strings with the relative prefixes in place.\n a = v.match(_numExp);\n forceAlpha && a.length < 4 && (a[3] = 1);\n return a;\n }\n } else {\n a = v.match(_strictNumExp) || _colorLookup.transparent;\n }\n\n a = a.map(Number);\n }\n\n if (toHSL && !wasHSL) {\n r = a[0] / _255;\n g = a[1] / _255;\n b = a[2] / _255;\n max = Math.max(r, g, b);\n min = Math.min(r, g, b);\n l = (max + min) / 2;\n\n if (max === min) {\n h = s = 0;\n } else {\n d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n h = max === r ? (g - b) / d + (g < b ? 6 : 0) : max === g ? (b - r) / d + 2 : (r - g) / d + 4;\n h *= 60;\n }\n\n a[0] = ~~(h + .5);\n a[1] = ~~(s * 100 + .5);\n a[2] = ~~(l * 100 + .5);\n }\n\n forceAlpha && a.length < 4 && (a[3] = 1);\n return a;\n},\n _colorOrderData = function _colorOrderData(v) {\n // strips out the colors from the string, finds all the numeric slots (with units) and returns an array of those. The Array also has a \"c\" property which is an Array of the index values where the colors belong. This is to help work around issues where there's a mis-matched order of color/numeric data like drop-shadow(#f00 0px 1px 2px) and drop-shadow(0x 1px 2px #f00). This is basically a helper function used in _formatColors()\n var values = [],\n c = [],\n i = -1;\n v.split(_colorExp).forEach(function (v) {\n var a = v.match(_numWithUnitExp) || [];\n values.push.apply(values, a);\n c.push(i += a.length + 1);\n });\n values.c = c;\n return values;\n},\n _formatColors = function _formatColors(s, toHSL, orderMatchData) {\n var result = \"\",\n colors = (s + result).match(_colorExp),\n type = toHSL ? \"hsla(\" : \"rgba(\",\n i = 0,\n c,\n shell,\n d,\n l;\n\n if (!colors) {\n return s;\n }\n\n colors = colors.map(function (color) {\n return (color = splitColor(color, toHSL, 1)) && type + (toHSL ? color[0] + \",\" + color[1] + \"%,\" + color[2] + \"%,\" + color[3] : color.join(\",\")) + \")\";\n });\n\n if (orderMatchData) {\n d = _colorOrderData(s);\n c = orderMatchData.c;\n\n if (c.join(result) !== d.c.join(result)) {\n shell = s.replace(_colorExp, \"1\").split(_numWithUnitExp);\n l = shell.length - 1;\n\n for (; i < l; i++) {\n result += shell[i] + (~c.indexOf(i) ? colors.shift() || type + \"0,0,0,0)\" : (d.length ? d : colors.length ? colors : orderMatchData).shift());\n }\n }\n }\n\n if (!shell) {\n shell = s.split(_colorExp);\n l = shell.length - 1;\n\n for (; i < l; i++) {\n result += shell[i] + colors[i];\n }\n }\n\n return result + shell[l];\n},\n _colorExp = function () {\n var s = \"(?:\\\\b(?:(?:rgb|rgba|hsl|hsla)\\\\(.+?\\\\))|\\\\B#(?:[0-9a-f]{3}){1,2}\\\\b\",\n //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.,\n p;\n\n for (p in _colorLookup) {\n s += \"|\" + p + \"\\\\b\";\n }\n\n return new RegExp(s + \")\", \"gi\");\n}(),\n _hslExp = /hsl[a]?\\(/,\n _colorStringFilter = function _colorStringFilter(a) {\n var combined = a.join(\" \"),\n toHSL;\n _colorExp.lastIndex = 0;\n\n if (_colorExp.test(combined)) {\n toHSL = _hslExp.test(combined);\n a[1] = _formatColors(a[1], toHSL);\n a[0] = _formatColors(a[0], toHSL, _colorOrderData(a[1])); // make sure the order of numbers/colors match with the END value.\n\n return true;\n }\n},\n\n/*\n * --------------------------------------------------------------------------------------\n * TICKER\n * --------------------------------------------------------------------------------------\n */\n_tickerActive,\n _ticker = function () {\n var _getTime = Date.now,\n _lagThreshold = 500,\n _adjustedLag = 33,\n _startTime = _getTime(),\n _lastUpdate = _startTime,\n _gap = 1 / 240,\n _nextTime = _gap,\n _listeners = [],\n _id,\n _req,\n _raf,\n _self,\n _tick = function _tick(v) {\n var elapsed = _getTime() - _lastUpdate,\n manual = v === true,\n overlap,\n dispatch;\n\n if (elapsed > _lagThreshold) {\n _startTime += elapsed - _adjustedLag;\n }\n\n _lastUpdate += elapsed;\n _self.time = (_lastUpdate - _startTime) / 1000;\n overlap = _self.time - _nextTime;\n\n if (overlap > 0 || manual) {\n _self.frame++;\n _nextTime += overlap + (overlap >= _gap ? 0.004 : _gap - overlap);\n dispatch = 1;\n }\n\n manual || (_id = _req(_tick)); //make sure the request is made before we dispatch the \"tick\" event so that timing is maintained. Otherwise, if processing the \"tick\" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise.\n\n dispatch && _listeners.forEach(function (l) {\n return l(_self.time, elapsed, _self.frame, v);\n });\n };\n\n _self = {\n time: 0,\n frame: 0,\n tick: function tick() {\n _tick(true);\n },\n wake: function wake() {\n if (_coreReady) {\n if (!_coreInitted && _windowExists()) {\n _win = _coreInitted = window;\n _doc = _win.document || {};\n _globals.gsap = gsap;\n (_win.gsapVersions || (_win.gsapVersions = [])).push(gsap.version);\n\n _install(_installScope || _win.GreenSockGlobals || !_win.gsap && _win || {});\n\n _raf = _win.requestAnimationFrame;\n }\n\n _id && _self.sleep();\n\n _req = _raf || function (f) {\n return setTimeout(f, (_nextTime - _self.time) * 1000 + 1 | 0);\n };\n\n _tickerActive = 1;\n\n _tick(2);\n }\n },\n sleep: function sleep() {\n (_raf ? _win.cancelAnimationFrame : clearTimeout)(_id);\n _tickerActive = 0;\n _req = _emptyFunc;\n },\n lagSmoothing: function lagSmoothing(threshold, adjustedLag) {\n _lagThreshold = threshold || 1 / _tinyNum; //zero should be interpreted as basically unlimited\n\n _adjustedLag = Math.min(adjustedLag, _lagThreshold, 0);\n },\n fps: function fps(_fps) {\n _gap = 1 / (_fps || 240);\n _nextTime = _self.time + _gap;\n },\n add: function add(callback) {\n _listeners.indexOf(callback) < 0 && _listeners.push(callback);\n\n _wake();\n },\n remove: function remove(callback) {\n var i;\n ~(i = _listeners.indexOf(callback)) && _listeners.splice(i, 1);\n },\n _listeners: _listeners\n };\n return _self;\n}(),\n _wake = function _wake() {\n return !_tickerActive && _ticker.wake();\n},\n //also ensures the core classes are initialized.\n\n/*\n* -------------------------------------------------\n* EASING\n* -------------------------------------------------\n*/\n_easeMap = {},\n _customEaseExp = /^[\\d.\\-M][\\d.\\-,\\s]/,\n _quotesExp = /[\"']/g,\n _parseObjectInString = function _parseObjectInString(value) {\n //takes a string like \"{wiggles:10, type:anticipate})\" and turns it into a real object. Notice it ends in \")\" and includes the {} wrappers. This is because we only use this function for parsing ease configs and prioritized optimization rather than reusability.\n var obj = {},\n split = value.substr(1, value.length - 3).split(\":\"),\n key = split[0],\n i = 1,\n l = split.length,\n index,\n val,\n parsedVal;\n\n for (; i < l; i++) {\n val = split[i];\n index = i !== l - 1 ? val.lastIndexOf(\",\") : val.length;\n parsedVal = val.substr(0, index);\n obj[key] = isNaN(parsedVal) ? parsedVal.replace(_quotesExp, \"\").trim() : +parsedVal;\n key = val.substr(index + 1).trim();\n }\n\n return obj;\n},\n _configEaseFromString = function _configEaseFromString(name) {\n //name can be a string like \"elastic.out(1,0.5)\", and pass in _easeMap as obj and it'll parse it out and call the actual function like _easeMap.Elastic.easeOut.config(1,0.5). It will also parse custom ease strings as long as CustomEase is loaded and registered (internally as _easeMap._CE).\n var split = (name + \"\").split(\"(\"),\n ease = _easeMap[split[0]];\n return ease && split.length > 1 && ease.config ? ease.config.apply(null, ~name.indexOf(\"{\") ? [_parseObjectInString(split[1])] : _parenthesesExp.exec(name)[1].split(\",\").map(_numericIfPossible)) : _easeMap._CE && _customEaseExp.test(name) ? _easeMap._CE(\"\", name) : ease;\n},\n _invertEase = function _invertEase(ease) {\n return function (p) {\n return 1 - ease(1 - p);\n };\n},\n // allow yoyoEase to be set in children and have those affected when the parent/ancestor timeline yoyos.\n_propagateYoyoEase = function _propagateYoyoEase(timeline, isYoyo) {\n var child = timeline._first,\n ease;\n\n while (child) {\n if (child instanceof Timeline) {\n _propagateYoyoEase(child, isYoyo);\n } else if (child.vars.yoyoEase && (!child._yoyo || !child._repeat) && child._yoyo !== isYoyo) {\n if (child.timeline) {\n _propagateYoyoEase(child.timeline, isYoyo);\n } else {\n ease = child._ease;\n child._ease = child._yEase;\n child._yEase = ease;\n child._yoyo = isYoyo;\n }\n }\n\n child = child._next;\n }\n},\n _parseEase = function _parseEase(ease, defaultEase) {\n return !ease ? defaultEase : (_isFunction(ease) ? ease : _easeMap[ease] || _configEaseFromString(ease)) || defaultEase;\n},\n _insertEase = function _insertEase(names, easeIn, easeOut, easeInOut) {\n if (easeOut === void 0) {\n easeOut = function easeOut(p) {\n return 1 - easeIn(1 - p);\n };\n }\n\n if (easeInOut === void 0) {\n easeInOut = function easeInOut(p) {\n return p < .5 ? easeIn(p * 2) / 2 : 1 - easeIn((1 - p) * 2) / 2;\n };\n }\n\n var ease = {\n easeIn: easeIn,\n easeOut: easeOut,\n easeInOut: easeInOut\n },\n lowercaseName;\n\n _forEachName(names, function (name) {\n _easeMap[name] = _globals[name] = ease;\n _easeMap[lowercaseName = name.toLowerCase()] = easeOut;\n\n for (var p in ease) {\n _easeMap[lowercaseName + (p === \"easeIn\" ? \".in\" : p === \"easeOut\" ? \".out\" : \".inOut\")] = _easeMap[name + \".\" + p] = ease[p];\n }\n });\n\n return ease;\n},\n _easeInOutFromOut = function _easeInOutFromOut(easeOut) {\n return function (p) {\n return p < .5 ? (1 - easeOut(1 - p * 2)) / 2 : .5 + easeOut((p - .5) * 2) / 2;\n };\n},\n _configElastic = function _configElastic(type, amplitude, period) {\n var p1 = amplitude >= 1 ? amplitude : 1,\n //note: if amplitude is < 1, we simply adjust the period for a more natural feel. Otherwise the math doesn't work right and the curve starts at 1.\n p2 = (period || (type ? .3 : .45)) / (amplitude < 1 ? amplitude : 1),\n p3 = p2 / _2PI * (Math.asin(1 / p1) || 0),\n easeOut = function easeOut(p) {\n return p === 1 ? 1 : p1 * Math.pow(2, -10 * p) * _sin((p - p3) * p2) + 1;\n },\n ease = type === \"out\" ? easeOut : type === \"in\" ? function (p) {\n return 1 - easeOut(1 - p);\n } : _easeInOutFromOut(easeOut);\n\n p2 = _2PI / p2; //precalculate to optimize\n\n ease.config = function (amplitude, period) {\n return _configElastic(type, amplitude, period);\n };\n\n return ease;\n},\n _configBack = function _configBack(type, overshoot) {\n if (overshoot === void 0) {\n overshoot = 1.70158;\n }\n\n var easeOut = function easeOut(p) {\n return p ? --p * p * ((overshoot + 1) * p + overshoot) + 1 : 0;\n },\n ease = type === \"out\" ? easeOut : type === \"in\" ? function (p) {\n return 1 - easeOut(1 - p);\n } : _easeInOutFromOut(easeOut);\n\n ease.config = function (overshoot) {\n return _configBack(type, overshoot);\n };\n\n return ease;\n}; // a cheaper (kb and cpu) but more mild way to get a parameterized weighted ease by feeding in a value between -1 (easeIn) and 1 (easeOut) where 0 is linear.\n// _weightedEase = ratio => {\n// \tlet y = 0.5 + ratio / 2;\n// \treturn p => (2 * (1 - p) * p * y + p * p);\n// },\n// a stronger (but more expensive kb/cpu) parameterized weighted ease that lets you feed in a value between -1 (easeIn) and 1 (easeOut) where 0 is linear.\n// _weightedEaseStrong = ratio => {\n// \tratio = .5 + ratio / 2;\n// \tlet o = 1 / 3 * (ratio < .5 ? ratio : 1 - ratio),\n// \t\tb = ratio - o,\n// \t\tc = ratio + o;\n// \treturn p => p === 1 ? p : 3 * b * (1 - p) * (1 - p) * p + 3 * c * (1 - p) * p * p + p * p * p;\n// };\n\n\n_forEachName(\"Linear,Quad,Cubic,Quart,Quint,Strong\", function (name, i) {\n var power = i < 5 ? i + 1 : i;\n\n _insertEase(name + \",Power\" + (power - 1), i ? function (p) {\n return Math.pow(p, power);\n } : function (p) {\n return p;\n }, function (p) {\n return 1 - Math.pow(1 - p, power);\n }, function (p) {\n return p < .5 ? Math.pow(p * 2, power) / 2 : 1 - Math.pow((1 - p) * 2, power) / 2;\n });\n});\n\n_easeMap.Linear.easeNone = _easeMap.none = _easeMap.Linear.easeIn;\n\n_insertEase(\"Elastic\", _configElastic(\"in\"), _configElastic(\"out\"), _configElastic());\n\n(function (n, c) {\n var n1 = 1 / c,\n n2 = 2 * n1,\n n3 = 2.5 * n1,\n easeOut = function easeOut(p) {\n return p < n1 ? n * p * p : p < n2 ? n * Math.pow(p - 1.5 / c, 2) + .75 : p < n3 ? n * (p -= 2.25 / c) * p + .9375 : n * Math.pow(p - 2.625 / c, 2) + .984375;\n };\n\n _insertEase(\"Bounce\", function (p) {\n return 1 - easeOut(1 - p);\n }, easeOut);\n})(7.5625, 2.75);\n\n_insertEase(\"Expo\", function (p) {\n return p ? Math.pow(2, 10 * (p - 1)) : 0;\n});\n\n_insertEase(\"Circ\", function (p) {\n return -(_sqrt(1 - p * p) - 1);\n});\n\n_insertEase(\"Sine\", function (p) {\n return p === 1 ? 1 : -_cos(p * _HALF_PI) + 1;\n});\n\n_insertEase(\"Back\", _configBack(\"in\"), _configBack(\"out\"), _configBack());\n\n_easeMap.SteppedEase = _easeMap.steps = _globals.SteppedEase = {\n config: function config(steps, immediateStart) {\n if (steps === void 0) {\n steps = 1;\n }\n\n var p1 = 1 / steps,\n p2 = steps + (immediateStart ? 0 : 1),\n p3 = immediateStart ? 1 : 0,\n max = 1 - _tinyNum;\n return function (p) {\n return ((p2 * _clamp(0, max, p) | 0) + p3) * p1;\n };\n }\n};\n_defaults.ease = _easeMap[\"quad.out\"];\n\n_forEachName(\"onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt\", function (name) {\n return _callbackNames += name + \",\" + name + \"Params,\";\n});\n/*\n * --------------------------------------------------------------------------------------\n * CACHE\n * --------------------------------------------------------------------------------------\n */\n\n\nexport var GSCache = function GSCache(target, harness) {\n this.id = _gsID++;\n target._gsap = this;\n this.target = target;\n this.harness = harness;\n this.get = harness ? harness.get : _getProperty;\n this.set = harness ? harness.getSetter : _getSetter;\n};\n/*\n * --------------------------------------------------------------------------------------\n * ANIMATION\n * --------------------------------------------------------------------------------------\n */\n\nexport var Animation = /*#__PURE__*/function () {\n function Animation(vars, time) {\n var parent = vars.parent || _globalTimeline;\n this.vars = vars;\n this._delay = +vars.delay || 0;\n\n if (this._repeat = vars.repeat || 0) {\n this._rDelay = vars.repeatDelay || 0;\n this._yoyo = !!vars.yoyo || !!vars.yoyoEase;\n }\n\n this._ts = 1;\n\n _setDuration(this, +vars.duration, 1);\n\n this.data = vars.data;\n _tickerActive || _ticker.wake();\n parent && _addToTimeline(parent, this, time || time === 0 ? time : parent._time, 1);\n vars.reversed && this.reverse();\n vars.paused && this.paused(true);\n }\n\n var _proto = Animation.prototype;\n\n _proto.delay = function delay(value) {\n if (value || value === 0) {\n this.parent && this.parent.smoothChildTiming && this.startTime(this._start + value - this._delay);\n this._delay = value;\n return this;\n }\n\n return this._delay;\n };\n\n _proto.duration = function duration(value) {\n return arguments.length ? this.totalDuration(this._repeat > 0 ? value + (value + this._rDelay) * this._repeat : value) : this.totalDuration() && this._dur;\n };\n\n _proto.totalDuration = function totalDuration(value) {\n if (!arguments.length) {\n return this._tDur;\n }\n\n this._dirty = 0;\n var t = this._time / this._dur || 0;\n\n _setDuration(this, this._repeat < 0 ? value : (value - this._repeat * this._rDelay) / (this._repeat + 1));\n\n return this._tTime ? _alignPlayhead(this, t * value + _elapsedCycleDuration(this)) : this; // in case the animation hasn't even started yet and it has a delay. Aligning the playhead in that case would make it appear to lose the delay.\n };\n\n _proto.totalTime = function totalTime(_totalTime, suppressEvents) {\n _wake();\n\n if (!arguments.length) {\n return this._tTime;\n }\n\n var parent = this._dp;\n\n if (parent && parent.smoothChildTiming && this._ts) {\n _alignPlayhead(this, _totalTime); //in case any of the ancestor timelines had completed but should now be enabled, we should reset their totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The start of that child would get pushed out, but one of the ancestors may have completed.\n\n\n while (parent.parent) {\n if (parent.parent._time !== parent._start + (parent._ts >= 0 ? parent._tTime / parent._ts : (parent.totalDuration() - parent._tTime) / -parent._ts)) {\n parent.totalTime(parent._tTime, true);\n }\n\n parent = parent.parent;\n }\n\n if (!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && _totalTime < this._tDur || this._ts < 0 && _totalTime > 0 || !this._tDur && !_totalTime)) {\n //if the animation doesn't have a parent, put it back into its last parent (recorded as _dp for exactly cases like this). Limit to parents with autoRemoveChildren (like globalTimeline) so that if the user manually removes an animation from a timeline and then alters its playhead, it doesn't get added back in.\n _addToTimeline(this._dp, this, this._start - this._delay);\n }\n }\n\n if (this._tTime !== _totalTime || !this._dur && !suppressEvents || this._initted && Math.abs(this._zTime) === _tinyNum || !_totalTime && !this._initted) {\n this._ts || (this._pTime = _totalTime); // otherwise, if an animation is paused, then the playhead is moved back to zero, then resumed, it'd revert back to the original time at the pause\n\n _lazySafeRender(this, _totalTime, suppressEvents);\n }\n\n return this;\n };\n\n _proto.time = function time(value, suppressEvents) {\n return arguments.length ? this.totalTime(Math.min(this.totalDuration(), value + _elapsedCycleDuration(this)) % this._dur || (value ? this._dur : 0), suppressEvents) : this._time; // note: if the modulus results in 0, the playhead could be exactly at the end or the beginning, and we always defer to the END with a non-zero value, otherwise if you set the time() to the very end (duration()), it would render at the START!\n };\n\n _proto.totalProgress = function totalProgress(value, suppressEvents) {\n return arguments.length ? this.totalTime(this.totalDuration() * value, suppressEvents) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.ratio;\n };\n\n _proto.progress = function progress(value, suppressEvents) {\n return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - value : value) + _elapsedCycleDuration(this), suppressEvents) : this.duration() ? Math.min(1, this._time / this._dur) : this.ratio;\n };\n\n _proto.iteration = function iteration(value, suppressEvents) {\n var cycleDuration = this.duration() + this._rDelay;\n\n return arguments.length ? this.totalTime(this._time + (value - 1) * cycleDuration, suppressEvents) : this._repeat ? _animationCycle(this._tTime, cycleDuration) + 1 : 1;\n } // potential future addition:\n // isPlayingBackwards() {\n // \tlet animation = this,\n // \t\torientation = 1; // 1 = forward, -1 = backward\n // \twhile (animation) {\n // \t\torientation *= animation.reversed() || (animation.repeat() && !(animation.iteration() & 1)) ? -1 : 1;\n // \t\tanimation = animation.parent;\n // \t}\n // \treturn orientation < 0;\n // }\n ;\n\n _proto.timeScale = function timeScale(value) {\n if (!arguments.length) {\n return this._rts === -_tinyNum ? 0 : this._rts; // recorded timeScale. Special case: if someone calls reverse() on an animation with timeScale of 0, we assign it -_tinyNum to remember it's reversed.\n }\n\n if (this._rts === value) {\n return this;\n }\n\n var tTime = this.parent && this._ts ? _parentToChildTotalTime(this.parent._time, this) : this._tTime; // make sure to do the parentToChildTotalTime() BEFORE setting the new _ts because the old one must be used in that calculation.\n // prioritize rendering where the parent's playhead lines up instead of this._tTime because there could be a tween that's animating another tween's timeScale in the same rendering loop (same parent), thus if the timeScale tween renders first, it would alter _start BEFORE _tTime was set on that tick (in the rendering loop), effectively freezing it until the timeScale tween finishes.\n\n this._rts = +value || 0;\n this._ts = this._ps || value === -_tinyNum ? 0 : this._rts; // _ts is the functional timeScale which would be 0 if the animation is paused.\n\n return _recacheAncestors(this.totalTime(_clamp(-this._delay, this._tDur, tTime), true));\n };\n\n _proto.paused = function paused(value) {\n if (!arguments.length) {\n return this._ps;\n }\n\n if (this._ps !== value) {\n this._ps = value;\n\n if (value) {\n this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()); // if the pause occurs during the delay phase, make sure that's factored in when resuming.\n\n this._ts = this._act = 0; // _ts is the functional timeScale, so a paused tween would effectively have a timeScale of 0. We record the \"real\" timeScale as _rts (recorded time scale)\n } else {\n _wake();\n\n this._ts = this._rts; //only defer to _pTime (pauseTime) if tTime is zero. Remember, someone could pause() an animation, then scrub the playhead and resume(). If the parent doesn't have smoothChildTiming, we render at the rawTime() because the startTime won't get updated.\n\n this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && (this._tTime -= _tinyNum) && Math.abs(this._zTime) !== _tinyNum); // edge case: animation.progress(1).pause().play() wouldn't render again because the playhead is already at the end, but the call to totalTime() below will add it back to its parent...and not remove it again (since removing only happens upon rendering at a new time). Offsetting the _tTime slightly is done simply to cause the final render in totalTime() that'll pop it off its timeline (if autoRemoveChildren is true, of course). Check to make sure _zTime isn't -_tinyNum to avoid an edge case where the playhead is pushed to the end but INSIDE a tween/callback, the timeline itself is paused thus halting rendering and leaving a few unrendered. When resuming, it wouldn't render those otherwise.\n }\n }\n\n return this;\n };\n\n _proto.startTime = function startTime(value) {\n if (arguments.length) {\n this._start = value;\n var parent = this.parent || this._dp;\n parent && (parent._sort || !this.parent) && _addToTimeline(parent, this, value - this._delay);\n return this;\n }\n\n return this._start;\n };\n\n _proto.endTime = function endTime(includeRepeats) {\n return this._start + (_isNotFalse(includeRepeats) ? this.totalDuration() : this.duration()) / Math.abs(this._ts);\n };\n\n _proto.rawTime = function rawTime(wrapRepeats) {\n var parent = this.parent || this._dp; // _dp = detatched parent\n\n return !parent ? this._tTime : wrapRepeats && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : !this._ts ? this._tTime : _parentToChildTotalTime(parent.rawTime(wrapRepeats), this);\n };\n\n _proto.globalTime = function globalTime(rawTime) {\n var animation = this,\n time = arguments.length ? rawTime : animation.rawTime();\n\n while (animation) {\n time = animation._start + time / (animation._ts || 1);\n animation = animation._dp;\n }\n\n return time;\n };\n\n _proto.repeat = function repeat(value) {\n if (arguments.length) {\n this._repeat = value;\n return _onUpdateTotalDuration(this);\n }\n\n return this._repeat;\n };\n\n _proto.repeatDelay = function repeatDelay(value) {\n if (arguments.length) {\n this._rDelay = value;\n return _onUpdateTotalDuration(this);\n }\n\n return this._rDelay;\n };\n\n _proto.yoyo = function yoyo(value) {\n if (arguments.length) {\n this._yoyo = value;\n return this;\n }\n\n return this._yoyo;\n };\n\n _proto.seek = function seek(position, suppressEvents) {\n return this.totalTime(_parsePosition(this, position), _isNotFalse(suppressEvents));\n };\n\n _proto.restart = function restart(includeDelay, suppressEvents) {\n return this.play().totalTime(includeDelay ? -this._delay : 0, _isNotFalse(suppressEvents));\n };\n\n _proto.play = function play(from, suppressEvents) {\n if (from != null) {\n this.seek(from, suppressEvents);\n }\n\n return this.reversed(false).paused(false);\n };\n\n _proto.reverse = function reverse(from, suppressEvents) {\n if (from != null) {\n this.seek(from || this.totalDuration(), suppressEvents);\n }\n\n return this.reversed(true).paused(false);\n };\n\n _proto.pause = function pause(atTime, suppressEvents) {\n if (atTime != null) {\n this.seek(atTime, suppressEvents);\n }\n\n return this.paused(true);\n };\n\n _proto.resume = function resume() {\n return this.paused(false);\n };\n\n _proto.reversed = function reversed(value) {\n if (arguments.length) {\n if (!!value !== this.reversed()) {\n this.timeScale(-this._rts || (value ? -_tinyNum : 0)); // in case timeScale is zero, reversing would have no effect so we use _tinyNum.\n }\n\n return this;\n }\n\n return this._rts < 0;\n };\n\n _proto.invalidate = function invalidate() {\n this._initted = 0;\n this._zTime = -_tinyNum;\n return this;\n };\n\n _proto.isActive = function isActive() {\n var parent = this.parent || this._dp,\n start = this._start,\n rawTime;\n return !!(!parent || this._ts && this._initted && parent.isActive() && (rawTime = parent.rawTime(true)) >= start && rawTime < this.endTime(true) - _tinyNum);\n };\n\n _proto.eventCallback = function eventCallback(type, callback, params) {\n var vars = this.vars;\n\n if (arguments.length > 1) {\n if (!callback) {\n delete vars[type];\n } else {\n vars[type] = callback;\n\n if (params) {\n vars[type + \"Params\"] = params;\n }\n\n if (type === \"onUpdate\") {\n this._onUpdate = callback;\n }\n }\n\n return this;\n }\n\n return vars[type];\n };\n\n _proto.then = function then(onFulfilled) {\n var self = this;\n return new Promise(function (resolve) {\n var f = _isFunction(onFulfilled) ? onFulfilled : _passThrough,\n _resolve = function _resolve() {\n var _then = self.then;\n self.then = null; // temporarily null the then() method to avoid an infinite loop (see https://github.com/greensock/GSAP/issues/322)\n\n _isFunction(f) && (f = f(self)) && (f.then || f === self) && (self.then = _then);\n resolve(f);\n self.then = _then;\n };\n\n if (self._initted && self.totalProgress() === 1 && self._ts >= 0 || !self._tTime && self._ts < 0) {\n _resolve();\n } else {\n self._prom = _resolve;\n }\n });\n };\n\n _proto.kill = function kill() {\n _interrupt(this);\n };\n\n return Animation;\n}();\n\n_setDefaults(Animation.prototype, {\n _time: 0,\n _start: 0,\n _end: 0,\n _tTime: 0,\n _tDur: 0,\n _dirty: 0,\n _repeat: 0,\n _yoyo: false,\n parent: null,\n _initted: false,\n _rDelay: 0,\n _ts: 1,\n _dp: 0,\n ratio: 0,\n _zTime: -_tinyNum,\n _prom: 0,\n _ps: false,\n _rts: 1\n});\n/*\n * -------------------------------------------------\n * TIMELINE\n * -------------------------------------------------\n */\n\n\nexport var Timeline = /*#__PURE__*/function (_Animation) {\n _inheritsLoose(Timeline, _Animation);\n\n function Timeline(vars, time) {\n var _this;\n\n if (vars === void 0) {\n vars = {};\n }\n\n _this = _Animation.call(this, vars, time) || this;\n _this.labels = {};\n _this.smoothChildTiming = !!vars.smoothChildTiming;\n _this.autoRemoveChildren = !!vars.autoRemoveChildren;\n _this._sort = _isNotFalse(vars.sortChildren);\n _this.parent && _postAddChecks(_this.parent, _assertThisInitialized(_this));\n vars.scrollTrigger && _scrollTrigger(_assertThisInitialized(_this), vars.scrollTrigger);\n return _this;\n }\n\n var _proto2 = Timeline.prototype;\n\n _proto2.to = function to(targets, vars, position) {\n new Tween(targets, _parseVars(arguments, 0, this), _parsePosition(this, _isNumber(vars) ? arguments[3] : position));\n return this;\n };\n\n _proto2.from = function from(targets, vars, position) {\n new Tween(targets, _parseVars(arguments, 1, this), _parsePosition(this, _isNumber(vars) ? arguments[3] : position));\n return this;\n };\n\n _proto2.fromTo = function fromTo(targets, fromVars, toVars, position) {\n new Tween(targets, _parseVars(arguments, 2, this), _parsePosition(this, _isNumber(fromVars) ? arguments[4] : position));\n return this;\n };\n\n _proto2.set = function set(targets, vars, position) {\n vars.duration = 0;\n vars.parent = this;\n _inheritDefaults(vars).repeatDelay || (vars.repeat = 0);\n vars.immediateRender = !!vars.immediateRender;\n new Tween(targets, vars, _parsePosition(this, position), 1);\n return this;\n };\n\n _proto2.call = function call(callback, params, position) {\n return _addToTimeline(this, Tween.delayedCall(0, callback, params), _parsePosition(this, position));\n } //ONLY for backward compatibility! Maybe delete?\n ;\n\n _proto2.staggerTo = function staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) {\n vars.duration = duration;\n vars.stagger = vars.stagger || stagger;\n vars.onComplete = onCompleteAll;\n vars.onCompleteParams = onCompleteAllParams;\n vars.parent = this;\n new Tween(targets, vars, _parsePosition(this, position));\n return this;\n };\n\n _proto2.staggerFrom = function staggerFrom(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) {\n vars.runBackwards = 1;\n _inheritDefaults(vars).immediateRender = _isNotFalse(vars.immediateRender);\n return this.staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams);\n };\n\n _proto2.staggerFromTo = function staggerFromTo(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams) {\n toVars.startAt = fromVars;\n _inheritDefaults(toVars).immediateRender = _isNotFalse(toVars.immediateRender);\n return this.staggerTo(targets, duration, toVars, stagger, position, onCompleteAll, onCompleteAllParams);\n };\n\n _proto2.render = function render(totalTime, suppressEvents, force) {\n var prevTime = this._time,\n tDur = this._dirty ? this.totalDuration() : this._tDur,\n dur = this._dur,\n tTime = this !== _globalTimeline && totalTime > tDur - _tinyNum && totalTime >= 0 ? tDur : totalTime < _tinyNum ? 0 : totalTime,\n crossingStart = this._zTime < 0 !== totalTime < 0 && (this._initted || !dur),\n time,\n child,\n next,\n iteration,\n cycleDuration,\n prevPaused,\n pauseTween,\n timeScale,\n prevStart,\n prevIteration,\n yoyo,\n isYoyo;\n\n if (tTime !== this._tTime || force || crossingStart) {\n if (prevTime !== this._time && dur) {\n //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).\n tTime += this._time - prevTime;\n totalTime += this._time - prevTime;\n }\n\n time = tTime;\n prevStart = this._start;\n timeScale = this._ts;\n prevPaused = !timeScale;\n\n if (crossingStart) {\n dur || (prevTime = this._zTime); //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect.\n\n (totalTime || !suppressEvents) && (this._zTime = totalTime);\n }\n\n if (this._repeat) {\n //adjust the time for repeats and yoyos\n yoyo = this._yoyo;\n cycleDuration = dur + this._rDelay;\n time = _round(tTime % cycleDuration); //round to avoid floating point errors. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!)\n\n if (time > dur || tDur === tTime) {\n time = dur;\n }\n\n iteration = ~~(tTime / cycleDuration);\n\n if (iteration && iteration === tTime / cycleDuration) {\n time = dur;\n iteration--;\n }\n\n prevIteration = _animationCycle(this._tTime, cycleDuration);\n !prevTime && this._tTime && prevIteration !== iteration && (prevIteration = iteration); // edge case - if someone does addPause() at the very beginning of a repeating timeline, that pause is technically at the same spot as the end which causes this._time to get set to 0 when the totalTime would normally place the playhead at the end. See https://greensock.com/forums/topic/23823-closing-nav-animation-not-working-on-ie-and-iphone-6-maybe-other-older-browser/?tab=comments#comment-113005\n\n if (yoyo && iteration & 1) {\n time = dur - time;\n isYoyo = 1;\n }\n /*\n make sure children at the end/beginning of the timeline are rendered properly. If, for example,\n a 3-second long timeline rendered at 2.9 seconds previously, and now renders at 3.2 seconds (which\n would get translated to 2.8 seconds if the timeline yoyos or 0.2 seconds if it just repeats), there\n could be a callback or a short tween that's at 2.95 or 3 seconds in which wouldn't render. So\n we need to push the timeline to the end (and/or beginning depending on its yoyo value). Also we must\n ensure that zero-duration tweens at the very beginning or end of the Timeline work.\n */\n\n\n if (iteration !== prevIteration && !this._lock) {\n var rewinding = yoyo && prevIteration & 1,\n doesWrap = rewinding === (yoyo && iteration & 1);\n\n if (iteration < prevIteration) {\n rewinding = !rewinding;\n }\n\n prevTime = rewinding ? 0 : dur;\n this._lock = 1;\n this.render(prevTime || (isYoyo ? 0 : _round(iteration * cycleDuration)), suppressEvents, !dur)._lock = 0;\n\n if (!suppressEvents && this.parent) {\n _callback(this, \"onRepeat\");\n }\n\n this.vars.repeatRefresh && !isYoyo && (this.invalidate()._lock = 1);\n\n if (prevTime !== this._time || prevPaused !== !this._ts) {\n return this;\n }\n\n if (doesWrap) {\n this._lock = 2;\n prevTime = rewinding ? dur + 0.0001 : -0.0001;\n this.render(prevTime, true);\n this.vars.repeatRefresh && !isYoyo && this.invalidate();\n }\n\n this._lock = 0;\n\n if (!this._ts && !prevPaused) {\n return this;\n } //in order for yoyoEase to work properly when there's a stagger, we must swap out the ease in each sub-tween.\n\n\n _propagateYoyoEase(this, isYoyo);\n }\n }\n\n if (this._hasPause && !this._forcing && this._lock < 2) {\n pauseTween = _findNextPauseTween(this, _round(prevTime), _round(time));\n\n if (pauseTween) {\n tTime -= time - (time = pauseTween._start);\n }\n }\n\n this._tTime = tTime;\n this._time = time;\n this._act = !timeScale; //as long as it's not paused, force it to be active so that if the user renders independent of the parent timeline, it'll be forced to re-render on the next tick.\n\n if (!this._initted) {\n this._onUpdate = this.vars.onUpdate;\n this._initted = 1;\n this._zTime = totalTime;\n }\n\n if (!prevTime && time && !suppressEvents) {\n _callback(this, \"onStart\");\n }\n\n if (time >= prevTime && totalTime >= 0) {\n child = this._first;\n\n while (child) {\n next = child._next;\n\n if ((child._act || time >= child._start) && child._ts && pauseTween !== child) {\n if (child.parent !== this) {\n // an extreme edge case - the child's render could do something like kill() the \"next\" one in the linked list, or reparent it. In that case we must re-initiate the whole render to be safe.\n return this.render(totalTime, suppressEvents, force);\n }\n\n child.render(child._ts > 0 ? (time - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (time - child._start) * child._ts, suppressEvents, force);\n\n if (time !== this._time || !this._ts && !prevPaused) {\n //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete\n pauseTween = 0;\n next && (tTime += this._zTime = -_tinyNum); // it didn't finish rendering, so flag zTime as negative so that so that the next time render() is called it'll be forced (to render any remaining children)\n\n break;\n }\n }\n\n child = next;\n }\n } else {\n child = this._last;\n var adjustedTime = totalTime < 0 ? totalTime : time; //when the playhead goes backward beyond the start of this timeline, we must pass that information down to the child animations so that zero-duration tweens know whether to render their starting or ending values.\n\n while (child) {\n next = child._prev;\n\n if ((child._act || adjustedTime <= child._end) && child._ts && pauseTween !== child) {\n if (child.parent !== this) {\n // an extreme edge case - the child's render could do something like kill() the \"next\" one in the linked list, or reparent it. In that case we must re-initiate the whole render to be safe.\n return this.render(totalTime, suppressEvents, force);\n }\n\n child.render(child._ts > 0 ? (adjustedTime - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (adjustedTime - child._start) * child._ts, suppressEvents, force);\n\n if (time !== this._time || !this._ts && !prevPaused) {\n //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete\n pauseTween = 0;\n next && (tTime += this._zTime = adjustedTime ? -_tinyNum : _tinyNum); // it didn't finish rendering, so adjust zTime so that so that the next time render() is called it'll be forced (to render any remaining children)\n\n break;\n }\n }\n\n child = next;\n }\n }\n\n if (pauseTween && !suppressEvents) {\n this.pause();\n pauseTween.render(time >= prevTime ? 0 : -_tinyNum)._zTime = time >= prevTime ? 1 : -1;\n\n if (this._ts) {\n //the callback resumed playback! So since we may have held back the playhead due to where the pause is positioned, go ahead and jump to where it's SUPPOSED to be (if no pause happened).\n this._start = prevStart; //if the pause was at an earlier time and the user resumed in the callback, it could reposition the timeline (changing its startTime), throwing things off slightly, so we make sure the _start doesn't shift.\n\n _setEnd(this);\n\n return this.render(totalTime, suppressEvents, force);\n }\n }\n\n this._onUpdate && !suppressEvents && _callback(this, \"onUpdate\", true);\n if (tTime === tDur && tDur >= this.totalDuration() || !tTime && prevTime) if (prevStart === this._start || Math.abs(timeScale) !== Math.abs(this._ts)) if (!this._lock) {\n (totalTime || !dur) && (tTime === tDur && this._ts > 0 || !tTime && this._ts < 0) && _removeFromParent(this, 1); // don't remove if the timeline is reversed and the playhead isn't at 0, otherwise tl.progress(1).reverse() won't work. Only remove if the playhead is at the end and timeScale is positive, or if the playhead is at 0 and the timeScale is negative.\n\n if (!suppressEvents && !(totalTime < 0 && !prevTime) && (tTime || prevTime)) {\n _callback(this, tTime === tDur ? \"onComplete\" : \"onReverseComplete\", true);\n\n this._prom && !(tTime < tDur && this.timeScale() > 0) && this._prom();\n }\n }\n }\n\n return this;\n };\n\n _proto2.add = function add(child, position) {\n var _this2 = this;\n\n if (!_isNumber(position)) {\n position = _parsePosition(this, position);\n }\n\n if (!(child instanceof Animation)) {\n if (_isArray(child)) {\n child.forEach(function (obj) {\n return _this2.add(obj, position);\n });\n return _uncache(this);\n }\n\n if (_isString(child)) {\n return this.addLabel(child, position);\n }\n\n if (_isFunction(child)) {\n child = Tween.delayedCall(0, child);\n } else {\n return this;\n }\n }\n\n return this !== child ? _addToTimeline(this, child, position) : this; //don't allow a timeline to be added to itself as a child!\n };\n\n _proto2.getChildren = function getChildren(nested, tweens, timelines, ignoreBeforeTime) {\n if (nested === void 0) {\n nested = true;\n }\n\n if (tweens === void 0) {\n tweens = true;\n }\n\n if (timelines === void 0) {\n timelines = true;\n }\n\n if (ignoreBeforeTime === void 0) {\n ignoreBeforeTime = -_bigNum;\n }\n\n var a = [],\n child = this._first;\n\n while (child) {\n if (child._start >= ignoreBeforeTime) {\n if (child instanceof Tween) {\n tweens && a.push(child);\n } else {\n timelines && a.push(child);\n nested && a.push.apply(a, child.getChildren(true, tweens, timelines));\n }\n }\n\n child = child._next;\n }\n\n return a;\n };\n\n _proto2.getById = function getById(id) {\n var animations = this.getChildren(1, 1, 1),\n i = animations.length;\n\n while (i--) {\n if (animations[i].vars.id === id) {\n return animations[i];\n }\n }\n };\n\n _proto2.remove = function remove(child) {\n if (_isString(child)) {\n return this.removeLabel(child);\n }\n\n if (_isFunction(child)) {\n return this.killTweensOf(child);\n }\n\n _removeLinkedListItem(this, child);\n\n if (child === this._recent) {\n this._recent = this._last;\n }\n\n return _uncache(this);\n };\n\n _proto2.totalTime = function totalTime(_totalTime2, suppressEvents) {\n if (!arguments.length) {\n return this._tTime;\n }\n\n this._forcing = 1;\n\n if (!this._dp && this._ts) {\n //special case for the global timeline (or any other that has no parent or detached parent).\n this._start = _round(_ticker.time - (this._ts > 0 ? _totalTime2 / this._ts : (this.totalDuration() - _totalTime2) / -this._ts));\n }\n\n _Animation.prototype.totalTime.call(this, _totalTime2, suppressEvents);\n\n this._forcing = 0;\n return this;\n };\n\n _proto2.addLabel = function addLabel(label, position) {\n this.labels[label] = _parsePosition(this, position);\n return this;\n };\n\n _proto2.removeLabel = function removeLabel(label) {\n delete this.labels[label];\n return this;\n };\n\n _proto2.addPause = function addPause(position, callback, params) {\n var t = Tween.delayedCall(0, callback || _emptyFunc, params);\n t.data = \"isPause\";\n this._hasPause = 1;\n return _addToTimeline(this, t, _parsePosition(this, position));\n };\n\n _proto2.removePause = function removePause(position) {\n var child = this._first;\n position = _parsePosition(this, position);\n\n while (child) {\n if (child._start === position && child.data === \"isPause\") {\n _removeFromParent(child);\n }\n\n child = child._next;\n }\n };\n\n _proto2.killTweensOf = function killTweensOf(targets, props, onlyActive) {\n var tweens = this.getTweensOf(targets, onlyActive),\n i = tweens.length;\n\n while (i--) {\n _overwritingTween !== tweens[i] && tweens[i].kill(targets, props);\n }\n\n return this;\n };\n\n _proto2.getTweensOf = function getTweensOf(targets, onlyActive) {\n var a = [],\n parsedTargets = toArray(targets),\n child = this._first,\n isGlobalTime = _isNumber(onlyActive),\n // a number is interpreted as a global time. If the animation spans\n children;\n\n while (child) {\n if (child instanceof Tween) {\n if (_arrayContainsAny(child._targets, parsedTargets) && (isGlobalTime ? (!_overwritingTween || child._initted && child._ts) && child.globalTime(0) <= onlyActive && child.globalTime(child.totalDuration()) > onlyActive : !onlyActive || child.isActive())) {\n // note: if this is for overwriting, it should only be for tweens that aren't paused and are initted.\n a.push(child);\n }\n } else if ((children = child.getTweensOf(parsedTargets, onlyActive)).length) {\n a.push.apply(a, children);\n }\n\n child = child._next;\n }\n\n return a;\n };\n\n _proto2.tweenTo = function tweenTo(position, vars) {\n vars = vars || {};\n\n var tl = this,\n endTime = _parsePosition(tl, position),\n _vars = vars,\n startAt = _vars.startAt,\n _onStart = _vars.onStart,\n onStartParams = _vars.onStartParams,\n tween = Tween.to(tl, _setDefaults(vars, {\n ease: \"none\",\n lazy: false,\n time: endTime,\n duration: vars.duration || Math.abs((endTime - (startAt && \"time\" in startAt ? startAt.time : tl._time)) / tl.timeScale()) || _tinyNum,\n onStart: function onStart() {\n tl.pause();\n var duration = vars.duration || Math.abs((endTime - tl._time) / tl.timeScale());\n tween._dur !== duration && _setDuration(tween, duration).render(tween._time, true, true);\n _onStart && _onStart.apply(tween, onStartParams || []); //in case the user had an onStart in the vars - we don't want to overwrite it.\n }\n }));\n\n return tween;\n };\n\n _proto2.tweenFromTo = function tweenFromTo(fromPosition, toPosition, vars) {\n return this.tweenTo(toPosition, _setDefaults({\n startAt: {\n time: _parsePosition(this, fromPosition)\n }\n }, vars));\n };\n\n _proto2.recent = function recent() {\n return this._recent;\n };\n\n _proto2.nextLabel = function nextLabel(afterTime) {\n if (afterTime === void 0) {\n afterTime = this._time;\n }\n\n return _getLabelInDirection(this, _parsePosition(this, afterTime));\n };\n\n _proto2.previousLabel = function previousLabel(beforeTime) {\n if (beforeTime === void 0) {\n beforeTime = this._time;\n }\n\n return _getLabelInDirection(this, _parsePosition(this, beforeTime), 1);\n };\n\n _proto2.currentLabel = function currentLabel(value) {\n return arguments.length ? this.seek(value, true) : this.previousLabel(this._time + _tinyNum);\n };\n\n _proto2.shiftChildren = function shiftChildren(amount, adjustLabels, ignoreBeforeTime) {\n if (ignoreBeforeTime === void 0) {\n ignoreBeforeTime = 0;\n }\n\n var child = this._first,\n labels = this.labels,\n p;\n\n while (child) {\n if (child._start >= ignoreBeforeTime) {\n child._start += amount;\n }\n\n child = child._next;\n }\n\n if (adjustLabels) {\n for (p in labels) {\n if (labels[p] >= ignoreBeforeTime) {\n labels[p] += amount;\n }\n }\n }\n\n return _uncache(this);\n };\n\n _proto2.invalidate = function invalidate() {\n var child = this._first;\n this._lock = 0;\n\n while (child) {\n child.invalidate();\n child = child._next;\n }\n\n return _Animation.prototype.invalidate.call(this);\n };\n\n _proto2.clear = function clear(includeLabels) {\n if (includeLabels === void 0) {\n includeLabels = true;\n }\n\n var child = this._first,\n next;\n\n while (child) {\n next = child._next;\n this.remove(child);\n child = next;\n }\n\n this._time = this._tTime = this._pTime = 0;\n\n if (includeLabels) {\n this.labels = {};\n }\n\n return _uncache(this);\n };\n\n _proto2.totalDuration = function totalDuration(value) {\n var max = 0,\n self = this,\n child = self._last,\n prevStart = _bigNum,\n prev,\n end,\n start,\n parent;\n\n if (arguments.length) {\n return self.timeScale((self._repeat < 0 ? self.duration() : self.totalDuration()) / (self.reversed() ? -value : value));\n }\n\n if (self._dirty) {\n parent = self.parent;\n\n while (child) {\n prev = child._prev; //record it here in case the tween changes position in the sequence...\n\n child._dirty && child.totalDuration(); //could change the tween._startTime, so make sure the animation's cache is clean before analyzing it.\n\n start = child._start;\n\n if (start > prevStart && self._sort && child._ts && !self._lock) {\n //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence\n self._lock = 1; //prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add().\n\n _addToTimeline(self, child, start - child._delay, 1)._lock = 0;\n } else {\n prevStart = start;\n }\n\n if (start < 0 && child._ts) {\n //children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found.\n max -= start;\n\n if (!parent && !self._dp || parent && parent.smoothChildTiming) {\n self._start += start / self._ts;\n self._time -= start;\n self._tTime -= start;\n }\n\n self.shiftChildren(-start, false, -1e999);\n prevStart = 0;\n }\n\n end = _setEnd(child);\n\n if (end > max && child._ts) {\n max = end;\n }\n\n child = prev;\n }\n\n _setDuration(self, self === _globalTimeline && self._time > max ? self._time : max, 1);\n\n self._dirty = 0;\n }\n\n return self._tDur;\n };\n\n Timeline.updateRoot = function updateRoot(time) {\n if (_globalTimeline._ts) {\n _lazySafeRender(_globalTimeline, _parentToChildTotalTime(time, _globalTimeline));\n\n _lastRenderedFrame = _ticker.frame;\n }\n\n if (_ticker.frame >= _nextGCFrame) {\n _nextGCFrame += _config.autoSleep || 120;\n var child = _globalTimeline._first;\n if (!child || !child._ts) if (_config.autoSleep && _ticker._listeners.length < 2) {\n while (child && !child._ts) {\n child = child._next;\n }\n\n child || _ticker.sleep();\n }\n }\n };\n\n return Timeline;\n}(Animation);\n\n_setDefaults(Timeline.prototype, {\n _lock: 0,\n _hasPause: 0,\n _forcing: 0\n});\n\nvar _addComplexStringPropTween = function _addComplexStringPropTween(target, prop, start, end, setter, stringFilter, funcParam) {\n //note: we call _addComplexStringPropTween.call(tweenInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus \"this\" would refer to the plugin.\n var pt = new PropTween(this._pt, target, prop, 0, 1, _renderComplexString, null, setter),\n index = 0,\n matchIndex = 0,\n result,\n startNums,\n color,\n endNum,\n chunk,\n startNum,\n hasRandom,\n a;\n pt.b = start;\n pt.e = end;\n start += \"\"; //ensure values are strings\n\n end += \"\";\n\n if (hasRandom = ~end.indexOf(\"random(\")) {\n end = _replaceRandom(end);\n }\n\n if (stringFilter) {\n a = [start, end];\n stringFilter(a, target, prop); //pass an array with the starting and ending values and let the filter do whatever it needs to the values.\n\n start = a[0];\n end = a[1];\n }\n\n startNums = start.match(_complexStringNumExp) || [];\n\n while (result = _complexStringNumExp.exec(end)) {\n endNum = result[0];\n chunk = end.substring(index, result.index);\n\n if (color) {\n color = (color + 1) % 5;\n } else if (chunk.substr(-5) === \"rgba(\") {\n color = 1;\n }\n\n if (endNum !== startNums[matchIndex++]) {\n startNum = parseFloat(startNums[matchIndex - 1]) || 0; //these nested PropTweens are handled in a special way - we'll never actually call a render or setter method on them. We'll just loop through them in the parent complex string PropTween's render method.\n\n pt._pt = {\n _next: pt._pt,\n p: chunk || matchIndex === 1 ? chunk : \",\",\n //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.\n s: startNum,\n c: endNum.charAt(1) === \"=\" ? parseFloat(endNum.substr(2)) * (endNum.charAt(0) === \"-\" ? -1 : 1) : parseFloat(endNum) - startNum,\n m: color && color < 4 ? Math.round : 0\n };\n index = _complexStringNumExp.lastIndex;\n }\n }\n\n pt.c = index < end.length ? end.substring(index, end.length) : \"\"; //we use the \"c\" of the PropTween to store the final part of the string (after the last number)\n\n pt.fp = funcParam;\n\n if (_relExp.test(end) || hasRandom) {\n pt.e = 0; //if the end string contains relative values or dynamic random(...) values, delete the end it so that on the final render we don't actually set it to the string with += or -= characters (forces it to use the calculated value).\n }\n\n this._pt = pt; //start the linked list with this new PropTween. Remember, we call _addComplexStringPropTween.call(tweenInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus \"this\" would refer to the plugin.\n\n return pt;\n},\n _addPropTween = function _addPropTween(target, prop, start, end, index, targets, modifier, stringFilter, funcParam) {\n _isFunction(end) && (end = end(index || 0, target, targets));\n var currentValue = target[prop],\n parsedStart = start !== \"get\" ? start : !_isFunction(currentValue) ? currentValue : funcParam ? target[prop.indexOf(\"set\") || !_isFunction(target[\"get\" + prop.substr(3)]) ? prop : \"get\" + prop.substr(3)](funcParam) : target[prop](),\n setter = !_isFunction(currentValue) ? _setterPlain : funcParam ? _setterFuncWithParam : _setterFunc,\n pt;\n\n if (_isString(end)) {\n if (~end.indexOf(\"random(\")) {\n end = _replaceRandom(end);\n }\n\n if (end.charAt(1) === \"=\") {\n end = parseFloat(parsedStart) + parseFloat(end.substr(2)) * (end.charAt(0) === \"-\" ? -1 : 1) + (getUnit(parsedStart) || 0);\n }\n }\n\n if (parsedStart !== end) {\n if (!isNaN(parsedStart * end)) {\n pt = new PropTween(this._pt, target, prop, +parsedStart || 0, end - (parsedStart || 0), typeof currentValue === \"boolean\" ? _renderBoolean : _renderPlain, 0, setter);\n funcParam && (pt.fp = funcParam);\n modifier && pt.modifier(modifier, this, target);\n return this._pt = pt;\n }\n\n !currentValue && !(prop in target) && _missingPlugin(prop, end);\n return _addComplexStringPropTween.call(this, target, prop, parsedStart, end, setter, stringFilter || _config.stringFilter, funcParam);\n }\n},\n //creates a copy of the vars object and processes any function-based values (putting the resulting values directly into the copy) as well as strings with \"random()\" in them. It does NOT process relative values.\n_processVars = function _processVars(vars, index, target, targets, tween) {\n if (_isFunction(vars)) {\n vars = _parseFuncOrString(vars, tween, index, target, targets);\n }\n\n if (!_isObject(vars) || vars.style && vars.nodeType || _isArray(vars)) {\n return _isString(vars) ? _parseFuncOrString(vars, tween, index, target, targets) : vars;\n }\n\n var copy = {},\n p;\n\n for (p in vars) {\n copy[p] = _parseFuncOrString(vars[p], tween, index, target, targets);\n }\n\n return copy;\n},\n _checkPlugin = function _checkPlugin(property, vars, tween, index, target, targets) {\n var plugin, pt, ptLookup, i;\n\n if (_plugins[property] && (plugin = new _plugins[property]()).init(target, plugin.rawVars ? vars[property] : _processVars(vars[property], index, target, targets, tween), tween, index, targets) !== false) {\n tween._pt = pt = new PropTween(tween._pt, target, property, 0, 1, plugin.render, plugin, 0, plugin.priority);\n\n if (tween !== _quickTween) {\n ptLookup = tween._ptLookup[tween._targets.indexOf(target)]; //note: we can't use tween._ptLookup[index] because for staggered tweens, the index from the fullTargets array won't match what it is in each individual tween that spawns from the stagger.\n\n i = plugin._props.length;\n\n while (i--) {\n ptLookup[plugin._props[i]] = pt;\n }\n }\n }\n\n return plugin;\n},\n _overwritingTween,\n //store a reference temporarily so we can avoid overwriting itself.\n_initTween = function _initTween(tween, time) {\n var vars = tween.vars,\n ease = vars.ease,\n startAt = vars.startAt,\n immediateRender = vars.immediateRender,\n lazy = vars.lazy,\n onUpdate = vars.onUpdate,\n onUpdateParams = vars.onUpdateParams,\n callbackScope = vars.callbackScope,\n runBackwards = vars.runBackwards,\n yoyoEase = vars.yoyoEase,\n keyframes = vars.keyframes,\n autoRevert = vars.autoRevert,\n dur = tween._dur,\n prevStartAt = tween._startAt,\n targets = tween._targets,\n parent = tween.parent,\n fullTargets = parent && parent.data === \"nested\" ? parent.parent._targets : targets,\n autoOverwrite = tween._overwrite === \"auto\",\n tl = tween.timeline,\n cleanVars,\n i,\n p,\n pt,\n target,\n hasPriority,\n gsData,\n harness,\n plugin,\n ptLookup,\n index,\n harnessVars,\n overwritten;\n tl && (!keyframes || !ease) && (ease = \"none\");\n tween._ease = _parseEase(ease, _defaults.ease);\n tween._yEase = yoyoEase ? _invertEase(_parseEase(yoyoEase === true ? ease : yoyoEase, _defaults.ease)) : 0;\n\n if (yoyoEase && tween._yoyo && !tween._repeat) {\n //there must have been a parent timeline with yoyo:true that is currently in its yoyo phase, so flip the eases.\n yoyoEase = tween._yEase;\n tween._yEase = tween._ease;\n tween._ease = yoyoEase;\n }\n\n if (!tl) {\n //if there's an internal timeline, skip all the parsing because we passed that task down the chain.\n harness = targets[0] ? _getCache(targets[0]).harness : 0;\n harnessVars = harness && vars[harness.prop]; //someone may need to specify CSS-specific values AND non-CSS values, like if the element has an \"x\" property plus it's a standard DOM element. We allow people to distinguish by wrapping plugin-specific stuff in a css:{} object for example.\n\n cleanVars = _copyExcluding(vars, _reservedProps);\n prevStartAt && prevStartAt.render(-1, true).kill();\n\n if (startAt) {\n _removeFromParent(tween._startAt = Tween.set(targets, _setDefaults({\n data: \"isStart\",\n overwrite: false,\n parent: parent,\n immediateRender: true,\n lazy: _isNotFalse(lazy),\n startAt: null,\n delay: 0,\n onUpdate: onUpdate,\n onUpdateParams: onUpdateParams,\n callbackScope: callbackScope,\n stagger: 0\n }, startAt))); //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, from, to).fromTo(e, to, from);\n\n\n if (immediateRender) {\n if (time > 0) {\n !autoRevert && (tween._startAt = 0); //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in Timeline instances where immediateRender was false or when autoRevert is explicitly set to true.\n } else if (dur && !(time < 0 && prevStartAt)) {\n tween._zTime = time;\n return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a Timeline, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting.\n }\n }\n } else if (runBackwards && dur) {\n //from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards)\n if (prevStartAt) {\n !autoRevert && (tween._startAt = 0);\n } else {\n time && (immediateRender = false); //in rare cases (like if a from() tween runs and then is invalidate()-ed), immediateRender could be true but the initial forced-render gets skipped, so there's no need to force the render in this context when the _time is greater than 0\n\n p = _setDefaults({\n overwrite: false,\n data: \"isFromStart\",\n //we tag the tween with as \"isFromStart\" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a \"from()\" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:\"height\", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in.\n lazy: immediateRender && _isNotFalse(lazy),\n immediateRender: immediateRender,\n //zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after)\n stagger: 0,\n parent: parent //ensures that nested tweens that had a stagger are handled properly, like gsap.from(\".class\", {y:gsap.utils.wrap([-100,100])})\n\n }, cleanVars);\n harnessVars && (p[harness.prop] = harnessVars); // in case someone does something like .from(..., {css:{}})\n\n _removeFromParent(tween._startAt = Tween.set(targets, p));\n\n if (!immediateRender) {\n _initTween(tween._startAt, _tinyNum); //ensures that the initial values are recorded\n\n } else if (!time) {\n return;\n }\n }\n }\n\n tween._pt = 0;\n lazy = dur && _isNotFalse(lazy) || lazy && !dur;\n\n for (i = 0; i < targets.length; i++) {\n target = targets[i];\n gsData = target._gsap || _harness(targets)[i]._gsap;\n tween._ptLookup[i] = ptLookup = {};\n _lazyLookup[gsData.id] && _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end)\n\n index = fullTargets === targets ? i : fullTargets.indexOf(target);\n\n if (harness && (plugin = new harness()).init(target, harnessVars || cleanVars, tween, index, fullTargets) !== false) {\n tween._pt = pt = new PropTween(tween._pt, target, plugin.name, 0, 1, plugin.render, plugin, 0, plugin.priority);\n\n plugin._props.forEach(function (name) {\n ptLookup[name] = pt;\n });\n\n plugin.priority && (hasPriority = 1);\n }\n\n if (!harness || harnessVars) {\n for (p in cleanVars) {\n if (_plugins[p] && (plugin = _checkPlugin(p, cleanVars, tween, index, target, fullTargets))) {\n plugin.priority && (hasPriority = 1);\n } else {\n ptLookup[p] = pt = _addPropTween.call(tween, target, p, \"get\", cleanVars[p], index, fullTargets, 0, vars.stringFilter);\n }\n }\n }\n\n tween._op && tween._op[i] && tween.kill(target, tween._op[i]);\n\n if (autoOverwrite && tween._pt) {\n _overwritingTween = tween;\n\n _globalTimeline.killTweensOf(target, ptLookup, tween.globalTime(0)); //Also make sure the overwriting doesn't overwrite THIS tween!!!\n\n\n overwritten = !tween.parent;\n _overwritingTween = 0;\n }\n\n tween._pt && lazy && (_lazyLookup[gsData.id] = 1);\n }\n\n hasPriority && _sortPropTweensByPriority(tween);\n tween._onInit && tween._onInit(tween); //plugins like RoundProps must wait until ALL of the PropTweens are instantiated. In the plugin's init() function, it sets the _onInit on the tween instance. May not be pretty/intuitive, but it's fast and keeps file size down.\n }\n\n tween._from = !tl && !!vars.runBackwards; //nested timelines should never run backwards - the backwards-ness is in the child tweens.\n\n tween._onUpdate = onUpdate;\n tween._initted = (!tween._op || tween._pt) && !overwritten; // if overwrittenProps resulted in the entire tween being killed, do NOT flag it as initted or else it may render for one tick.\n},\n _addAliasesToVars = function _addAliasesToVars(targets, vars) {\n var harness = targets[0] ? _getCache(targets[0]).harness : 0,\n propertyAliases = harness && harness.aliases,\n copy,\n p,\n i,\n aliases;\n\n if (!propertyAliases) {\n return vars;\n }\n\n copy = _merge({}, vars);\n\n for (p in propertyAliases) {\n if (p in copy) {\n aliases = propertyAliases[p].split(\",\");\n i = aliases.length;\n\n while (i--) {\n copy[aliases[i]] = copy[p];\n }\n }\n }\n\n return copy;\n},\n _parseFuncOrString = function _parseFuncOrString(value, tween, i, target, targets) {\n return _isFunction(value) ? value.call(tween, i, target, targets) : _isString(value) && ~value.indexOf(\"random(\") ? _replaceRandom(value) : value;\n},\n _staggerTweenProps = _callbackNames + \"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase\",\n _staggerPropsToSkip = (_staggerTweenProps + \",id,stagger,delay,duration,paused,scrollTrigger\").split(\",\");\n/*\n * --------------------------------------------------------------------------------------\n * TWEEN\n * --------------------------------------------------------------------------------------\n */\n\n\nexport var Tween = /*#__PURE__*/function (_Animation2) {\n _inheritsLoose(Tween, _Animation2);\n\n function Tween(targets, vars, time, skipInherit) {\n var _this3;\n\n if (typeof vars === \"number\") {\n time.duration = vars;\n vars = time;\n time = null;\n }\n\n _this3 = _Animation2.call(this, skipInherit ? vars : _inheritDefaults(vars), time) || this;\n var _this3$vars = _this3.vars,\n duration = _this3$vars.duration,\n delay = _this3$vars.delay,\n immediateRender = _this3$vars.immediateRender,\n stagger = _this3$vars.stagger,\n overwrite = _this3$vars.overwrite,\n keyframes = _this3$vars.keyframes,\n defaults = _this3$vars.defaults,\n scrollTrigger = _this3$vars.scrollTrigger,\n yoyoEase = _this3$vars.yoyoEase,\n parent = _this3.parent,\n parsedTargets = (_isArray(targets) ? _isNumber(targets[0]) : \"length\" in vars) ? [targets] : toArray(targets),\n tl,\n i,\n copy,\n l,\n p,\n curTarget,\n staggerFunc,\n staggerVarsToMerge;\n _this3._targets = parsedTargets.length ? _harness(parsedTargets) : _warn(\"GSAP target \" + targets + \" not found. https://greensock.com\", !_config.nullTargetWarn) || [];\n _this3._ptLookup = []; //PropTween lookup. An array containing an object for each target, having keys for each tweening property\n\n _this3._overwrite = overwrite;\n\n if (keyframes || stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) {\n vars = _this3.vars;\n tl = _this3.timeline = new Timeline({\n data: \"nested\",\n defaults: defaults || {}\n });\n tl.kill();\n tl.parent = _assertThisInitialized(_this3);\n\n if (keyframes) {\n _setDefaults(tl.vars.defaults, {\n ease: \"none\"\n });\n\n keyframes.forEach(function (frame) {\n return tl.to(parsedTargets, frame, \">\");\n });\n } else {\n l = parsedTargets.length;\n staggerFunc = stagger ? distribute(stagger) : _emptyFunc;\n\n if (_isObject(stagger)) {\n //users can pass in callbacks like onStart/onComplete in the stagger object. These should fire with each individual tween.\n for (p in stagger) {\n if (~_staggerTweenProps.indexOf(p)) {\n staggerVarsToMerge || (staggerVarsToMerge = {});\n staggerVarsToMerge[p] = stagger[p];\n }\n }\n }\n\n for (i = 0; i < l; i++) {\n copy = {};\n\n for (p in vars) {\n if (_staggerPropsToSkip.indexOf(p) < 0) {\n copy[p] = vars[p];\n }\n }\n\n copy.stagger = 0;\n yoyoEase && (copy.yoyoEase = yoyoEase);\n staggerVarsToMerge && _merge(copy, staggerVarsToMerge);\n curTarget = parsedTargets[i]; //don't just copy duration or delay because if they're a string or function, we'd end up in an infinite loop because _isFuncOrString() would evaluate as true in the child tweens, entering this loop, etc. So we parse the value straight from vars and default to 0.\n\n copy.duration = +_parseFuncOrString(duration, _assertThisInitialized(_this3), i, curTarget, parsedTargets);\n copy.delay = (+_parseFuncOrString(delay, _assertThisInitialized(_this3), i, curTarget, parsedTargets) || 0) - _this3._delay;\n\n if (!stagger && l === 1 && copy.delay) {\n // if someone does delay:\"random(1, 5)\", repeat:-1, for example, the delay shouldn't be inside the repeat.\n _this3._delay = delay = copy.delay;\n _this3._start += delay;\n copy.delay = 0;\n }\n\n tl.to(curTarget, copy, staggerFunc(i, curTarget, parsedTargets));\n }\n\n tl.duration() ? duration = delay = 0 : _this3.timeline = 0; // if the timeline's duration is 0, we don't need a timeline internally!\n }\n\n duration || _this3.duration(duration = tl.duration());\n } else {\n _this3.timeline = 0; //speed optimization, faster lookups (no going up the prototype chain)\n }\n\n if (overwrite === true) {\n _overwritingTween = _assertThisInitialized(_this3);\n\n _globalTimeline.killTweensOf(parsedTargets);\n\n _overwritingTween = 0;\n }\n\n parent && _postAddChecks(parent, _assertThisInitialized(_this3));\n\n if (immediateRender || !duration && !keyframes && _this3._start === _round(parent._time) && _isNotFalse(immediateRender) && _hasNoPausedAncestors(_assertThisInitialized(_this3)) && parent.data !== \"nested\") {\n _this3._tTime = -_tinyNum; //forces a render without having to set the render() \"force\" parameter to true because we want to allow lazying by default (using the \"force\" parameter always forces an immediate full render)\n\n _this3.render(Math.max(0, -delay)); //in case delay is negative\n\n }\n\n scrollTrigger && _scrollTrigger(_assertThisInitialized(_this3), scrollTrigger);\n return _this3;\n }\n\n var _proto3 = Tween.prototype;\n\n _proto3.render = function render(totalTime, suppressEvents, force) {\n var prevTime = this._time,\n tDur = this._tDur,\n dur = this._dur,\n tTime = totalTime > tDur - _tinyNum && totalTime >= 0 ? tDur : totalTime < _tinyNum ? 0 : totalTime,\n time,\n pt,\n iteration,\n cycleDuration,\n prevIteration,\n isYoyo,\n ratio,\n timeline,\n yoyoEase;\n\n if (!dur) {\n _renderZeroDurationTween(this, totalTime, suppressEvents, force);\n } else if (tTime !== this._tTime || !totalTime || force || this._startAt && this._zTime < 0 !== totalTime < 0) {\n //this senses if we're crossing over the start time, in which case we must record _zTime and force the render, but we do it in this lengthy conditional way for performance reasons (usually we can skip the calculations): this._initted && (this._zTime < 0) !== (totalTime < 0)\n time = tTime;\n timeline = this.timeline;\n\n if (this._repeat) {\n //adjust the time for repeats and yoyos\n cycleDuration = dur + this._rDelay;\n time = _round(tTime % cycleDuration); //round to avoid floating point errors. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!)\n\n if (time > dur || tDur === tTime) {\n // the tDur === tTime is for edge cases where there's a lengthy decimal on the duration and it may reach the very end but the time is rendered as not-quite-there (remember, tDur is rounded to 4 decimals whereas dur isn't)\n time = dur;\n }\n\n iteration = ~~(tTime / cycleDuration);\n\n if (iteration && iteration === tTime / cycleDuration) {\n time = dur;\n iteration--;\n }\n\n isYoyo = this._yoyo && iteration & 1;\n\n if (isYoyo) {\n yoyoEase = this._yEase;\n time = dur - time;\n }\n\n prevIteration = _animationCycle(this._tTime, cycleDuration);\n\n if (time === prevTime && !force && this._initted) {\n //could be during the repeatDelay part. No need to render and fire callbacks.\n return this;\n }\n\n if (iteration !== prevIteration) {\n timeline && this._yEase && _propagateYoyoEase(timeline, isYoyo); //repeatRefresh functionality\n\n if (this.vars.repeatRefresh && !isYoyo && !this._lock) {\n this._lock = force = 1; //force, otherwise if lazy is true, the _attemptInitTween() will return and we'll jump out and get caught bouncing on each tick.\n\n this.render(_round(cycleDuration * iteration), true).invalidate()._lock = 0;\n }\n }\n }\n\n if (!this._initted) {\n if (_attemptInitTween(this, totalTime < 0 ? totalTime : time, force, suppressEvents)) {\n this._tTime = 0; // in constructor if immediateRender is true, we set _tTime to -_tinyNum to have the playhead cross the starting point but we can't leave _tTime as a negative number.\n\n return this;\n }\n\n if (dur !== this._dur) {\n // while initting, a plugin like InertiaPlugin might alter the duration, so rerun from the start to ensure everything renders as it should.\n return this.render(totalTime, suppressEvents, force);\n }\n }\n\n this._tTime = tTime;\n this._time = time;\n\n if (!this._act && this._ts) {\n this._act = 1; //as long as it's not paused, force it to be active so that if the user renders independent of the parent timeline, it'll be forced to re-render on the next tick.\n\n this._lazy = 0;\n }\n\n this.ratio = ratio = (yoyoEase || this._ease)(time / dur);\n\n if (this._from) {\n this.ratio = ratio = 1 - ratio;\n }\n\n time && !prevTime && !suppressEvents && _callback(this, \"onStart\");\n pt = this._pt;\n\n while (pt) {\n pt.r(ratio, pt.d);\n pt = pt._next;\n }\n\n timeline && timeline.render(totalTime < 0 ? totalTime : !time && isYoyo ? -_tinyNum : timeline._dur * ratio, suppressEvents, force) || this._startAt && (this._zTime = totalTime);\n\n if (this._onUpdate && !suppressEvents) {\n if (totalTime < 0 && this._startAt) {\n this._startAt.render(totalTime, true, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.\n\n }\n\n _callback(this, \"onUpdate\");\n }\n\n this._repeat && iteration !== prevIteration && this.vars.onRepeat && !suppressEvents && this.parent && _callback(this, \"onRepeat\");\n\n if ((tTime === this._tDur || !tTime) && this._tTime === tTime) {\n totalTime < 0 && this._startAt && !this._onUpdate && this._startAt.render(totalTime, true, true);\n (totalTime || !dur) && (tTime === this._tDur && this._ts > 0 || !tTime && this._ts < 0) && _removeFromParent(this, 1); // don't remove if we're rendering at exactly a time of 0, as there could be autoRevert values that should get set on the next tick (if the playhead goes backward beyond the startTime, negative totalTime). Don't remove if the timeline is reversed and the playhead isn't at 0, otherwise tl.progress(1).reverse() won't work. Only remove if the playhead is at the end and timeScale is positive, or if the playhead is at 0 and the timeScale is negative.\n\n if (!suppressEvents && !(totalTime < 0 && !prevTime) && (tTime || prevTime)) {\n // if prevTime and tTime are zero, we shouldn't fire the onReverseComplete. This could happen if you gsap.to(... {paused:true}).play();\n _callback(this, tTime === tDur ? \"onComplete\" : \"onReverseComplete\", true);\n\n this._prom && !(tTime < tDur && this.timeScale() > 0) && this._prom();\n }\n }\n }\n\n return this;\n };\n\n _proto3.targets = function targets() {\n return this._targets;\n };\n\n _proto3.invalidate = function invalidate() {\n this._pt = this._op = this._startAt = this._onUpdate = this._act = this._lazy = 0;\n this._ptLookup = [];\n this.timeline && this.timeline.invalidate();\n return _Animation2.prototype.invalidate.call(this);\n };\n\n _proto3.kill = function kill(targets, vars) {\n if (vars === void 0) {\n vars = \"all\";\n }\n\n if (!targets && (!vars || vars === \"all\")) {\n this._lazy = 0;\n\n if (this.parent) {\n return _interrupt(this);\n }\n }\n\n if (this.timeline) {\n var tDur = this.timeline.totalDuration();\n this.timeline.killTweensOf(targets, vars, _overwritingTween && _overwritingTween.vars.overwrite !== true)._first || _interrupt(this); // if nothing is left tweenng, interrupt.\n\n this.parent && tDur !== this.timeline.totalDuration() && _setDuration(this, this._dur * this.timeline._tDur / tDur); // if a nested tween is killed that changes the duration, it should affect this tween's duration. We must use the ratio, though, because sometimes the internal timeline is stretched like for keyframes where they don't all add up to whatever the parent tween's duration was set to.\n\n return this;\n }\n\n var parsedTargets = this._targets,\n killingTargets = targets ? toArray(targets) : parsedTargets,\n propTweenLookup = this._ptLookup,\n firstPT = this._pt,\n overwrittenProps,\n curLookup,\n curOverwriteProps,\n props,\n p,\n pt,\n i;\n\n if ((!vars || vars === \"all\") && _arraysMatch(parsedTargets, killingTargets)) {\n vars === \"all\" && (this._pt = 0);\n return _interrupt(this);\n }\n\n overwrittenProps = this._op = this._op || [];\n\n if (vars !== \"all\") {\n //so people can pass in a comma-delimited list of property names\n if (_isString(vars)) {\n p = {};\n\n _forEachName(vars, function (name) {\n return p[name] = 1;\n });\n\n vars = p;\n }\n\n vars = _addAliasesToVars(parsedTargets, vars);\n }\n\n i = parsedTargets.length;\n\n while (i--) {\n if (~killingTargets.indexOf(parsedTargets[i])) {\n curLookup = propTweenLookup[i];\n\n if (vars === \"all\") {\n overwrittenProps[i] = vars;\n props = curLookup;\n curOverwriteProps = {};\n } else {\n curOverwriteProps = overwrittenProps[i] = overwrittenProps[i] || {};\n props = vars;\n }\n\n for (p in props) {\n pt = curLookup && curLookup[p];\n\n if (pt) {\n if (!(\"kill\" in pt.d) || pt.d.kill(p) === true) {\n _removeLinkedListItem(this, pt, \"_pt\");\n }\n\n delete curLookup[p];\n }\n\n if (curOverwriteProps !== \"all\") {\n curOverwriteProps[p] = 1;\n }\n }\n }\n }\n\n this._initted && !this._pt && firstPT && _interrupt(this); //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening.\n\n return this;\n };\n\n Tween.to = function to(targets, vars) {\n return new Tween(targets, vars, arguments[2]);\n };\n\n Tween.from = function from(targets, vars) {\n return new Tween(targets, _parseVars(arguments, 1));\n };\n\n Tween.delayedCall = function delayedCall(delay, callback, params, scope) {\n return new Tween(callback, 0, {\n immediateRender: false,\n lazy: false,\n overwrite: false,\n delay: delay,\n onComplete: callback,\n onReverseComplete: callback,\n onCompleteParams: params,\n onReverseCompleteParams: params,\n callbackScope: scope\n });\n };\n\n Tween.fromTo = function fromTo(targets, fromVars, toVars) {\n return new Tween(targets, _parseVars(arguments, 2));\n };\n\n Tween.set = function set(targets, vars) {\n vars.duration = 0;\n vars.repeatDelay || (vars.repeat = 0);\n return new Tween(targets, vars);\n };\n\n Tween.killTweensOf = function killTweensOf(targets, props, onlyActive) {\n return _globalTimeline.killTweensOf(targets, props, onlyActive);\n };\n\n return Tween;\n}(Animation);\n\n_setDefaults(Tween.prototype, {\n _targets: [],\n _lazy: 0,\n _startAt: 0,\n _op: 0,\n _onInit: 0\n}); //add the pertinent timeline methods to Tween instances so that users can chain conveniently and create a timeline automatically. (removed due to concerns that it'd ultimately add to more confusion especially for beginners)\n// _forEachName(\"to,from,fromTo,set,call,add,addLabel,addPause\", name => {\n// \tTween.prototype[name] = function() {\n// \t\tlet tl = new Timeline();\n// \t\treturn _addToTimeline(tl, this)[name].apply(tl, toArray(arguments));\n// \t}\n// });\n//for backward compatibility. Leverage the timeline calls.\n\n\n_forEachName(\"staggerTo,staggerFrom,staggerFromTo\", function (name) {\n Tween[name] = function () {\n var tl = new Timeline(),\n params = _slice.call(arguments, 0);\n\n params.splice(name === \"staggerFromTo\" ? 5 : 4, 0, 0);\n return tl[name].apply(tl, params);\n };\n});\n/*\n * --------------------------------------------------------------------------------------\n * PROPTWEEN\n * --------------------------------------------------------------------------------------\n */\n\n\nvar _setterPlain = function _setterPlain(target, property, value) {\n return target[property] = value;\n},\n _setterFunc = function _setterFunc(target, property, value) {\n return target[property](value);\n},\n _setterFuncWithParam = function _setterFuncWithParam(target, property, value, data) {\n return target[property](data.fp, value);\n},\n _setterAttribute = function _setterAttribute(target, property, value) {\n return target.setAttribute(property, value);\n},\n _getSetter = function _getSetter(target, property) {\n return _isFunction(target[property]) ? _setterFunc : _isUndefined(target[property]) && target.setAttribute ? _setterAttribute : _setterPlain;\n},\n _renderPlain = function _renderPlain(ratio, data) {\n return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 10000) / 10000, data);\n},\n _renderBoolean = function _renderBoolean(ratio, data) {\n return data.set(data.t, data.p, !!(data.s + data.c * ratio), data);\n},\n _renderComplexString = function _renderComplexString(ratio, data) {\n var pt = data._pt,\n s = \"\";\n\n if (!ratio && data.b) {\n //b = beginning string\n s = data.b;\n } else if (ratio === 1 && data.e) {\n //e = ending string\n s = data.e;\n } else {\n while (pt) {\n s = pt.p + (pt.m ? pt.m(pt.s + pt.c * ratio) : Math.round((pt.s + pt.c * ratio) * 10000) / 10000) + s; //we use the \"p\" property for the text inbetween (like a suffix). And in the context of a complex string, the modifier (m) is typically just Math.round(), like for RGB colors.\n\n pt = pt._next;\n }\n\n s += data.c; //we use the \"c\" of the PropTween to store the final chunk of non-numeric text.\n }\n\n data.set(data.t, data.p, s, data);\n},\n _renderPropTweens = function _renderPropTweens(ratio, data) {\n var pt = data._pt;\n\n while (pt) {\n pt.r(ratio, pt.d);\n pt = pt._next;\n }\n},\n _addPluginModifier = function _addPluginModifier(modifier, tween, target, property) {\n var pt = this._pt,\n next;\n\n while (pt) {\n next = pt._next;\n\n if (pt.p === property) {\n pt.modifier(modifier, tween, target);\n }\n\n pt = next;\n }\n},\n _killPropTweensOf = function _killPropTweensOf(property) {\n var pt = this._pt,\n hasNonDependentRemaining,\n next;\n\n while (pt) {\n next = pt._next;\n\n if (pt.p === property && !pt.op || pt.op === property) {\n _removeLinkedListItem(this, pt, \"_pt\");\n } else if (!pt.dep) {\n hasNonDependentRemaining = 1;\n }\n\n pt = next;\n }\n\n return !hasNonDependentRemaining;\n},\n _setterWithModifier = function _setterWithModifier(target, property, value, data) {\n data.mSet(target, property, data.m.call(data.tween, value, data.mt), data);\n},\n _sortPropTweensByPriority = function _sortPropTweensByPriority(parent) {\n var pt = parent._pt,\n next,\n pt2,\n first,\n last; //sorts the PropTween linked list in order of priority because some plugins need to do their work after ALL of the PropTweens were created (like RoundPropsPlugin and ModifiersPlugin)\n\n while (pt) {\n next = pt._next;\n pt2 = first;\n\n while (pt2 && pt2.pr > pt.pr) {\n pt2 = pt2._next;\n }\n\n if (pt._prev = pt2 ? pt2._prev : last) {\n pt._prev._next = pt;\n } else {\n first = pt;\n }\n\n if (pt._next = pt2) {\n pt2._prev = pt;\n } else {\n last = pt;\n }\n\n pt = next;\n }\n\n parent._pt = first;\n}; //PropTween key: t = target, p = prop, r = renderer, d = data, s = start, c = change, op = overwriteProperty (ONLY populated when it's different than p), pr = priority, _next/_prev for the linked list siblings, set = setter, m = modifier, mSet = modifierSetter (the original setter, before a modifier was added)\n\n\nexport var PropTween = /*#__PURE__*/function () {\n function PropTween(next, target, prop, start, change, renderer, data, setter, priority) {\n this.t = target;\n this.s = start;\n this.c = change;\n this.p = prop;\n this.r = renderer || _renderPlain;\n this.d = data || this;\n this.set = setter || _setterPlain;\n this.pr = priority || 0;\n this._next = next;\n\n if (next) {\n next._prev = this;\n }\n }\n\n var _proto4 = PropTween.prototype;\n\n _proto4.modifier = function modifier(func, tween, target) {\n this.mSet = this.mSet || this.set; //in case it was already set (a PropTween can only have one modifier)\n\n this.set = _setterWithModifier;\n this.m = func;\n this.mt = target; //modifier target\n\n this.tween = tween;\n };\n\n return PropTween;\n}(); //Initialization tasks\n\n_forEachName(_callbackNames + \"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger\", function (name) {\n return _reservedProps[name] = 1;\n});\n\n_globals.TweenMax = _globals.TweenLite = Tween;\n_globals.TimelineLite = _globals.TimelineMax = Timeline;\n_globalTimeline = new Timeline({\n sortChildren: false,\n defaults: _defaults,\n autoRemoveChildren: true,\n id: \"root\",\n smoothChildTiming: true\n});\n_config.stringFilter = _colorStringFilter;\n/*\n * --------------------------------------------------------------------------------------\n * GSAP\n * --------------------------------------------------------------------------------------\n */\n\nvar _gsap = {\n registerPlugin: function registerPlugin() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n args.forEach(function (config) {\n return _createPlugin(config);\n });\n },\n timeline: function timeline(vars) {\n return new Timeline(vars);\n },\n getTweensOf: function getTweensOf(targets, onlyActive) {\n return _globalTimeline.getTweensOf(targets, onlyActive);\n },\n getProperty: function getProperty(target, property, unit, uncache) {\n if (_isString(target)) {\n //in case selector text or an array is passed in\n target = toArray(target)[0];\n }\n\n var getter = _getCache(target || {}).get,\n format = unit ? _passThrough : _numericIfPossible;\n\n if (unit === \"native\") {\n unit = \"\";\n }\n\n return !target ? target : !property ? function (property, unit, uncache) {\n return format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache));\n } : format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache));\n },\n quickSetter: function quickSetter(target, property, unit) {\n target = toArray(target);\n\n if (target.length > 1) {\n var setters = target.map(function (t) {\n return gsap.quickSetter(t, property, unit);\n }),\n l = setters.length;\n return function (value) {\n var i = l;\n\n while (i--) {\n setters[i](value);\n }\n };\n }\n\n target = target[0] || {};\n\n var Plugin = _plugins[property],\n cache = _getCache(target),\n p = cache.harness && (cache.harness.aliases || {})[property] || property,\n // in case it's an alias, like \"rotate\" for \"rotation\".\n setter = Plugin ? function (value) {\n var p = new Plugin();\n _quickTween._pt = 0;\n p.init(target, unit ? value + unit : value, _quickTween, 0, [target]);\n p.render(1, p);\n _quickTween._pt && _renderPropTweens(1, _quickTween);\n } : cache.set(target, p);\n\n return Plugin ? setter : function (value) {\n return setter(target, p, unit ? value + unit : value, cache, 1);\n };\n },\n isTweening: function isTweening(targets) {\n return _globalTimeline.getTweensOf(targets, true).length > 0;\n },\n defaults: function defaults(value) {\n if (value && value.ease) {\n value.ease = _parseEase(value.ease, _defaults.ease);\n }\n\n return _mergeDeep(_defaults, value || {});\n },\n config: function config(value) {\n return _mergeDeep(_config, value || {});\n },\n registerEffect: function registerEffect(_ref) {\n var name = _ref.name,\n effect = _ref.effect,\n plugins = _ref.plugins,\n defaults = _ref.defaults,\n extendTimeline = _ref.extendTimeline;\n (plugins || \"\").split(\",\").forEach(function (pluginName) {\n return pluginName && !_plugins[pluginName] && !_globals[pluginName] && _warn(name + \" effect requires \" + pluginName + \" plugin.\");\n });\n\n _effects[name] = function (targets, vars, tl) {\n return effect(toArray(targets), _setDefaults(vars || {}, defaults), tl);\n };\n\n if (extendTimeline) {\n Timeline.prototype[name] = function (targets, vars, position) {\n return this.add(_effects[name](targets, _isObject(vars) ? vars : (position = vars) && {}, this), position);\n };\n }\n },\n registerEase: function registerEase(name, ease) {\n _easeMap[name] = _parseEase(ease);\n },\n parseEase: function parseEase(ease, defaultEase) {\n return arguments.length ? _parseEase(ease, defaultEase) : _easeMap;\n },\n getById: function getById(id) {\n return _globalTimeline.getById(id);\n },\n exportRoot: function exportRoot(vars, includeDelayedCalls) {\n if (vars === void 0) {\n vars = {};\n }\n\n var tl = new Timeline(vars),\n child,\n next;\n tl.smoothChildTiming = _isNotFalse(vars.smoothChildTiming);\n\n _globalTimeline.remove(tl);\n\n tl._dp = 0; //otherwise it'll get re-activated when adding children and be re-introduced into _globalTimeline's linked list (then added to itself).\n\n tl._time = tl._tTime = _globalTimeline._time;\n child = _globalTimeline._first;\n\n while (child) {\n next = child._next;\n\n if (includeDelayedCalls || !(!child._dur && child instanceof Tween && child.vars.onComplete === child._targets[0])) {\n _addToTimeline(tl, child, child._start - child._delay);\n }\n\n child = next;\n }\n\n _addToTimeline(_globalTimeline, tl, 0);\n\n return tl;\n },\n utils: {\n wrap: wrap,\n wrapYoyo: wrapYoyo,\n distribute: distribute,\n random: random,\n snap: snap,\n normalize: normalize,\n getUnit: getUnit,\n clamp: clamp,\n splitColor: splitColor,\n toArray: toArray,\n mapRange: mapRange,\n pipe: pipe,\n unitize: unitize,\n interpolate: interpolate,\n shuffle: shuffle\n },\n install: _install,\n effects: _effects,\n ticker: _ticker,\n updateRoot: Timeline.updateRoot,\n plugins: _plugins,\n globalTimeline: _globalTimeline,\n core: {\n PropTween: PropTween,\n globals: _addGlobal,\n Tween: Tween,\n Timeline: Timeline,\n Animation: Animation,\n getCache: _getCache,\n _removeLinkedListItem: _removeLinkedListItem\n }\n};\n\n_forEachName(\"to,from,fromTo,delayedCall,set,killTweensOf\", function (name) {\n return _gsap[name] = Tween[name];\n});\n\n_ticker.add(Timeline.updateRoot);\n\n_quickTween = _gsap.to({}, {\n duration: 0\n}); // ---- EXTRA PLUGINS --------------------------------------------------------\n\nvar _getPluginPropTween = function _getPluginPropTween(plugin, prop) {\n var pt = plugin._pt;\n\n while (pt && pt.p !== prop && pt.op !== prop && pt.fp !== prop) {\n pt = pt._next;\n }\n\n return pt;\n},\n _addModifiers = function _addModifiers(tween, modifiers) {\n var targets = tween._targets,\n p,\n i,\n pt;\n\n for (p in modifiers) {\n i = targets.length;\n\n while (i--) {\n pt = tween._ptLookup[i][p];\n\n if (pt && (pt = pt.d)) {\n if (pt._pt) {\n // is a plugin\n pt = _getPluginPropTween(pt, p);\n }\n\n pt && pt.modifier && pt.modifier(modifiers[p], tween, targets[i], p);\n }\n }\n }\n},\n _buildModifierPlugin = function _buildModifierPlugin(name, modifier) {\n return {\n name: name,\n rawVars: 1,\n //don't pre-process function-based values or \"random()\" strings.\n init: function init(target, vars, tween) {\n tween._onInit = function (tween) {\n var temp, p;\n\n if (_isString(vars)) {\n temp = {};\n\n _forEachName(vars, function (name) {\n return temp[name] = 1;\n }); //if the user passes in a comma-delimited list of property names to roundProps, like \"x,y\", we round to whole numbers.\n\n\n vars = temp;\n }\n\n if (modifier) {\n temp = {};\n\n for (p in vars) {\n temp[p] = modifier(vars[p]);\n }\n\n vars = temp;\n }\n\n _addModifiers(tween, vars);\n };\n }\n };\n}; //register core plugins\n\n\nexport var gsap = _gsap.registerPlugin({\n name: \"attr\",\n init: function init(target, vars, tween, index, targets) {\n var p, pt;\n\n for (p in vars) {\n pt = this.add(target, \"setAttribute\", (target.getAttribute(p) || 0) + \"\", vars[p], index, targets, 0, 0, p);\n pt && (pt.op = p); //this.add(target, \"setAttribute\", (target.getAttribute((p in target.dataset ? (p = \"data-\" + p) : p)) || 0) + \"\", vars[p], index, targets, 0, 0, p);\n\n this._props.push(p);\n }\n }\n}, {\n name: \"endArray\",\n init: function init(target, value) {\n var i = value.length;\n\n while (i--) {\n this.add(target, i, target[i] || 0, value[i]);\n }\n }\n}, _buildModifierPlugin(\"roundProps\", _roundModifier), _buildModifierPlugin(\"modifiers\"), _buildModifierPlugin(\"snap\", snap)) || _gsap; //to prevent the core plugins from being dropped via aggressive tree shaking, we must include them in the variable declaration in this way.\n\nTween.version = Timeline.version = gsap.version = \"3.4.2\";\n_coreReady = 1;\n\nif (_windowExists()) {\n _wake();\n}\n\nvar Power0 = _easeMap.Power0,\n Power1 = _easeMap.Power1,\n Power2 = _easeMap.Power2,\n Power3 = _easeMap.Power3,\n Power4 = _easeMap.Power4,\n Linear = _easeMap.Linear,\n Quad = _easeMap.Quad,\n Cubic = _easeMap.Cubic,\n Quart = _easeMap.Quart,\n Quint = _easeMap.Quint,\n Strong = _easeMap.Strong,\n Elastic = _easeMap.Elastic,\n Back = _easeMap.Back,\n SteppedEase = _easeMap.SteppedEase,\n Bounce = _easeMap.Bounce,\n Sine = _easeMap.Sine,\n Expo = _easeMap.Expo,\n Circ = _easeMap.Circ;\nexport { Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ };\nexport { Tween as TweenMax, Tween as TweenLite, Timeline as TimelineMax, Timeline as TimelineLite, gsap as default, wrap, wrapYoyo, distribute, random, snap, normalize, getUnit, clamp, splitColor, toArray, mapRange, pipe, unitize, interpolate, shuffle }; //export some internal methods/orojects for use in CSSPlugin so that we can externalize that file and allow custom builds that exclude it.\n\nexport { _getProperty, _numExp, _numWithUnitExp, _isString, _isUndefined, _renderComplexString, _relExp, _setDefaults, _removeLinkedListItem, _forEachName, _sortPropTweensByPriority, _colorStringFilter, _replaceRandom, _checkPlugin, _plugins, _ticker, _config, _roundModifier, _round, _missingPlugin, _getSetter, _getCache };","/*!\n * CSSPlugin 3.4.2\n * https://greensock.com\n *\n * Copyright 2008-2020, GreenSock. All rights reserved.\n * Subject to the terms at https://greensock.com/standard-license or for\n * Club GreenSock members, the agreement issued with that membership.\n * @author: Jack Doyle, jack@greensock.com\n*/\n\n/* eslint-disable */\nimport { gsap, _getProperty, _numExp, _numWithUnitExp, getUnit, _isString, _isUndefined, _renderComplexString, _relExp, _forEachName, _sortPropTweensByPriority, _colorStringFilter, _checkPlugin, _replaceRandom, _plugins, GSCache, PropTween, _config, _ticker, _round, _missingPlugin, _getSetter, _getCache, _setDefaults, _removeLinkedListItem //for the commented-out className feature.\n} from \"./gsap-core.js\";\n\nvar _win,\n _doc,\n _docElement,\n _pluginInitted,\n _tempDiv,\n _tempDivStyler,\n _recentSetterPlugin,\n _windowExists = function _windowExists() {\n return typeof window !== \"undefined\";\n},\n _transformProps = {},\n _RAD2DEG = 180 / Math.PI,\n _DEG2RAD = Math.PI / 180,\n _atan2 = Math.atan2,\n _bigNum = 1e8,\n _capsExp = /([A-Z])/g,\n _horizontalExp = /(?:left|right|width|margin|padding|x)/i,\n _complexExp = /[\\s,\\(]\\S/,\n _propertyAliases = {\n autoAlpha: \"opacity,visibility\",\n scale: \"scaleX,scaleY\",\n alpha: \"opacity\"\n},\n _renderCSSProp = function _renderCSSProp(ratio, data) {\n return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u, data);\n},\n _renderPropWithEnd = function _renderPropWithEnd(ratio, data) {\n return data.set(data.t, data.p, ratio === 1 ? data.e : Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u, data);\n},\n _renderCSSPropWithBeginning = function _renderCSSPropWithBeginning(ratio, data) {\n return data.set(data.t, data.p, ratio ? Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u : data.b, data);\n},\n //if units change, we need a way to render the original unit/value when the tween goes all the way back to the beginning (ratio:0)\n_renderRoundedCSSProp = function _renderRoundedCSSProp(ratio, data) {\n var value = data.s + data.c * ratio;\n data.set(data.t, data.p, ~~(value + (value < 0 ? -.5 : .5)) + data.u, data);\n},\n _renderNonTweeningValue = function _renderNonTweeningValue(ratio, data) {\n return data.set(data.t, data.p, ratio ? data.e : data.b, data);\n},\n _renderNonTweeningValueOnlyAtEnd = function _renderNonTweeningValueOnlyAtEnd(ratio, data) {\n return data.set(data.t, data.p, ratio !== 1 ? data.b : data.e, data);\n},\n _setterCSSStyle = function _setterCSSStyle(target, property, value) {\n return target.style[property] = value;\n},\n _setterCSSProp = function _setterCSSProp(target, property, value) {\n return target.style.setProperty(property, value);\n},\n _setterTransform = function _setterTransform(target, property, value) {\n return target._gsap[property] = value;\n},\n _setterScale = function _setterScale(target, property, value) {\n return target._gsap.scaleX = target._gsap.scaleY = value;\n},\n _setterScaleWithRender = function _setterScaleWithRender(target, property, value, data, ratio) {\n var cache = target._gsap;\n cache.scaleX = cache.scaleY = value;\n cache.renderTransform(ratio, cache);\n},\n _setterTransformWithRender = function _setterTransformWithRender(target, property, value, data, ratio) {\n var cache = target._gsap;\n cache[property] = value;\n cache.renderTransform(ratio, cache);\n},\n _transformProp = \"transform\",\n _transformOriginProp = _transformProp + \"Origin\",\n _supports3D,\n _createElement = function _createElement(type, ns) {\n var e = _doc.createElementNS ? _doc.createElementNS((ns || \"http://www.w3.org/1999/xhtml\").replace(/^https/, \"http\"), type) : _doc.createElement(type); //some servers swap in https for http in the namespace which can break things, making \"style\" inaccessible.\n\n return e.style ? e : _doc.createElement(type); //some environments won't allow access to the element's style when created with a namespace in which case we default to the standard createElement() to work around the issue. Also note that when GSAP is embedded directly inside an SVG file, createElement() won't allow access to the style object in Firefox (see https://greensock.com/forums/topic/20215-problem-using-tweenmax-in-standalone-self-containing-svg-file-err-cannot-set-property-csstext-of-undefined/).\n},\n _getComputedProperty = function _getComputedProperty(target, property, skipPrefixFallback) {\n var cs = getComputedStyle(target);\n return cs[property] || cs.getPropertyValue(property.replace(_capsExp, \"-$1\").toLowerCase()) || cs.getPropertyValue(property) || !skipPrefixFallback && _getComputedProperty(target, _checkPropPrefix(property) || property, 1) || \"\"; //css variables may not need caps swapped out for dashes and lowercase.\n},\n _prefixes = \"O,Moz,ms,Ms,Webkit\".split(\",\"),\n _checkPropPrefix = function _checkPropPrefix(property, element, preferPrefix) {\n var e = element || _tempDiv,\n s = e.style,\n i = 5;\n\n if (property in s && !preferPrefix) {\n return property;\n }\n\n property = property.charAt(0).toUpperCase() + property.substr(1);\n\n while (i-- && !(_prefixes[i] + property in s)) {}\n\n return i < 0 ? null : (i === 3 ? \"ms\" : i >= 0 ? _prefixes[i] : \"\") + property;\n},\n _initCore = function _initCore() {\n if (_windowExists() && window.document) {\n _win = window;\n _doc = _win.document;\n _docElement = _doc.documentElement;\n _tempDiv = _createElement(\"div\") || {\n style: {}\n };\n _tempDivStyler = _createElement(\"div\");\n _transformProp = _checkPropPrefix(_transformProp);\n _transformOriginProp = _transformProp + \"Origin\";\n _tempDiv.style.cssText = \"border-width:0;line-height:0;position:absolute;padding:0\"; //make sure to override certain properties that may contaminate measurements, in case the user has overreaching style sheets.\n\n _supports3D = !!_checkPropPrefix(\"perspective\");\n _pluginInitted = 1;\n }\n},\n _getBBoxHack = function _getBBoxHack(swapIfPossible) {\n //works around issues in some browsers (like Firefox) that don't correctly report getBBox() on SVG elements inside a element and/or . We try creating an SVG, adding it to the documentElement and toss the element in there so that it's definitely part of the rendering tree, then grab the bbox and if it works, we actually swap out the original getBBox() method for our own that does these extra steps whenever getBBox is needed. This helps ensure that performance is optimal (only do all these extra steps when absolutely necessary...most elements don't need it).\n var svg = _createElement(\"svg\", this.ownerSVGElement && this.ownerSVGElement.getAttribute(\"xmlns\") || \"http://www.w3.org/2000/svg\"),\n oldParent = this.parentNode,\n oldSibling = this.nextSibling,\n oldCSS = this.style.cssText,\n bbox;\n\n _docElement.appendChild(svg);\n\n svg.appendChild(this);\n this.style.display = \"block\";\n\n if (swapIfPossible) {\n try {\n bbox = this.getBBox();\n this._gsapBBox = this.getBBox; //store the original\n\n this.getBBox = _getBBoxHack;\n } catch (e) {}\n } else if (this._gsapBBox) {\n bbox = this._gsapBBox();\n }\n\n if (oldParent) {\n if (oldSibling) {\n oldParent.insertBefore(this, oldSibling);\n } else {\n oldParent.appendChild(this);\n }\n }\n\n _docElement.removeChild(svg);\n\n this.style.cssText = oldCSS;\n return bbox;\n},\n _getAttributeFallbacks = function _getAttributeFallbacks(target, attributesArray) {\n var i = attributesArray.length;\n\n while (i--) {\n if (target.hasAttribute(attributesArray[i])) {\n return target.getAttribute(attributesArray[i]);\n }\n }\n},\n _getBBox = function _getBBox(target) {\n var bounds;\n\n try {\n bounds = target.getBBox(); //Firefox throws errors if you try calling getBBox() on an SVG element that's not rendered (like in a or ). https://bugzilla.mozilla.org/show_bug.cgi?id=612118\n } catch (error) {\n bounds = _getBBoxHack.call(target, true);\n }\n\n bounds && (bounds.width || bounds.height) || target.getBBox === _getBBoxHack || (bounds = _getBBoxHack.call(target, true)); //some browsers (like Firefox) misreport the bounds if the element has zero width and height (it just assumes it's at x:0, y:0), thus we need to manually grab the position in that case.\n\n return bounds && !bounds.width && !bounds.x && !bounds.y ? {\n x: +_getAttributeFallbacks(target, [\"x\", \"cx\", \"x1\"]) || 0,\n y: +_getAttributeFallbacks(target, [\"y\", \"cy\", \"y1\"]) || 0,\n width: 0,\n height: 0\n } : bounds;\n},\n _isSVG = function _isSVG(e) {\n return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) && _getBBox(e));\n},\n //reports if the element is an SVG on which getBBox() actually works\n_removeProperty = function _removeProperty(target, property) {\n if (property) {\n var style = target.style;\n\n if (property in _transformProps && property !== _transformOriginProp) {\n property = _transformProp;\n }\n\n if (style.removeProperty) {\n if (property.substr(0, 2) === \"ms\" || property.substr(0, 6) === \"webkit\") {\n //Microsoft and some Webkit browsers don't conform to the standard of capitalizing the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be \"ms-transform\" instead of \"-ms-transform\" for IE9, for example)\n property = \"-\" + property;\n }\n\n style.removeProperty(property.replace(_capsExp, \"-$1\").toLowerCase());\n } else {\n //note: old versions of IE use \"removeAttribute()\" instead of \"removeProperty()\"\n style.removeAttribute(property);\n }\n }\n},\n _addNonTweeningPT = function _addNonTweeningPT(plugin, target, property, beginning, end, onlySetAtEnd) {\n var pt = new PropTween(plugin._pt, target, property, 0, 1, onlySetAtEnd ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue);\n plugin._pt = pt;\n pt.b = beginning;\n pt.e = end;\n\n plugin._props.push(property);\n\n return pt;\n},\n _nonConvertibleUnits = {\n deg: 1,\n rad: 1,\n turn: 1\n},\n //takes a single value like 20px and converts it to the unit specified, like \"%\", returning only the numeric amount.\n_convertToUnit = function _convertToUnit(target, property, value, unit) {\n var curValue = parseFloat(value) || 0,\n curUnit = (value + \"\").trim().substr((curValue + \"\").length) || \"px\",\n // some browsers leave extra whitespace at the beginning of CSS variables, hence the need to trim()\n style = _tempDiv.style,\n horizontal = _horizontalExp.test(property),\n isRootSVG = target.tagName.toLowerCase() === \"svg\",\n measureProperty = (isRootSVG ? \"client\" : \"offset\") + (horizontal ? \"Width\" : \"Height\"),\n amount = 100,\n toPixels = unit === \"px\",\n toPercent = unit === \"%\",\n px,\n parent,\n cache,\n isSVG;\n\n if (unit === curUnit || !curValue || _nonConvertibleUnits[unit] || _nonConvertibleUnits[curUnit]) {\n return curValue;\n }\n\n curUnit !== \"px\" && !toPixels && (curValue = _convertToUnit(target, property, value, \"px\"));\n isSVG = target.getCTM && _isSVG(target);\n\n if (toPercent && (_transformProps[property] || ~property.indexOf(\"adius\"))) {\n //transforms and borderRadius are relative to the size of the element itself!\n return _round(curValue / (isSVG ? target.getBBox()[horizontal ? \"width\" : \"height\"] : target[measureProperty]) * amount);\n }\n\n style[horizontal ? \"width\" : \"height\"] = amount + (toPixels ? curUnit : unit);\n parent = ~property.indexOf(\"adius\") || unit === \"em\" && target.appendChild && !isRootSVG ? target : target.parentNode;\n\n if (isSVG) {\n parent = (target.ownerSVGElement || {}).parentNode;\n }\n\n if (!parent || parent === _doc || !parent.appendChild) {\n parent = _doc.body;\n }\n\n cache = parent._gsap;\n\n if (cache && toPercent && cache.width && horizontal && cache.time === _ticker.time) {\n return _round(curValue / cache.width * amount);\n } else {\n (toPercent || curUnit === \"%\") && (style.position = _getComputedProperty(target, \"position\"));\n parent === target && (style.position = \"static\"); // like for borderRadius, if it's a % we must have it relative to the target itself but that may not have position: relative or position: absolute in which case it'd go up the chain until it finds its offsetParent (bad). position: static protects against that.\n\n parent.appendChild(_tempDiv);\n px = _tempDiv[measureProperty];\n parent.removeChild(_tempDiv);\n style.position = \"absolute\";\n\n if (horizontal && toPercent) {\n cache = _getCache(parent);\n cache.time = _ticker.time;\n cache.width = parent[measureProperty];\n }\n }\n\n return _round(toPixels ? px * curValue / amount : px && curValue ? amount / px * curValue : 0);\n},\n _get = function _get(target, property, unit, uncache) {\n var value;\n _pluginInitted || _initCore();\n\n if (property in _propertyAliases && property !== \"transform\") {\n property = _propertyAliases[property];\n\n if (~property.indexOf(\",\")) {\n property = property.split(\",\")[0];\n }\n }\n\n if (_transformProps[property] && property !== \"transform\") {\n value = _parseTransform(target, uncache);\n value = property !== \"transformOrigin\" ? value[property] : _firstTwoOnly(_getComputedProperty(target, _transformOriginProp)) + \" \" + value.zOrigin + \"px\";\n } else {\n value = target.style[property];\n\n if (!value || value === \"auto\" || uncache || ~(value + \"\").indexOf(\"calc(\")) {\n value = _specialProps[property] && _specialProps[property](target, property, unit) || _getComputedProperty(target, property) || _getProperty(target, property) || (property === \"opacity\" ? 1 : 0); // note: some browsers, like Firefox, don't report borderRadius correctly! Instead, it only reports every corner like borderTopLeftRadius\n }\n }\n\n return unit && !~(value + \"\").indexOf(\" \") ? _convertToUnit(target, property, value, unit) + unit : value;\n},\n _tweenComplexCSSString = function _tweenComplexCSSString(target, prop, start, end) {\n //note: we call _tweenComplexCSSString.call(pluginInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus \"this\" would refer to the plugin.\n if (!start || start === \"none\") {\n // some browsers like Safari actually PREFER the prefixed property and mis-report the unprefixed value like clipPath (BUG). In other words, even though clipPath exists in the style (\"clipPath\" in target.style) and it's set in the CSS properly (along with -webkit-clip-path), Safari reports clipPath as \"none\" whereas WebkitClipPath reports accurately like \"ellipse(100% 0% at 50% 0%)\", so in this case we must SWITCH to using the prefixed property instead. See https://greensock.com/forums/topic/18310-clippath-doesnt-work-on-ios/\n var p = _checkPropPrefix(prop, target, 1),\n s = p && _getComputedProperty(target, p, 1);\n\n if (s && s !== start) {\n prop = p;\n start = s;\n } else if (prop === \"borderColor\") {\n start = _getComputedProperty(target, \"borderTopColor\"); // Firefox bug: always reports \"borderColor\" as \"\", so we must fall back to borderTopColor. See https://greensock.com/forums/topic/24583-how-to-return-colors-that-i-had-after-reverse/\n }\n }\n\n var pt = new PropTween(this._pt, target.style, prop, 0, 1, _renderComplexString),\n index = 0,\n matchIndex = 0,\n a,\n result,\n startValues,\n startNum,\n color,\n startValue,\n endValue,\n endNum,\n chunk,\n endUnit,\n startUnit,\n relative,\n endValues;\n pt.b = start;\n pt.e = end;\n start += \"\"; //ensure values are strings\n\n end += \"\";\n\n if (end === \"auto\") {\n target.style[prop] = end;\n end = _getComputedProperty(target, prop) || end;\n target.style[prop] = start;\n }\n\n a = [start, end];\n\n _colorStringFilter(a); //pass an array with the starting and ending values and let the filter do whatever it needs to the values. If colors are found, it returns true and then we must match where the color shows up order-wise because for things like boxShadow, sometimes the browser provides the computed values with the color FIRST, but the user provides it with the color LAST, so flip them if necessary. Same for drop-shadow().\n\n\n start = a[0];\n end = a[1];\n startValues = start.match(_numWithUnitExp) || [];\n endValues = end.match(_numWithUnitExp) || [];\n\n if (endValues.length) {\n while (result = _numWithUnitExp.exec(end)) {\n endValue = result[0];\n chunk = end.substring(index, result.index);\n\n if (color) {\n color = (color + 1) % 5;\n } else if (chunk.substr(-5) === \"rgba(\" || chunk.substr(-5) === \"hsla(\") {\n color = 1;\n }\n\n if (endValue !== (startValue = startValues[matchIndex++] || \"\")) {\n startNum = parseFloat(startValue) || 0;\n startUnit = startValue.substr((startNum + \"\").length);\n relative = endValue.charAt(1) === \"=\" ? +(endValue.charAt(0) + \"1\") : 0;\n\n if (relative) {\n endValue = endValue.substr(2);\n }\n\n endNum = parseFloat(endValue);\n endUnit = endValue.substr((endNum + \"\").length);\n index = _numWithUnitExp.lastIndex - endUnit.length;\n\n if (!endUnit) {\n //if something like \"perspective:300\" is passed in and we must add a unit to the end\n endUnit = endUnit || _config.units[prop] || startUnit;\n\n if (index === end.length) {\n end += endUnit;\n pt.e += endUnit;\n }\n }\n\n if (startUnit !== endUnit) {\n startNum = _convertToUnit(target, prop, startValue, endUnit) || 0;\n } //these nested PropTweens are handled in a special way - we'll never actually call a render or setter method on them. We'll just loop through them in the parent complex string PropTween's render method.\n\n\n pt._pt = {\n _next: pt._pt,\n p: chunk || matchIndex === 1 ? chunk : \",\",\n //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.\n s: startNum,\n c: relative ? relative * endNum : endNum - startNum,\n m: color && color < 4 ? Math.round : 0\n };\n }\n }\n\n pt.c = index < end.length ? end.substring(index, end.length) : \"\"; //we use the \"c\" of the PropTween to store the final part of the string (after the last number)\n } else {\n pt.r = prop === \"display\" && end === \"none\" ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue;\n }\n\n if (_relExp.test(end)) {\n pt.e = 0; //if the end string contains relative values or dynamic random(...) values, delete the end it so that on the final render we don't actually set it to the string with += or -= characters (forces it to use the calculated value).\n }\n\n this._pt = pt; //start the linked list with this new PropTween. Remember, we call _tweenComplexCSSString.call(pluginInstance...) to ensure that it's scoped properly. We may call it from within another plugin too, thus \"this\" would refer to the plugin.\n\n return pt;\n},\n _keywordToPercent = {\n top: \"0%\",\n bottom: \"100%\",\n left: \"0%\",\n right: \"100%\",\n center: \"50%\"\n},\n _convertKeywordsToPercentages = function _convertKeywordsToPercentages(value) {\n var split = value.split(\" \"),\n x = split[0],\n y = split[1] || \"50%\";\n\n if (x === \"top\" || x === \"bottom\" || y === \"left\" || y === \"right\") {\n //the user provided them in the wrong order, so flip them\n value = x;\n x = y;\n y = value;\n }\n\n split[0] = _keywordToPercent[x] || x;\n split[1] = _keywordToPercent[y] || y;\n return split.join(\" \");\n},\n _renderClearProps = function _renderClearProps(ratio, data) {\n if (data.tween && data.tween._time === data.tween._dur) {\n var target = data.t,\n style = target.style,\n props = data.u,\n cache = target._gsap,\n prop,\n clearTransforms,\n i;\n\n if (props === \"all\" || props === true) {\n style.cssText = \"\";\n clearTransforms = 1;\n } else {\n props = props.split(\",\");\n i = props.length;\n\n while (--i > -1) {\n prop = props[i];\n\n if (_transformProps[prop]) {\n clearTransforms = 1;\n prop = prop === \"transformOrigin\" ? _transformOriginProp : _transformProp;\n }\n\n _removeProperty(target, prop);\n }\n }\n\n if (clearTransforms) {\n _removeProperty(target, _transformProp);\n\n if (cache) {\n cache.svg && target.removeAttribute(\"transform\");\n\n _parseTransform(target, 1); // force all the cached values back to \"normal\"/identity, otherwise if there's another tween that's already set to render transforms on this element, it could display the wrong values.\n\n\n cache.uncache = 1;\n }\n }\n }\n},\n // note: specialProps should return 1 if (and only if) they have a non-zero priority. It indicates we need to sort the linked list.\n_specialProps = {\n clearProps: function clearProps(plugin, target, property, endValue, tween) {\n if (tween.data !== \"isFromStart\") {\n var pt = plugin._pt = new PropTween(plugin._pt, target, property, 0, 0, _renderClearProps);\n pt.u = endValue;\n pt.pr = -10;\n pt.tween = tween;\n\n plugin._props.push(property);\n\n return 1;\n }\n }\n /* className feature (about 0.4kb gzipped).\n , className(plugin, target, property, endValue, tween) {\n \tlet _renderClassName = (ratio, data) => {\n \t\t\tdata.css.render(ratio, data.css);\n \t\t\tif (!ratio || ratio === 1) {\n \t\t\t\tlet inline = data.rmv,\n \t\t\t\t\ttarget = data.t,\n \t\t\t\t\tp;\n \t\t\t\ttarget.setAttribute(\"class\", ratio ? data.e : data.b);\n \t\t\t\tfor (p in inline) {\n \t\t\t\t\t_removeProperty(target, p);\n \t\t\t\t}\n \t\t\t}\n \t\t},\n \t\t_getAllStyles = (target) => {\n \t\t\tlet styles = {},\n \t\t\t\tcomputed = getComputedStyle(target),\n \t\t\t\tp;\n \t\t\tfor (p in computed) {\n \t\t\t\tif (isNaN(p) && p !== \"cssText\" && p !== \"length\") {\n \t\t\t\t\tstyles[p] = computed[p];\n \t\t\t\t}\n \t\t\t}\n \t\t\t_setDefaults(styles, _parseTransform(target, 1));\n \t\t\treturn styles;\n \t\t},\n \t\tstartClassList = target.getAttribute(\"class\"),\n \t\tstyle = target.style,\n \t\tcssText = style.cssText,\n \t\tcache = target._gsap,\n \t\tclassPT = cache.classPT,\n \t\tinlineToRemoveAtEnd = {},\n \t\tdata = {t:target, plugin:plugin, rmv:inlineToRemoveAtEnd, b:startClassList, e:(endValue.charAt(1) !== \"=\") ? endValue : startClassList.replace(new RegExp(\"(?:\\\\s|^)\" + endValue.substr(2) + \"(?![\\\\w-])\"), \"\") + ((endValue.charAt(0) === \"+\") ? \" \" + endValue.substr(2) : \"\")},\n \t\tchangingVars = {},\n \t\tstartVars = _getAllStyles(target),\n \t\ttransformRelated = /(transform|perspective)/i,\n \t\tendVars, p;\n \tif (classPT) {\n \t\tclassPT.r(1, classPT.d);\n \t\t_removeLinkedListItem(classPT.d.plugin, classPT, \"_pt\");\n \t}\n \ttarget.setAttribute(\"class\", data.e);\n \tendVars = _getAllStyles(target, true);\n \ttarget.setAttribute(\"class\", startClassList);\n \tfor (p in endVars) {\n \t\tif (endVars[p] !== startVars[p] && !transformRelated.test(p)) {\n \t\t\tchangingVars[p] = endVars[p];\n \t\t\tif (!style[p] && style[p] !== \"0\") {\n \t\t\t\tinlineToRemoveAtEnd[p] = 1;\n \t\t\t}\n \t\t}\n \t}\n \tcache.classPT = plugin._pt = new PropTween(plugin._pt, target, \"className\", 0, 0, _renderClassName, data, 0, -11);\n \tif (style.cssText !== cssText) { //only apply if things change. Otherwise, in cases like a background-image that's pulled dynamically, it could cause a refresh. See https://greensock.com/forums/topic/20368-possible-gsap-bug-switching-classnames-in-chrome/.\n \t\tstyle.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).\n \t}\n \t_parseTransform(target, true); //to clear the caching of transforms\n \tdata.css = new gsap.plugins.css();\n \tdata.css.init(target, changingVars, tween);\n \tplugin._props.push(...data.css._props);\n \treturn 1;\n }\n */\n\n},\n\n/*\n * --------------------------------------------------------------------------------------\n * TRANSFORMS\n * --------------------------------------------------------------------------------------\n */\n_identity2DMatrix = [1, 0, 0, 1, 0, 0],\n _rotationalProperties = {},\n _isNullTransform = function _isNullTransform(value) {\n return value === \"matrix(1, 0, 0, 1, 0, 0)\" || value === \"none\" || !value;\n},\n _getComputedTransformMatrixAsArray = function _getComputedTransformMatrixAsArray(target) {\n var matrixString = _getComputedProperty(target, _transformProp);\n\n return _isNullTransform(matrixString) ? _identity2DMatrix : matrixString.substr(7).match(_numExp).map(_round);\n},\n _getMatrix = function _getMatrix(target, force2D) {\n var cache = target._gsap || _getCache(target),\n style = target.style,\n matrix = _getComputedTransformMatrixAsArray(target),\n parent,\n nextSibling,\n temp,\n addedToDOM;\n\n if (cache.svg && target.getAttribute(\"transform\")) {\n temp = target.transform.baseVal.consolidate().matrix; //ensures that even complex values like \"translate(50,60) rotate(135,0,0)\" are parsed because it mashes it into a matrix.\n\n matrix = [temp.a, temp.b, temp.c, temp.d, temp.e, temp.f];\n return matrix.join(\",\") === \"1,0,0,1,0,0\" ? _identity2DMatrix : matrix;\n } else if (matrix === _identity2DMatrix && !target.offsetParent && target !== _docElement && !cache.svg) {\n //note: if offsetParent is null, that means the element isn't in the normal document flow, like if it has display:none or one of its ancestors has display:none). Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n //browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not \"none\". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px).\n temp = style.display;\n style.display = \"block\";\n parent = target.parentNode;\n\n if (!parent || !target.offsetParent) {\n // note: in 3.3.0 we switched target.offsetParent to _doc.body.contains(target) to avoid [sometimes unnecessary] MutationObserver calls but that wasn't adequate because there are edge cases where nested position: fixed elements need to get reparented to accurately sense transforms. See https://github.com/greensock/GSAP/issues/388 and https://github.com/greensock/GSAP/issues/375\n addedToDOM = 1; //flag\n\n nextSibling = target.nextSibling;\n\n _docElement.appendChild(target); //we must add it to the DOM in order to get values properly\n\n }\n\n matrix = _getComputedTransformMatrixAsArray(target);\n temp ? style.display = temp : _removeProperty(target, \"display\");\n\n if (addedToDOM) {\n nextSibling ? parent.insertBefore(target, nextSibling) : parent ? parent.appendChild(target) : _docElement.removeChild(target);\n }\n }\n\n return force2D && matrix.length > 6 ? [matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]] : matrix;\n},\n _applySVGOrigin = function _applySVGOrigin(target, origin, originIsAbsolute, smooth, matrixArray, pluginToAddPropTweensTo) {\n var cache = target._gsap,\n matrix = matrixArray || _getMatrix(target, true),\n xOriginOld = cache.xOrigin || 0,\n yOriginOld = cache.yOrigin || 0,\n xOffsetOld = cache.xOffset || 0,\n yOffsetOld = cache.yOffset || 0,\n a = matrix[0],\n b = matrix[1],\n c = matrix[2],\n d = matrix[3],\n tx = matrix[4],\n ty = matrix[5],\n originSplit = origin.split(\" \"),\n xOrigin = parseFloat(originSplit[0]) || 0,\n yOrigin = parseFloat(originSplit[1]) || 0,\n bounds,\n determinant,\n x,\n y;\n\n if (!originIsAbsolute) {\n bounds = _getBBox(target);\n xOrigin = bounds.x + (~originSplit[0].indexOf(\"%\") ? xOrigin / 100 * bounds.width : xOrigin);\n yOrigin = bounds.y + (~(originSplit[1] || originSplit[0]).indexOf(\"%\") ? yOrigin / 100 * bounds.height : yOrigin);\n } else if (matrix !== _identity2DMatrix && (determinant = a * d - b * c)) {\n //if it's zero (like if scaleX and scaleY are zero), skip it to avoid errors with dividing by zero.\n x = xOrigin * (d / determinant) + yOrigin * (-c / determinant) + (c * ty - d * tx) / determinant;\n y = xOrigin * (-b / determinant) + yOrigin * (a / determinant) - (a * ty - b * tx) / determinant;\n xOrigin = x;\n yOrigin = y;\n }\n\n if (smooth || smooth !== false && cache.smooth) {\n tx = xOrigin - xOriginOld;\n ty = yOrigin - yOriginOld;\n cache.xOffset = xOffsetOld + (tx * a + ty * c) - tx;\n cache.yOffset = yOffsetOld + (tx * b + ty * d) - ty;\n } else {\n cache.xOffset = cache.yOffset = 0;\n }\n\n cache.xOrigin = xOrigin;\n cache.yOrigin = yOrigin;\n cache.smooth = !!smooth;\n cache.origin = origin;\n cache.originIsAbsolute = !!originIsAbsolute;\n target.style[_transformOriginProp] = \"0px 0px\"; //otherwise, if someone sets an origin via CSS, it will likely interfere with the SVG transform attribute ones (because remember, we're baking the origin into the matrix() value).\n\n if (pluginToAddPropTweensTo) {\n _addNonTweeningPT(pluginToAddPropTweensTo, cache, \"xOrigin\", xOriginOld, xOrigin);\n\n _addNonTweeningPT(pluginToAddPropTweensTo, cache, \"yOrigin\", yOriginOld, yOrigin);\n\n _addNonTweeningPT(pluginToAddPropTweensTo, cache, \"xOffset\", xOffsetOld, cache.xOffset);\n\n _addNonTweeningPT(pluginToAddPropTweensTo, cache, \"yOffset\", yOffsetOld, cache.yOffset);\n }\n\n target.setAttribute(\"data-svg-origin\", xOrigin + \" \" + yOrigin);\n},\n _parseTransform = function _parseTransform(target, uncache) {\n var cache = target._gsap || new GSCache(target);\n\n if (\"x\" in cache && !uncache && !cache.uncache) {\n return cache;\n }\n\n var style = target.style,\n invertedScaleX = cache.scaleX < 0,\n px = \"px\",\n deg = \"deg\",\n origin = _getComputedProperty(target, _transformOriginProp) || \"0\",\n x,\n y,\n z,\n scaleX,\n scaleY,\n rotation,\n rotationX,\n rotationY,\n skewX,\n skewY,\n perspective,\n xOrigin,\n yOrigin,\n matrix,\n angle,\n cos,\n sin,\n a,\n b,\n c,\n d,\n a12,\n a22,\n t1,\n t2,\n t3,\n a13,\n a23,\n a33,\n a42,\n a43,\n a32;\n x = y = z = rotation = rotationX = rotationY = skewX = skewY = perspective = 0;\n scaleX = scaleY = 1;\n cache.svg = !!(target.getCTM && _isSVG(target));\n matrix = _getMatrix(target, cache.svg);\n\n if (cache.svg) {\n t1 = !cache.uncache && target.getAttribute(\"data-svg-origin\");\n\n _applySVGOrigin(target, t1 || origin, !!t1 || cache.originIsAbsolute, cache.smooth !== false, matrix);\n }\n\n xOrigin = cache.xOrigin || 0;\n yOrigin = cache.yOrigin || 0;\n\n if (matrix !== _identity2DMatrix) {\n a = matrix[0]; //a11\n\n b = matrix[1]; //a21\n\n c = matrix[2]; //a31\n\n d = matrix[3]; //a41\n\n x = a12 = matrix[4];\n y = a22 = matrix[5]; //2D matrix\n\n if (matrix.length === 6) {\n scaleX = Math.sqrt(a * a + b * b);\n scaleY = Math.sqrt(d * d + c * c);\n rotation = a || b ? _atan2(b, a) * _RAD2DEG : 0; //note: if scaleX is 0, we cannot accurately measure rotation. Same for skewX with a scaleY of 0. Therefore, we default to the previously recorded value (or zero if that doesn't exist).\n\n skewX = c || d ? _atan2(c, d) * _RAD2DEG + rotation : 0;\n skewX && (scaleY *= Math.cos(skewX * _DEG2RAD));\n\n if (cache.svg) {\n x -= xOrigin - (xOrigin * a + yOrigin * c);\n y -= yOrigin - (xOrigin * b + yOrigin * d);\n } //3D matrix\n\n } else {\n a32 = matrix[6];\n a42 = matrix[7];\n a13 = matrix[8];\n a23 = matrix[9];\n a33 = matrix[10];\n a43 = matrix[11];\n x = matrix[12];\n y = matrix[13];\n z = matrix[14];\n angle = _atan2(a32, a33);\n rotationX = angle * _RAD2DEG; //rotationX\n\n if (angle) {\n cos = Math.cos(-angle);\n sin = Math.sin(-angle);\n t1 = a12 * cos + a13 * sin;\n t2 = a22 * cos + a23 * sin;\n t3 = a32 * cos + a33 * sin;\n a13 = a12 * -sin + a13 * cos;\n a23 = a22 * -sin + a23 * cos;\n a33 = a32 * -sin + a33 * cos;\n a43 = a42 * -sin + a43 * cos;\n a12 = t1;\n a22 = t2;\n a32 = t3;\n } //rotationY\n\n\n angle = _atan2(-c, a33);\n rotationY = angle * _RAD2DEG;\n\n if (angle) {\n cos = Math.cos(-angle);\n sin = Math.sin(-angle);\n t1 = a * cos - a13 * sin;\n t2 = b * cos - a23 * sin;\n t3 = c * cos - a33 * sin;\n a43 = d * sin + a43 * cos;\n a = t1;\n b = t2;\n c = t3;\n } //rotationZ\n\n\n angle = _atan2(b, a);\n rotation = angle * _RAD2DEG;\n\n if (angle) {\n cos = Math.cos(angle);\n sin = Math.sin(angle);\n t1 = a * cos + b * sin;\n t2 = a12 * cos + a22 * sin;\n b = b * cos - a * sin;\n a22 = a22 * cos - a12 * sin;\n a = t1;\n a12 = t2;\n }\n\n if (rotationX && Math.abs(rotationX) + Math.abs(rotation) > 359.9) {\n //when rotationY is set, it will often be parsed as 180 degrees different than it should be, and rotationX and rotation both being 180 (it looks the same), so we adjust for that here.\n rotationX = rotation = 0;\n rotationY = 180 - rotationY;\n }\n\n scaleX = _round(Math.sqrt(a * a + b * b + c * c));\n scaleY = _round(Math.sqrt(a22 * a22 + a32 * a32));\n angle = _atan2(a12, a22);\n skewX = Math.abs(angle) > 0.0002 ? angle * _RAD2DEG : 0;\n perspective = a43 ? 1 / (a43 < 0 ? -a43 : a43) : 0;\n }\n\n if (cache.svg) {\n //sense if there are CSS transforms applied on an SVG element in which case we must overwrite them when rendering. The transform attribute is more reliable cross-browser, but we can't just remove the CSS ones because they may be applied in a CSS rule somewhere (not just inline).\n t1 = target.getAttribute(\"transform\");\n cache.forceCSS = target.setAttribute(\"transform\", \"\") || !_isNullTransform(_getComputedProperty(target, _transformProp));\n t1 && target.setAttribute(\"transform\", t1);\n }\n }\n\n if (Math.abs(skewX) > 90 && Math.abs(skewX) < 270) {\n if (invertedScaleX) {\n scaleX *= -1;\n skewX += rotation <= 0 ? 180 : -180;\n rotation += rotation <= 0 ? 180 : -180;\n } else {\n scaleY *= -1;\n skewX += skewX <= 0 ? 180 : -180;\n }\n }\n\n cache.x = ((cache.xPercent = x && Math.round(target.offsetWidth / 2) === Math.round(-x) ? -50 : 0) ? 0 : x) + px;\n cache.y = ((cache.yPercent = y && Math.round(target.offsetHeight / 2) === Math.round(-y) ? -50 : 0) ? 0 : y) + px;\n cache.z = z + px;\n cache.scaleX = _round(scaleX);\n cache.scaleY = _round(scaleY);\n cache.rotation = _round(rotation) + deg;\n cache.rotationX = _round(rotationX) + deg;\n cache.rotationY = _round(rotationY) + deg;\n cache.skewX = skewX + deg;\n cache.skewY = skewY + deg;\n cache.transformPerspective = perspective + px;\n\n if (cache.zOrigin = parseFloat(origin.split(\" \")[2]) || 0) {\n style[_transformOriginProp] = _firstTwoOnly(origin);\n }\n\n cache.xOffset = cache.yOffset = 0;\n cache.force3D = _config.force3D;\n cache.renderTransform = cache.svg ? _renderSVGTransforms : _supports3D ? _renderCSSTransforms : _renderNon3DTransforms;\n cache.uncache = 0;\n return cache;\n},\n _firstTwoOnly = function _firstTwoOnly(value) {\n return (value = value.split(\" \"))[0] + \" \" + value[1];\n},\n //for handling transformOrigin values, stripping out the 3rd dimension\n_addPxTranslate = function _addPxTranslate(target, start, value) {\n var unit = getUnit(start);\n return _round(parseFloat(start) + parseFloat(_convertToUnit(target, \"x\", value + \"px\", unit))) + unit;\n},\n _renderNon3DTransforms = function _renderNon3DTransforms(ratio, cache) {\n cache.z = \"0px\";\n cache.rotationY = cache.rotationX = \"0deg\";\n cache.force3D = 0;\n\n _renderCSSTransforms(ratio, cache);\n},\n _zeroDeg = \"0deg\",\n _zeroPx = \"0px\",\n _endParenthesis = \") \",\n _renderCSSTransforms = function _renderCSSTransforms(ratio, cache) {\n var _ref = cache || this,\n xPercent = _ref.xPercent,\n yPercent = _ref.yPercent,\n x = _ref.x,\n y = _ref.y,\n z = _ref.z,\n rotation = _ref.rotation,\n rotationY = _ref.rotationY,\n rotationX = _ref.rotationX,\n skewX = _ref.skewX,\n skewY = _ref.skewY,\n scaleX = _ref.scaleX,\n scaleY = _ref.scaleY,\n transformPerspective = _ref.transformPerspective,\n force3D = _ref.force3D,\n target = _ref.target,\n zOrigin = _ref.zOrigin,\n transforms = \"\",\n use3D = force3D === \"auto\" && ratio && ratio !== 1 || force3D === true; // Safari has a bug that causes it not to render 3D transform-origin values properly, so we force the z origin to 0, record it in the cache, and then do the math here to offset the translate values accordingly (basically do the 3D transform-origin part manually)\n\n\n if (zOrigin && (rotationX !== _zeroDeg || rotationY !== _zeroDeg)) {\n var angle = parseFloat(rotationY) * _DEG2RAD,\n a13 = Math.sin(angle),\n a33 = Math.cos(angle),\n cos;\n\n angle = parseFloat(rotationX) * _DEG2RAD;\n cos = Math.cos(angle);\n x = _addPxTranslate(target, x, a13 * cos * -zOrigin);\n y = _addPxTranslate(target, y, -Math.sin(angle) * -zOrigin);\n z = _addPxTranslate(target, z, a33 * cos * -zOrigin + zOrigin);\n }\n\n if (transformPerspective !== _zeroPx) {\n transforms += \"perspective(\" + transformPerspective + _endParenthesis;\n }\n\n if (xPercent || yPercent) {\n transforms += \"translate(\" + xPercent + \"%, \" + yPercent + \"%) \";\n }\n\n if (use3D || x !== _zeroPx || y !== _zeroPx || z !== _zeroPx) {\n transforms += z !== _zeroPx || use3D ? \"translate3d(\" + x + \", \" + y + \", \" + z + \") \" : \"translate(\" + x + \", \" + y + _endParenthesis;\n }\n\n if (rotation !== _zeroDeg) {\n transforms += \"rotate(\" + rotation + _endParenthesis;\n }\n\n if (rotationY !== _zeroDeg) {\n transforms += \"rotateY(\" + rotationY + _endParenthesis;\n }\n\n if (rotationX !== _zeroDeg) {\n transforms += \"rotateX(\" + rotationX + _endParenthesis;\n }\n\n if (skewX !== _zeroDeg || skewY !== _zeroDeg) {\n transforms += \"skew(\" + skewX + \", \" + skewY + _endParenthesis;\n }\n\n if (scaleX !== 1 || scaleY !== 1) {\n transforms += \"scale(\" + scaleX + \", \" + scaleY + _endParenthesis;\n }\n\n target.style[_transformProp] = transforms || \"translate(0, 0)\";\n},\n _renderSVGTransforms = function _renderSVGTransforms(ratio, cache) {\n var _ref2 = cache || this,\n xPercent = _ref2.xPercent,\n yPercent = _ref2.yPercent,\n x = _ref2.x,\n y = _ref2.y,\n rotation = _ref2.rotation,\n skewX = _ref2.skewX,\n skewY = _ref2.skewY,\n scaleX = _ref2.scaleX,\n scaleY = _ref2.scaleY,\n target = _ref2.target,\n xOrigin = _ref2.xOrigin,\n yOrigin = _ref2.yOrigin,\n xOffset = _ref2.xOffset,\n yOffset = _ref2.yOffset,\n forceCSS = _ref2.forceCSS,\n tx = parseFloat(x),\n ty = parseFloat(y),\n a11,\n a21,\n a12,\n a22,\n temp;\n\n rotation = parseFloat(rotation);\n skewX = parseFloat(skewX);\n skewY = parseFloat(skewY);\n\n if (skewY) {\n //for performance reasons, we combine all skewing into the skewX and rotation values. Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of 10 degrees.\n skewY = parseFloat(skewY);\n skewX += skewY;\n rotation += skewY;\n }\n\n if (rotation || skewX) {\n rotation *= _DEG2RAD;\n skewX *= _DEG2RAD;\n a11 = Math.cos(rotation) * scaleX;\n a21 = Math.sin(rotation) * scaleX;\n a12 = Math.sin(rotation - skewX) * -scaleY;\n a22 = Math.cos(rotation - skewX) * scaleY;\n\n if (skewX) {\n skewY *= _DEG2RAD;\n temp = Math.tan(skewX - skewY);\n temp = Math.sqrt(1 + temp * temp);\n a12 *= temp;\n a22 *= temp;\n\n if (skewY) {\n temp = Math.tan(skewY);\n temp = Math.sqrt(1 + temp * temp);\n a11 *= temp;\n a21 *= temp;\n }\n }\n\n a11 = _round(a11);\n a21 = _round(a21);\n a12 = _round(a12);\n a22 = _round(a22);\n } else {\n a11 = scaleX;\n a22 = scaleY;\n a21 = a12 = 0;\n }\n\n if (tx && !~(x + \"\").indexOf(\"px\") || ty && !~(y + \"\").indexOf(\"px\")) {\n tx = _convertToUnit(target, \"x\", x, \"px\");\n ty = _convertToUnit(target, \"y\", y, \"px\");\n }\n\n if (xOrigin || yOrigin || xOffset || yOffset) {\n tx = _round(tx + xOrigin - (xOrigin * a11 + yOrigin * a12) + xOffset);\n ty = _round(ty + yOrigin - (xOrigin * a21 + yOrigin * a22) + yOffset);\n }\n\n if (xPercent || yPercent) {\n //The SVG spec doesn't support percentage-based translation in the \"transform\" attribute, so we merge it into the translation to simulate it.\n temp = target.getBBox();\n tx = _round(tx + xPercent / 100 * temp.width);\n ty = _round(ty + yPercent / 100 * temp.height);\n }\n\n temp = \"matrix(\" + a11 + \",\" + a21 + \",\" + a12 + \",\" + a22 + \",\" + tx + \",\" + ty + \")\";\n target.setAttribute(\"transform\", temp);\n\n if (forceCSS) {\n //some browsers prioritize CSS transforms over the transform attribute. When we sense that the user has CSS transforms applied, we must overwrite them this way (otherwise some browser simply won't render the transform attribute changes!)\n target.style[_transformProp] = temp;\n }\n},\n _addRotationalPropTween = function _addRotationalPropTween(plugin, target, property, startNum, endValue, relative) {\n var cap = 360,\n isString = _isString(endValue),\n endNum = parseFloat(endValue) * (isString && ~endValue.indexOf(\"rad\") ? _RAD2DEG : 1),\n change = relative ? endNum * relative : endNum - startNum,\n finalValue = startNum + change + \"deg\",\n direction,\n pt;\n\n if (isString) {\n direction = endValue.split(\"_\")[1];\n\n if (direction === \"short\") {\n change %= cap;\n\n if (change !== change % (cap / 2)) {\n change += change < 0 ? cap : -cap;\n }\n }\n\n if (direction === \"cw\" && change < 0) {\n change = (change + cap * _bigNum) % cap - ~~(change / cap) * cap;\n } else if (direction === \"ccw\" && change > 0) {\n change = (change - cap * _bigNum) % cap - ~~(change / cap) * cap;\n }\n }\n\n plugin._pt = pt = new PropTween(plugin._pt, target, property, startNum, change, _renderPropWithEnd);\n pt.e = finalValue;\n pt.u = \"deg\";\n\n plugin._props.push(property);\n\n return pt;\n},\n _addRawTransformPTs = function _addRawTransformPTs(plugin, transforms, target) {\n //for handling cases where someone passes in a whole transform string, like transform: \"scale(2, 3) rotate(20deg) translateY(30em)\"\n var style = _tempDivStyler.style,\n startCache = target._gsap,\n exclude = \"perspective,force3D,transformOrigin,svgOrigin\",\n endCache,\n p,\n startValue,\n endValue,\n startNum,\n endNum,\n startUnit,\n endUnit;\n style.cssText = getComputedStyle(target).cssText + \";position:absolute;display:block;\"; //%-based translations will fail unless we set the width/height to match the original target (and padding/borders can affect it)\n\n style[_transformProp] = transforms;\n\n _doc.body.appendChild(_tempDivStyler);\n\n endCache = _parseTransform(_tempDivStyler, 1);\n\n for (p in _transformProps) {\n startValue = startCache[p];\n endValue = endCache[p];\n\n if (startValue !== endValue && exclude.indexOf(p) < 0) {\n //tweening to no perspective gives very unintuitive results - just keep the same perspective in that case.\n startUnit = getUnit(startValue);\n endUnit = getUnit(endValue);\n startNum = startUnit !== endUnit ? _convertToUnit(target, p, startValue, endUnit) : parseFloat(startValue);\n endNum = parseFloat(endValue);\n plugin._pt = new PropTween(plugin._pt, startCache, p, startNum, endNum - startNum, _renderCSSProp);\n plugin._pt.u = endUnit || 0;\n\n plugin._props.push(p);\n }\n }\n\n _doc.body.removeChild(_tempDivStyler);\n}; // handle splitting apart padding, margin, borderWidth, and borderRadius into their 4 components. Firefox, for example, won't report borderRadius correctly - it will only do borderTopLeftRadius and the other corners. We also want to handle paddingTop, marginLeft, borderRightWidth, etc.\n\n\n_forEachName(\"padding,margin,Width,Radius\", function (name, index) {\n var t = \"Top\",\n r = \"Right\",\n b = \"Bottom\",\n l = \"Left\",\n props = (index < 3 ? [t, r, b, l] : [t + l, t + r, b + r, b + l]).map(function (side) {\n return index < 2 ? name + side : \"border\" + side + name;\n });\n\n _specialProps[index > 1 ? \"border\" + name : name] = function (plugin, target, property, endValue, tween) {\n var a, vars;\n\n if (arguments.length < 4) {\n // getter, passed target, property, and unit (from _get())\n a = props.map(function (prop) {\n return _get(plugin, prop, property);\n });\n vars = a.join(\" \");\n return vars.split(a[0]).length === 5 ? a[0] : vars;\n }\n\n a = (endValue + \"\").split(\" \");\n vars = {};\n props.forEach(function (prop, i) {\n return vars[prop] = a[i] = a[i] || a[(i - 1) / 2 | 0];\n });\n plugin.init(target, vars, tween);\n };\n});\n\nexport var CSSPlugin = {\n name: \"css\",\n register: _initCore,\n targetTest: function targetTest(target) {\n return target.style && target.nodeType;\n },\n init: function init(target, vars, tween, index, targets) {\n var props = this._props,\n style = target.style,\n startValue,\n endValue,\n endNum,\n startNum,\n type,\n specialProp,\n p,\n startUnit,\n endUnit,\n relative,\n isTransformRelated,\n transformPropTween,\n cache,\n smooth,\n hasPriority;\n\n if (!_pluginInitted) {\n _initCore();\n }\n\n for (p in vars) {\n if (p === \"autoRound\") {\n continue;\n }\n\n endValue = vars[p];\n\n if (_plugins[p] && _checkPlugin(p, vars, tween, index, target, targets)) {\n //plugins\n continue;\n }\n\n type = typeof endValue;\n specialProp = _specialProps[p];\n\n if (type === \"function\") {\n endValue = endValue.call(tween, index, target, targets);\n type = typeof endValue;\n }\n\n if (type === \"string\" && ~endValue.indexOf(\"random(\")) {\n endValue = _replaceRandom(endValue);\n }\n\n if (specialProp) {\n if (specialProp(this, target, p, endValue, tween)) {\n hasPriority = 1;\n }\n } else if (p.substr(0, 2) === \"--\") {\n //CSS variable\n this.add(style, \"setProperty\", getComputedStyle(target).getPropertyValue(p) + \"\", endValue + \"\", index, targets, 0, 0, p);\n } else {\n startValue = _get(target, p);\n startNum = parseFloat(startValue);\n relative = type === \"string\" && endValue.charAt(1) === \"=\" ? +(endValue.charAt(0) + \"1\") : 0;\n\n if (relative) {\n endValue = endValue.substr(2);\n }\n\n endNum = parseFloat(endValue);\n\n if (p in _propertyAliases) {\n if (p === \"autoAlpha\") {\n //special case where we control the visibility along with opacity. We still allow the opacity value to pass through and get tweened.\n if (startNum === 1 && _get(target, \"visibility\") === \"hidden\" && endNum) {\n //if visibility is initially set to \"hidden\", we should interpret that as intent to make opacity 0 (a convenience)\n startNum = 0;\n }\n\n _addNonTweeningPT(this, style, \"visibility\", startNum ? \"inherit\" : \"hidden\", endNum ? \"inherit\" : \"hidden\", !endNum);\n }\n\n if (p !== \"scale\" && p !== \"transform\") {\n p = _propertyAliases[p];\n\n if (~p.indexOf(\",\")) {\n p = p.split(\",\")[0];\n }\n }\n }\n\n isTransformRelated = p in _transformProps; //--- TRANSFORM-RELATED ---\n\n if (isTransformRelated) {\n if (!transformPropTween) {\n cache = target._gsap;\n cache.renderTransform || _parseTransform(target); // if, for example, gsap.set(... {transform:\"translateX(50vw)\"}), the _get() call doesn't parse the transform, thus cache.renderTransform won't be set yet so force the parsing of the transform here.\n\n smooth = vars.smoothOrigin !== false && cache.smooth;\n transformPropTween = this._pt = new PropTween(this._pt, style, _transformProp, 0, 1, cache.renderTransform, cache, 0, -1); //the first time through, create the rendering PropTween so that it runs LAST (in the linked list, we keep adding to the beginning)\n\n transformPropTween.dep = 1; //flag it as dependent so that if things get killed/overwritten and this is the only PropTween left, we can safely kill the whole tween.\n }\n\n if (p === \"scale\") {\n this._pt = new PropTween(this._pt, cache, \"scaleY\", cache.scaleY, relative ? relative * endNum : endNum - cache.scaleY);\n props.push(\"scaleY\", p);\n p += \"X\";\n } else if (p === \"transformOrigin\") {\n endValue = _convertKeywordsToPercentages(endValue); //in case something like \"left top\" or \"bottom right\" is passed in. Convert to percentages.\n\n if (cache.svg) {\n _applySVGOrigin(target, endValue, 0, smooth, 0, this);\n } else {\n endUnit = parseFloat(endValue.split(\" \")[2]) || 0; //handle the zOrigin separately!\n\n if (endUnit !== cache.zOrigin) {\n _addNonTweeningPT(this, cache, \"zOrigin\", cache.zOrigin, endUnit);\n }\n\n _addNonTweeningPT(this, style, p, _firstTwoOnly(startValue), _firstTwoOnly(endValue));\n }\n\n continue;\n } else if (p === \"svgOrigin\") {\n _applySVGOrigin(target, endValue, 1, smooth, 0, this);\n\n continue;\n } else if (p in _rotationalProperties) {\n _addRotationalPropTween(this, cache, p, startNum, endValue, relative);\n\n continue;\n } else if (p === \"smoothOrigin\") {\n _addNonTweeningPT(this, cache, \"smooth\", cache.smooth, endValue);\n\n continue;\n } else if (p === \"force3D\") {\n cache[p] = endValue;\n continue;\n } else if (p === \"transform\") {\n _addRawTransformPTs(this, endValue, target);\n\n continue;\n }\n } else if (!(p in style)) {\n p = _checkPropPrefix(p) || p;\n }\n\n if (isTransformRelated || (endNum || endNum === 0) && (startNum || startNum === 0) && !_complexExp.test(endValue) && p in style) {\n startUnit = (startValue + \"\").substr((startNum + \"\").length);\n endNum || (endNum = 0); // protect against NaN\n\n endUnit = (endValue + \"\").substr((endNum + \"\").length) || (p in _config.units ? _config.units[p] : startUnit);\n\n if (startUnit !== endUnit) {\n startNum = _convertToUnit(target, p, startValue, endUnit);\n }\n\n this._pt = new PropTween(this._pt, isTransformRelated ? cache : style, p, startNum, relative ? relative * endNum : endNum - startNum, endUnit === \"px\" && vars.autoRound !== false && !isTransformRelated ? _renderRoundedCSSProp : _renderCSSProp);\n this._pt.u = endUnit || 0;\n\n if (startUnit !== endUnit) {\n //when the tween goes all the way back to the beginning, we need to revert it to the OLD/ORIGINAL value (with those units). We record that as a \"b\" (beginning) property and point to a render method that handles that. (performance optimization)\n this._pt.b = startValue;\n this._pt.r = _renderCSSPropWithBeginning;\n }\n } else if (!(p in style)) {\n if (p in target) {\n //maybe it's not a style - it could be a property added directly to an element in which case we'll try to animate that.\n this.add(target, p, target[p], endValue, index, targets);\n } else {\n _missingPlugin(p, endValue);\n\n continue;\n }\n } else {\n _tweenComplexCSSString.call(this, target, p, startValue, endValue);\n }\n\n props.push(p);\n }\n }\n\n if (hasPriority) {\n _sortPropTweensByPriority(this);\n }\n },\n get: _get,\n aliases: _propertyAliases,\n getSetter: function getSetter(target, property, plugin) {\n //returns a setter function that accepts target, property, value and applies it accordingly. Remember, properties like \"x\" aren't as simple as target.style.property = value because they've got to be applied to a proxy object and then merged into a transform string in a renderer.\n var p = _propertyAliases[property];\n p && p.indexOf(\",\") < 0 && (property = p);\n return property in _transformProps && property !== _transformOriginProp && (target._gsap.x || _get(target, \"x\")) ? plugin && _recentSetterPlugin === plugin ? property === \"scale\" ? _setterScale : _setterTransform : (_recentSetterPlugin = plugin || {}) && (property === \"scale\" ? _setterScaleWithRender : _setterTransformWithRender) : target.style && !_isUndefined(target.style[property]) ? _setterCSSStyle : ~property.indexOf(\"-\") ? _setterCSSProp : _getSetter(target, property);\n },\n core: {\n _removeProperty: _removeProperty,\n _getMatrix: _getMatrix\n }\n};\ngsap.utils.checkPrefix = _checkPropPrefix;\n\n(function (positionAndScale, rotation, others, aliases) {\n var all = _forEachName(positionAndScale + \",\" + rotation + \",\" + others, function (name) {\n _transformProps[name] = 1;\n });\n\n _forEachName(rotation, function (name) {\n _config.units[name] = \"deg\";\n _rotationalProperties[name] = 1;\n });\n\n _propertyAliases[all[13]] = positionAndScale + \",\" + rotation;\n\n _forEachName(aliases, function (name) {\n var split = name.split(\":\");\n _propertyAliases[split[1]] = all[split[0]];\n });\n})(\"x,y,z,scale,scaleX,scaleY,xPercent,yPercent\", \"rotation,rotationX,rotationY,skewX,skewY\", \"transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective\", \"0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY\");\n\n_forEachName(\"x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective\", function (name) {\n _config.units[name] = \"px\";\n});\n\ngsap.registerPlugin(CSSPlugin);\nexport { CSSPlugin as default, _getBBox, _createElement, _checkPropPrefix as checkPrefix };","import { gsap, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ, TweenLite, TimelineLite, TimelineMax } from \"./gsap-core.js\";\nimport { CSSPlugin } from \"./CSSPlugin.js\";\nvar gsapWithCSS = gsap.registerPlugin(CSSPlugin) || gsap,\n // to protect from tree shaking\nTweenMaxWithCSS = gsapWithCSS.core.Tween;\nexport { gsapWithCSS as gsap, gsapWithCSS as default, CSSPlugin, TweenMaxWithCSS as TweenMax, TweenLite, TimelineMax, TimelineLite, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ };","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.\n *\n * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n *\n */\n(function() {\n'use strict';\n\n// Exit early if we're not running in a browser.\nif (typeof window !== 'object') {\n return;\n}\n\n// Exit early if all IntersectionObserver and IntersectionObserverEntry\n// features are natively supported.\nif ('IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'intersectionRatio' in window.IntersectionObserverEntry.prototype) {\n\n // Minimal polyfill for Edge 15's lack of `isIntersecting`\n // See: https://github.com/w3c/IntersectionObserver/issues/211\n if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {\n Object.defineProperty(window.IntersectionObserverEntry.prototype,\n 'isIntersecting', {\n get: function () {\n return this.intersectionRatio > 0;\n }\n });\n }\n return;\n}\n\n/**\n * Returns the embedding frame element, if any.\n * @param {!Document} doc\n * @return {!Element}\n */\nfunction getFrameElement(doc) {\n try {\n return doc.defaultView && doc.defaultView.frameElement || null;\n } catch (e) {\n // Ignore the error.\n return null;\n }\n}\n\n/**\n * A local reference to the root document.\n */\nvar document = (function(startDoc) {\n var doc = startDoc;\n var frame = getFrameElement(doc);\n while (frame) {\n doc = frame.ownerDocument;\n frame = getFrameElement(doc);\n }\n return doc;\n})(window.document);\n\n/**\n * An IntersectionObserver registry. This registry exists to hold a strong\n * reference to IntersectionObserver instances currently observing a target\n * element. Without this registry, instances without another reference may be\n * garbage collected.\n */\nvar registry = [];\n\n/**\n * The signal updater for cross-origin intersection. When not null, it means\n * that the polyfill is configured to work in a cross-origin mode.\n * @type {function(DOMRect|ClientRect, DOMRect|ClientRect)}\n */\nvar crossOriginUpdater = null;\n\n/**\n * The current cross-origin intersection. Only used in the cross-origin mode.\n * @type {DOMRect|ClientRect}\n */\nvar crossOriginRect = null;\n\n\n/**\n * Creates the global IntersectionObserverEntry constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry\n * @param {Object} entry A dictionary of instance properties.\n * @constructor\n */\nfunction IntersectionObserverEntry(entry) {\n this.time = entry.time;\n this.target = entry.target;\n this.rootBounds = ensureDOMRect(entry.rootBounds);\n this.boundingClientRect = ensureDOMRect(entry.boundingClientRect);\n this.intersectionRect = ensureDOMRect(entry.intersectionRect || getEmptyRect());\n this.isIntersecting = !!entry.intersectionRect;\n\n // Calculates the intersection ratio.\n var targetRect = this.boundingClientRect;\n var targetArea = targetRect.width * targetRect.height;\n var intersectionRect = this.intersectionRect;\n var intersectionArea = intersectionRect.width * intersectionRect.height;\n\n // Sets intersection ratio.\n if (targetArea) {\n // Round the intersection ratio to avoid floating point math issues:\n // https://github.com/w3c/IntersectionObserver/issues/324\n this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4));\n } else {\n // If area is zero and is intersecting, sets to 1, otherwise to 0\n this.intersectionRatio = this.isIntersecting ? 1 : 0;\n }\n}\n\n\n/**\n * Creates the global IntersectionObserver constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface\n * @param {Function} callback The function to be invoked after intersection\n * changes have queued. The function is not invoked if the queue has\n * been emptied by calling the `takeRecords` method.\n * @param {Object=} opt_options Optional configuration options.\n * @constructor\n */\nfunction IntersectionObserver(callback, opt_options) {\n\n var options = opt_options || {};\n\n if (typeof callback != 'function') {\n throw new Error('callback must be a function');\n }\n\n if (\n options.root &&\n options.root.nodeType != 1 &&\n options.root.nodeType != 9\n ) {\n throw new Error('root must be a Document or Element');\n }\n\n // Binds and throttles `this._checkForIntersections`.\n this._checkForIntersections = throttle(\n this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT);\n\n // Private properties.\n this._callback = callback;\n this._observationTargets = [];\n this._queuedEntries = [];\n this._rootMarginValues = this._parseRootMargin(options.rootMargin);\n\n // Public properties.\n this.thresholds = this._initThresholds(options.threshold);\n this.root = options.root || null;\n this.rootMargin = this._rootMarginValues.map(function(margin) {\n return margin.value + margin.unit;\n }).join(' ');\n\n /** @private @const {!Array} */\n this._monitoringDocuments = [];\n /** @private @const {!Array} */\n this._monitoringUnsubscribes = [];\n}\n\n\n/**\n * The minimum interval within which the document will be checked for\n * intersection changes.\n */\nIntersectionObserver.prototype.THROTTLE_TIMEOUT = 100;\n\n\n/**\n * The frequency in which the polyfill polls for intersection changes.\n * this can be updated on a per instance basis and must be set prior to\n * calling `observe` on the first target.\n */\nIntersectionObserver.prototype.POLL_INTERVAL = null;\n\n/**\n * Use a mutation observer on the root element\n * to detect intersection changes.\n */\nIntersectionObserver.prototype.USE_MUTATION_OBSERVER = true;\n\n\n/**\n * Sets up the polyfill in the cross-origin mode. The result is the\n * updater function that accepts two arguments: `boundingClientRect` and\n * `intersectionRect` - just as these fields would be available to the\n * parent via `IntersectionObserverEntry`. This function should be called\n * each time the iframe receives intersection information from the parent\n * window, e.g. via messaging.\n * @return {function(DOMRect|ClientRect, DOMRect|ClientRect)}\n */\nIntersectionObserver._setupCrossOriginUpdater = function() {\n if (!crossOriginUpdater) {\n /**\n * @param {DOMRect|ClientRect} boundingClientRect\n * @param {DOMRect|ClientRect} intersectionRect\n */\n crossOriginUpdater = function(boundingClientRect, intersectionRect) {\n if (!boundingClientRect || !intersectionRect) {\n crossOriginRect = getEmptyRect();\n } else {\n crossOriginRect = convertFromParentRect(boundingClientRect, intersectionRect);\n }\n registry.forEach(function(observer) {\n observer._checkForIntersections();\n });\n };\n }\n return crossOriginUpdater;\n};\n\n\n/**\n * Resets the cross-origin mode.\n */\nIntersectionObserver._resetCrossOriginUpdater = function() {\n crossOriginUpdater = null;\n crossOriginRect = null;\n};\n\n\n/**\n * Starts observing a target element for intersection changes based on\n * the thresholds values.\n * @param {Element} target The DOM element to observe.\n */\nIntersectionObserver.prototype.observe = function(target) {\n var isTargetAlreadyObserved = this._observationTargets.some(function(item) {\n return item.element == target;\n });\n\n if (isTargetAlreadyObserved) {\n return;\n }\n\n if (!(target && target.nodeType == 1)) {\n throw new Error('target must be an Element');\n }\n\n this._registerInstance();\n this._observationTargets.push({element: target, entry: null});\n this._monitorIntersections(target.ownerDocument);\n this._checkForIntersections();\n};\n\n\n/**\n * Stops observing a target element for intersection changes.\n * @param {Element} target The DOM element to observe.\n */\nIntersectionObserver.prototype.unobserve = function(target) {\n this._observationTargets =\n this._observationTargets.filter(function(item) {\n return item.element != target;\n });\n this._unmonitorIntersections(target.ownerDocument);\n if (this._observationTargets.length == 0) {\n this._unregisterInstance();\n }\n};\n\n\n/**\n * Stops observing all target elements for intersection changes.\n */\nIntersectionObserver.prototype.disconnect = function() {\n this._observationTargets = [];\n this._unmonitorAllIntersections();\n this._unregisterInstance();\n};\n\n\n/**\n * Returns any queue entries that have not yet been reported to the\n * callback and clears the queue. This can be used in conjunction with the\n * callback to obtain the absolute most up-to-date intersection information.\n * @return {Array} The currently queued entries.\n */\nIntersectionObserver.prototype.takeRecords = function() {\n var records = this._queuedEntries.slice();\n this._queuedEntries = [];\n return records;\n};\n\n\n/**\n * Accepts the threshold value from the user configuration object and\n * returns a sorted array of unique threshold values. If a value is not\n * between 0 and 1 and error is thrown.\n * @private\n * @param {Array|number=} opt_threshold An optional threshold value or\n * a list of threshold values, defaulting to [0].\n * @return {Array} A sorted list of unique and valid threshold values.\n */\nIntersectionObserver.prototype._initThresholds = function(opt_threshold) {\n var threshold = opt_threshold || [0];\n if (!Array.isArray(threshold)) threshold = [threshold];\n\n return threshold.sort().filter(function(t, i, a) {\n if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) {\n throw new Error('threshold must be a number between 0 and 1 inclusively');\n }\n return t !== a[i - 1];\n });\n};\n\n\n/**\n * Accepts the rootMargin value from the user configuration object\n * and returns an array of the four margin values as an object containing\n * the value and unit properties. If any of the values are not properly\n * formatted or use a unit other than px or %, and error is thrown.\n * @private\n * @param {string=} opt_rootMargin An optional rootMargin value,\n * defaulting to '0px'.\n * @return {Array