PageSourceSearch

https://prompthero.com/_next/static/chunks/7594-b873746613947c27.js

js prompthero.com collected 2026-09-24 09:23:56 UTC 28,543 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="019f9510-f7b1-7ca2-bffc-1438b3ee2d33")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7594],{3250:(e,t,r)=>{r.d(t,{M:()=>i});var n=r(3847),o=r(7620),s=r(63079);function i(e){var t;let{pluginPathMethods:r,pluginsActions:i,pluginsAtoms:l,$fetch:a,$store:u,atomListeners:c}=(0,n.i)(e),d={};for(let[e,t]of Object.entries(l))d[`use${(0,s.Zr)(e)}`]=()=>(function(e,t={}){let r=(0,o.useRef)(e.get()),{keys:n,deps:s=[e,n]}=t,i=(0,o.useCallback)(t=>{let o=e=>{r.current!==e&&(r.current=e,t())};if(o(e.value),n?.length){let t;return t=new Set(n).add(void 0),e.listen((e,r,n)=>{t.has(n)&&o(e,r,n)})}return e.listen(o)},s),l=()=>r.current;return(0,o.useSyncExternalStore)(i,l,l)})(t);return t={...i,...d,$fetch:a,$store:u},function e(n=[]){return new Proxy(function(){},{get(r,o){var s;if("string"!=typeof o||"then"===o||"catch"===o||"finally"===o)return;let i=[...n,o],l=t;for(let e of i)if(l&&"object"==typeof l&&e in l)l=l[e];else{l=void 0;break}return"function"==typeof l?l:"object"==typeof(s=l)&&null!==s&&"get"in s&&"function"==typeof s.get&&"lc"in s&&"number"==typeof s.lc?l:e(i)},apply:async(e,t,o)=>{let s="/"+n.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join("/"),i=o[0]||{},u=o[1]||{},{query:d,fetchOptions:f,...p}=i,h={...u,...f},v=function(e,t,r){let n=t[e],{fetchOptions:o,query:s,...i}=r||{};return n||(o?.method?o.method:i&&Object.keys(i).length>0?"POST":"GET")}(s,r,i);return await a(s,{...h,body:"GET"===v?void 0:{...p,...h?.body||{}},query:d||h?.query,method:v,async onSuccess(e){if(await h?.onSuccess?.(e),!c||h.disableSignal)return;let t=c.filter(e=>e.matcher(s));if(!t.length)return;let r=new Set;for(let e of t){let t=l[e.signal];if(!t)return;if(r.has(e.signal))continue;r.add(e.signal);let n=t.get();setTimeout(()=>{t.set(!n)},10)}}})}})}()}},3847:(e,t,r)=>{r.d(t,{i:()=>K});var n=r(37286),o=r(98694);function s(e,t="/api/auth"){try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)throw new o.$(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){if(t instanceof o.$)throw t;throw new o.$(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}if(function(e){try{return"/"!==(new URL(e).pathname.replace(/\/+$/,"")||"/")}catch{throw new o.$(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}(e))return e;let r=e.replace(/\/+$/,"");return t&&"/"!==t?(t=t.startsWith("/")?t:`/${t}`,`${r}${t}`):r}let i={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&"u">typeof window&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},l={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},a=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,u={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},c=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/,d=[],f=0,p=0,h=e=>{let t=[],r={get:()=>(r.lc||r.listen(()=>{})(),r.value),lc:0,listen:e=>(r.lc=t.push(e),()=>{for(let t=f+4;t<d.length;)d[t]===e?d.splice(t,4):t+=4;let n=t.indexOf(e);~n&&(t.splice(n,1),--r.lc||r.off())}),notify(e,n){p++;let o=!d.length;for(let o of t)d.push(o,r.value,e,n);if(o){for(f=0;f<d.length;f+=4)d[f](d[f+1],d[f+2],d[f+3]);d.length=0}},off(){},set(e){let t=r.value;t!==e&&(r.value=e,r.notify(t))},subscribe(e){let t=r.listen(e);return e(r.value),t},value:e};return r},v=(e,t)=>{var r,n;return r=r=>{let n=t(r);n&&e.events[6].push(n)},n=t=>{let r=e.listen;e.listen=(...n)=>(e.lc||e.active||(e.active=!0,t()),r(...n));let n=e.off;return e.events[6]=[],e.off=()=>{n(),setTimeout(()=>
1{if(e.active&&!e.lc){for(let t of(e.active=!1,e.events[6]))t();e.events[6]=[]}},1e3)},()=>{e.listen=r,e.off=n}},e.events=e.events||{},e.events[15]||(e.events[15]=n(t=>{e.events[5].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[5]=e.events[5]||[],e.events[5].push(r),()=>{let t=e.events[5],n=t.indexOf(r);t.splice(n,1),t.length||(delete e.events[5],e.events[15](),delete e.events[15])}},y=()=>"u"<typeof window;var b=r(76546);function g(e){if(null===e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.iterator in e)&&(!(Symbol.toStringTag in e)||"[object Module]"===Object.prototype.toString.call(e))}function m(e){return(...t)=>t.reduce((t,r)=>(function e(t,r,n=".",o){if(!g(r))return e(t,{},n,o);let s=Object.assign({},r);for(let r in t){if("__proto__"===r||"constructor"===r)continue;let i=t[r];null!=i&&(o&&o(s,r,i,n)||(Array.isArray(i)&&Array.isArray(s[r])?s[r]=[...i,...s[r]]:g(i)&&g(s[r])?s[r]=e(i,s[r],(n?`${n}.`:"")+r.toString(),o):s[r]=i))}return s})(t,r,"",e),{})}let w=m();m((e,t,r)=>{if(void 0!==e[t]&&"function"==typeof r)return e[t]=r(e[t]),!0}),m((e,t,r)=>{if(Array.isArray(e[t])&&"function"==typeof r)return e[t]=r(e[t]),!0});var R=Object.defineProperty,E=Object.defineProperties,T=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,A=(e,t,r)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))S.call(t,r)&&A(e,r,t[r]);if(O)for(var r of O(t))_.call(t,r)&&A(e,r,t[r]);return e},I=(e,t)=>E(e,T(t)),U=class extends Error{constructor(e,t,r){super(t||e.toString(),{cause:r}),this.status=e,this.statusText=t,this.error=r,Error.captureStackTrace(this,this.constructor)}},x=async(e,t)=>{var r,n,o,s,i,l;let a=t||{},u={onRequest:[null==t?void 0:t.onRequest],onResponse:[null==t?void 0:t.onResponse],onSuccess:[null==t?void 0:t.onSuccess],onError:[null==t?void 0:t.onError],onRetry:[null==t?void 0:t.onRetry]};if(!t||!(null==t?void 0:t.plugins))return{url:e,options:a,hooks:u};for(let c of(null==t?void 0:t.plugins)||[]){if(c.init){let n=await (null==(r=c.init)?void 0:r.call(c,e.toString(),t));a=n.options||a,e=n.url}u.onRequest.push(null==(n=c.hooks)?void 0:n.onRequest),u.onResponse.push(null==(o=c.hooks)?void 0:o.onResponse),u.onSuccess.push(null==(s=c.hooks)?void 0:s.onSuccess),u.onError.push(null==(i=c.hooks)?void 0:i.onError),u.onRetry.push(null==(l=c.hooks)?void 0:l.onRetry)}return{url:e,options:a,hooks:u}},P=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},j=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}},$=async e=>{let t={},r=async e=>"function"==typeof e?await e():e;if(null==e?void 0:e.auth){if("Bearer"===e.auth.type){let n=await r(e.auth.token);if(!n)return t;t.authorization=`Bearer ${n}`}else if("Basic"===e.auth.type){let[n,o]=await Promise.all([r(e.auth.username),r(e.auth.password)]);if(!n||!o)return t;t.authorization=`Basic ${btoa(`${n}:${o}`)}`}else if("Custom"===e.auth.type){let[n,o]=await Promise.all([r(e.auth.prefix),r(e.auth.value)]);if(!o)return t;t.authorization=`${null!=n?n:""} ${o}`}}return t},C=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function N(e){if(void 0===e)return!1;let t=typeof e;return"string"===t||"number"===t||"boolean"===t||null===t||"object"===t&&(!!Array.isArray(e)||!e.buffer&&(e.constructor&&"Object"===e.constructor.name||"function"==typeof e.toJSON))}function M(e){try{return JSON.parse(e)}catch(t){return e}}function B(e){return"function"==typeof e}async function k(e){let t=new Headers(null==e?void 0:e.headers);for(let[r,n]of Object.entries(await $(e)||{}))t.set(r,n);if(!t.has("content-type")){let r=N(null==e?void 0:e.body)?"application/json":null;r&&t.set("content-type",r)}return t}
1var D=class e extends Error{constructor(t,r){super(r||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function q(e,t){let r=await e["~standard"].validate(t);if(r.issues)throw new D(r.issues);return r.value}var F=["get","post","put","patch","delete"],H=async(e,t)=>{var r,n,o,s,i,l,a,u;let c,{hooks:d,url:f,options:p}=await x(e,t),h=function(e){if(null==e?void 0:e.customFetchImpl)return e.customFetchImpl;if("u">typeof globalThis&&B(globalThis.fetch))return globalThis.fetch;if("u">typeof window&&B(window.fetch))return window.fetch;throw Error("No fetch implementation found")}(p),v=new AbortController,y=null!=(r=p.signal)?r:v.signal,b=function(e,t){let{baseURL:r,params:n,query:o}=t||{query:{},params:{},baseURL:""},s=e.startsWith("http")?e.split("/").slice(0,3).join("/"):r||"";if(e.startsWith("@")){let t=e.toString().split("@")[1].split("/")[0];F.includes(t)&&(e=e.replace(`@${t}/`,"/"))}s.endsWith("/")||(s+="/");let[i,l]=e.replace(s,"").split("?"),a=new URLSearchParams(l);for(let[e,t]of Object.entries(o||{})){let r;if(null!=t){if("string"==typeof t)r=t;else if(Array.isArray(t)){for(let r of t)a.append(e,r);continue}else r=JSON.stringify(t);a.set(e,r)}}if(n)if(Array.isArray(n))for(let[e,t]of i.split("/").filter(e=>e.startsWith(":")).entries()){let r=n[e];i=i.replace(t,r)}else for(let[e,t]of Object.entries(n))i=i.replace(`:${e}`,String(t));(i=i.split("/").map(encodeURIComponent).join("/")).startsWith("/")&&(i=i.slice(1));let u=a.toString();return(u=u.length>0?`?${u}`.replace(/\+/g,"%20"):"",s.startsWith("http"))?new URL(`${i}${u}`,s):`${s}${i}${u}`}(f,p),g=function(e){if(!(null==e?void 0:e.body))return null;let t=new Headers(null==e?void 0:e.headers);if(N(e.body)&&!t.has("content-type")){for(let[t,r]of Object.entries(null==e?void 0:e.body))r instanceof Date&&(e.body[t]=r.toISOString());return JSON.stringify(e.body)}return t.has("content-type")&&"application/x-www-form-urlencoded"===t.get("content-type")&&N(e.body)?new URLSearchParams(e.body).toString():e.body}(p),m=await k(p),w=function(e,t){var r;if(null==t?void 0:t.method)return t.method.toUpperCase();if(e.startsWith("@")){let n=null==(r=e.split("@")[1])?void 0:r.split("/")[0];return F.includes(n)?n.toUpperCase():(null==t?void 0:t.body)?"POST":"GET"}return(null==t?void 0:t.body)?"POST":"GET"}(f,p),R=I(L({},p),{url:b,headers:m,body:g,method:w,signal:y});for(let e of d.onRequest)if(e){let t=await e(R);"object"==typeof t&&null!==t&&(R=t)}("pipeTo"in R&&"function"==typeof R.pipeTo||"function"==typeof(null==(n=null==t?void 0:t.body)?void 0:n.pipe))&&!("duplex"in R)&&(R.duplex="half");let{clearTimeout:E}=(!(null==p?void 0:p.signal)&&(null==p?void 0:p.timeout)&&(c=setTimeout(()=>null==v?void 0:v.abort(),null==p?void 0:p.timeout)),{abortTimeout:c,clearTimeout:()=>{c&&clearTimeout(c)}}),T=await h(R.url,R);E();let O={response:T,request:R};for(let e of d.onResponse)if(e){let r=await e(I(L({},O),{response:(null==(o=null==t?void 0:t.hookOptions)?void 0:o.cloneResponse)?T.clone():T}));r instanceof Response?T=r:"object"==typeof r&&null!==r&&(T=r.response)}if(T.ok){if("HEAD"===R.method)return{data:"",error:null};let e=function(e){let t=e.headers.get("content-type"),r=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";let n=t.split(";").shift()||"";return C.test(n)?"json":r.has(n)||n.startsWith("text/")?"text":"blob"}(T),r={data:null,response:T,request:R};if("json"===e||"text"===e){let e=await T.text(),t=null!=(s=R.jsonParser)?s:M;r.data=await t(e)}else r.data=await T[e]();for(let e of((null==R?void 0:R.output)&&R.output&&!R.disableValidation&&(r.data=await q(R.output,r.data)),d.onSuccess))e&&await e(I(L({},r),{response:(null==(i=null==t?void 0:t.hookOptions)?void 0:i.cloneResponse)?T.clone():T}));return(null==t?void 0:t.throw)?r.data:{data:r.data,error:null}}let S=null!=(l=null==t?void 0:t.jsonParser)?l:M,_=await T.text(),A=function(e){try{return JSON.parse(e),!0}catch(e){return!1}}(_),$=A?await S(_):null,D={response:T,responseText:_,request:R,error:I(L({},$),{status:T.status,statusText:T.statusText})};for(let e of d.onError)e&&await e(I(L({},D),{response:(null==(a=null==t?void 0:t.hookOptions)?void 0:a.cloneResponse)?T.clone():T}));if(null==t?void 0:t.retry){let r=function(e){if("number"==typeof e)return new P({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new P(e);case"exponential":return new j(e);default:throw Error("Invalid retry strategy")}}(t.retry),n=null!=(u=t.retryAttempt)?u:0;
1if(await r.shouldAttemptRetry(n,T)){for(let e of d.onRetry)e&&await e(O);let o=r.getDelay(n);return await new Promise(e=>setTimeout(e,o)),await H(e,I(L({},t),{retryAttempt:n+1}))}}if(null==t?void 0:t.throw)throw new U(T.status,T.statusText,A?$:_);return{data:null,error:I(L({},$),{status:T.status,statusText:T.statusText})}};let K=(e,t)=>{var r;let d,f,p="credentials"in Request.prototype,g=function(e,t,r,i){if(e)return s(e,t);if(!1!==i){let e=n._K.BETTER_AUTH_URL||n._K.NEXT_PUBLIC_BETTER_AUTH_URL||n._K.PUBLIC_BETTER_AUTH_URL||n._K.NUXT_PUBLIC_BETTER_AUTH_URL||n._K.NUXT_PUBLIC_AUTH_URL||("/"!==n._K.BASE_URL?n._K.BASE_URL:void 0);if(e)return s(e,t)}r?.headers.get("x-forwarded-host"),r?.headers.get("x-forwarded-proto");if(r){let e=function(e){try{let t=new URL(e);return"null"===t.origin?null:t.origin}catch{return null}}(r.url);if(!e)throw new o.$("Could not get origin from request. Please provide a valid base URL.");return s(e,t)}if("u">typeof window&&window.location)return s(window.location.origin,t)}(e?.baseURL,e?.basePath,void 0,t)??"/api/auth",m=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>void 0!==e)||[],R={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:E,onError:T,onRequest:O,onResponse:S,..._}=e?.fetchOptions||{},A=(r={baseURL:g,...p?{credentials:"include"}:{},method:"GET",jsonParser:e=>e?function(e,t={strict:!0}){return function(e,t={}){let{strict:r=!1,warnings:n=!1,reviver:o,parseDates:s=!0}=t;if("string"!=typeof e)return e;let i=e.trim();if(i.length>0&&'"'===i[0]&&i.endsWith('"')&&!i.slice(1,-1).includes('"'))return i.slice(1,-1);let d=i.toLowerCase();if(d.length<=9&&d in u)return u[d];if(!a.test(i)){if(r)throw SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(l).some(([e,t])=>{let r=t.test(i);return r&&n&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),r})&&r)throw Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(i,(e,t)=>{if("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t){n&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(s&&"string"==typeof t){let e=function(e){let t=c.exec(e);if(!t)return null;let[,r,n,o,s,i,l,a,u,d,f]=t,p=new Date(Date.UTC(parseInt(r,10),parseInt(n,10)-1,parseInt(o,10),parseInt(s,10),parseInt(i,10),parseInt(l,10),a?parseInt(a.padEnd(3,"0"),10):0));if(u){let e=(60*parseInt(d,10)+parseInt(f,10))*("+"===u?-1:1);p.setUTCMinutes(p.getUTCMinutes()+e)}
1return p instanceof Date&&!isNaN(p.getTime())?p:null}(t);if(e)return e}return o?o(e,t):t})}catch(t){if(r)throw t;return e}}(e,t)}(e,{strict:!1}):null,customFetchImpl:fetch,..._,plugins:[R,..._.plugins||[],...e?.disableDefaultFetchPlugins?[]:[i],...m]},async function(e,t){let n,o=I(L(L({},r),t),{plugins:[...(null==r?void 0:r.plugins)||[],(n=r||{},{id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(e,t){var r,o,s,i;let l=(null==(o=null==(r=n.plugins)?void 0:r.find(t=>{var r;return null!=(r=t.schema)&&!!r.config&&(e.startsWith(t.schema.config.baseURL||"")||e.startsWith(t.schema.config.prefix||""))}))?void 0:o.schema)||n.schema;if(l){let r=e;(null==(s=l.config)?void 0:s.prefix)&&r.startsWith(l.config.prefix)&&(r=r.replace(l.config.prefix,""),l.config.baseURL&&(e=e.replace(l.config.prefix,l.config.baseURL))),(null==(i=l.config)?void 0:i.baseURL)&&r.startsWith(l.config.baseURL)&&(r=r.replace(l.config.baseURL,""));let n=l.schema[r];if(n){let r=I(L({},t),{method:n.method,output:n.output});return(null==t?void 0:t.disableValidation)||(r=I(L({},r),{body:n.input?await q(n.input,null==t?void 0:t.body):null==t?void 0:t.body,params:n.params?await q(n.params,null==t?void 0:t.params):null==t?void 0:t.params,query:n.query?await q(n.query,null==t?void 0:t.query):null==t?void 0:t.query})),{url:e,options:r}}}return{url:e,options:t}}}),...(null==t?void 0:t.plugins)||[]]});if(null==r?void 0:r.catchAllError)try{return await H(e,o)}catch(e){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:e}}}return await H(e,o)}),{$sessionSignal:U,session:x}=(f=((e,t,r,n)=>{let o=h({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>s(e)}),s=async e=>new Promise(s=>{let i="function"==typeof n?n({data:o.get().data,error:o.get().error,isPending:o.get().isPending}):n;r(t,{...i,query:{...i?.query,...e?.query},async onSuccess(e){o.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await i?.onSuccess?.(e)},async onError(e){let{request:t}=e,r="number"==typeof t.retry?t.retry:t.retry?.attempts,n=t.retryAttempt||0;r&&n<r||(o.set({error:e.error,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await i?.onError?.(e))},async onRequest(e){let t=o.get();o.set({isPending:null===t.data,data:t.data,error:null,isRefetching:!0,refetch:o.value.refetch}),await i?.onRequest?.(e)}}).catch(e=>{o.set({error:e,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch})}).finally(()=>{s(void 0)})});e=Array.isArray(e)?e:[e];let i=!1;for(let t of e)t.subscribe(async()=>{y()||(i?await s():v(o,()=>{let e=setTimeout(async()=>{i||(await s(),i=!0)},0);return()=>{o.off(),t.off(),clearTimeout(e)}}))});return o})(d=h(!1),"/get-session",A,{method:"GET"}),v(f,()=>{let t=(0,b.X)({sessionAtom:f,sessionSignal:d,$fetch:A,options:e});return t.init(),()=>{t.cleanup()}}),{session:f,$sessionSignal:d}),P=e?.plugins||[],j={},$={$sessionSignal:U,session:x},C={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},N=[{signal:"$sessionSignal",matcher:e=>"/sign-out"===e||"/update-user"===e||"/sign-up/email"===e||"/sign-in/email"===e||"/delete-user"===e||"/verify-email"===e||"/revoke-sessions"===e||"/revoke-session"===e||"/change-email"===e}];for(let e of P)e.getAtoms&&Object.assign($,e.getAtoms?.(A)),e.pathMethods&&Object.assign(C,e.pathMethods),e.atomListeners&&N.push(...e.atomListeners);let M={notify:e=>{$[e].set(!$[e].get())},listen:(e,t)=>{$[e].subscribe(t)},atoms:$};for(let t of P)t.getActions&&(j=w(t.getActions?.(A,M,e)??{},j));return{get baseURL(){return g},pluginsActions:j,pluginsAtoms:$,pluginPathMethods:C,atomListeners:N,$fetch:A,$store:M}}},4960:(e,t,r)=>{r.d(t,{_K:()=>i,lh:()=>l});var n=r(40459);let o=Object.create(null),s=e=>globalThis.process?.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?o:globalThis),i=new Proxy(o,{get:(e,t)=>s()[t]??o[t],has:(e,t)=>t in s()||t in o,set:(e,t,r)=>(s(!0)[t]=r,!0),deleteProperty(e,t){if(!t)return!1;let r=s(!0);return delete r[t],!0},ownKeys:()=>Object.keys(s(!0))});function l(e,t){return void 0!==n&&n.env?n.env[e]??t:"u">typeof Deno?Deno.env.get(e)??t:"u">typeof Bun?Bun.env[e]??t:t}void 0!==n&&n.env,Object.freeze({get BETTER_AUTH_SECRET(){return l("BETTER_AUTH_SECRET")},get AUTH_SECRET(){return l("AUTH_SECRET")},get BETTER_AUTH_TELEMETRY(){return l("BETTER_AUTH_TELEMETRY")},get BETTER_AUTH_TELEMETRY_ID(){return l("BETTER_AUTH_TELEMETRY_ID")},get NODE_ENV(){return l("NODE_ENV","development")},get PACKAGE_VERSION(){return l("PACKAGE_VERSION","0.0.0")},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return l("BETTER_AUTH_TELEMETRY_ENDPOINT","")}})},20327:(e,t,r)=>{r.d(t,{i:()=>s});let n=Symbol.for("better-auth:broadcast-channel");var o=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if("u">typeof window)try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:Math.floor(Date.now()/1e3)}))}catch{}}setup(){if("u"<typeof window||void 0===window.addEventListener)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??"{}");
1t?.event==="session"&&t?.data&&this.listeners.forEach(e=>e(t))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function s(e="better-auth.message"){return globalThis[n]||(globalThis[n]=new o(e)),globalThis[n]}},37286:(e,t,r)=>{r.d(t,{_K:()=>n._K});var n=r(4960);r(62831),r(49728)},49389:(e,t,r)=>{r.d(t,{Y:()=>s});let n=Symbol.for("better-auth:online-manager");var o=class{listeners=new Set;isOnline="u"<typeof navigator||navigator.onLine;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if("u"<typeof window||void 0===window.addEventListener)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function s(){return globalThis[n]||(globalThis[n]=new o),globalThis[n]}},49728:(e,t,r)=>{let n,o;var s=r(62831);let i="\x1b[0m",l="\x1b[31m",a="\x1b[32m",u="\x1b[33m",c="\x1b[34m",d="\x1b[35m",f=["debug","info","success","warn","error"],p={info:c,success:a,warn:u,error:l,debug:d};n=(void 0)??"warn",o=1!==(0,s.t)(),Object.fromEntries(f.map(e=>[e,(...[t,...r])=>((e,t,r=[])=>{let s;if(!(f.indexOf(e)>=f.indexOf(n)))return;let l=(s=new Date().toISOString(),o?`\x1b[2m${s}${i} ${p[e]}${e.toUpperCase()}${i} \x1b[1m[Better Auth]:${i} ${t}`:`${s} ${e.toUpperCase()} [Better Auth]: ${t}`);"error"===e?console.error(l,...r):"warn"===e?console.warn(l,...r):console.log(l,...r)})(e,t,r)]))},62566:(e,t,r)=>{r.d(t,{x:()=>s});let n=Symbol.for("better-auth:focus-manager");var o=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if("u"<typeof window||"u"<typeof document||void 0===window.addEventListener)return()=>{};let e=()=>{"visible"===document.visibilityState&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function s(){return globalThis[n]||(globalThis[n]=new o),globalThis[n]}},62831:(e,t,r)=>{r.d(t,{t:()=>l});var n=r(4960);let o={eterm:4,cons25:4,console:4,cygwin:4,dtterm:4,gnome:4,hurd:4,jfbterm:4,konsole:4,kterm:4,mlterm:4,mosh:24,putty:4,st:4,"rxvt-unicode-24bit":24,terminator:24,"xterm-kitty":24},s=new Map(Object.entries({APPVEYOR:8,BUILDKITE:8,CIRCLECI:24,DRONE:8,GITEA_ACTIONS:24,GITHUB_ACTIONS:24,GITLAB_CI:8,TRAVIS:8})),i=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function l(){if(void 0!==(0,n.lh)("FORCE_COLOR"))switch((0,n.lh)("FORCE_COLOR")){case"":case"1":case"true":return 4;case"2":return 8;case"3":return 24;default:return 1}if(void 0!==(0,n.lh)("NODE_DISABLE_COLORS")&&""!==(0,n.lh)("NODE_DISABLE_COLORS")||void 0!==(0,n.lh)("NO_COLOR")&&""!==(0,n.lh)("NO_COLOR")||"dumb"===(0,n.lh)("TERM"))return 1;if((0,n.lh)("TMUX"))return 24;if("TF_BUILD"in n._K&&"AGENT_NAME"in n._K)return 4;if("CI"in n._K){for(let{0:e,1:t}of s)if(e in n._K)return t;return"codeship"===(0,n.lh)("CI_NAME")?8:1}if("TEAMCITY_VERSION"in n._K)return null!==/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec((0,n.lh)("TEAMCITY_VERSION"))?4:1;switch((0,n.lh)("TERM_PROGRAM")){case"iTerm.app":if(!(0,n.lh)("TERM_PROGRAM_VERSION")||null!==/^[0-2]\./.exec((0,n.lh)("TERM_PROGRAM_VERSION")))return 8;return 24;case"HyperTerm":case"MacTerm":return 24;case"Apple_Terminal":return 8}if("truecolor"===(0,n.lh)("COLORTERM")||"24bit"===(0,n.lh)("COLORTERM"))return 24;if((0,n.lh)("TERM")){if(null!==/truecolor/.exec((0,n.lh)("TERM")))return 24;if(null!==/^xterm-256/.exec((0,n.lh)("TERM")))return 8;let e=(0,n.lh)("TERM").toLowerCase();if(o[e])return o[e];if(i.some(t=>null!==t.exec(e)))return 4}return(0,n.lh)("COLORTERM")?4:1}},63079:(e,t,r)=>{function n(e){return e.charAt(0).toUpperCase()+e.slice(1)}r.d(t,{Zr:()=>n}),r(49728),r(37286)},72601:(e,t,r)=>{r.d(t,{tT:()=>i});var n=r(98694);function o(e){return{newRole:e=>{var t;return{authorize(e,r="AND"){let o=!1;for(let[s,i]of Object.entries(e)){let e=t[s];if(!e)return{success:!1,error:`You are not allowed to access resource: ${s}`};if(Array.isArray(i))o=i.every(t=>e.includes(t));else if("object"==typeof i)o="OR"===i.connector?i.actions.some(t=>e.includes(t)):i.actions.every(t=>e.includes(t));else throw new n.$("Invalid access control request");
1if(o&&"OR"===r)return{success:o};if(!o&&"AND"===r)return{success:!1,error:`unauthorized to access resource "${s}"`}}return o?{success:o}:{success:!1,error:"Not authorized"}},statements:t=e}},statements:e}}let s=o({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]});s.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),s.newRole({user:[],session:[]});let i=()=>({id:"magic-link",$InferServerPlugin:{}});r(20327),r(62566),r(49389),r(76546),r(3847),r(63079);let l=o({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]});l.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),l.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),l.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]})},76546:(e,t,r)=>{r.d(t,{X:()=>l});var n=r(20327),o=r(62566),s=r(49389);let i=()=>Math.floor(Date.now()/1e3);function l(e){let{sessionAtom:t,sessionSignal:r,$fetch:l,options:a={}}=e,u=a.sessionOptions?.refetchInterval??0,c=a.sessionOptions?.refetchOnWindowFocus??!0,d=a.sessionOptions?.refetchWhenOffline??!1,f={lastSync:0,lastSessionRequest:0,cachedSession:void 0},p=e=>{if(!(d||(0,s.Y)().isOnline))return;if(e?.event==="storage"){f.lastSync=i(),r.set(!r.get());return}let n=t.get();if(e?.event==="poll"){f.lastSessionRequest=i(),l("/get-session").then(e=>{e.error?t.set({...n,data:null,error:e.error}):t.set({...n,data:e.data,error:null}),f.lastSync=i(),r.set(!r.get())}).catch(()=>{});return}if(e?.event==="visibilitychange"){if(i()-f.lastSessionRequest<5)return;f.lastSessionRequest=i()}(n?.data===null||n?.data===void 0||e?.event==="visibilitychange")&&(f.lastSync=i(),r.set(!r.get()))};return{init:()=>{u&&u>0&&(f.pollInterval=setInterval(()=>{t.get()?.data&&p({event:"poll"})},1e3*u)),f.unsubscribeBroadcast=(0,n.i)().subscribe(()=>{p({event:"storage"})}),c&&(f.unsubscribeFocus=(0,o.x)().subscribe(()=>{p({event:"visibilitychange"})})),f.unsubscribeOnline=(0,s.Y)().subscribe(e=>{e&&p({event:"visibilitychange"})}),(0,n.i)().setup(),(0,o.x)().setup(),(0,s.Y)().setup()},cleanup:()=>{f.pollInterval&&(clearInterval(f.pollInterval),f.pollInterval=void 0),f.unsubscribeBroadcast&&(f.unsubscribeBroadcast(),f.unsubscribeBroadcast=void 0),f.unsubscribeFocus&&(f.unsubscribeFocus(),f.unsubscribeFocus=void 0),f.unsubscribeOnline&&(f.unsubscribeOnline(),f.unsubscribeOnline=void 0),f.lastSync=0,f.lastSessionRequest=0,f.cachedSession=void 0},triggerRefetch:p,broadcastSessionUpdate:e=>{(0,n.i)().post({event:"session",data:{trigger:e},clientId:Math.random().toString(36).substring(7)})}}}},98694:(e,t,r)=>{r.d(t,{$:()=>n}),r(63079);var n=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}}}}]);
2//# chunkId=019f9510-f7b1-7ca2-bffc-1438b3ee2d33

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.