{"version":3,"sources":["webpack://_N_E/../../../next-server/lib/amp.ts","webpack://_N_E/./src/utils/graphqlLogsMiddleware.ts","webpack://_N_E/./config/apiURL.ts","webpack://_N_E/./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?7ae7","webpack://_N_E/../../../next-server/lib/head.tsx","webpack://_N_E/../../../next-server/lib/head-manager-context.ts","webpack://_N_E/./src/hooks/useLess.tsx","webpack://_N_E/../../../next-server/lib/side-effect.tsx","webpack://_N_E/./src/pages/_app.tsx","webpack://_N_E/../../../next-server/lib/amp-context.ts","webpack://_N_E/./src/utils/graphqlAuthMiddleware.ts","webpack://_N_E/./src/components/Positivator/usePositivatorState.tsx"],"names":["isInAmpMode","React","AmpStateContext","ampFirst","hybrid","hasQuery","graphqlLogsMiddleware","ctx","a","CAN_DEBUG","variables","methodConfig","action","result","schemaKey","appendToFragment","fragment","color","rgb","mountRequestSignature","includes","actionName","args","Object","keys","length","push","console","log","str","hash","i","charCodeAt","c","toString","toUpperCase","substring","localStorage","debug","window","location","hostname","urlFromEnv","process","API_URL","__NEXT_P","defaultHead","inAmpMode","head","charSet","name","content","onlyReactElement","child","list","fragmentChild","fragmentList","METATYPES","reduceComponents","headElements","headElementChildren","headElement","props","tags","metaTypes","metaCategories","h","isUnique","key","len","metatype","category","categories","unique","Head","ampState","useContext","headManager","HeadManagerContext","reduceComponentsToState","useLess","parseArgs","factory","actions","onChange","deps","isFirstRender","current","previousState","initial","reactiveObject","api","getState","ref","setState","s","forEach","k","nextColor","internalValue","defineProperty","get","set","value","requestAnimationFrame","valueString","ellipsis","Array","isArray","startsWith","groupCollapsed","Date","toLocaleTimeString","trace","groupEnd","enumerable","apiEntry","currentActions","error","colorIndex","colors","max","createLessContext","Context","useDefaultDepsHook","useState","state","Error","Provider","useDepsHook","_useState","children","constructor","_hasHeadManager","emitChange","this","Component","MyApp","pageProps","client","useMemo","GraphQLClient","url","methods","AppMethods","methodsInfo","AppMethodsInfo","middleware","graphqlAuthMiddleware","getLayout","page","async","src","dangerouslySetInnerHTML","__html","rel","href","favIcons","type","sizes","media","handleApiErrors","token","UserSession","getToken","requestConfig","headers","Authorization","fetchResponse","newToken","setItem","errors","entityName","join","err","msg","message","match","clear","pathname","info","replace","warn","PositivatorContext","positivatorModalData","closePositivatorModal","openPositivatorModal","positivator"],"mappings":"oJAWO,WAEL,OAAOA,EAAYC,qBAAiBC,EAApC,mBAbF,I,EAAA,G,EAAA,Y,2BACA,YAEO,SAASF,IAIC,6DAJV,GAIU,IAHfG,gBAGe,aAFfC,cAEe,aADfC,gBACe,SACf,OAAOF,GAAaC,GAApB,I,wKCNK,SAAeE,EAAtB,kC,4CAAO,WAAqCC,GAArC,mCAAAC,EAAA,yDACAC,IADA,yCACoBF,GADpB,UAGGG,EAA4CH,EAA5CG,UAAWC,EAAiCJ,EAAjCI,aAAcC,EAAmBL,EAAnBK,OAAQC,EAAWN,EAAXM,OACjCC,EAA0CH,EAA1CG,UAAWC,EAA+BJ,EAA/BI,iBAAkBC,EAAaL,EAAbK,SAChCF,EALA,yCAKkBP,GALlB,cAOCU,EAAQC,EACZC,gCACEL,EACAJ,EAFmB,UAGhBM,GAHgB,OAGLD,KAId,CAAC,WAAY,aAAaK,SAASR,KACjCS,EAAa,GACF,cAAXT,IACFS,EAAa,gBAEA,aAAXT,IACFS,EAAa,gBAGTC,EAAc,CAAC,MAAD,OACZD,EADY,YACEP,GADF,sBAEHG,EAFG,iEAKhBM,OAAOC,KAAKd,GAAWe,QACzBH,EAAKI,KAAK,CAAEhB,cAGC,aAAXE,GACFU,EAAKI,KAAK,CAAEb,YAGd,EAAAc,SAAQC,IAAR,QAAeN,IArCZ,kBAwCEf,GAxCF,4C,sBA2CP,SAASW,EAAIW,GAEX,IADA,IAAIC,EAAO,EACFC,EAAI,EAAGA,EAAIF,EAAIJ,OAAQM,IAC9BD,EAAOD,EAAIG,WAAWD,KAAOD,GAAQ,GAAKA,GAE5C,IAAIG,GAAY,SAAPH,GAAmBI,SAAS,IAA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ACLsG,qBAAsB,OAWxBrG,QALkD,SAK1CQ,GACN,MAAO,CACL8F,sBADK,WAEH9F,EAAIG,SAAS,CACX0F,qBAAsB,QAI1BE,qBAPK,SAOgBC,GACnBhG,EAAIG,SAAS,CACX0F,qBAAsBG,W","file":"static/chunks/pages/_app-f35b1148056a0cc2bad6.js","sourcesContent":["import React from 'react'\nimport { AmpStateContext } from './amp-context'\n\nexport function isInAmpMode({\n ampFirst = false,\n hybrid = false,\n hasQuery = false,\n} = {}): boolean {\n return ampFirst || (hybrid && hasQuery)\n}\n\nexport function useAmp(): boolean {\n // Don't assign the context value to a variable to save bytes\n return isInAmpMode(React.useContext(AmpStateContext))\n}\n","import { Context, mountRequestSignature } from 'graphql-clientgen';\n\nexport async function graphqlLogsMiddleware(ctx: Context) {\n if (!CAN_DEBUG()) return ctx;\n\n const { variables, methodConfig, action, result } = ctx;\n const { schemaKey, appendToFragment, fragment } = methodConfig;\n if (!schemaKey) return ctx;\n\n const color = rgb(\n mountRequestSignature(\n schemaKey,\n variables,\n `${fragment}${appendToFragment}`\n )\n );\n\n if (['complete', 'willQueue'].includes(action)) {\n let actionName = '';\n if (action === 'willQueue') {\n actionName = '๐Ÿš€';\n }\n if (action === 'complete') {\n actionName = '๐Ÿ›ฉ';\n }\n\n const args: any[] = [\n `%c ${actionName} ${schemaKey}`,\n `background: ${color}; color: #000000; padding: 3px; width: 100%; display: block;`\n ];\n\n if (Object.keys(variables).length) {\n args.push({ variables });\n }\n\n if (action === 'complete') {\n args.push({ result });\n }\n\n console.log(...args);\n }\n\n return ctx;\n}\n\nfunction rgb(str: string) {\n let hash = 0;\n for (let i = 0; i < str.length; i++) {\n hash = str.charCodeAt(i) + ((hash << 5) - hash);\n }\n let c = (hash & 0x00ffffff).toString(16).toUpperCase();\n return '#' + '00000'.substring(0, 6 - c.length) + c;\n}\n\nlet CAN_DEBUG = () => {\n if (typeof window !== 'undefined') {\n return localStorage.debug || window.location.hostname === 'localhost';\n }\n};\n","const urlFromEnv = process.env.REACT_APP_API_URL;\n\nif (!urlFromEnv) {\n throw new Error(\n `cria um arquivo .env na raiz do projeto seguindo o exemplo no arquivo .env.example`\n );\n}\n\nexport const API_URL = urlFromEnv;\n","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/_app\",\n function () {\n return require(\"private-next-pages/_app.tsx\");\n }\n ]);\n ","import React, { useContext } from 'react'\nimport Effect from './side-effect'\nimport { AmpStateContext } from './amp-context'\nimport { HeadManagerContext } from './head-manager-context'\nimport { isInAmpMode } from './amp'\n\ntype WithInAmpMode = {\n inAmpMode?: boolean\n}\n\nexport function defaultHead(inAmpMode = false): JSX.Element[] {\n const head = []\n if (!inAmpMode) {\n head.push()\n }\n return head\n}\n\nfunction onlyReactElement(\n list: Array>,\n child: React.ReactChild\n): Array> {\n // React children can be \"string\" or \"number\" in this case we ignore them for backwards compat\n if (typeof child === 'string' || typeof child === 'number') {\n return list\n }\n // Adds support for React.Fragment\n if (child.type === React.Fragment) {\n return list.concat(\n React.Children.toArray(child.props.children).reduce(\n (\n fragmentList: Array>,\n fragmentChild: React.ReactChild\n ): Array> => {\n if (\n typeof fragmentChild === 'string' ||\n typeof fragmentChild === 'number'\n ) {\n return fragmentList\n }\n return fragmentList.concat(fragmentChild)\n },\n []\n )\n )\n }\n return list.concat(child)\n}\n\nconst METATYPES = ['name', 'httpEquiv', 'charSet', 'itemProp']\n\n/*\n returns a function for filtering head child elements\n which shouldn't be duplicated, like \n Also adds support for deduplicated `key` properties\n*/\nfunction unique() {\n const keys = new Set()\n const tags = new Set()\n const metaTypes = new Set()\n const metaCategories: { [metatype: string]: Set<string> } = {}\n\n return (h: React.ReactElement<any>) => {\n let isUnique = true\n\n if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {\n const key = h.key.slice(h.key.indexOf('$') + 1)\n if (keys.has(key)) {\n isUnique = false\n } else {\n keys.add(key)\n }\n }\n\n // eslint-disable-next-line default-case\n switch (h.type) {\n case 'title':\n case 'base':\n if (tags.has(h.type)) {\n isUnique = false\n } else {\n tags.add(h.type)\n }\n break\n case 'meta':\n for (let i = 0, len = METATYPES.length; i < len; i++) {\n const metatype = METATYPES[i]\n if (!h.props.hasOwnProperty(metatype)) continue\n\n if (metatype === 'charSet') {\n if (metaTypes.has(metatype)) {\n isUnique = false\n } else {\n metaTypes.add(metatype)\n }\n } else {\n const category = h.props[metatype]\n const categories = metaCategories[metatype] || new Set()\n if (categories.has(category)) {\n isUnique = false\n } else {\n categories.add(category)\n metaCategories[metatype] = categories\n }\n }\n }\n break\n }\n\n return isUnique\n }\n}\n\n/**\n *\n * @param headElements List of multiple <Head> instances\n */\nfunction reduceComponents(\n headElements: Array<React.ReactElement<any>>,\n props: WithInAmpMode\n) {\n return headElements\n .reduce(\n (list: React.ReactChild[], headElement: React.ReactElement<any>) => {\n const headElementChildren = React.Children.toArray(\n headElement.props.children\n )\n return list.concat(headElementChildren)\n },\n []\n )\n .reduce(onlyReactElement, [])\n .reverse()\n .concat(defaultHead(props.inAmpMode))\n .filter(unique())\n .reverse()\n .map((c: React.ReactElement<any>, i: number) => {\n const key = c.key || i\n if (process.env.__NEXT_OPTIMIZE_FONTS && !props.inAmpMode) {\n if (\n c.type === 'link' &&\n c.props['href'] &&\n // TODO(prateekbh@): Replace this with const from `constants` when the tree shaking works.\n ['https://fonts.googleapis.com/css'].some((url) =>\n c.props['href'].startsWith(url)\n )\n ) {\n const newProps = { ...(c.props || {}) }\n newProps['data-href'] = newProps['href']\n newProps['href'] = undefined\n return React.cloneElement(c, newProps)\n }\n }\n return React.cloneElement(c, { key })\n })\n}\n\n/**\n * This component injects elements to `<head>` of your page.\n * To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.\n */\nfunction Head({ children }: { children: React.ReactNode }) {\n const ampState = useContext(AmpStateContext)\n const headManager = useContext(HeadManagerContext)\n return (\n <Effect\n reduceComponentsToState={reduceComponents}\n headManager={headManager}\n inAmpMode={isInAmpMode(ampState)}\n >\n {children}\n </Effect>\n )\n}\n\n// TODO: Remove in the next major release\nHead.rewind = () => {}\n\nexport default Head\n","import React from 'react'\n\nexport const HeadManagerContext: React.Context<{\n updateHead?: (state: any) => void\n mountedInstances?: any\n}> = React.createContext({})\n\nif (process.env.NODE_ENV !== 'production') {\n HeadManagerContext.displayName = 'HeadManagerContext'\n}\n","/**\n * ESSE ARQUIVO ยดE UMA COPIA DO USELESS EXISTENTE NO PROJETO UTILS, PQ NAO DA PRA IMPORTAR O UTILS AQUI\n * ELE AJUDA A DIMINUIR A QUANTIDADE DE ESTADO ESPALHADO ENTRE COMPONENTES E CENTRALIZA EM UM UNICO CONTEXT\n */\n\nimport * as React from 'react';\n\nexport type UseLessAPI<State> = {\n setState(state: Partial<State>): State;\n getState(): State;\n previousState: () => State | null;\n};\n\nexport function useLess<State, Actions>(\n factory: (prev: State | null) => State,\n deps?: any[]\n): State & Actions & UseLessAPI<State> & { api: UseLessAPI<State> };\n\nexport function useLess<State, Actions>(\n factory: (prev: State | null) => State,\n actions?: (api: UseLessAPI<State>) => Actions,\n deps?: any[]\n): State & Actions & UseLessAPI<State> & { api: UseLessAPI<State> };\n\nexport function useLess<State, Actions>(\n args: ArgsObject<State, Actions>\n): State & Actions & UseLessAPI<State> & { api: UseLessAPI<State> };\n\nexport function useLess<State>(...args: any[]) {\n const { factory, actions, onChange, deps } = parseArgs(...args);\n\n let isFirstRender = React.useRef(true);\n\n React.useEffect(() => {\n isFirstRender.current = true;\n }, deps);\n\n const previousState = React.useRef(null as State | null);\n\n const initial = React.useMemo(() => {\n const reactiveObject: any = factory(previousState.current);\n\n const api: UseLessAPI<State> = {\n previousState() {\n return previousState.current ? { ...previousState.current } : null;\n },\n getState() {\n return { ...ref.current };\n },\n setState(s: any) {\n Object.keys(s).forEach(function (k) {\n reactiveObject[k] = s[k];\n });\n return reactiveObject;\n }\n };\n\n Object.keys(reactiveObject).forEach(function (key) {\n const color = nextColor();\n let internalValue = reactiveObject[key];\n\n Object.defineProperty(reactiveObject, key, {\n get() {\n return internalValue;\n },\n set(value) {\n if (internalValue === value) return;\n internalValue = value;\n\n ref.current = { ...ref.current, [key]: value };\n setState(ref.current);\n\n onChange &&\n onChange(\n // @ts-ignore\n key,\n ref.current,\n api\n );\n\n if (CAN_DEBUG()) {\n requestAnimationFrame(() => {\n let valueString = ellipsis(\n value?.toString ? value.toString() : value + ''\n );\n\n if (Array.isArray(value)) {\n valueString = `[${valueString}]`;\n }\n if (valueString?.startsWith('[object Object]')) {\n valueString = '<<object>> ๐Ÿ”ฝ';\n }\n console.groupCollapsed(\n `%c set ${key} to ${valueString} ${new Date().toLocaleTimeString()} `,\n `background: ${color}; color: #000000; padding: 3px; width: 100%; display: block;`\n );\n console.log(value);\n console.trace();\n console.groupEnd();\n });\n }\n },\n enumerable: true\n });\n });\n\n if (!isFirstRender.current) {\n setState(reactiveObject);\n }\n\n isFirstRender.current = false;\n previousState.current = { ...reactiveObject };\n\n Object.keys(api).forEach(function (apiEntry) {\n Object.defineProperty(reactiveObject, apiEntry, {\n get() {\n return (api as any)[apiEntry];\n },\n enumerable: false\n });\n });\n\n Object.defineProperty(reactiveObject, 'api', {\n get() {\n return api;\n },\n enumerable: false\n });\n\n if (actions) {\n const currentActions: any = actions(api);\n Object.keys(currentActions).forEach((key) => {\n if (reactiveObject[key]) {\n return console.error(\n `${key} already defined as ${reactiveObject[key]}`\n );\n }\n Object.defineProperty(reactiveObject, key, {\n get() {\n return currentActions[key];\n },\n enumerable: false\n });\n });\n }\n\n return reactiveObject;\n }, deps);\n\n const ref = React.useRef<State>(initial);\n const [, setState] = React.useState<State>(initial);\n\n return initial as any;\n}\n\nfunction nextColor() {\n ++colorIndex;\n if (colorIndex >= colors.length) {\n colorIndex = 0;\n }\n return colors[colorIndex];\n}\n\nlet colorIndex = -1;\n\nconst colors = [\n '#3366E6',\n '#99FF99',\n '#E6B3B3',\n '#FF99E6',\n '#CCFF1A',\n '#FF1A66',\n '#33FFCC',\n '#991AFF',\n '#4DB3FF',\n '#1AB399',\n '#E666B3',\n '#CC9999',\n '#E6FF80',\n '#1AFF33',\n '#FF3380',\n '#CCCC00',\n '#66E64D',\n '#4D80CC',\n '#9900B3',\n '#FF6633',\n '#FFB399',\n '#FF33FF',\n '#00B3E6',\n '#E6B333',\n '#E64D66',\n '#FF4D4D',\n '#6666FF'\n];\n\nlet CAN_DEBUG = () => {\n if (typeof window !== 'undefined') {\n return localStorage.debug || window.location.hostname === 'localhost';\n }\n};\n\ntype ArgsObject<State, Actions> = {\n factory: (prev: State | null) => State;\n onChange?(key: keyof State, newState: State, api: UseLessAPI<State>): void;\n actions?: (api: UseLessAPI<State>) => Actions;\n deps: any[];\n};\n\nfunction parseArgs<State, Actions>(...args: any[]): ArgsObject<State, Actions> {\n let factory: any;\n let actions: any;\n let deps: any = [];\n\n if (typeof args[0] === 'function') {\n factory = args[0];\n\n if (typeof args[1] === 'function') {\n actions = args[1];\n }\n\n if (Array.isArray(args[1])) {\n deps = args[1];\n }\n\n if (Array.isArray(args[2])) {\n deps = args[2];\n }\n\n return {\n factory,\n actions,\n deps\n };\n }\n\n return args[0];\n}\n\nconst ellipsis = (str: string, max = 100) =>\n str.length > max ? `${str.substring(0, max)}...` : str;\n\nexport function createLessContext<State, Actions>(\n args: Omit<ArgsObject<State, Actions>, 'deps'>\n) {\n function _useState(useDepsHook: () => any[]) {\n const deps = useDepsHook();\n return useLess<State, Actions>({ ...args, deps });\n }\n\n type S = ReturnType<typeof _useState>;\n\n const Context = React.createContext<S | null>(null);\n\n function useState() {\n const state = React.useContext(Context);\n if (!state) {\n debugger;\n throw new Error(`Check if Provider was added to react tree`);\n }\n return state;\n }\n\n function useDefaultDepsHook(): any[] {\n return [];\n }\n\n function Provider(props: {\n children: (state: S) => React.ReactNode;\n useDepsHook?: () => any[];\n }) {\n const state = _useState(props.useDepsHook || useDefaultDepsHook);\n\n return (\n <Context.Provider value={state}>{props.children(state)}</Context.Provider>\n );\n }\n\n return {\n useState,\n Provider\n };\n}\n\nexport type LessStateType<\n Context extends ReturnType<typeof createLessContext>\n> = ReturnType<Context['useState']>;\n","import React, { Component } from 'react'\n\nconst isServer = typeof window === 'undefined'\n\ntype State = JSX.Element[] | undefined\n\ntype SideEffectProps = {\n reduceComponentsToState: <T>(\n components: Array<React.ReactElement<any>>,\n props: T\n ) => State\n handleStateChange?: (state: State) => void\n headManager: any\n inAmpMode?: boolean\n}\n\nexport default class extends Component<SideEffectProps> {\n private _hasHeadManager: boolean\n\n emitChange = (): void => {\n if (this._hasHeadManager) {\n this.props.headManager.updateHead(\n this.props.reduceComponentsToState(\n [...this.props.headManager.mountedInstances],\n this.props\n )\n )\n }\n }\n\n constructor(props: any) {\n super(props)\n this._hasHeadManager =\n this.props.headManager && this.props.headManager.mountedInstances\n\n if (isServer && this._hasHeadManager) {\n this.props.headManager.mountedInstances.add(this)\n this.emitChange()\n }\n }\n componentDidMount() {\n if (this._hasHeadManager) {\n this.props.headManager.mountedInstances.add(this)\n }\n this.emitChange()\n }\n componentDidUpdate() {\n this.emitChange()\n }\n componentWillUnmount() {\n if (this._hasHeadManager) {\n this.props.headManager.mountedInstances.delete(this)\n }\n this.emitChange()\n }\n\n render() {\n return null\n }\n}\n","import React, { ReactElement, ReactNode } from 'react';\nimport { AppProps } from 'next/app';\nimport Head from 'next/head';\n\nimport { GraphQLClient, GraphQLProvider } from 'graphql-clientgen';\nimport { API_URL } from '../../config/apiURL';\nimport { AppMethods, AppMethodsInfo } from '../../client/client';\nimport { graphqlAuthMiddleware } from '../utils/graphqlAuthMiddleware';\nimport { graphqlLogsMiddleware } from '../utils/graphqlLogsMiddleware';\nimport '../theme/index.less';\nimport { UserProvider } from '../hooks/useUser';\nimport { PositivatorContext } from '../components/Positivator/usePositivatorState';\nimport type { NextPage } from 'next';\n\nexport type NextPageWithLayout<P = {}, IP = P> = NextPage<P, IP> & {\n getLayout?: (page: ReactElement) => ReactNode;\n};\n\ntype AppPropsWithLayout = AppProps & {\n Component: NextPageWithLayout;\n};\n\nconst MyApp: React.FC<AppProps> = function MyApp({\n Component,\n pageProps\n}: AppPropsWithLayout) {\n const client = React.useMemo(() => {\n return new GraphQLClient({\n url: API_URL,\n methods: AppMethods,\n methodsInfo: AppMethodsInfo,\n middleware: [graphqlAuthMiddleware, graphqlLogsMiddleware]\n });\n }, []);\n\n const getLayout = Component.getLayout ?? ((page) => page);\n\n return (\n <>\n <Head>\n <script\n async\n src=\"https://www.googletagmanager.com/gtag/js?id=UA-154596215-3\"\n />\n <script\n dangerouslySetInnerHTML={{\n __html: `\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', 'UA-154596215-3');\n `\n }}\n />\n <meta\n name=\"viewport\"\n content=\"width=device-width, initial-scale=1.00, maximum-scale=1, minimum-scale=1.00\"\n />\n <meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\n <meta name=\"mobile-web-app-capable\" content=\"yes\" />\n <meta\n name=\"apple-mobile-web-app-status-bar-style\"\n content=\"black-translucent\"\n />\n <meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\n {favIcons()}\n {splash()}\n </Head>\n\n <GraphQLProvider client={client}>\n <PositivatorContext.Provider>\n {() => (\n <UserProvider>\n {getLayout(<Component {...pageProps} />)}\n </UserProvider>\n )}\n </PositivatorContext.Provider>\n </GraphQLProvider>\n </>\n );\n};\n\nexport default MyApp;\n\nfunction favIcons(color = '#004691') {\n return (\n <>\n <link rel=\"manifest\" href=\"/static/manifest.json?v=32Nma5vmqjAA\" />\n\n <meta name=\"apple-mobile-web-app-title\" content=\"Tim - Positivador\" />\n <meta name=\"application-name\" content=\"Tim - Positivador\" />\n <meta name=\"msapplication-TileColor\" content=\"#b91d47\" />\n <meta name=\"theme-color\" content=\"#ffffff\" />\n <meta name=\"msapplication-TileColor\" content={color} />\n <meta name=\"theme-color\" content={color} />\n </>\n );\n}\nfunction splash() {\n return (\n <>\n <link\n rel=\"icon\"\n type=\"image/png\"\n sizes=\"196x196\"\n href=\"/static/favicon/favicon-196.png\"\n />\n <meta\n name=\"msapplication-square70x70logo\"\n content=\"/static/favicon/mstile-icon-128.png\"\n />\n <meta\n name=\"msapplication-square150x150logo\"\n content=\"/static/favicon/mstile-icon-270.png\"\n />\n <meta\n name=\"msapplication-square310x310logo\"\n content=\"/static/favicon/mstile-icon-558.png\"\n />\n <meta\n name=\"msapplication-wide310x150logo\"\n content=\"/static/favicon/mstile-icon-558-270.png\"\n />\n <link rel=\"apple-touch-icon\" href=\"/static/favicon/apple-icon-180.png\" />\n <meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-2048-2732.jpg\"\n media=\"(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-2732-2048.jpg\"\n media=\"(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-1668-2388.jpg\"\n media=\"(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-2388-1668.jpg\"\n media=\"(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-1536-2048.jpg\"\n media=\"(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-2048-1536.jpg\"\n media=\"(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-1668-2224.jpg\"\n media=\"(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-2224-1668.jpg\"\n media=\"(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-1620-2160.jpg\"\n media=\"(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-2160-1620.jpg\"\n media=\"(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-1284-2778.jpg\"\n media=\"(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-2778-1284.jpg\"\n media=\"(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-1170-2532.jpg\"\n media=\"(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-2532-1170.jpg\"\n media=\"(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-1125-2436.jpg\"\n media=\"(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-2436-1125.jpg\"\n media=\"(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-1242-2688.jpg\"\n media=\"(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-2688-1242.jpg\"\n media=\"(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-828-1792.jpg\"\n media=\"(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-1792-828.jpg\"\n media=\"(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-1242-2208.jpg\"\n media=\"(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-2208-1242.jpg\"\n media=\"(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-750-1334.jpg\"\n media=\"(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-1334-750.jpg\"\n media=\"(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-640-1136.jpg\"\n media=\"(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)\"\n />\n <link\n rel=\"apple-touch-startup-image\"\n href=\"/static/favicon/apple-splash-1136-640.jpg\"\n media=\"(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)\"\n />\n </>\n );\n}\n","import React from 'react'\n\nexport const AmpStateContext: React.Context<any> = React.createContext({})\n\nif (process.env.NODE_ENV !== 'production') {\n AmpStateContext.displayName = 'AmpStateContext'\n}\n","import { Context, Middleware } from 'graphql-clientgen';\nimport { UserSession } from './UserSession';\nimport { message } from 'antd';\n\nexport const graphqlAuthMiddleware: Middleware = async (ctx) => {\n handleApiErrors(ctx);\n\n const token = UserSession.getToken();\n\n if (token) {\n ctx.requestConfig.headers = {\n ...ctx.requestConfig.headers,\n Authorization: `bearer ${token}`\n };\n }\n\n // quando usamos um token temporario, a api pode retornar\n // um novo token permanente no response header authorization\n // quando isso ocorre, salvamos o novo token permanente\n if (ctx.fetchResponse) {\n const newToken = ctx.fetchResponse.headers.get('authorization');\n if (newToken) {\n UserSession.setItem('temp_token', newToken);\n }\n }\n\n return ctx;\n};\n\nconst handleApiErrors = (ctx: Context) => {\n if (!ctx.errors) return;\n if (ctx.action !== 'complete') return;\n if (ctx.methodConfig.entityName === 'User') return; // nao notificar 401 quando fetch de user\n\n const error = ctx.errors.join();\n\n ctx.errors.forEach(function (err: string | Record<string, any>) {\n const msg = typeof err === 'string' ? err : err.message;\n if (msg === '401' || msg.match(/Unauthorized/i)) {\n localStorage.clear();\n if (!window.location.pathname.match(/login/)) {\n window.location.href = '/';\n }\n }\n });\n\n if (typeof window !== 'undefined') {\n if (error.match(/CLIENT_INFO::/)) {\n return message.info(error.replace('CLIENT_INFO::', ''));\n }\n\n if (error.match(/CLIENT_WARNING::/)) {\n return message.warn(error.replace('CLIENT_WARNING::', ''));\n }\n\n message.error(`${ctx.methodConfig.entityName}: ${error}`);\n }\n\n return ctx;\n};\n","import { createLessContext, UseLessAPI } from '../../hooks/useLess';\nimport { PositivatorItem } from '../../../client/types';\n\nfunction initialState() {\n return {\n positivatorModalData: null as null | PositivatorItem\n };\n}\n\ntype State = ReturnType<typeof initialState>;\n\nexport const PositivatorContext = createLessContext({\n factory() {\n return initialState();\n },\n\n actions(api: UseLessAPI<State>) {\n return {\n closePositivatorModal() {\n api.setState({\n positivatorModalData: null\n });\n },\n\n openPositivatorModal(positivator: PositivatorItem) {\n api.setState({\n positivatorModalData: positivator\n });\n }\n };\n }\n});\n"],"sourceRoot":""}