From b0296841e92fe9d85019fbbfd14b20ce7c2ae917 Mon Sep 17 00:00:00 2001 From: KUNAAL MANGAL Date: Thu, 28 Sep 2023 23:12:20 +0530 Subject: [PATCH 01/14] AFrame CameraRig, Camera, Cursor, Controls, and Assets Loading fix --- app.js | 40849 ++++++++++++++++++++--- app.min.js | 601 +- data/museum-of-scientists.json | 1 - src/js/app/Components/navbar/Navbar.js | 8 +- src/js/app/views/aframe/AFrame copy.js | 623 + src/js/app/views/aframe/AFrame.js | 914 +- style.css | 516 +- vendor.js | 3 + 8 files changed, 38695 insertions(+), 4820 deletions(-) create mode 100644 src/js/app/views/aframe/AFrame copy.js diff --git a/app.js b/app.js index ccc9efa..8c08121 100644 --- a/app.js +++ b/app.js @@ -2,19 +2,49 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ 401: +/***/ "./node_modules/@remix-run/router/dist/router.js": +/*!*******************************************************!*\ + !*** ./node_modules/@remix-run/router/dist/router.js ***! + \*******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Z: () => (/* binding */ app) -}); - -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(294); -var react_namespaceObject = /*#__PURE__*/__webpack_require__.t(react, 2); -;// CONCATENATED MODULE: ./node_modules/@remix-run/router/dist/router.js +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AbortedDeferredError: () => (/* binding */ AbortedDeferredError), +/* harmony export */ Action: () => (/* binding */ Action), +/* harmony export */ ErrorResponse: () => (/* binding */ ErrorResponse), +/* harmony export */ IDLE_BLOCKER: () => (/* binding */ IDLE_BLOCKER), +/* harmony export */ IDLE_FETCHER: () => (/* binding */ IDLE_FETCHER), +/* harmony export */ IDLE_NAVIGATION: () => (/* binding */ IDLE_NAVIGATION), +/* harmony export */ UNSAFE_DEFERRED_SYMBOL: () => (/* binding */ UNSAFE_DEFERRED_SYMBOL), +/* harmony export */ UNSAFE_DeferredData: () => (/* binding */ DeferredData), +/* harmony export */ UNSAFE_convertRoutesToDataRoutes: () => (/* binding */ convertRoutesToDataRoutes), +/* harmony export */ UNSAFE_getPathContributingMatches: () => (/* binding */ getPathContributingMatches), +/* harmony export */ UNSAFE_invariant: () => (/* binding */ invariant), +/* harmony export */ UNSAFE_warning: () => (/* binding */ warning), +/* harmony export */ createBrowserHistory: () => (/* binding */ createBrowserHistory), +/* harmony export */ createHashHistory: () => (/* binding */ createHashHistory), +/* harmony export */ createMemoryHistory: () => (/* binding */ createMemoryHistory), +/* harmony export */ createPath: () => (/* binding */ createPath), +/* harmony export */ createRouter: () => (/* binding */ createRouter), +/* harmony export */ createStaticHandler: () => (/* binding */ createStaticHandler), +/* harmony export */ defer: () => (/* binding */ defer), +/* harmony export */ generatePath: () => (/* binding */ generatePath), +/* harmony export */ getStaticContextFromError: () => (/* binding */ getStaticContextFromError), +/* harmony export */ getToPathname: () => (/* binding */ getToPathname), +/* harmony export */ isDeferredData: () => (/* binding */ isDeferredData), +/* harmony export */ isRouteErrorResponse: () => (/* binding */ isRouteErrorResponse), +/* harmony export */ joinPaths: () => (/* binding */ joinPaths), +/* harmony export */ json: () => (/* binding */ json), +/* harmony export */ matchPath: () => (/* binding */ matchPath), +/* harmony export */ matchRoutes: () => (/* binding */ matchRoutes), +/* harmony export */ normalizePathname: () => (/* binding */ normalizePathname), +/* harmony export */ parsePath: () => (/* binding */ parsePath), +/* harmony export */ redirect: () => (/* binding */ redirect), +/* harmony export */ resolvePath: () => (/* binding */ resolvePath), +/* harmony export */ resolveTo: () => (/* binding */ resolveTo), +/* harmony export */ stripBasename: () => (/* binding */ stripBasename) +/* harmony export */ }); /** * @remix-run/router v1.7.0 * @@ -73,7 +103,7 @@ const PopStateEventType = "popstate"; * Memory history stores the current location in memory. It is designed for use * in stateful non-browser environments like tests and React Native. */ -function router_createMemoryHistory(options) { +function createMemoryHistory(options) { if (options === void 0) { options = {}; } @@ -102,7 +132,7 @@ function router_createMemoryHistory(options) { return location; } function createHref(to) { - return typeof to === "string" ? to : router_createPath(to); + return typeof to === "string" ? to : createPath(to); } let history = { get index() { @@ -180,7 +210,7 @@ function router_createMemoryHistory(options) { * * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory */ -function router_createBrowserHistory(options) { +function createBrowserHistory(options) { if (options === void 0) { options = {}; } @@ -199,7 +229,7 @@ function router_createBrowserHistory(options) { globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default"); } function createBrowserHref(window, to) { - return typeof to === "string" ? to : router_createPath(to); + return typeof to === "string" ? to : createPath(to); } return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options); } @@ -211,7 +241,7 @@ function router_createBrowserHistory(options) { * * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory */ -function router_createHashHistory(options) { +function createHashHistory(options) { if (options === void 0) { options = {}; } @@ -237,7 +267,7 @@ function router_createHashHistory(options) { let hashIndex = url.indexOf("#"); href = hashIndex === -1 ? url : url.slice(0, hashIndex); } - return href + "#" + (typeof to === "string" ? to : router_createPath(to)); + return href + "#" + (typeof to === "string" ? to : createPath(to)); } function validateHashLocation(location, to) { warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in hash history.push(" + JSON.stringify(to) + ")"); @@ -301,7 +331,7 @@ function createLocation(current, to, state, key) { /** * Creates a string URL path from the given pathname, search, and hash components. */ -function router_createPath(_ref) { +function createPath(_ref) { let { pathname = "/", search = "", @@ -424,7 +454,7 @@ function getUrlBasedHistory(getLocation, createHref, validateLocation, options) // under certain conditions, notably when serving from a local HTML file // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297 let base = window.location.origin !== "null" ? window.location.origin : window.location.href; - let href = typeof to === "string" ? to : router_createPath(to); + let href = typeof to === "string" ? to : createPath(to); invariant(base, "No window.location.(origin|href) available to create URL for href: " + href); return new URL(href, base); } @@ -523,7 +553,7 @@ function matchRoutes(routes, locationArg, basename) { basename = "/"; } let location = typeof locationArg === "string" ? parsePath(locationArg) : locationArg; - let pathname = router_stripBasename(location.pathname || "/", basename); + let pathname = stripBasename(location.pathname || "/", basename); if (pathname == null) { return null; } @@ -563,7 +593,7 @@ function flattenRoutes(routes, branches, parentsMeta, parentPath) { invariant(meta.relativePath.startsWith(parentPath), "Absolute route path \"" + meta.relativePath + "\" nested under path " + ("\"" + parentPath + "\" is not valid. An absolute child route path ") + "must start with the combined path of all its parent routes."); meta.relativePath = meta.relativePath.slice(parentPath.length); } - let path = router_joinPaths([parentPath, meta.relativePath]); + let path = joinPaths([parentPath, meta.relativePath]); let routesMeta = parentsMeta.concat(meta); // Add the children before adding this route to the array so we traverse the // route tree depth-first and child routes appear before their parents in @@ -688,7 +718,7 @@ function matchRouteBranch(branch, pathname) { let meta = routesMeta[i]; let end = i === routesMeta.length - 1; let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/"; - let match = router_matchPath({ + let match = matchPath({ path: meta.relativePath, caseSensitive: meta.caseSensitive, end @@ -699,12 +729,12 @@ function matchRouteBranch(branch, pathname) { matches.push({ // TODO: Can this as be avoided? params: matchedParams, - pathname: router_joinPaths([matchedPathname, match.pathname]), - pathnameBase: normalizePathname(router_joinPaths([matchedPathname, match.pathnameBase])), + pathname: joinPaths([matchedPathname, match.pathname]), + pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])), route }); if (match.pathnameBase !== "/") { - matchedPathname = router_joinPaths([matchedPathname, match.pathnameBase]); + matchedPathname = joinPaths([matchedPathname, match.pathnameBase]); } } return matches; @@ -754,7 +784,7 @@ function generatePath(originalPath, params) { * * @see https://reactrouter.com/utils/match-path */ -function router_matchPath(pattern, pathname) { +function matchPath(pattern, pathname) { if (typeof pattern === "string") { pattern = { path: pattern, @@ -840,7 +870,7 @@ function safelyDecodeURIComponent(value, paramName) { /** * @private */ -function router_stripBasename(pathname, basename) { +function stripBasename(pathname, basename) { if (basename === "/") return pathname; if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) { return null; @@ -921,7 +951,7 @@ function getPathContributingMatches(matches) { /** * @private */ -function router_resolveTo(toArg, routePathnames, locationPathname, isPathRelative) { +function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) { if (isPathRelative === void 0) { isPathRelative = false; } @@ -985,7 +1015,7 @@ function getToPathname(to) { /** * @private */ -const router_joinPaths = paths => paths.join("/").replace(/\/\/+/g, "/"); +const joinPaths = paths => paths.join("/").replace(/\/\/+/g, "/"); /** * @private */ @@ -1228,7 +1258,7 @@ const IDLE_FETCHER = { json: undefined, text: undefined }; -const router_IDLE_BLOCKER = { +const IDLE_BLOCKER = { state: "unblocked", proceed: undefined, reset: undefined, @@ -1245,7 +1275,7 @@ const defaultMapRouteProperties = route => ({ /** * Create a router and listen to history POP navigations */ -function router_createRouter(init) { +function createRouter(init) { const routerWindow = init.window ? init.window : typeof window !== "undefined" ? window : undefined; const isBrowser = typeof routerWindow !== "undefined" && typeof routerWindow.document !== "undefined" && typeof routerWindow.document.createElement !== "undefined"; const isServer = !isBrowser; @@ -1421,7 +1451,7 @@ function router_createRouter(init) { }, reset() { let blockers = new Map(state.blockers); - blockers.set(blockerKey, router_IDLE_BLOCKER); + blockers.set(blockerKey, IDLE_BLOCKER); updateState({ blockers }); @@ -1582,7 +1612,7 @@ function router_createRouter(init) { }, reset() { let blockers = new Map(state.blockers); - blockers.set(blockerKey, router_IDLE_BLOCKER); + blockers.set(blockerKey, IDLE_BLOCKER); updateState({ blockers }); @@ -2213,7 +2243,7 @@ function router_createRouter(init) { // Check if this an absolute external redirect that goes to a new origin if (ABSOLUTE_URL_REGEX.test(redirect.location) && isBrowser) { let url = init.history.createURL(redirect.location); - let isDifferentBasename = router_stripBasename(url.pathname, basename) == null; + let isDifferentBasename = stripBasename(url.pathname, basename) == null; if (routerWindow.location.origin !== url.origin || isDifferentBasename) { if (replace) { routerWindow.location.replace(redirect.location); @@ -2368,7 +2398,7 @@ function router_createRouter(init) { return yeetedKeys.length > 0; } function getBlocker(key, fn) { - let blocker = state.blockers.get(key) || router_IDLE_BLOCKER; + let blocker = state.blockers.get(key) || IDLE_BLOCKER; if (blockerFunctions.get(key) !== fn) { blockerFunctions.set(key, fn); } @@ -2380,7 +2410,7 @@ function router_createRouter(init) { } // Utility function to update blockers, ensuring valid state transitions function updateBlocker(key, newBlocker) { - let blocker = state.blockers.get(key) || router_IDLE_BLOCKER; + let blocker = state.blockers.get(key) || IDLE_BLOCKER; // Poor mans state machine :) // https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM invariant(blocker.state === "unblocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "proceeding" || blocker.state === "blocked" && newBlocker.state === "unblocked" || blocker.state === "proceeding" && newBlocker.state === "unblocked", "Invalid blocker state transition: " + blocker.state + " -> " + newBlocker.state); @@ -2567,7 +2597,7 @@ function createStaticHandler(routes, opts) { } = _temp2 === void 0 ? {} : _temp2; let url = new URL(request.url); let method = request.method; - let location = createLocation("", router_createPath(url), null, "default"); + let location = createLocation("", createPath(url), null, "default"); let matches = matchRoutes(dataRoutes, location, basename); // SSR supports HEAD requests while SPA doesn't if (!isValidMethod(method) && method !== "HEAD") { @@ -2654,7 +2684,7 @@ function createStaticHandler(routes, opts) { } = _temp3 === void 0 ? {} : _temp3; let url = new URL(request.url); let method = request.method; - let location = createLocation("", router_createPath(url), null, "default"); + let location = createLocation("", createPath(url), null, "default"); let matches = matchRoutes(dataRoutes, location, basename); // SSR supports HEAD requests while SPA doesn't if (!isValidMethod(method) && method !== "HEAD" && method !== "OPTIONS") { @@ -2936,7 +2966,7 @@ function normalizeTo(location, matches, basename, prependBasename, to, fromRoute activeRouteMatch = matches[matches.length - 1]; } // Resolve the relative path - let path = router_resolveTo(to ? to : ".", getPathContributingMatches(contextualMatches).map(m => m.pathnameBase), router_stripBasename(location.pathname, basename) || location.pathname, relative === "path"); + let path = resolveTo(to ? to : ".", getPathContributingMatches(contextualMatches).map(m => m.pathnameBase), stripBasename(location.pathname, basename) || location.pathname, relative === "path"); // When `to` is not specified we inherit search/hash from the current // location, unlike when to="." and we just inherit the path. // See https://github.com/remix-run/remix/issues/927 @@ -2953,9 +2983,9 @@ function normalizeTo(location, matches, basename, prependBasename, to, fromRoute // the basename to have full control over the presence of a trailing slash // on root actions if (prependBasename && basename !== "/") { - path.pathname = path.pathname === "/" ? basename : router_joinPaths([basename, path.pathname]); + path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]); } - return router_createPath(path); + return createPath(path); } // Normalize navigation options by converting formMethod=GET formData objects to // URLSearchParams so they behave identically to links with query params @@ -3077,7 +3107,7 @@ function normalizeNavigateOptions(normalizeFormMethod, isFetcher, path, opts) { } parsedPath.search = "?" + searchParams; return { - path: router_createPath(parsedPath), + path: createPath(parsedPath), submission }; } @@ -3357,7 +3387,7 @@ async function callLoaderOrAction(type, request, match, matches, manifest, mapRo // browser as-is let currentUrl = new URL(request.url); let url = location.startsWith("//") ? new URL(currentUrl.protocol + location) : new URL(location); - let isSameBasename = router_stripBasename(url.pathname, basename) != null; + let isSameBasename = stripBasename(url.pathname, basename) != null; if (url.origin === currentUrl.origin && isSameBasename) { location = url.pathname + url.search + url.hash; } @@ -3681,7 +3711,7 @@ function findRedirect(results) { } function stripHashFromPath(path) { let parsedPath = typeof path === "string" ? parsePath(path) : path; - return router_createPath(_extends({}, parsedPath, { + return createPath(_extends({}, parsedPath, { hash: "" })); } @@ -3962,4179 +3992,37356 @@ function getDoneFetcher(data) { //# sourceMappingURL=router.js.map -;// CONCATENATED MODULE: ./node_modules/react-router/dist/index.js -/** - * React Router v6.14.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */ +/***/ }), + +/***/ "./src/js/app/app.js": +/*!***************************!*\ + !*** ./src/js/app/app.js ***! + \***************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/dist/index.js"); +/* harmony import */ var _config_appConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./config/appConfig */ "./src/js/app/config/appConfig.js"); +/* harmony import */ var _routes_routes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./routes/routes */ "./src/js/app/routes/routes.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./src/js/app/utils/index.js"); +/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components */ "./src/js/app/components/index.js"); -function dist_extends() { - dist_extends = Object.assign ? Object.assign.bind() : function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } + + + + +const App = () => { + const base_url = _config_appConfig__WEBPACK_IMPORTED_MODULE_1__.AppConfig.SITE_URL; + const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true); + const [activeLanguages, setActiveLanguages] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]); + const [menuData, setMenuData] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]); + const [lang, setLang] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]); + (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { + console.log("app config", _config_appConfig__WEBPACK_IMPORTED_MODULE_1__.AppConfig); + getActiveLanguages(); + getMenuData(); + }, [lang]); + const getActiveLanguages = async () => { + let SITE_ACTIVE_PLUGINS = _config_appConfig__WEBPACK_IMPORTED_MODULE_1__.AppConfig.SITE_ACTIVE_PLUGINS; + let wpml = "sitepress-multilingual-cms/sitepress.php"; + if (!SITE_ACTIVE_PLUGINS.includes(wpml)) { + setActiveLanguages(); + } else { + const url = `${base_url}/wp-json/wpml/v1/active_languages`; + await fetch(url).then(response => response.json()).then(result => { + setActiveLanguages(result); + }).catch(error => { + console.log("Error when getting ActiveLanguages data", error); + }); } - return target; }; - return dist_extends.apply(this, arguments); -} - -// Create react-specific types from the agnostic types in @remix-run/router to -// export from react-router -const DataRouterContext = /*#__PURE__*/react.createContext(null); -if (false) {} -const DataRouterStateContext = /*#__PURE__*/react.createContext(null); -if (false) {} -const AwaitContext = /*#__PURE__*/react.createContext(null); -if (false) {} + const getMenuData = async () => { + const url = `${base_url}/${lang}/wp-json/wp/v2/menus?menus`; + await fetch(url).then(response => response.json()).then(result => { + console.log("menusdata...", result); + setMenuData(result); + setLoading(false); + }).catch(error => { + console.log("Error when getting menu data", error); + }); + }; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, loading ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components__WEBPACK_IMPORTED_MODULE_4__.AppLoader, null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils__WEBPACK_IMPORTED_MODULE_3__.DataContext.Provider, { + value: { + activeLanguages: activeLanguages, + setActiveLanguages: setActiveLanguages, + menuData: menuData, + setMenuData: setMenuData, + lang: lang, + setLang: setLang + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_5__.RouterProvider, { + router: _routes_routes__WEBPACK_IMPORTED_MODULE_2__["default"] + }))); +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (App); -/** - * A Navigator is a "location changer"; it's how you get to different locations. - * - * Every history instance conforms to the Navigator interface, but the - * distinction is useful primarily when it comes to the low-level API - * where both the location and a navigator must be provided separately in order - * to avoid "tearing" that may occur in a suspense-enabled app if the action - * and/or location were to be read directly from the history instance. - */ +/***/ }), -const NavigationContext = /*#__PURE__*/react.createContext(null); -if (false) {} -const LocationContext = /*#__PURE__*/react.createContext(null); -if (false) {} -const RouteContext = /*#__PURE__*/react.createContext({ - outlet: null, - matches: [], - isDataRoute: false -}); -if (false) {} -const RouteErrorContext = /*#__PURE__*/react.createContext(null); -if (false) {} +/***/ "./src/js/app/components/footer/Footer.js": +/*!************************************************!*\ + !*** ./src/js/app/components/footer/Footer.js ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -/** - * Returns the full href for the given "to" value. This is useful for building - * custom links that are also accessible and preserve right-click behavior. - * - * @see https://reactrouter.com/hooks/use-href - */ -function useHref(to, _temp) { - let { - relative - } = _temp === void 0 ? {} : _temp; - !useInRouterContext() ? false ? 0 : invariant(false) : void 0; - let { - basename, - navigator - } = react.useContext(NavigationContext); - let { - hash, - pathname, - search - } = dist_useResolvedPath(to, { - relative - }); - let joinedPathname = pathname; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/dist/index.js"); +/* harmony import */ var _scss_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../scss/style.scss */ "./src/scss/style.scss"); +/* harmony import */ var _config_appConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config/appConfig */ "./src/js/app/config/appConfig.js"); - // If we're operating within a basename, prepend it to the pathname prior - // to creating the href. If this is a root navigation, then just use the raw - // basename which allows the basename to have full control over the presence - // of a trailing slash on root links - if (basename !== "/") { - joinedPathname = pathname === "/" ? basename : router_joinPaths([basename, pathname]); - } - return navigator.createHref({ - pathname: joinedPathname, - search, - hash - }); -} -/** - * Returns true if this component is a descendant of a . - * - * @see https://reactrouter.com/hooks/use-in-router-context - */ -function useInRouterContext() { - return react.useContext(LocationContext) != null; -} -/** - * Returns the current location object, which represents the current URL in web - * browsers. - * - * Note: If you're using this it may mean you're doing some of your own - * "routing" in your app, and we'd like to know what your use case is. We may - * be able to provide something higher-level to better suit your needs. - * - * @see https://reactrouter.com/hooks/use-location - */ -function dist_useLocation() { - !useInRouterContext() ? false ? 0 : invariant(false) : void 0; - return react.useContext(LocationContext).location; -} -/** - * Returns the current navigation action which describes how the router came to - * the current location, either by a pop, push, or replace on the history stack. - * - * @see https://reactrouter.com/hooks/use-navigation-type - */ -function useNavigationType() { - return React.useContext(LocationContext).navigationType; -} +const Footer = () => { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("footer", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "container" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "d-flex justify-content-between py-4 my-4 border-top" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, "\xA9 2023", _config_appConfig__WEBPACK_IMPORTED_MODULE_2__.AppConfig.SITE_TITLE ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, " ", _config_appConfig__WEBPACK_IMPORTED_MODULE_2__.AppConfig.SITE_TITLE) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, " Site Title "), ". All rights reserved."), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", { + className: "list-unstyled d-flex" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { + className: "ms-3" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__.Link, { + className: "link-light", + href: "https://twitter.com/webxrawards", + rel: "noreferrer", + target: "_blank" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { + className: "dropdown__logo-img" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("i", { + className: "fa-brands fa-twitter fa-xl" + })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { + className: "ms-3" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__.Link, { + className: "link-light", + href: "https://www.instagram.com/webxrawards/", + rel: "noreferrer", + target: "_blank" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { + className: "dropdown__logo-img" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("i", { + className: "fa-brands fa-instagram fa-xl" + })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { + className: "ms-3" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__.Link, { + className: "link-light", + href: "https://www.facebook.com/groups/webxrawards", + rel: "noreferrer", + target: "_blank" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { + className: "dropdown__logo-img" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("i", { + className: "fa-brands fa-facebook fa-xl" + })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { + className: "ms-3" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__.Link, { + className: "link-light", + href: "https://www.linkedin.com/company/the-polys/", + rel: "noreferrer", + target: "_blank" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { + className: "dropdown__logo-img" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("i", { + className: "fa-brands fa-linkedin fa-xl" + })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { + className: "ms-3" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__.Link, { + className: "link-light", + href: "https://discord.gg/T5vRuM5cDS", + rel: "noreferrer", + target: "_blank" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { + className: "dropdown__logo-img" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("i", { + className: "fa-brands fa-discord fa-xl" + })))))))); +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Footer); -/** - * Returns a PathMatch object if the given pattern matches the current URL. - * This is useful for components that need to know "active" state, e.g. - * . - * - * @see https://reactrouter.com/hooks/use-match - */ -function useMatch(pattern) { - !useInRouterContext() ? false ? 0 : UNSAFE_invariant(false) : void 0; - let { - pathname - } = dist_useLocation(); - return React.useMemo(() => matchPath(pattern, pathname), [pathname, pattern]); -} +/***/ }), -/** - * The interface for the navigate() function returned from useNavigate(). - */ +/***/ "./src/js/app/components/header/Header.js": +/*!************************************************!*\ + !*** ./src/js/app/components/header/Header.js ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -const navigateEffectWarning = (/* unused pure expression or super */ null && ("You should call navigate() in a React.useEffect(), not when " + "your component is first rendered.")); +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/dist/index.js"); +/* harmony import */ var _scss_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../scss/style.scss */ "./src/scss/style.scss"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./src/js/app/utils/index.js"); +/* harmony import */ var _config_appConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config/appConfig */ "./src/js/app/config/appConfig.js"); -// Mute warnings for calls to useNavigate in SSR environments -function useIsomorphicLayoutEffect(cb) { - let isStatic = react.useContext(NavigationContext).static; - if (!isStatic) { - // We should be able to get rid of this once react 18.3 is released - // See: https://github.com/facebook/react/pull/26395 - // eslint-disable-next-line react-hooks/rules-of-hooks - react.useLayoutEffect(cb); - } -} -/** - * Returns an imperative method for changing the location. Used by s, but - * may also be used by other elements to change the location. - * - * @see https://reactrouter.com/hooks/use-navigate - */ -function dist_useNavigate() { - let { - isDataRoute - } = react.useContext(RouteContext); - // Conditional usage is OK here because the usage of a data router is static - // eslint-disable-next-line react-hooks/rules-of-hooks - return isDataRoute ? useNavigateStable() : useNavigateUnstable(); -} -function useNavigateUnstable() { - !useInRouterContext() ? false ? 0 : invariant(false) : void 0; - let dataRouterContext = react.useContext(DataRouterContext); - let { - basename, - navigator - } = react.useContext(NavigationContext); - let { - matches - } = react.useContext(RouteContext); - let { - pathname: locationPathname - } = dist_useLocation(); - let routePathnamesJson = JSON.stringify(getPathContributingMatches(matches).map(match => match.pathnameBase)); - let activeRef = react.useRef(false); - useIsomorphicLayoutEffect(() => { - activeRef.current = true; - }); - let navigate = react.useCallback(function (to, options) { - if (options === void 0) { - options = {}; - } - false ? 0 : void 0; - // Short circuit here since if this happens on first render the navigate - // is useless because we haven't wired up our history listener yet - if (!activeRef.current) return; - if (typeof to === "number") { - navigator.go(to); - return; - } - let path = router_resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path"); - // If we're operating within a basename, prepend it to the pathname prior - // to handing off to history (but only if we're not in a data router, - // otherwise it'll prepend the basename inside of the router). - // If this is a root navigation, then we navigate to the raw basename - // which allows the basename to have full control over the presence of a - // trailing slash on root links - if (dataRouterContext == null && basename !== "/") { - path.pathname = path.pathname === "/" ? basename : router_joinPaths([basename, path.pathname]); - } - (!!options.replace ? navigator.replace : navigator.push)(path, options.state, options); - }, [basename, navigator, routePathnamesJson, locationPathname, dataRouterContext]); - return navigate; -} -const OutletContext = /*#__PURE__*/react.createContext(null); -/** - * Returns the context (if provided) for the child route at this level of the route - * hierarchy. - * @see https://reactrouter.com/hooks/use-outlet-context +const Header = () => { + const [mainMenus, setMainMenus] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]); + const [parentMenus, setParentMenus] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]); + const [childMenus, setChildMenus] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]); + const { + activeLanguages, + menuData, + lang, + setLang + } = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_utils__WEBPACK_IMPORTED_MODULE_2__.DataContext); + (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => { + menuData.filter(item => { + if ((item === null || item === void 0 ? void 0 : item.slug) == "main-menu") { + var _item$items; + setMainMenus(item === null || item === void 0 ? void 0 : item.items); + item === null || item === void 0 ? void 0 : (_item$items = item.items) === null || _item$items === void 0 ? void 0 : _item$items.map(menuItem => { + let parent = []; + let child = []; + if ((menuItem === null || menuItem === void 0 ? void 0 : menuItem.menu_item_parent) === "0") { + parent.push(menuItem); + // console.log("Parent menu", parent); + setParentMenus(parent); + } else { + child.push(menuItem); + // console.log("child menu", child); + setChildMenus(child); + } + }); + } + }); + }, [menuData, lang]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("header", { + className: "App-header" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "App-header-left" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.Link, { + className: "", + to: "/" + }, (_config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig === null || _config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig === void 0 ? void 0 : _config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig.SITE_CUSTOM_LOGO) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "App-logo" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("img", { + src: _config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig === null || _config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig === void 0 ? void 0 : _config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig.SITE_CUSTOM_LOGO[0], + alt: "logo" + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "App-title" + }, _config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig.SITE_TITLE ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h4", { + className: "title-head" + }, " ", _config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig.SITE_TITLE) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h4", { + className: "title-head" + }, " Site Title ")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "App-header-right d-flex flex-row-reverse " + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("nav", { + className: "navbar navbar-expand-lg navbar-dark " + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "container-fluid navbar-container " + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "navbar-toggler", + type: "button", + "data-bs-toggle": "collapse", + "data-bs-target": "#navbarToggleBtn", + "aria-controls": "navbarToggleBtn", + "aria-expanded": "false", + "aria-label": "Toggle navigation" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { + className: "navbar-toggler-icon" + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "collapse navbar-collapse", + id: "navbarToggleBtn" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", { + className: "navbar-nav me-auto mb-2 mb-lg-0 " + }, /* The main dropdown menu items of the Navbar */mainMenus === null || mainMenus === void 0 ? void 0 : mainMenus.map((menusItem, index) => { + let parnetMenuID = menusItem === null || menusItem === void 0 ? void 0 : menusItem.menu_item_parent; + let childMenu = []; + return parnetMenuID === "0" && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { + className: "nav-item dropdown ", + key: index + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.Link, { + className: "dropdownbtn nav-link active", + to: menusItem === null || menusItem === void 0 ? void 0 : menusItem.url + }, menusItem === null || menusItem === void 0 ? void 0 : menusItem.title), parnetMenuID !== "0" && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", { + className: "dropdown-menu dropdown__content" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { + className: "nav-item" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.Link, { + className: "dropdown-item", + href: "#" + }, menusItem === null || menusItem === void 0 ? void 0 : menusItem.title)))); + }), /* The activeLanguages items of the Navbar */ + activeLanguages && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { + className: "nav-item dropdown " + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.Link, { + className: "dropdownbtn nav-link active", + to: "#" + }, "Languages"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", { + className: "dropdown-menu dropdown__content" + }, activeLanguages === null || activeLanguages === void 0 ? void 0 : activeLanguages.map((item, index) => { + let code = item === null || item === void 0 ? void 0 : item.code; + if (code == "en") { + code = ""; + } + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { + className: "nav-item", + key: index + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { + className: "dropdown-item", + onClick: () => setLang(`${code}`) + }, item === null || item === void 0 ? void 0 : item.native_name)); + }))))))))); +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Header); + +/***/ }), + +/***/ "./src/js/app/components/index.js": +/*!****************************************!*\ + !*** ./src/js/app/components/index.js ***! + \****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AppLoader: () => (/* reexport safe */ _loader_AppLoader__WEBPACK_IMPORTED_MODULE_0__["default"]), +/* harmony export */ Footer: () => (/* reexport safe */ _footer_Footer__WEBPACK_IMPORTED_MODULE_3__["default"]), +/* harmony export */ Header: () => (/* reexport safe */ _header_Header__WEBPACK_IMPORTED_MODULE_4__["default"]), +/* harmony export */ Navbar: () => (/* reexport safe */ _navbar_Navbar__WEBPACK_IMPORTED_MODULE_1__["default"]), +/* harmony export */ Sidebar: () => (/* reexport safe */ _sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_2__["default"]) +/* harmony export */ }); +/* harmony import */ var _loader_AppLoader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./loader/AppLoader */ "./src/js/app/components/loader/AppLoader.js"); +/* harmony import */ var _navbar_Navbar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./navbar/Navbar */ "./src/js/app/components/navbar/Navbar.js"); +/* harmony import */ var _sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sidebar/Sidebar */ "./src/js/app/components/sidebar/Sidebar.js"); +/* harmony import */ var _footer_Footer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./footer/Footer */ "./src/js/app/components/footer/Footer.js"); +/* harmony import */ var _header_Header__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./header/Header */ "./src/js/app/components/header/Header.js"); + + + + + + + +/***/ }), + +/***/ "./src/js/app/components/loader/AppLoader.js": +/*!***************************************************!*\ + !*** ./src/js/app/components/loader/AppLoader.js ***! + \***************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _scss_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../scss/style.scss */ "./src/scss/style.scss"); + + +const AppLoader = () => { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "App-Loader container" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h1", { + className: "h1 text-center" + }, "Loading!")); +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AppLoader); + +/***/ }), + +/***/ "./src/js/app/components/navbar/Navbar.js": +/*!************************************************!*\ + !*** ./src/js/app/components/navbar/Navbar.js ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/dist/index.js"); +/* harmony import */ var _scss_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../scss/style.scss */ "./src/scss/style.scss"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./src/js/app/utils/index.js"); +/* harmony import */ var _config_appConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config/appConfig */ "./src/js/app/config/appConfig.js"); + + + + + +const Navbar = () => { + const { + activeLanguages, + menuData, + lang, + setLang + } = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_utils__WEBPACK_IMPORTED_MODULE_2__.DataContext); + const [showMenu, setShowMenu] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false); + const [navbarMenus, setNavbarMenus] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]); + const [c2IDs, setC2IDs] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]); + const [hoveredIndex, setHoveredIndex] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(-1); + const [navbarData, setNavbarData] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]); + + // The useEffect hook is used to call the getData function once when the component is mounted. + (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { + settingMenuData(); + }, [menuData, lang]); + function formatNames(name) { + let allWords = name.toLowerCase().split(" "); + for (let i = 0; i < allWords.length; i++) { + allWords[i] = allWords[i][0].toUpperCase() + allWords[i].substr(1); + } + let formattedName = allWords.join(" "); + return formattedName; + } + function settingMenuData() { + let items; + menuData.filter(item => { + if ((item === null || item === void 0 ? void 0 : item.slug) === "main-menu") { + items = item === null || item === void 0 ? void 0 : item.items; + } + }); + console.log("main menus", items); + const parents = {}; + const children = []; + const grandchildren = []; + items.forEach(item => { + const { + ID, + menu_item_parent + } = item; + if (menu_item_parent === "0") { + parents[ID] = { + ...item, + childItems: [] + }; + } else if (parents[menu_item_parent]) { + children.push(item); + } else { + grandchildren.push(item); + } + }); + children.forEach(child => { + const { + menu_item_parent + } = child; + if (parents[menu_item_parent]) { + parents[menu_item_parent].childItems.push(child); + } + }); + grandchildren.forEach(grandchild => { + const { + menu_item_parent + } = grandchild; + let parent = Object.values(parents); + parent = parent.find(parent => parent.childItems.filter(child => child.ID === menu_item_parent)); + if (parent) { + const child = parent.childItems.find(child => child.ID == menu_item_parent); + if (child) { + child.childItems = child.childItems || []; + child.childItems.push(grandchild); + } + } + }); + const navbarData2 = Object.values(parents).map(parent => parent).map(child => child).map(gcc => gcc); + setNavbarData(navbarData2); + } + + /** + * This is a functional React component that returns a Navbar. + */ + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("header", { + className: "App-header" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "App-header-left" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.Link, { + className: "", + to: "/" + }, (_config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig === null || _config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig === void 0 ? void 0 : _config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig.SITE_CUSTOM_LOGO) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "App-logo" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("img", { + src: _config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig === null || _config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig === void 0 ? void 0 : _config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig.SITE_CUSTOM_LOGO[0], + alt: "logo" + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "App-title" + }, _config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig.SITE_TITLE ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h4", { + className: "title-head" + }, " ", _config_appConfig__WEBPACK_IMPORTED_MODULE_3__.AppConfig.SITE_TITLE) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h4", { + className: "title-head" + }, " Site Title ")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("nav", { + className: "navbar" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "navbar-right" + }, navbarData && (navbarData === null || navbarData === void 0 ? void 0 : navbarData.map((currNavBarItem, i) => { + let title = currNavBarItem === null || currNavBarItem === void 0 ? void 0 : currNavBarItem.title; + let titleUrl = currNavBarItem === null || currNavBarItem === void 0 ? void 0 : currNavBarItem.url; + let childItems = currNavBarItem === null || currNavBarItem === void 0 ? void 0 : currNavBarItem.childItems; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "dropdown", + key: i + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.NavLink, { + to: titleUrl + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "dropbtn" + }, title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "dropdown__content" + }, childItems.map((menu, i) => { + const { + title, + url, + childItems: nestedChildItems + } = menu; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.NavLink, { + className: "dropdown__items", + key: i, + to: url + }, formatNames(title), nestedChildItems && nestedChildItems.length > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "n2" + }, nestedChildItems.map((cur, i) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.NavLink, { + to: cur.url, + className: "dropdown__items d2", + key: i + }, cur === null || cur === void 0 ? void 0 : cur.title)))); + }))); + })), /* The Language Section of Navbar*/ + (activeLanguages === null || activeLanguages === void 0 ? void 0 : activeLanguages.length) > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "dropdown" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "dropbtn" + }, " Languages "), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "dropdown__content" + }, activeLanguages === null || activeLanguages === void 0 ? void 0 : activeLanguages.map(currLang => { + let cLang = currLang.native_name; + let code = currLang.code; + if (code == "en") { + code = ""; + } + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { + onClick: () => setLang(`${code}`), + key: code, + className: "dropdown__items" + }, cLang); + }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "hamburger" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { + className: "hamburger__logo", + onClick: () => { + setShowMenu(!showMenu); + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("i", { + className: "fa-solid fa-bars fa-xl" + }))), showMenu === true && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "sideMenu" + }, navbarData ? navbarData === null || navbarData === void 0 ? void 0 : navbarData.map(currNavBarItem => { + let title = currNavBarItem === null || currNavBarItem === void 0 ? void 0 : currNavBarItem.title; + let childItems = currNavBarItem.childItems; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "dropdown2", + key: currNavBarItem + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "dropbtn" + }, title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "dropdown__content" + }, childItems.map((menu, i) => { + const { + title, + url + } = menu; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.NavLink, { + className: "dropdown__items", + key: title, + to: url + }, formatNames(title)); + }))); + }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null), navbarData && navbarData.map((currEle, i) => { + let { + head, + childItems, + nestedItems + } = currEle; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "dropdown2", + key: i + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "dropbtn" + }, head === null || head === void 0 ? void 0 : head.title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "dropdown__content" + }, childItems.map((menu, i) => { + const c = c2IDs.includes(menu.ID); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.NavLink, { + className: "dropdown__items", + key: i, + onMouseEnter: () => setHoveredIndex(i), + onMouseLeave: () => setHoveredIndex(-1), + to: menu.url + }, formatNames(menu === null || menu === void 0 ? void 0 : menu.title), c && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { + className: "n2-drop" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("i", { + className: "fa-solid fa-circle-chevron-down" + })), c && hoveredIndex === i && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "n2" + }, nestedItems.map((cur, i) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.NavLink, { + to: cur.url, + className: "dropdown__items d2", + key: i + }, cur === null || cur === void 0 ? void 0 : cur.title)))); + }))); + }), (activeLanguages === null || activeLanguages === void 0 ? void 0 : activeLanguages.length) > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "dropdown2" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "dropbtn" + }, " Languages "), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "dropdown__content" + }, activeLanguages === null || activeLanguages === void 0 ? void 0 : activeLanguages.map(currLang => { + let cLang = currLang.native_name; + let code = currLang.code; + if (code == "en") { + code = ""; + } + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { + onClick: () => setLang(`${code}`), + key: code, + className: "dropdown__items" + }, cLang); + }))))))); +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Navbar); + +/***/ }), + +/***/ "./src/js/app/components/sidebar/Sidebar.js": +/*!**************************************************!*\ + !*** ./src/js/app/components/sidebar/Sidebar.js ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _scss_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../scss/style.scss */ "./src/scss/style.scss"); + + +function Sidebar() { + const [showAccessibilityPanel, setShowAccessibilityPanel] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false); + const handleAccessibilityButtonClick = () => { + setShowAccessibilityPanel(true); + }; + const handleAccessibilityCloseButtonClick = () => { + setShowAccessibilityPanel(false); + }; + const handleHighContrastButtonClick = () => { + document.body.classList.toggle("high-contrast"); + }; + const handleGreyscaleButtonClick = () => { + document.body.classList.toggle("greyscale"); + }; + const handleIncreaseFontSizeButtonClick = () => { + const currentFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize); + document.documentElement.style.fontSize = currentFontSize + 1 + "px"; + }; + const handleDecreaseFontSizeButtonClick = () => { + const currentFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize); + document.documentElement.style.fontSize = currentFontSize - 1 + "px"; + }; + const handleLightModeButtonClick = () => { + document.body.classList.toggle("light-mode"); + }; + const handleDarkModeButtonClick = () => { + document.body.classList.toggle("dark-mode"); + }; + const handleIncreaseWordSpaceButtonClick = () => { + const currentWordSpacing = parseFloat(getComputedStyle(document.documentElement).wordSpacing); + document.documentElement.style.wordSpacing = currentWordSpacing + 1 + "px"; + }; + const handleDecreaseWordSpaceButtonClick = () => { + const currentWordSpacing = parseFloat(getComputedStyle(document.documentElement).wordSpacing); + document.documentElement.style.wordSpacing = currentWordSpacing - 1 + "px"; + }; + + // const handleFocusModeButtonClick = () => { + // document.body.classList.toggle('focus-mode'); + // }; + + const handleResetButtonClick = () => { + // Reset body classList + document.body.classList.remove("high-contrast"); + document.body.classList.remove("greyscale"); + document.body.classList.remove("light-mode"); + document.body.classList.remove("dark-mode"); + + // Reset font size and word spacing + document.documentElement.style.fontSize = ""; + document.documentElement.style.wordSpacing = ""; + }; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("i", { + className: "fa-brands fa-accessible-icon", + onClick: handleAccessibilityButtonClick + }), showAccessibilityPanel && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: `accessibility-panel ${showAccessibilityPanel ? "active" : ""}` + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "accessibility-close-button", + "aria-label": "Close Accessibility Menu", + onClick: handleAccessibilityCloseButtonClick + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { + className: "accessibility-close-icon" + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "accessibility-options" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "accessibility-high-contrast-button", + onClick: handleHighContrastButtonClick + }, "High Contrast")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "accessibility-greyscale-button", + onClick: handleGreyscaleButtonClick + }, "Greyscale")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "accessibility-increase-font-size-button", + onClick: handleIncreaseFontSizeButtonClick + }, "Increase Font Size"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "accessibility-decrease-font-size-button", + onClick: handleDecreaseFontSizeButtonClick + }, "Decrease Font Size")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "accessibility-dark-mode-button", + onClick: handleDarkModeButtonClick + }, "Dark Mode")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "accessibility-increase-word-space-button", + onClick: handleIncreaseWordSpaceButtonClick + }, "Increase Word Space"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "accessibility-decrease-word-space-button", + onClick: handleDecreaseWordSpaceButtonClick + }, "Decrease Word Space")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { + className: "accessibility-reset-button", + onClick: handleResetButtonClick + }, "Reset")))))); +} +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Sidebar); + +/***/ }), + +/***/ "./src/js/app/config/appConfig.js": +/*!****************************************!*\ + !*** ./src/js/app/config/appConfig.js ***! + \****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AppConfig: () => (/* binding */ AppConfig) +/* harmony export */ }); +const AppConfig = configData; + + +/***/ }), + +/***/ "./src/js/app/index.js": +/*!*****************************!*\ + !*** ./src/js/app/index.js ***! + \*****************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom/client */ "./node_modules/react-dom/client.js"); +/* harmony import */ var _scss_style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../scss/style.scss */ "./src/scss/style.scss"); +/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./app */ "./src/js/app/app.js"); + + + + +const root = react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot(document.getElementById("root")); +root.render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_app__WEBPACK_IMPORTED_MODULE_3__["default"], null))); + +/***/ }), + +/***/ "./src/js/app/routes/routes.js": +/*!*************************************!*\ + !*** ./src/js/app/routes/routes.js ***! + \*************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/dist/index.js"); +/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components */ "./src/js/app/components/index.js"); +/* harmony import */ var _views__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../views */ "./src/js/app/views/index.js"); + + + + +const routes = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_3__.createBrowserRouter)([{ + path: "/", + element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components__WEBPACK_IMPORTED_MODULE_1__.Navbar, null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components__WEBPACK_IMPORTED_MODULE_1__.Sidebar, null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_views__WEBPACK_IMPORTED_MODULE_2__.Home, null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components__WEBPACK_IMPORTED_MODULE_1__.Footer, null)), + children: [{ + path: "/", + element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_views__WEBPACK_IMPORTED_MODULE_2__.Body, null) + }, { + path: "/:slug_name", + element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_views__WEBPACK_IMPORTED_MODULE_2__.Body, null) + }, { + path: "profile/:slug_name", + element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_views__WEBPACK_IMPORTED_MODULE_2__.Profile, null) + }, { + path: "posts/:slug_name", + element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_views__WEBPACK_IMPORTED_MODULE_2__.Posts, null) + }, { + path: "*", + element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_views__WEBPACK_IMPORTED_MODULE_2__.NotFound, null) + }] +}]); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (routes); + +/***/ }), + +/***/ "./src/js/app/utils/DataContext.js": +/*!*****************************************!*\ + !*** ./src/js/app/utils/DataContext.js ***! + \*****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +const DataContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({ + data: {} +}); +DataContext.displayName = "DataContext"; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DataContext); + +/***/ }), + +/***/ "./src/js/app/utils/index.js": +/*!***********************************!*\ + !*** ./src/js/app/utils/index.js ***! + \***********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ DataContext: () => (/* reexport safe */ _DataContext__WEBPACK_IMPORTED_MODULE_0__["default"]) +/* harmony export */ }); +/* harmony import */ var _DataContext__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DataContext */ "./src/js/app/utils/DataContext.js"); + + + +/***/ }), + +/***/ "./src/js/app/views/404/NotFound.js": +/*!******************************************!*\ + !*** ./src/js/app/views/404/NotFound.js ***! + \******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +const NotFound = () => { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "container" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h1", { + className: "h1 text-center" + }, "Oops!"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h3", { + className: "h3 text-center" + }, "Data not Found...")); +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NotFound); + +/***/ }), + +/***/ "./src/js/app/views/Home.js": +/*!**********************************!*\ + !*** ./src/js/app/views/Home.js ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/dist/index.js"); + + +const Home = () => { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("main", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_1__.Outlet, null))); +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Home); + +/***/ }), + +/***/ "./src/js/app/views/aframe/AFrame.js": +/*!*******************************************!*\ + !*** ./src/js/app/views/aframe/AFrame.js ***! + \*******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _config_appConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../config/appConfig */ "./src/js/app/config/appConfig.js"); +/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../components */ "./src/js/app/components/index.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ "./src/js/app/utils/index.js"); + + + + +const AFrame = props => { + var _AFrameData$propertie, _AFrameData$propertie2, _AFrameData$propertie3, _AFrameData$propertie4, _AFrameData$propertie5, _AFrameData$propertie6, _AFrameData$post_medi, _AFrameData$post_medi2; + const base_url = _config_appConfig__WEBPACK_IMPORTED_MODULE_1__.AppConfig.SITE_URL; + const upload_dir = `${base_url}/wp-content/uploads/`; + const AFrameData = props === null || props === void 0 ? void 0 : props.aframeData; + // const PAGE_SLUG = AFrameData?.slug; + // const { activeLanguages } = useContext(DataContext); // For all languages supported + const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true); // For asset loading + // const [elementDetected, setElementDetected] = useState(false); // For inspector loaded + // const langRef = useRef(null); // Current language state + // const prev_langRef = useRef(null); // Previous language state + // const data = useRef([{}]); // Data from inspector + + // langRef.current = AFrameData?.languages?.default; + // prev_langRef.current = AFrameData?.languages?.default; + + (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { + console.log("AFrame Data....", AFrameData); + setTimeout(() => { + setLoading(false); + }, 5000); + }, []); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + style: { + height: "100vh", + width: "100%" + } + }, AFrameData && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-scene", { + embedded: true, + environment: "preset: japan; ground: canyon; groundTexture: checkerboard; groundColor: #2b291c; groundColor2: #312f20; dressingColor: #124017; dressing: trees", + "loading-screen": "enabled: true;dotsColor: red; backgroundColor: black", + "device-orientation-permission-ui": "enabled: false", + "vr-mode-ui": "enabled: false", + webxr: "requiredFeatures: hit-test,local-floor;\r optionalFeatures: dom-overlay,unbounded;\r overlayElement: #overlay;" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "cameraRig", + position: "25 10 0", + "rotation-reader": true, + "thumbstick-logging": true, + "movement-controls": "constrainToNavMesh: true; speed:1; controls: checkpoint, gamepad, trackpad, keyboard, touch;" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "camera", + camera: "active: true", + position: "0 1.6 0", + rotation: "-4.469070802020421 -84.91234523838803 0", + "look-controls": true, + "wasd-controls": "acceleration:100", + raycaster: "far: 5; objects: .clickable" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "cursor", + animation__click: "property: scale; startEvents: click; easing: easeInCubic; dur: 150; from: 0.1 0.1 0.1; to: 1 1 1", + animation__fusing: "property: scale; startEvents: fusing; easing: easeInCubic; dur: 1500; from: 1 1 1; to: 0.1 0.1 0.1", + animation__mouseleave: "property: scale; startEvents: mouseleave; easing: easeInCubic; dur: 500; to: 1 1 1", + cursor: "fuse: true; fuseTimeout: 500", + position: "0 0 -1", + geometry: "primitive: ring; radiusInner: 0.02; radiusOuter: 0.03", + material: "color: black; shader: flat", + raycaster: "far: 5; objects: .clickable" + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "leftHand", + "hand-controls": "hand: left; handModelStyle: lowPoly; color: #ffcccc", + raycaster: "far: 5; objects: .clickable" + // teleport-controls="cameraRig: #cameraRig; teleportOrigin: #camera;" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "rightHand", + raycaster: "far: 5; objects: .clickable", + "hand-controls": "hand: right; handModelStyle: lowPoly; color: #ffcccc" + // teleport-controls="cameraRig: #cameraRig; teleportOrigin: #camera;" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "laser-controls-left-hand", + "laser-controls": "hand: left", + raycaster: "objects: .clickable", + cursor: "rayOrigin: mouse" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "laser-controls-right-hand", + "laser-controls": "hand: right", + raycaster: "objects: .clickable", + cursor: "rayOrigin: mouse" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "gearvr-controls-left-hand", + "gearvr-controls": "hand: left" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "gearvr-controls-left-hand", + "gearvr-controls": "hand: right" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "magicleap-controls-left-hand", + "magicleap-controls": "hand: left" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "magicleap-controls-right-hand", + "magicleap-controls": "hand: right" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "oculus-go-controls-left-hand", + "oculus-go-controls": "hand: left" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "oculus-go-controls-right-hand", + "oculus-go-controls": "hand: right" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "oculus-touch-controls-left-hand", + "oculus-touch-controls": "hand: left" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "oculus-touch-controls-right-hand", + "oculus-touch-controls": "hand: right" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "vive-controls-left-hand", + "vive-controls": "hand: left" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "vive-controls-right-hand", + "vive-controls": "hand: right" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "vive-focus-controls-left-hand", + "vive-focus-controls": "hand: left" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "vive-focus-controls-right-hand", + "vive-focus-controls": "hand: right" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "windows-motion-controls-left-hand", + "windows-motion-controls": "hand: left" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "windows-motion-controls-right-hand", + "windows-motion-controls": "hand: right" + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-assets", { + timeout: "5000" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-asset-item", { + id: Object.keys(AFrameData === null || AFrameData === void 0 ? void 0 : AFrameData.properties_3D).find(key => key == "world_model"), + src: upload_dir + (AFrameData === null || AFrameData === void 0 ? void 0 : (_AFrameData$propertie = AFrameData.properties_3D) === null || _AFrameData$propertie === void 0 ? void 0 : (_AFrameData$propertie2 = _AFrameData$propertie.world_model) === null || _AFrameData$propertie2 === void 0 ? void 0 : _AFrameData$propertie2.src), + crossOrigin: "anonymous" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-asset-item", { + id: Object.keys(AFrameData === null || AFrameData === void 0 ? void 0 : AFrameData.properties_3D).find(key => key == "nav_mesh"), + src: upload_dir + ((_AFrameData$propertie3 = AFrameData.properties_3D) === null || _AFrameData$propertie3 === void 0 ? void 0 : (_AFrameData$propertie4 = _AFrameData$propertie3.nav_mesh) === null || _AFrameData$propertie4 === void 0 ? void 0 : _AFrameData$propertie4.src), + crossOrigin: "anonymous" + }), AFrameData === null || AFrameData === void 0 ? void 0 : (_AFrameData$propertie5 = AFrameData.properties_3D) === null || _AFrameData$propertie5 === void 0 ? void 0 : (_AFrameData$propertie6 = _AFrameData$propertie5.furniture) === null || _AFrameData$propertie6 === void 0 ? void 0 : _AFrameData$propertie6.map(furniture => { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-asset-item", { + key: furniture === null || furniture === void 0 ? void 0 : furniture.id, + id: furniture === null || furniture === void 0 ? void 0 : furniture.id, + src: base_url + (furniture === null || furniture === void 0 ? void 0 : furniture.full_path), + crossOrigin: "anonymous" + }); + }), AFrameData === null || AFrameData === void 0 ? void 0 : (_AFrameData$post_medi = AFrameData.post_media) === null || _AFrameData$post_medi === void 0 ? void 0 : (_AFrameData$post_medi2 = _AFrameData$post_medi.screen_image) === null || _AFrameData$post_medi2 === void 0 ? void 0 : _AFrameData$post_medi2.map(scientist => { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("img", { + key: scientist === null || scientist === void 0 ? void 0 : scientist.id, + id: scientist === null || scientist === void 0 ? void 0 : scientist.id, + src: base_url + (scientist === null || scientist === void 0 ? void 0 : scientist.full_path), + crossOrigin: "anonymous" + }); + })), !loading && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: "meta-world" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + id: Object.keys(AFrameData === null || AFrameData === void 0 ? void 0 : AFrameData.properties_3D).find(key => key == "world_model"), + "gltf-model": "#" + Object.keys(AFrameData === null || AFrameData === void 0 ? void 0 : AFrameData.properties_3D).find(key => key == "world_model"), + position: "4.537 0 3.468" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-entity", { + "nav-mesh": true, + id: Object.keys(AFrameData === null || AFrameData === void 0 ? void 0 : AFrameData.properties_3D).find(key => key == "nav_mesh"), + "gltf-model": "#" + Object.keys(AFrameData === null || AFrameData === void 0 ? void 0 : AFrameData.properties_3D).find(key => key == "nav_mesh"), + visible: "false", + position: "4.762 0 3.739" + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-sky", { + id: Object.keys(AFrameData === null || AFrameData === void 0 ? void 0 : AFrameData.properties_3D).find(key => key == "skybox"), + color: "#6EBAA7" + // src={ + // "#" + + // Object.keys(AFrameData?.properties_3D).find( + // (key) => key == "skybox" + // ) + // } + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-plane", { + "static-body": "shape: mesh", + position: "0 0 -4", + visible: "false", + rotation: "-90 0 0", + width: "4", + height: "4", + color: "#7BC8A4", + scale: "6 2 2" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-light", { + id: "bulb-1", + type: "directional", + color: "#35227A", + intensity: "0.60", + position: "4.40664 0.98434 0.05053", + light: "type: point; angle: 180", + rotation: "-0.3 50.509 147.30229250797848" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-light", { + id: "bulb-2", + type: "directional", + color: "#FFFFBC", + intensity: "0.50", + position: "3.94786 -1.28516 -0.54807", + light: "type: hemisphere; angle: 90; color: #8778bf", + rotation: "-0.3 50.509 147.30229250797848" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-light", { + id: "bulb-3", + type: "directional", + color: "#FF4400", + intensity: "2", + position: "20.45283 -2.62394 -5.68868", + light: "type: ambient; intensity: 0.3; angle: 180; color: #7156d2", + rotation: "-0.3 50.509 147.30229250797848" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a-light", { + id: "bulb-4", + type: "directional", + color: "#FFFFBC", + intensity: "0.50", + position: "-0.21291 -0.99888 0.00254", + light: "type: hemisphere; color: #ffffff; angle: 90", + rotation: "-0.3 50.509 147.30229250797848" + }))); +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AFrame); + +/***/ }), + +/***/ "./src/js/app/views/body/Body.js": +/*!***************************************!*\ + !*** ./src/js/app/views/body/Body.js ***! + \***************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/dist/index.js"); +/* harmony import */ var _scss_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../scss/style.scss */ "./src/scss/style.scss"); +/* harmony import */ var _config_appConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config/appConfig */ "./src/js/app/config/appConfig.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ "./src/js/app/utils/index.js"); +/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components */ "./src/js/app/components/index.js"); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../index */ "./src/js/app/views/index.js"); + + + + + + + +const Body = () => { + var _data$properties_3D, _data$title, _data$post_media, _data$post_media$_thu, _data$post_media2, _data$post_media2$_th, _data$post_media3, _data$post_media3$_th, _data$content; + const base_url = _config_appConfig__WEBPACK_IMPORTED_MODULE_2__.AppConfig.SITE_URL; + const { + slug_name + } = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_6__.useParams)(); + const param = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_6__.useParams)(); + const { + lang, + menuData + } = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_utils__WEBPACK_IMPORTED_MODULE_3__.DataContext); + const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true); + const [data, setData] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(); + const curl = slug_name !== undefined && "/" + slug_name + "/"; + (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { + // console.log("params", param); + fetchdata(); + }, [lang, menuData, slug_name]); + const fetchdata = async () => { + const url = `${base_url}/${lang}/wp-json/wp/v2/pages?fields=id,type,title,content,slug,excerpt,languages,post_media,featured_media,screen_images,properties_3D,featured_video,cats,tags,type&filter[orderby]=ID&order=asc&per_page=100`; + await fetch(url).then(response => response.json()).then(result => { + result.map(pageData => { + if ((pageData === null || pageData === void 0 ? void 0 : pageData.id) == (_config_appConfig__WEBPACK_IMPORTED_MODULE_2__.AppConfig === null || _config_appConfig__WEBPACK_IMPORTED_MODULE_2__.AppConfig === void 0 ? void 0 : _config_appConfig__WEBPACK_IMPORTED_MODULE_2__.AppConfig.SITE_FRONT_PAGE)) { + setData(pageData); + setLoading(false); + } else { + if ((pageData === null || pageData === void 0 ? void 0 : pageData.slug) === slug_name) { + // console.log( + // "menuItem with page", + // pageData?.slug, + // slug_name, + // curl + // ); + setData(pageData); + setLoading(false); + } else { + setLoading(false); + // console.log("menuItem without page", pageData, curl); + } + } + }); + }).catch(error => { + console.log("Error when getting body data", error); + }); + }; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, loading ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components__WEBPACK_IMPORTED_MODULE_4__.AppLoader, null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, data ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "content" + }, data !== null && data !== void 0 && (_data$properties_3D = data.properties_3D) !== null && _data$properties_3D !== void 0 && _data$properties_3D.use_aframe ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_index__WEBPACK_IMPORTED_MODULE_5__.AFrame, { + aframeData: data + }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "container" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h1", null, data === null || data === void 0 ? void 0 : (_data$title = data.title) === null || _data$title === void 0 ? void 0 : _data$title.rendered), (data === null || data === void 0 ? void 0 : (_data$post_media = data.post_media) === null || _data$post_media === void 0 ? void 0 : (_data$post_media$_thu = _data$post_media._thumbnail_id[0]) === null || _data$post_media$_thu === void 0 ? void 0 : _data$post_media$_thu.full_path) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "featured-image" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("img", { + src: data === null || data === void 0 ? void 0 : (_data$post_media2 = data.post_media) === null || _data$post_media2 === void 0 ? void 0 : (_data$post_media2$_th = _data$post_media2._thumbnail_id[0]) === null || _data$post_media2$_th === void 0 ? void 0 : _data$post_media2$_th.full_path, + alt: data === null || data === void 0 ? void 0 : (_data$post_media3 = data.post_media) === null || _data$post_media3 === void 0 ? void 0 : (_data$post_media3$_th = _data$post_media3._thumbnail_id[0]) === null || _data$post_media3$_th === void 0 ? void 0 : _data$post_media3$_th.alt + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + dangerouslySetInnerHTML: { + __html: data === null || data === void 0 ? void 0 : (_data$content = data.content) === null || _data$content === void 0 ? void 0 : _data$content.rendered + } + }))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_index__WEBPACK_IMPORTED_MODULE_5__.NotFound, null))); +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Body); + +/***/ }), + +/***/ "./src/js/app/views/index.js": +/*!***********************************!*\ + !*** ./src/js/app/views/index.js ***! + \***********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AFrame: () => (/* reexport safe */ _aframe_AFrame__WEBPACK_IMPORTED_MODULE_3__["default"]), +/* harmony export */ Body: () => (/* reexport safe */ _body_Body__WEBPACK_IMPORTED_MODULE_1__["default"]), +/* harmony export */ Home: () => (/* reexport safe */ _Home__WEBPACK_IMPORTED_MODULE_0__["default"]), +/* harmony export */ NotFound: () => (/* reexport safe */ _404_NotFound__WEBPACK_IMPORTED_MODULE_4__["default"]), +/* harmony export */ Posts: () => (/* reexport safe */ _posts_Posts__WEBPACK_IMPORTED_MODULE_5__["default"]), +/* harmony export */ Profile: () => (/* reexport safe */ _profile_Profile__WEBPACK_IMPORTED_MODULE_2__["default"]) +/* harmony export */ }); +/* harmony import */ var _Home__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Home */ "./src/js/app/views/Home.js"); +/* harmony import */ var _body_Body__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./body/Body */ "./src/js/app/views/body/Body.js"); +/* harmony import */ var _profile_Profile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./profile/Profile */ "./src/js/app/views/profile/Profile.js"); +/* harmony import */ var _aframe_AFrame__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./aframe/AFrame */ "./src/js/app/views/aframe/AFrame.js"); +/* harmony import */ var _404_NotFound__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./404/NotFound */ "./src/js/app/views/404/NotFound.js"); +/* harmony import */ var _posts_Posts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./posts/Posts */ "./src/js/app/views/posts/Posts.js"); + + + + + + + + +/***/ }), + +/***/ "./src/js/app/views/posts/Posts.js": +/*!*****************************************!*\ + !*** ./src/js/app/views/posts/Posts.js ***! + \*****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/dist/index.js"); +/* harmony import */ var _scss_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../scss/style.scss */ "./src/scss/style.scss"); +/* harmony import */ var _config_appConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config/appConfig */ "./src/js/app/config/appConfig.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ "./src/js/app/utils/index.js"); +/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components */ "./src/js/app/components/index.js"); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../index */ "./src/js/app/views/index.js"); + + + + + + + +const Posts = () => { + var _data$post_media, _data$post_media$_thu, _data$post_media2, _data$post_media2$_th, _data$post_media3, _data$post_media3$_th, _data$content; + const base_url = _config_appConfig__WEBPACK_IMPORTED_MODULE_2__.AppConfig.SITE_URL; + const { + slug_name + } = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_6__.useParams)(); + const { + lang, + menuData + } = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_utils__WEBPACK_IMPORTED_MODULE_3__.DataContext); + const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true); + const [data, setData] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(); + const curl = slug_name !== undefined ? "/" + slug_name + "/" : ""; + (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { + console.log("param", slug_name); + fetchdata(); + }, [lang, menuData, slug_name]); + const fetchdata = async () => { + const url = `${base_url}/${lang}/wp-json/wp/v2/posts?fields=id,type,title,content,slug,excerpt,languages,post_media,featured_media,screen_images,video,type,cats,tags&filter[orderby]=ID&order=asc&per_page=100`; + await fetch(url).then(response => response.json()).then(result => { + console.log("posts result", result); + result.map(postData => { + if ((postData === null || postData === void 0 ? void 0 : postData.id) == (_config_appConfig__WEBPACK_IMPORTED_MODULE_2__.AppConfig === null || _config_appConfig__WEBPACK_IMPORTED_MODULE_2__.AppConfig === void 0 ? void 0 : _config_appConfig__WEBPACK_IMPORTED_MODULE_2__.AppConfig.SITE_FRONT_PAGE)) { + setData(postData); + setLoading(false); + } else { + if ((postData === null || postData === void 0 ? void 0 : postData.slug) === slug_name) { + console.log("menuItem with page", postData === null || postData === void 0 ? void 0 : postData.slug, slug_name, curl); + setData(postData); + setLoading(false); + } else { + setLoading(false); + // console.log("menuItem without page", postData, curl); + } + } + }); + }).catch(error => { + console.log("Error when getting body data", error); + }); + }; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "container" + }, loading ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components__WEBPACK_IMPORTED_MODULE_4__.AppLoader, null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, data ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "dynamic" + }, (data === null || data === void 0 ? void 0 : (_data$post_media = data.post_media) === null || _data$post_media === void 0 ? void 0 : (_data$post_media$_thu = _data$post_media._thumbnail_id[0]) === null || _data$post_media$_thu === void 0 ? void 0 : _data$post_media$_thu.full_path) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("img", { + src: data === null || data === void 0 ? void 0 : (_data$post_media2 = data.post_media) === null || _data$post_media2 === void 0 ? void 0 : (_data$post_media2$_th = _data$post_media2._thumbnail_id[0]) === null || _data$post_media2$_th === void 0 ? void 0 : _data$post_media2$_th.full_path, + alt: data === null || data === void 0 ? void 0 : (_data$post_media3 = data.post_media) === null || _data$post_media3 === void 0 ? void 0 : (_data$post_media3$_th = _data$post_media3._thumbnail_id[0]) === null || _data$post_media3$_th === void 0 ? void 0 : _data$post_media3$_th.alt + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + dangerouslySetInnerHTML: { + __html: data === null || data === void 0 ? void 0 : (_data$content = data.content) === null || _data$content === void 0 ? void 0 : _data$content.rendered + } + })) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_index__WEBPACK_IMPORTED_MODULE_5__.NotFound, null)))); +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Posts); + +/***/ }), + +/***/ "./src/js/app/views/profile/Profile.js": +/*!*********************************************!*\ + !*** ./src/js/app/views/profile/Profile.js ***! + \*********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/dist/index.js"); +/* harmony import */ var _scss_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../scss/style.scss */ "./src/scss/style.scss"); +/* harmony import */ var _config_appConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config/appConfig */ "./src/js/app/config/appConfig.js"); +/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components */ "./src/js/app/components/index.js"); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../index */ "./src/js/app/views/index.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ "./src/js/app/utils/index.js"); + + + + + + + +const Profile = () => { + var _data$title, _data$post_media, _data$post_media$_thu, _data$post_media2, _data$post_media2$_th, _data$post_media3, _data$post_media3$_th, _data$content; + const base_url = _config_appConfig__WEBPACK_IMPORTED_MODULE_2__.AppConfig.SITE_URL; + const { + slug_name + } = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_6__.useParams)(); + const { + lang, + menuData + } = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_utils__WEBPACK_IMPORTED_MODULE_5__.DataContext); + const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true); + const [data, setData] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(); + const curl = slug_name !== undefined && "/profile/" + slug_name + "/"; + (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { + fetchdata(); + }, [lang, menuData, slug_name]); + const fetchdata = async () => { + const url = `${base_url}/${lang}/wp-json/wp/v2/profile?fields=id,type,title,content,slug,excerpt,post_media,languages,meta,info,seo,featured_media,screen_images,featured_video,type,industry,support_hardware,feature,thumbnail_url,collaboration_type,platform,cats,tags&filter[orderby]=post_title&order=asc&per_page=100&page=1`; + await fetch(url).then(response => response.json()).then(result => { + result.map(profileData => { + if ((profileData === null || profileData === void 0 ? void 0 : profileData.id) == (_config_appConfig__WEBPACK_IMPORTED_MODULE_2__.AppConfig === null || _config_appConfig__WEBPACK_IMPORTED_MODULE_2__.AppConfig === void 0 ? void 0 : _config_appConfig__WEBPACK_IMPORTED_MODULE_2__.AppConfig.SITE_FRONT_PAGE)) { + setData(profileData); + setLoading(false); + } else { + if ((profileData === null || profileData === void 0 ? void 0 : profileData.slug) === slug_name) { + console.log("menuItem with page", profileData === null || profileData === void 0 ? void 0 : profileData.slug, slug_name, curl); + setData(profileData); + setLoading(false); + } else { + setLoading(false); + // console.log("menuItem without page", profileData, curl); + } + } + }); + }).catch(error => { + console.log("Error when getting body data", error); + }); + }; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, loading ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components__WEBPACK_IMPORTED_MODULE_3__.AppLoader, null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, data ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "profile" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h1", { + className: "profile-text" + }, " ", data === null || data === void 0 ? void 0 : (_data$title = data.title) === null || _data$title === void 0 ? void 0 : _data$title.rendered), (data === null || data === void 0 ? void 0 : (_data$post_media = data.post_media) === null || _data$post_media === void 0 ? void 0 : (_data$post_media$_thu = _data$post_media._thumbnail_id[0]) === null || _data$post_media$_thu === void 0 ? void 0 : _data$post_media$_thu.full_path) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "profile_container" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("img", { + src: data === null || data === void 0 ? void 0 : (_data$post_media2 = data.post_media) === null || _data$post_media2 === void 0 ? void 0 : (_data$post_media2$_th = _data$post_media2._thumbnail_id[0]) === null || _data$post_media2$_th === void 0 ? void 0 : _data$post_media2$_th.full_path, + alt: data === null || data === void 0 ? void 0 : (_data$post_media3 = data.post_media) === null || _data$post_media3 === void 0 ? void 0 : (_data$post_media3$_th = _data$post_media3._thumbnail_id[0]) === null || _data$post_media3$_th === void 0 ? void 0 : _data$post_media3$_th.alt, + className: "profile-img" + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { + className: "profile-text", + dangerouslySetInnerHTML: { + __html: data === null || data === void 0 ? void 0 : (_data$content = data.content) === null || _data$content === void 0 ? void 0 : _data$content.rendered + } + }))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_index__WEBPACK_IMPORTED_MODULE_4__.NotFound, null))); +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Profile); + +/***/ }), + +/***/ "./src/scss/style.scss": +/*!*****************************!*\ + !*** ./src/scss/style.scss ***! + \*****************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ "./node_modules/react-dom/cjs/react-dom.development.js": +/*!*************************************************************!*\ + !*** ./node_modules/react-dom/cjs/react-dom.development.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +/** + * @license React + * react-dom.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +if (true) { + (function() { + + 'use strict'; + +/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ +if ( + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === + 'function' +) { + __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); +} + var React = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +var Scheduler = __webpack_require__(/*! scheduler */ "./node_modules/scheduler/index.js"); + +var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + +var suppressWarning = false; +function setSuppressWarning(newSuppressWarning) { + { + suppressWarning = newSuppressWarning; + } +} // In DEV, calls to console.warn and console.error get replaced +// by calls to these methods by a Babel plugin. +// +// In PROD (or in packages without access to React internals), +// they are left as they are instead. + +function warn(format) { + { + if (!suppressWarning) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + printWarning('warn', format, args); + } + } +} +function error(format) { + { + if (!suppressWarning) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + + printWarning('error', format, args); + } + } +} + +function printWarning(level, format, args) { + // When changing this logic, you might want to also + // update consoleWithStackDev.www.js as well. + { + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); + + if (stack !== '') { + format += '%s'; + args = args.concat([stack]); + } // eslint-disable-next-line react-internal/safe-string-coercion + + + var argsWithFormat = args.map(function (item) { + return String(item); + }); // Careful: RN currently depends on this prefix + + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + // eslint-disable-next-line react-internal/no-production-logging + + Function.prototype.apply.call(console[level], console, argsWithFormat); + } +} + +var FunctionComponent = 0; +var ClassComponent = 1; +var IndeterminateComponent = 2; // Before we know whether it is function or class + +var HostRoot = 3; // Root of a host tree. Could be nested inside another node. + +var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. + +var HostComponent = 5; +var HostText = 6; +var Fragment = 7; +var Mode = 8; +var ContextConsumer = 9; +var ContextProvider = 10; +var ForwardRef = 11; +var Profiler = 12; +var SuspenseComponent = 13; +var MemoComponent = 14; +var SimpleMemoComponent = 15; +var LazyComponent = 16; +var IncompleteClassComponent = 17; +var DehydratedFragment = 18; +var SuspenseListComponent = 19; +var ScopeComponent = 21; +var OffscreenComponent = 22; +var LegacyHiddenComponent = 23; +var CacheComponent = 24; +var TracingMarkerComponent = 25; + +// ----------------------------------------------------------------------------- + +var enableClientRenderFallbackOnTextMismatch = true; // TODO: Need to review this code one more time before landing +// the react-reconciler package. + +var enableNewReconciler = false; // Support legacy Primer support on internal FB www + +var enableLazyContextPropagation = false; // FB-only usage. The new API has different semantics. + +var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber + +var enableSuspenseAvoidThisFallback = false; // Enables unstable_avoidThisFallback feature in Fizz +// React DOM Chopping Block +// +// Similar to main Chopping Block but only flags related to React DOM. These are +// grouped because we will likely batch all of them into a single major release. +// ----------------------------------------------------------------------------- +// Disable support for comment nodes as React DOM containers. Already disabled +// in open source, but www codebase still relies on it. Need to remove. + +var disableCommentsAsDOMContainers = true; // Disable javascript: URL strings in href for XSS protection. +// and client rendering, mostly to allow JSX attributes to apply to the custom +// element's object properties instead of only HTML attributes. +// https://github.com/facebook/react/issues/11347 + +var enableCustomElementPropertySupport = false; // Disables children for