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EAC3E,CACF","sources":["webpack://_N_E/?a218","webpack://_N_E/./src/services/intercom-provider/index.tsx","webpack://_N_E/./src/styles/globals.css","webpack://_N_E/./src/components/ui/toast.tsx","webpack://_N_E/./src/components/ui/toaster.tsx","webpack://_N_E/./src/services/tanstack-query/provider.tsx","webpack://_N_E/./src/lib/utils.ts","webpack://_N_E/./src/hooks/use-toast.ts"],"sourcesContent":["import(/* webpackMode: \"eager\" */ \"/codebuild/output/src1699180052/src/treeunfe-website-nextjs/node_modules/@next/third-parties/dist/google/ga.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src1699180052/src/treeunfe-website-nextjs/node_modules/@next/third-parties/dist/google/gtm.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src1699180052/src/treeunfe-website-nextjs/node_modules/@next/third-parties/dist/ThirdPartyScriptEmbed.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src1699180052/src/treeunfe-website-nextjs/node_modules/next/dist/client/script.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src1699180052/src/treeunfe-website-nextjs/node_modules/next/font/google/target.css?{\\\"path\\\":\\\"src/app/layout.tsx\\\",\\\"import\\\":\\\"Inter\\\",\\\"arguments\\\":[{\\\"subsets\\\":[\\\"latin\\\"],\\\"variable\\\":\\\"--font-inter\\\"}],\\\"variableName\\\":\\\"inter\\\"}\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"Toaster\"] */ \"/codebuild/output/src1699180052/src/treeunfe-website-nextjs/src/components/ui/toaster.tsx\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"default\"] */ \"/codebuild/output/src1699180052/src/treeunfe-website-nextjs/src/services/intercom-provider/index.tsx\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"default\"] */ \"/codebuild/output/src1699180052/src/treeunfe-website-nextjs/src/services/tanstack-query/provider.tsx\");\n;\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src1699180052/src/treeunfe-website-nextjs/src/styles/globals.css\");\n","'use client'\nimport { useEffect } from 'react'\n\ndeclare global {\n interface Window {\n Intercom?: (...args: any[]) => void\n intercomSettings?: {\n app_id: string\n name?: string\n email?: string\n user_id?: string\n }\n }\n}\n\nconst APP_ID = process.env.NEXT_PUBLIC_INTERCOM_APP_ID\nif (!APP_ID) {\n throw new Error('Intercom APP_ID não foi definido!')\n}\n\nconst IntercomProvider = () => {\n useEffect(() => {\n const loadIntercom = () => {\n if (typeof window !== 'undefined') {\n window.intercomSettings = {\n app_id: APP_ID,\n }\n\n // Carregar o Intercom de forma assíncrona\n const script = document.createElement('script')\n script.type = 'text/javascript'\n script.async = true\n script.src = `https://widget.intercom.io/widget/${APP_ID}`\n\n // Adiciona o script no head da página\n script.onload = () => {\n if (typeof window.Intercom === 'function') {\n window.Intercom('reattach_activator')\n window.Intercom('update', window.intercomSettings)\n }\n }\n\n const firstScriptTag = document.getElementsByTagName('script')[0]\n firstScriptTag.parentNode?.insertBefore(script, firstScriptTag)\n }\n }\n\n // Carregar o Intercom após a página ter carregado\n if (typeof window !== 'undefined') {\n window.onload = loadIntercom\n }\n\n // Limpar o evento para não sobrescrever\n return () => {\n if (typeof window !== 'undefined' && window.onload === loadIntercom) {\n window.onload = null\n }\n }\n }, [])\n\n return null\n}\n\nexport default IntercomProvider\n","// extracted by mini-css-extract-plugin","\"use client\"\n\nimport * as React from \"react\"\nimport * as ToastPrimitives from \"@radix-ui/react-toast\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst ToastProvider = ToastPrimitives.Provider\n\nconst ToastViewport = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nToastViewport.displayName = ToastPrimitives.Viewport.displayName\n\nconst toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border bg-background text-foreground\",\n destructive:\n \"destructive group border-destructive bg-destructive text-destructive-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst Toast = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, variant, ...props }, ref) => {\n return (\n \n )\n})\nToast.displayName = ToastPrimitives.Root.displayName\n\nconst ToastAction = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nToastAction.displayName = ToastPrimitives.Action.displayName\n\nconst ToastClose = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n))\nToastClose.displayName = ToastPrimitives.Close.displayName\n\nconst ToastTitle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nToastTitle.displayName = ToastPrimitives.Title.displayName\n\nconst ToastDescription = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nToastDescription.displayName = ToastPrimitives.Description.displayName\n\ntype ToastProps = React.ComponentPropsWithoutRef\n\ntype ToastActionElement = React.ReactElement\n\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n}\n","'use client'\n\nimport {\n Toast,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport,\n} from '@/components/ui/toast'\nimport { useToast } from '@/hooks/use-toast'\n\nexport function Toaster() {\n const { toasts } = useToast()\n\n return (\n \n {toasts.map(function ({ id, title, description, action, ...props }) {\n return (\n \n
\n {title && {title}}\n {description && (\n {description}\n )}\n
\n {action}\n \n
\n )\n })}\n \n
\n )\n}\n","// In Next.js, this file would be called: app/providers.jsx\n'use client'\n\n// Since QueryClientProvider relies on useContext under the hood, we have to put 'use client' on top\nimport {\n isServer,\n QueryClient,\n QueryClientProvider,\n} from '@tanstack/react-query'\n\nfunction makeQueryClient() {\n return new QueryClient({\n defaultOptions: {\n queries: {\n // With SSR, we usually want to set some default staleTime\n // above 0 to avoid refetching immediately on the client\n staleTime: 60 * 1000,\n },\n },\n })\n}\n\nlet browserQueryClient: QueryClient | undefined = undefined\n\nfunction getQueryClient() {\n if (isServer) {\n // Server: always make a new query client\n return makeQueryClient()\n } else {\n // Browser: make a new query client if we don't already have one\n // This is very important, so we don't re-make a new client if React\n // suspends during the initial render. This may not be needed if we\n // have a suspense boundary BELOW the creation of the query client\n if (!browserQueryClient) browserQueryClient = makeQueryClient()\n return browserQueryClient\n }\n}\n\nexport default function TanstackQueryProvider({\n children,\n}: {\n children: React.ReactNode\n}) {\n // NOTE: Avoid useState when initializing the query client if you don't\n // have a suspense boundary between this and the code that may\n // suspend because React will throw away the client on the initial\n // render if it suspends and there is no boundary\n const queryClient = getQueryClient()\n\n return (\n {children}\n )\n}\n","import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\ntype QueryParams = {\n content_type: string\n fields?: Record\n limit?: number\n order?: string\n skip?: number\n include?: number\n}\n\nexport function buildQuery(params: QueryParams): string {\n const queryParts: string[] = []\n\n queryParts.push(`content_type=${encodeURIComponent(params.content_type)}`)\n\n if (params.fields) {\n Object.entries(params.fields).forEach(([key, value]) => {\n queryParts.push(\n `fields.${encodeURIComponent(key)}[match]=${encodeURIComponent(value)}`,\n )\n })\n }\n\n if (params.limit !== undefined) {\n queryParts.push(`limit=${params.limit}`)\n }\n\n if (params.order) {\n queryParts.push(`order=${encodeURIComponent(params.order)}`)\n }\n\n if (params.skip !== undefined) {\n queryParts.push(`skip=${params.skip}`)\n }\n\n params.include\n ? queryParts.push(`include=${params.include}`)\n : queryParts.push(`include=0`)\n\n return queryParts.join('&')\n}\n","\"use client\"\n\n// Inspired by react-hot-toast library\nimport * as React from \"react\"\n\nimport type {\n ToastActionElement,\n ToastProps,\n} from \"@/components/ui/toast\"\n\nconst TOAST_LIMIT = 1\nconst TOAST_REMOVE_DELAY = 1000000\n\ntype ToasterToast = ToastProps & {\n id: string\n title?: React.ReactNode\n description?: React.ReactNode\n action?: ToastActionElement\n}\n\nconst actionTypes = {\n ADD_TOAST: \"ADD_TOAST\",\n UPDATE_TOAST: \"UPDATE_TOAST\",\n DISMISS_TOAST: \"DISMISS_TOAST\",\n REMOVE_TOAST: \"REMOVE_TOAST\",\n} as const\n\nlet count = 0\n\nfunction genId() {\n count = (count + 1) % Number.MAX_SAFE_INTEGER\n return count.toString()\n}\n\ntype ActionType = typeof actionTypes\n\ntype Action =\n | {\n type: ActionType[\"ADD_TOAST\"]\n toast: ToasterToast\n }\n | {\n type: ActionType[\"UPDATE_TOAST\"]\n toast: Partial\n }\n | {\n type: ActionType[\"DISMISS_TOAST\"]\n toastId?: ToasterToast[\"id\"]\n }\n | {\n type: ActionType[\"REMOVE_TOAST\"]\n toastId?: ToasterToast[\"id\"]\n }\n\ninterface State {\n toasts: ToasterToast[]\n}\n\nconst toastTimeouts = new Map>()\n\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) {\n return\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId)\n dispatch({\n type: \"REMOVE_TOAST\",\n toastId: toastId,\n })\n }, TOAST_REMOVE_DELAY)\n\n toastTimeouts.set(toastId, timeout)\n}\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case \"ADD_TOAST\":\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n }\n\n case \"UPDATE_TOAST\":\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t\n ),\n }\n\n case \"DISMISS_TOAST\": {\n const { toastId } = action\n\n // ! Side effects ! - This could be extracted into a dismissToast() action,\n // but I'll keep it here for simplicity\n if (toastId) {\n addToRemoveQueue(toastId)\n } else {\n state.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id)\n })\n }\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n open: false,\n }\n : t\n ),\n }\n }\n case \"REMOVE_TOAST\":\n if (action.toastId === undefined) {\n return {\n ...state,\n toasts: [],\n }\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\n }\n }\n}\n\nconst listeners: Array<(state: State) => void> = []\n\nlet memoryState: State = { toasts: [] }\n\nfunction dispatch(action: Action) {\n memoryState = reducer(memoryState, action)\n listeners.forEach((listener) => {\n listener(memoryState)\n })\n}\n\ntype Toast = Omit\n\nfunction toast({ ...props }: Toast) {\n const id = genId()\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: \"UPDATE_TOAST\",\n toast: { ...props, id },\n })\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id })\n\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => {\n if (!open) dismiss()\n },\n },\n })\n\n return {\n id: id,\n dismiss,\n update,\n }\n}\n\nfunction useToast() {\n const [state, setState] = React.useState(memoryState)\n\n React.useEffect(() => {\n listeners.push(setState)\n return () => {\n const index = listeners.indexOf(setState)\n if (index > -1) {\n listeners.splice(index, 1)\n }\n }\n }, [state])\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\n }\n}\n\nexport { useToast, toast }\n"],"names":["APP_ID","process","useEffect","IntercomProvider","loadIntercom","firstScriptTag","window","intercomSettings","app_id","script","document","createElement","type","async","src","onload","Intercom","getElementsByTagName","parentNode","insertBefore","ToastProvider","ToastPrimitives","ToastViewport","React","ref","className","props","cn","displayName","toastVariants","cva","variants","variant","default","destructive","defaultVariants","Toast","ToastAction","ToastClose","toast-close","X","ToastTitle","ToastDescription","Toaster","toasts","useToast","map","id","title","description","action","duration","div","browserQueryClient","undefined","makeQueryClient","QueryClient","defaultOptions","queries","staleTime","TanstackQueryProvider","children","queryClient","isServer","getQueryClient","QueryClientProvider","client","inputs","twMerge","clsx","count","toastTimeouts","Map","addToRemoveQueue","has","toastId","timeout","setTimeout","delete","dispatch","TOAST_REMOVE_DELAY","set","reducer","state","toast","slice","TOAST_LIMIT","t","forEach","open","filter","memoryState","listeners","listener","Number","MAX_SAFE_INTEGER","toString","dismiss","onOpenChange","update","setState","push","index","indexOf","splice"],"sourceRoot":"","ignoreList":[]}