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pack://Oomple/./node_modules/@react-oauth/google/dist/index.esm.js","webpack://Oomple/./app/javascript/components/v4/public/users/show.jsx","webpack://Oomple/./app/javascript/packs/v4/public/users/show_pack.jsx","webpack://Oomple/./node_modules/lucide-react/dist/esm/icons/upload.js","webpack://Oomple/./node_modules/lucide-react/dist/esm/icons/x.js"],"sourcesContent":["import React, { useState, useRef, useEffect, createContext, useMemo, useContext, useCallback } from 'react';\n\nfunction useLoadGsiScript(options = {}) {\r\n const { nonce, onScriptLoadSuccess, onScriptLoadError } = options;\r\n const [scriptLoadedSuccessfully, setScriptLoadedSuccessfully] = useState(false);\r\n const onScriptLoadSuccessRef = useRef(onScriptLoadSuccess);\r\n onScriptLoadSuccessRef.current = onScriptLoadSuccess;\r\n const onScriptLoadErrorRef = useRef(onScriptLoadError);\r\n onScriptLoadErrorRef.current = onScriptLoadError;\r\n useEffect(() => {\r\n const scriptTag = document.createElement('script');\r\n scriptTag.src = 'https://accounts.google.com/gsi/client';\r\n scriptTag.async = true;\r\n scriptTag.defer = true;\r\n scriptTag.nonce = nonce;\r\n scriptTag.onload = () => {\r\n var _a;\r\n setScriptLoadedSuccessfully(true);\r\n (_a = onScriptLoadSuccessRef.current) === null || _a === void 0 ? void 0 : _a.call(onScriptLoadSuccessRef);\r\n };\r\n scriptTag.onerror = () => {\r\n var _a;\r\n setScriptLoadedSuccessfully(false);\r\n (_a = onScriptLoadErrorRef.current) === null || _a === void 0 ? void 0 : _a.call(onScriptLoadErrorRef);\r\n };\r\n document.body.appendChild(scriptTag);\r\n return () => {\r\n document.body.removeChild(scriptTag);\r\n };\r\n }, [nonce]);\r\n return scriptLoadedSuccessfully;\r\n}\n\nconst GoogleOAuthContext = createContext(null);\r\nfunction GoogleOAuthProvider({ clientId, nonce, onScriptLoadSuccess, onScriptLoadError, children, }) {\r\n const scriptLoadedSuccessfully = useLoadGsiScript({\r\n nonce,\r\n onScriptLoadSuccess,\r\n onScriptLoadError,\r\n });\r\n const contextValue = useMemo(() => ({\r\n clientId,\r\n scriptLoadedSuccessfully,\r\n }), [clientId, scriptLoadedSuccessfully]);\r\n return (React.createElement(GoogleOAuthContext.Provider, { value: contextValue }, children));\r\n}\r\nfunction useGoogleOAuth() {\r\n const context = useContext(GoogleOAuthContext);\r\n if (!context) {\r\n throw new Error('Google OAuth components must be used within GoogleOAuthProvider');\r\n }\r\n return context;\r\n}\n\nfunction extractClientId(credentialResponse) {\r\n var _a;\r\n const clientId = (_a = credentialResponse === null || credentialResponse === void 0 ? void 0 : credentialResponse.clientId) !== null && _a !== void 0 ? _a : credentialResponse === null || credentialResponse === void 0 ? void 0 : credentialResponse.client_id;\r\n return clientId;\r\n}\n\nconst containerHeightMap = { large: 40, medium: 32, small: 20 };\r\nfunction GoogleLogin({ onSuccess, onError, useOneTap, promptMomentNotification, type = 'standard', theme = 'outline', size = 'large', text, shape, logo_alignment, width, locale, click_listener, containerProps, ...props }) {\r\n const btnContainerRef = useRef(null);\r\n const { clientId, scriptLoadedSuccessfully } = useGoogleOAuth();\r\n const onSuccessRef = useRef(onSuccess);\r\n onSuccessRef.current = onSuccess;\r\n const onErrorRef = useRef(onError);\r\n onErrorRef.current = onError;\r\n const promptMomentNotificationRef = useRef(promptMomentNotification);\r\n promptMomentNotificationRef.current = promptMomentNotification;\r\n useEffect(() => {\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n if (!scriptLoadedSuccessfully)\r\n return;\r\n (_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.accounts) === null || _b === void 0 ? void 0 : _b.id) === null || _c === void 0 ? void 0 : _c.initialize({\r\n client_id: clientId,\r\n callback: (credentialResponse) => {\r\n var _a;\r\n if (!(credentialResponse === null || credentialResponse === void 0 ? void 0 : credentialResponse.credential)) {\r\n return (_a = onErrorRef.current) === null || _a === void 0 ? void 0 : _a.call(onErrorRef);\r\n }\r\n const { credential, select_by } = credentialResponse;\r\n onSuccessRef.current({\r\n credential,\r\n clientId: extractClientId(credentialResponse),\r\n select_by,\r\n });\r\n },\r\n ...props,\r\n });\r\n (_f = (_e = (_d = window === null || window === void 0 ? void 0 : window.google) === null || _d === void 0 ? void 0 : _d.accounts) === null || _e === void 0 ? void 0 : _e.id) === null || _f === void 0 ? void 0 : _f.renderButton(btnContainerRef.current, {\r\n type,\r\n theme,\r\n size,\r\n text,\r\n shape,\r\n logo_alignment,\r\n width,\r\n locale,\r\n click_listener,\r\n });\r\n if (useOneTap)\r\n (_j = (_h = (_g = window === null || window === void 0 ? void 0 : window.google) === null || _g === void 0 ? void 0 : _g.accounts) === null || _h === void 0 ? void 0 : _h.id) === null || _j === void 0 ? void 0 : _j.prompt(promptMomentNotificationRef.current);\r\n return () => {\r\n var _a, _b, _c;\r\n if (useOneTap)\r\n (_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.accounts) === null || _b === void 0 ? void 0 : _b.id) === null || _c === void 0 ? void 0 : _c.cancel();\r\n };\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [\r\n clientId,\r\n scriptLoadedSuccessfully,\r\n useOneTap,\r\n type,\r\n theme,\r\n size,\r\n text,\r\n shape,\r\n logo_alignment,\r\n width,\r\n locale,\r\n ]);\r\n return (React.createElement(\"div\", { ...containerProps, ref: btnContainerRef, style: { height: containerHeightMap[size], ...containerProps === null || containerProps === void 0 ? void 0 : containerProps.style } }));\r\n}\n\nfunction googleLogout() {\r\n var _a, _b, _c;\r\n (_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.accounts) === null || _b === void 0 ? void 0 : _b.id) === null || _c === void 0 ? void 0 : _c.disableAutoSelect();\r\n}\n\n/* eslint-disable import/export */\r\nfunction useGoogleLogin({ flow = 'implicit', scope = '', onSuccess, onError, onNonOAuthError, overrideScope, state, ...props }) {\r\n const { clientId, scriptLoadedSuccessfully } = useGoogleOAuth();\r\n const clientRef = useRef();\r\n const onSuccessRef = useRef(onSuccess);\r\n onSuccessRef.current = onSuccess;\r\n const onErrorRef = useRef(onError);\r\n onErrorRef.current = onError;\r\n const onNonOAuthErrorRef = useRef(onNonOAuthError);\r\n onNonOAuthErrorRef.current = onNonOAuthError;\r\n useEffect(() => {\r\n var _a;\r\n if (!scriptLoadedSuccessfully)\r\n return;\r\n const clientMethod = flow === 'implicit' ? 'initTokenClient' : 'initCodeClient';\r\n const client = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.accounts.oauth2[clientMethod]({\r\n client_id: clientId,\r\n scope: overrideScope ? scope : `openid profile email ${scope}`,\r\n callback: (response) => {\r\n var _a, _b;\r\n if (response.error)\r\n return (_a = onErrorRef.current) === null || _a === void 0 ? void 0 : _a.call(onErrorRef, response);\r\n (_b = onSuccessRef.current) === null || _b === void 0 ? void 0 : _b.call(onSuccessRef, response);\r\n },\r\n error_callback: (nonOAuthError) => {\r\n var _a;\r\n (_a = onNonOAuthErrorRef.current) === null || _a === void 0 ? void 0 : _a.call(onNonOAuthErrorRef, nonOAuthError);\r\n },\r\n state,\r\n ...props,\r\n });\r\n clientRef.current = client;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [clientId, scriptLoadedSuccessfully, flow, scope, state]);\r\n const loginImplicitFlow = useCallback((overrideConfig) => { var _a; return (_a = clientRef.current) === null || _a === void 0 ? void 0 : _a.requestAccessToken(overrideConfig); }, []);\r\n const loginAuthCodeFlow = useCallback(() => { var _a; return (_a = clientRef.current) === null || _a === void 0 ? void 0 : _a.requestCode(); }, []);\r\n return flow === 'implicit' ? loginImplicitFlow : loginAuthCodeFlow;\r\n}\n\nfunction useGoogleOneTapLogin({ onSuccess, onError, promptMomentNotification, cancel_on_tap_outside, prompt_parent_id, state_cookie_domain, hosted_domain, disabled, }) {\r\n const { clientId, scriptLoadedSuccessfully } = useGoogleOAuth();\r\n const onSuccessRef = useRef(onSuccess);\r\n onSuccessRef.current = onSuccess;\r\n const onErrorRef = useRef(onError);\r\n onErrorRef.current = onError;\r\n const promptMomentNotificationRef = useRef(promptMomentNotification);\r\n promptMomentNotificationRef.current = promptMomentNotification;\r\n useEffect(() => {\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n if (!scriptLoadedSuccessfully)\r\n return;\r\n if (disabled) {\r\n (_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.accounts) === null || _b === void 0 ? void 0 : _b.id) === null || _c === void 0 ? void 0 : _c.cancel();\r\n return;\r\n }\r\n (_f = (_e = (_d = window === null || window === void 0 ? void 0 : window.google) === null || _d === void 0 ? void 0 : _d.accounts) === null || _e === void 0 ? void 0 : _e.id) === null || _f === void 0 ? void 0 : _f.initialize({\r\n client_id: clientId,\r\n callback: (credentialResponse) => {\r\n var _a;\r\n if (!(credentialResponse === null || credentialResponse === void 0 ? void 0 : credentialResponse.credential)) {\r\n return (_a = onErrorRef.current) === null || _a === void 0 ? void 0 : _a.call(onErrorRef);\r\n }\r\n const { credential, select_by } = credentialResponse;\r\n onSuccessRef.current({\r\n credential,\r\n clientId: extractClientId(credentialResponse),\r\n select_by,\r\n });\r\n },\r\n hosted_domain,\r\n cancel_on_tap_outside,\r\n prompt_parent_id,\r\n state_cookie_domain,\r\n });\r\n (_j = (_h = (_g = window === null || window === void 0 ? void 0 : window.google) === null || _g === void 0 ? void 0 : _g.accounts) === null || _h === void 0 ? void 0 : _h.id) === null || _j === void 0 ? void 0 : _j.prompt(promptMomentNotificationRef.current);\r\n return () => {\r\n var _a, _b, _c;\r\n (_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.accounts) === null || _b === void 0 ? void 0 : _b.id) === null || _c === void 0 ? void 0 : _c.cancel();\r\n };\r\n }, [\r\n clientId,\r\n scriptLoadedSuccessfully,\r\n cancel_on_tap_outside,\r\n prompt_parent_id,\r\n state_cookie_domain,\r\n hosted_domain,\r\n disabled,\r\n ]);\r\n}\n\n/**\r\n * Checks if the user granted all the specified scope or scopes\r\n * @returns True if all the scopes are granted\r\n */\r\nfunction hasGrantedAllScopesGoogle(tokenResponse, firstScope, ...restScopes) {\r\n var _a, _b, _c;\r\n if (!(window === null || window === void 0 ? void 0 : window.google))\r\n return false;\r\n return (((_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.accounts) === null || _b === void 0 ? void 0 : _b.oauth2) === null || _c === void 0 ? void 0 : _c.hasGrantedAllScopes(tokenResponse, firstScope, ...restScopes)) || false);\r\n}\n\n/**\r\n * Checks if the user granted any of the specified scope or scopes.\r\n * @returns True if any of the scopes are granted\r\n */\r\nfunction hasGrantedAnyScopeGoogle(tokenResponse, firstScope, ...restScopes) {\r\n var _a, _b, _c;\r\n if (!(window === null || window === void 0 ? void 0 : window.google))\r\n return false;\r\n return (((_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.accounts) === null || _b === void 0 ? void 0 : _b.oauth2) === null || _c === void 0 ? void 0 : _c.hasGrantedAnyScope(tokenResponse, firstScope, ...restScopes)) || false);\r\n}\n\nexport { GoogleLogin, GoogleOAuthProvider, googleLogout, hasGrantedAllScopesGoogle, hasGrantedAnyScopeGoogle, useGoogleLogin, useGoogleOneTapLogin };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faUserPlus } from '@fortawesome/pro-solid-svg-icons';\n\n// Mixins / Modules\nimport Window from '../../../../modules/window';\nimport isResizable from '../../../mixins/resizable';\n\n// Models\nimport User from '../../../../models/v2/user';\n\n// Base\nimport Button from '../../base/button';\n\n// Related Components\nimport Jobs from '../../consultants/users/show/jobs';\nimport Loading from '../../consultants/users/show/loading';\nimport Profile from '../../consultants/users/show/profile';\nimport Roles from '../../consultants/users/show/roles';\nimport SignInUp from '../opportunities/sign_in_up'\n\nclass Edit extends React.Component {\n static propTypes = {\n isMobile: PropTypes.bool.isRequired,\n id: PropTypes.number.isRequired,\n }\n\n state = {\n loading: true,\n user: {},\n isOpen: false,\n }\n\n componentDidMount() {\n this.loadData();\n }\n\n loadData = () => {\n const { id } = this.props;\n User\n .find(id)\n .then((user) => {\n this.setState({\n user,\n loading: false,\n });\n })\n .catch((error) => Window.flash.error(error));\n }\n\n handleSignUpIn = () => {\n const { id } = this.props;\n Window.redirect(`/users/${id}`);\n }\n\n handleOpen = () => {\n this.setState({ isOpen: true });\n }\n\n handleClose = () => {\n this.setState({ isOpen: false });\n }\n\n render() {\n const { loading, user, isOpen } = this.state;\n\n if (loading) {\n return \n }\n\n return (\n \n \n \n \n Profile\n \n this.handleOpen(),\n }}>\n \n Connect\n \n \n \n \n \n \n \n {\n !user.is_agent &&\n \n }\n {\n user.is_agent &&\n \n }\n \n )\n }\n}\n\nexport default isResizable(Edit);","import React from 'react';\nimport { createRoot } from 'react-dom/client';\n\nimport Show from '../../../../components/v4/public/users/show';\n\ndocument.addEventListener('DOMContentLoaded', () => {\n const element = document.getElementById('public-users-show');\n const { id } = element.dataset;\n\n if (element) {\n const root = createRoot(element);\n root.render();\n }\n});","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Upload = createLucideIcon(\"Upload\", [\n [\"path\", { d: \"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\", key: \"ih7n3h\" }],\n [\"polyline\", { points: \"17 8 12 3 7 8\", key: \"t8dd8p\" }],\n [\"line\", { x1: \"12\", x2: \"12\", y1: \"3\", y2: \"15\", key: \"widbto\" }]\n]);\n\nexport { Upload as default };\n//# sourceMappingURL=upload.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst X = createLucideIcon(\"X\", [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }]\n]);\n\nexport { X as default };\n//# sourceMappingURL=x.js.map\n"],"names":["GoogleOAuthContext","createContext","GoogleOAuthProvider","clientId","nonce","onScriptLoadSuccess","onScriptLoadError","children","scriptLoadedSuccessfully","options","setScriptLoadedSuccessfully","useState","onScriptLoadSuccessRef","useRef","current","onScriptLoadErrorRef","useEffect","scriptTag","document","createElement","src","async","defer","onload","_a","call","onerror","body","appendChild","removeChild","useLoadGsiScript","contextValue","useMemo","Provider","value","useGoogleOAuth","context","useContext","Error","extractClientId","credentialResponse","client_id","containerHeightMap","large","medium","small","GoogleLogin","onSuccess","onError","useOneTap","promptMomentNotification","type","theme","size","text","shape","logo_alignment","width","locale","click_listener","containerProps","props","btnContainerRef","onSuccessRef","onErrorRef","promptMomentNotificationRef","_b","_c","_d","_e","_f","_g","_h","_j","window","google","accounts","id","initialize","callback","credential","select_by","renderButton","prompt","cancel","ref","style","height","Edit","_React$Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_defineProperty","_assertThisInitialized","apply","concat","loading","user","isOpen","User","then","setState","catch","error","Window","key","this","loadData","_this2","_this$state","state","React","Loading","className","Button","onClick","handleOpen","FontAwesomeIcon","icon","faUserPlus","SignInUp","onSignUp","handleSignUpIn","onSignIn","onClose","handleClose","Profile","is_agent","Roles","Jobs","isMobile","PropTypes","isResizable","addEventListener","element","getElementById","dataset","createRoot","render","Show","parseInt","Upload","d","points","x1","x2","y1","y2","X"],"sourceRoot":""}