"use strict";(()=>{var T={};T.id=4912,T.ids=[4912],T.modules={72934:T=>{T.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:T=>{T.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:T=>{T.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:T=>{T.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:T=>{T.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},27790:T=>{T.exports=require("assert")},78893:T=>{T.exports=require("buffer")},84770:T=>{T.exports=require("crypto")},17702:T=>{T.exports=require("events")},92048:T=>{T.exports=require("fs")},32615:T=>{T.exports=require("http")},35240:T=>{T.exports=require("https")},19801:T=>{T.exports=require("os")},55315:T=>{T.exports=require("path")},86624:T=>{T.exports=require("querystring")},17360:T=>{T.exports=require("url")},21764:T=>{T.exports=require("util")},71568:T=>{T.exports=require("zlib")},92761:T=>{T.exports=require("node:async_hooks")},17718:T=>{T.exports=require("node:child_process")},6005:T=>{T.exports=require("node:crypto")},15673:T=>{T.exports=require("node:events")},87561:T=>{T.exports=require("node:fs")},93977:T=>{T.exports=require("node:fs/promises")},70612:T=>{T.exports=require("node:os")},49411:T=>{T.exports=require("node:path")},97742:T=>{T.exports=require("node:process")},25997:T=>{T.exports=require("node:tty")},47261:T=>{T.exports=require("node:util")},57549:(T,e,E)=>{E.r(e),E.d(e,{originalPathname:()=>S,patchFetch:()=>D,requestAsyncStorage:()=>a,routeModule:()=>O,serverHooks:()=>I,staticGenerationAsyncStorage:()=>s});var L={};E.r(L),E.d(L,{GET:()=>U,POST:()=>U});var N=E(49790),A=E(60540),r=E(82273),t=E(27489),i=E.n(t),o=E(64451);let U=i()(o.L),O=new N.AppRouteRouteModule({definition:{kind:A.x.APP_ROUTE,page:"/api/auth/[...nextauth]/route",pathname:"/api/auth/[...nextauth]",filename:"route",bundlePath:"app/api/auth/[...nextauth]/route"},resolvedPagePath:"/Users/andrasgyenes/Desktop/MrQuery 2026/HyreMe/Archive/hyreme-app/app/api/auth/[...nextauth]/route.ts",nextConfigOutput:"standalone",userland:L}),{requestAsyncStorage:a,staticGenerationAsyncStorage:s,serverHooks:I}=O,S="/api/auth/[...nextauth]/route";function D(){return(0,r.patchFetch)({serverHooks:I,staticGenerationAsyncStorage:s})}},64451:(T,e,E)=>{E.d(e,{L:()=>i});var L=E(53236),N=E(23734),A=E.n(N),r=E(92795),t=E(93334);let i={session:{strategy:"jwt"},pages:{signIn:"/login"},providers:[(0,L.Z)({name:"credentials",credentials:{email:{label:"Email",type:"email"},password:{label:"Password",type:"password"}},async authorize(T){if(!T?.email||!T?.password)return null;await (0,t.X)(r._);let e=await r._.user.findUnique({where:{email:T.email.toLowerCase()}});if(!e||!await A().compare(T.password,e.password))return null;if(!e.emailVerified)throw Error("EMAIL_NOT_VERIFIED");return{id:e.id,email:e.email,name:e.name??void 0}}})],callbacks:{jwt:async({token:T,user:e})=>(e&&(T.id=e.id),T),session:async({session:T,token:e})=>(T.user&&e.id&&(T.user.id=e.id),T)}}},93334:(T,e,E)=>{E.d(e,{X:()=>r});let L=globalThis,N=[`
  CREATE TABLE IF NOT EXISTS "User" (
      "id" TEXT NOT NULL,
      "email" TEXT NOT NULL,
      "password" TEXT NOT NULL,
      "name" TEXT,
      "firstName" TEXT,
      "lastName" TEXT,
      "photoUrl" TEXT,
      "emailVerified" TIMESTAMP(3),
      "verificationToken" TEXT,
      "verificationTokenExpiry" TIMESTAMP(3),
      "aiProvider" TEXT NOT NULL DEFAULT 'gemini',
      "aiModel" TEXT,
      "aiOpenaiKey" TEXT,
      "aiAnthropicKey" TEXT,
      "aiGeminiKey" TEXT,
      "aiMistralKey" TEXT,
      "aiGroqKey" TEXT,
      "aiDeepseekKey" TEXT,
      "aiXaiKey" TEXT,
      "aiCohereKey" TEXT,
      "aiPerplexityKey" TEXT,
      "aiOllamaKey" TEXT,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      CONSTRAINT "User_pkey" PRIMARY KEY ("id")
  )
  `,'ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "name" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "firstName" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "lastName" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "photoUrl" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "emailVerified" TIMESTAMP(3)','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "verificationToken" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "verificationTokenExpiry" TIMESTAMP(3)','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "aiProvider" TEXT DEFAULT \'gemini\'','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "aiModel" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "aiOpenaiKey" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "aiAnthropicKey" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "aiGeminiKey" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "aiMistralKey" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "aiGroqKey" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "aiDeepseekKey" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "aiXaiKey" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "aiCohereKey" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "aiPerplexityKey" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "aiOllamaKey" TEXT','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP','ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP','CREATE UNIQUE INDEX IF NOT EXISTS "User_email_key" ON "User"("email")',`
  CREATE TABLE IF NOT EXISTS "Profile" (
      "id" TEXT NOT NULL,
      "userId" TEXT NOT NULL,
      "fullName" TEXT NOT NULL DEFAULT '',
      "email" TEXT NOT NULL DEFAULT '',
      "phone" TEXT NOT NULL DEFAULT '',
      "location" TEXT NOT NULL DEFAULT '',
      "linkedinUrl" TEXT NOT NULL DEFAULT '',
      "websiteUrl" TEXT NOT NULL DEFAULT '',
      "summary" TEXT NOT NULL DEFAULT '',
      "skills" JSONB NOT NULL DEFAULT '[]',
      "experience" JSONB NOT NULL DEFAULT '[]',
      "education" JSONB NOT NULL DEFAULT '[]',
      "certifications" JSONB NOT NULL DEFAULT '[]',
      "projects" JSONB NOT NULL DEFAULT '[]',
      "languages" JSONB NOT NULL DEFAULT '[]',
      "atsScore" INTEGER,
      "lastAnalysis" TEXT,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      CONSTRAINT "Profile_pkey" PRIMARY KEY ("id")
  )
  `,'ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "fullName" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "email" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "phone" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "location" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "linkedinUrl" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "websiteUrl" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "summary" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "skills" JSONB NOT NULL DEFAULT \'[]\'','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "experience" JSONB NOT NULL DEFAULT \'[]\'','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "education" JSONB NOT NULL DEFAULT \'[]\'','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "certifications" JSONB NOT NULL DEFAULT \'[]\'','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "projects" JSONB NOT NULL DEFAULT \'[]\'','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "languages" JSONB NOT NULL DEFAULT \'[]\'','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "atsScore" INTEGER','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "lastAnalysis" TEXT','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP','ALTER TABLE "Profile" ADD COLUMN IF NOT EXISTS "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP','ALTER TABLE "Profile" DROP COLUMN IF EXISTS "targetTitle"','CREATE UNIQUE INDEX IF NOT EXISTS "Profile_userId_key" ON "Profile"("userId")',`
  CREATE TABLE IF NOT EXISTS "JobListing" (
      "id" TEXT NOT NULL,
      "userId" TEXT NOT NULL,
      "url" TEXT NOT NULL,
      "title" TEXT NOT NULL DEFAULT '',
      "company" TEXT NOT NULL DEFAULT '',
      "location" TEXT NOT NULL DEFAULT '',
      "rawContent" TEXT NOT NULL DEFAULT '',
      "description" TEXT NOT NULL DEFAULT '',
      "fitScore" INTEGER,
      "fitAnalysis" TEXT,
      "tailoredCvHtml" TEXT,
      "coverLetterHtml" TEXT,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      CONSTRAINT "JobListing_pkey" PRIMARY KEY ("id")
  )
  `,'ALTER TABLE "JobListing" ADD COLUMN IF NOT EXISTS "title" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "JobListing" ADD COLUMN IF NOT EXISTS "company" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "JobListing" ADD COLUMN IF NOT EXISTS "location" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "JobListing" ADD COLUMN IF NOT EXISTS "rawContent" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "JobListing" ADD COLUMN IF NOT EXISTS "description" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "JobListing" ADD COLUMN IF NOT EXISTS "fitScore" INTEGER','ALTER TABLE "JobListing" ADD COLUMN IF NOT EXISTS "fitAnalysis" TEXT','ALTER TABLE "JobListing" ADD COLUMN IF NOT EXISTS "tailoredCvHtml" TEXT','ALTER TABLE "JobListing" ADD COLUMN IF NOT EXISTS "coverLetterHtml" TEXT','ALTER TABLE "JobListing" ADD COLUMN IF NOT EXISTS "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP','ALTER TABLE "JobListing" ADD COLUMN IF NOT EXISTS "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP',`
  CREATE TABLE IF NOT EXISTS "PromptTemplate" (
      "id" TEXT NOT NULL,
      "key" TEXT NOT NULL,
      "label" TEXT NOT NULL,
      "description" TEXT NOT NULL DEFAULT '',
      "defaultContent" TEXT NOT NULL,
      "activeContent" TEXT NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      CONSTRAINT "PromptTemplate_pkey" PRIMARY KEY ("id")
  )
  `,'ALTER TABLE "PromptTemplate" ADD COLUMN IF NOT EXISTS "key" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "PromptTemplate" ADD COLUMN IF NOT EXISTS "label" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "PromptTemplate" ADD COLUMN IF NOT EXISTS "description" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "PromptTemplate" ADD COLUMN IF NOT EXISTS "defaultContent" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "PromptTemplate" ADD COLUMN IF NOT EXISTS "activeContent" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "PromptTemplate" ADD COLUMN IF NOT EXISTS "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP','ALTER TABLE "PromptTemplate" ADD COLUMN IF NOT EXISTS "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP','CREATE UNIQUE INDEX IF NOT EXISTS "PromptTemplate_key_key" ON "PromptTemplate"("key")',`
  CREATE TABLE IF NOT EXISTS "PromptTemplateVersion" (
      "id" TEXT NOT NULL,
      "promptKey" TEXT NOT NULL,
      "version" INTEGER NOT NULL,
      "content" TEXT NOT NULL,
      "updatedBy" TEXT,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      CONSTRAINT "PromptTemplateVersion_pkey" PRIMARY KEY ("id")
  )
  `,'ALTER TABLE "PromptTemplateVersion" ADD COLUMN IF NOT EXISTS "promptKey" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "PromptTemplateVersion" ADD COLUMN IF NOT EXISTS "version" INTEGER NOT NULL DEFAULT 1','ALTER TABLE "PromptTemplateVersion" ADD COLUMN IF NOT EXISTS "content" TEXT NOT NULL DEFAULT \'\'','ALTER TABLE "PromptTemplateVersion" ADD COLUMN IF NOT EXISTS "updatedBy" TEXT','ALTER TABLE "PromptTemplateVersion" ADD COLUMN IF NOT EXISTS "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP','CREATE INDEX IF NOT EXISTS "PromptTemplateVersion_promptKey_version_idx" ON "PromptTemplateVersion"("promptKey", "version")',`
  DO $$
  BEGIN
      IF NOT EXISTS (
          SELECT 1 FROM pg_constraint WHERE conname = 'Profile_userId_fkey'
      ) THEN
          ALTER TABLE "Profile"
              ADD CONSTRAINT "Profile_userId_fkey"
              FOREIGN KEY ("userId") REFERENCES "User"("id")
              ON DELETE CASCADE ON UPDATE CASCADE;
      END IF;
  END $$;
  `,`
  DO $$
  BEGIN
      IF NOT EXISTS (
          SELECT 1 FROM pg_constraint WHERE conname = 'JobListing_userId_fkey'
      ) THEN
          ALTER TABLE "JobListing"
              ADD CONSTRAINT "JobListing_userId_fkey"
              FOREIGN KEY ("userId") REFERENCES "User"("id")
              ON DELETE CASCADE ON UPDATE CASCADE;
      END IF;
  END $$;
  `,`
  DO $$
  BEGIN
      IF NOT EXISTS (
          SELECT 1 FROM pg_constraint WHERE conname = 'PromptTemplateVersion_promptKey_fkey'
      ) THEN
          ALTER TABLE "PromptTemplateVersion"
              ADD CONSTRAINT "PromptTemplateVersion_promptKey_fkey"
              FOREIGN KEY ("promptKey") REFERENCES "PromptTemplate"("key")
              ON DELETE CASCADE ON UPDATE CASCADE;
      END IF;
  END $$;
  `];async function A(T){for(let e of N)await T.$executeRawUnsafe(e)}async function r(T){"true"!==String(process.env.LOCAL_DEV_MODE||"").toLowerCase()&&(L.hyremeSchemaReady||(L.hyremeSchemaReady=A(T).catch(T=>{throw L.hyremeSchemaReady=void 0,T})),await L.hyremeSchemaReady)}},49790:(T,e,E)=>{T.exports=E(30517)}};var e=require("../../../../webpack-runtime.js");e.C(T);var E=T=>e(e.s=T),L=e.X(0,[9085,400,7764,2795],()=>E(57549));module.exports=L})();