1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="56a7d706-4d6a-994f-4605-ebdfef1897d1")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,801330,(e,t,n)=>{"use strict";function r(e,t,n){if(e){for(let r of(n&&(n=n.toLowerCase()),e))if(t===r.domain?.split(":",1)[0].toLowerCase()||n===r.defaultLocale.toLowerCase()||r.locales?.some(e=>e.toLowerCase()===n))return r}}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"detectDomainLocale",{enumerable:!0,get:function(){return r}})},82010,(e,t,n)=>{"use strict";function r(e,t){let n;if(t?.host&&!Array.isArray(t.host))n=t.host.toString().split(":",1)[0];else{if(!e.hostname)return;n=e.hostname}return n.toLowerCase()}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getHostname",{enumerable:!0,get:function(){return r}})},468732,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"NextURL",{enumerable:!0,get:function(){return l}});let r=e.r(801330),i=e.r(161610),o=e.r(82010),s=e.r(667637),a=/^(?:127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)$/;function u(e,t){let n=new URL(String(e),t&&String(t));return a.test(n.hostname)&&(n.hostname="localhost"),n}let c=Symbol("NextURLInternal");class l{constructor(e,t,n){let r,i;"object"==typeof t&&"pathname"in t||"string"==typeof t?(r=t,i=n||{}):i=n||t||{},this[c]={url:u(e,r??i.base),options:i,basePath:""},this.analyze()}analyze(){var e,t,n,i,a;let u=(0,s.getNextPathnameInfo)(this[c].url.pathname,{nextConfig:this[c].options.nextConfig,parseData:!0,i18nProvider:this[c].options.i18nProvider}),l=(0,o.getHostname)(this[c].url,this[c].options.headers);this[c].domainLocale=this[c].options.i18nProvider?this[c].options.i18nProvider.detectDomainLocale(l):(0,r.detectDomainLocale)(null==(t=this[c].options.nextConfig)||null==(e=t.i18n)?void 0:e.domains,l);let h=(null==(n=this[c].domainLocale)?void 0:n.defaultLocale)||(null==(a=this[c].options.nextConfig)||null==(i=a.i18n)?void 0:i.defaultLocale);this[c].url.pathname=u.pathname,this[c].defaultLocale=h,this[c].basePath=u.basePath??"",this[c].buildId=u.buildId,this[c].locale=u.locale??h,this[c].trailingSlash=u.trailingSlash}formatPathname(){return(0,i.formatNextPathnameInfo)({basePath:this[c].basePath,buildId:this[c].buildId,defaultLocale:this[c].options.forceLocale?void 0:this[c].defaultLocale,locale:this[c].locale,pathname:this[c].url.pathname,trailingSlash:this[c].trailingSlash})}formatSearch(){return this[c].url.search}get buildId(){return this[c].buildId}set buildId(e){this[c].buildId=e}get locale(){return this[c].locale??""}set locale(e){var t,n;if(!this[c].locale||!(null==(n=this[c].options.nextConfig)||null==(t=n.i18n)?void 0:t.locales.includes(e)))throw Object.defineProperty(TypeError(`The NextURL configuration includes no locale "${e}"`),"__NEXT_ERROR_CODE",{value:"E597",enumerable:!1,configurable:!0});this[c].locale=e}get defaultLocale(){return this[c].defaultLocale}get domainLocale(){return this[c].domainLocale}get searchParams(){return this[c].url.searchParams}get host(){return this[c].url.host}set host(e){this[c].url.host=e}get hostname(){return this[c].url.hostname}set hostname(e){this[c].url.hostname=e}get port(){return this[c].url.port}set port(e){this[c].url.port=e}get protocol(){return this[c].url.protocol}set protocol(e){this[c].url.protocol=e}get href(){let e=this.formatPathname(),t=this.formatSearch();return`${this.protocol}//${this.host}${e}${t}${this.hash}`}set href(e){this[c].url=u(e),this.analyze()}get origin(){return this[c].url.origin}get pathname(){return this[c].url.pathname}set pathname(e){this[c].url.pathname=e}get hash(){return this[c].url.hash}set hash(e){this[c].url.hash=e}get search(){return this[c].url.search}set search(e){this[c].url.search=e}get password(){return this[c].url.password}set password(e){this[c].url.password=e}get username(){return this[c].url.username}set username(e){this[c].url.username=e}get basePath(){return this[c].basePath}set basePath(e){this[c].basePath=e.startsWith("/")?e:`/${e}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new l(String(this),this[c].options)}}},61968,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={fromNodeOutgoingHttpHeaders:function(){return s},normalizeNextQueryParam:function(){return l},splitCookiesString:function(){return a},toNodeOutgoingHttpHeaders:function(){return u},validateURL:function(){return c}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let o=e.r(403629);function s(e){let t=new Headers;for(let[n,r]of Object.entries(e))for(let e of Array.isArray(r)?r:[r])void 0!==e&&("number"==typeof e&&(e=e.toString()),t.append(n,e));return t}function a(e){var t,n,r,i,o,s=[],a=0;function u(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,o=!1;u();)if(","===(n=e.charAt(a))){for(r=a,a+=1,u(),i=a;a<e.length&&"="!==(n=e.charAt(a))&&";"!==n&&","!==n;)a+=1;a<e.length&&"="===e.charAt(a)?(o=!0,a=i,s.push(e.substring(t,r)),t=a):a=r+1}else a+=1;(!o||a>=e.length)&&s.push(e.substring(t,e.length))}return s}function u(e){let t={},n=[];if(e)for(let[r,i]of e.entries())"set-cookie"===r.toLowerCase()?(n.push(...a(i)),t[r]=1===n.length?n[0]:n):t[r]=i;return t}function c(e){try{return String(new URL(String(e)))}catch(t){throw Object.defineProperty(Error(`URL is malformed "${String(e)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:t}
2),"__NEXT_ERROR_CODE",{value:"E61",enumerable:!1,configurable:!0})}}function l(e){for(let t of[o.NEXT_QUERY_PARAM_PREFIX,o.NEXT_INTERCEPTION_MARKER_PREFIX])if(e!==t&&e.startsWith(t))return e.substring(t.length);return null}},948114,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={PageSignatureError:function(){return o},RemovedPageError:function(){return s},RemovedUAError:function(){return a}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});class o extends Error{constructor({page:e}){super(`The middleware "${e}" accepts an async API directly with the form: 3 4 export function middleware(request, event) { 5 return NextResponse.redirect('/new-location') 6 } 7 8 Read more: https://nextjs.org/docs/messages/middleware-new-signature 9 `)}}class s extends Error{constructor(){super("The request.page has been deprecated in favour of `URLPattern`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n ")}}class a extends Error{constructor(){super("The request.ua has been removed in favour of `userAgent` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n ")}}},252658,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={INTERNALS:function(){return c},NextRequest:function(){return l}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let o=e.r(468732),s=e.r(61968),a=e.r(948114),u=e.r(287939),c=Symbol("internal request");class l extends Request{constructor(e,t={}){const n="string"!=typeof e&&"url"in e?e.url:String(e);(0,s.validateURL)(n),t.body&&"half"!==t.duplex&&(t.duplex="half"),e instanceof Request?super(e,t):super(n,t);const r=new o.NextURL(n,{headers:(0,s.toNodeOutgoingHttpHeaders)(this.headers),nextConfig:t.nextConfig});this[c]={cookies:new u.RequestCookies(this.headers),nextUrl:r,url:r.toString()}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[c].cookies}get nextUrl(){return this[c].nextUrl}get page(){throw new a.RemovedPageError}get ua(){throw new a.RemovedUAError}get url(){return this[c].url}}},69136,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"NextResponse",{enumerable:!0,get:function(){return h}});let r=e.r(287939),i=e.r(468732),o=e.r(61968),s=e.r(390288),a=e.r(287939),u=Symbol("internal response"),c=new Set([301,302,303,307,308]);function l(e,t){var n;if(null==e||null==(n=e.request)?void 0:n.headers){if(!(e.request.headers instanceof Headers))throw Object.defineProperty(Error("request.headers must be an instance of Headers"),"__NEXT_ERROR_CODE",{value:"E119",enumerable:!1,configurable:!0});let n=[];for(let[r,i]of e.request.headers)t.set("x-middleware-request-"+r,i),n.push(r);t.set("x-middleware-override-headers",n.join(","))}}class h extends Response{constructor(e,t={}){super(e,t);const n=this.headers,c=new Proxy(new a.ResponseCookies(n),{get(e,i,o){switch(i){case"delete":case"set":return(...o)=>{let s=Reflect.apply(e[i],e,o),u=new Headers(n);return s instanceof a.ResponseCookies&&n.set("x-middleware-set-cookie",s.getAll().map(e=>(0,r.stringifyCookie)(e)).join(",")),l(t,u),s};default:return s.ReflectAdapter.get(e,i,o)}}});this[u]={cookies:c,url:t.url?new i.NextURL(t.url,{headers:(0,o.toNodeOutgoingHttpHeaders)(n),nextConfig:t.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[u].cookies}static json(e,t){let n=Response.json(e,t);return new h(n.body,n)}static redirect(e,t){let n="number"==typeof t?t:(null==t?void 0:t.status)??307;if(!c.has(n))throw Object.defineProperty(RangeError('Failed to execute "redirect" on "response": Invalid status code'),"__NEXT_ERROR_CODE",{value:"E529",enumerable:!1,
9configurable:!0});let r="object"==typeof t?t:{},i=new Headers(null==r?void 0:r.headers);return i.set("Location",(0,o.validateURL)(e)),new h(null,{...r,headers:i,status:n})}static rewrite(e,t){let n=new Headers(null==t?void 0:t.headers);return n.set("x-middleware-rewrite",(0,o.validateURL)(e)),l(t,n),new h(null,{...t,headers:n})}static next(e){let t=new Headers(null==e?void 0:e.headers);return t.set("x-middleware-next","1"),l(e,t),new h(null,{...e,headers:t})}}},139643,(e,t,n)=>{"use strict";function r(){throw Object.defineProperty(Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead'),"__NEXT_ERROR_CODE",{value:"E183",enumerable:!1,configurable:!0})}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ImageResponse",{enumerable:!0,get:function(){return r}})},497451,(e,t,n)=>{var r={226:function(t,n){!function(r){"use strict";var i="function",o="undefined",s="object",a="string",u="major",c="model",l="name",h="type",d="vendor",f="version",p="architecture",b="console",g="mobile",v="tablet",w="smarttv",y="wearable",m="embedded",A="Amazon",E="Apple",_="ASUS",S="BlackBerry",O="Browser",T="Chrome",k="Firefox",I="Google",P="Huawei",x="Microsoft",C="Motorola",R="Opera",N="Samsung",D="Sharp",j="Sony",L="Xiaomi",U="Zebra",M="Facebook",q="Chromium OS",V="Mac OS",K=function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},F=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},H=function(e,t){return typeof e===a&&-1!==G(t).indexOf(G(e))},G=function(e){return e.toLowerCase()},z=function(e,t){if(typeof e===a)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,350)},$=function(e,t){for(var n,r,o,a,u,c,l=0;l<t.length&&!u;){var h=t[l],d=t[l+1];for(n=r=0;n<h.length&&!u&&h[n];)if(u=h[n++].exec(e))for(o=0;o<d.length;o++)c=u[++r],typeof(a=d[o])===s&&a.length>0?2===a.length?typeof a[1]==i?this[a[0]]=a[1].call(this,c):this[a[0]]=a[1]:3===a.length?typeof a[1]!==i||a[1].exec&&a[1].test?this[a[0]]=c?c.replace(a[1],a[2]):void 0:this[a[0]]=c?a[1].call(this,c,a[2]):void 0:4===a.length&&(this[a[0]]=c?a[3].call(this,c.replace(a[1],a[2])):void 0):this[a]=c||void 0;l+=2}},B=function(e,t){for(var n in t)if(typeof t[n]===s&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(H(t[n][r],e))return"?"===n?void 0:n}else if(H(t[n],e))return"?"===n?void 0:n;return e},X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},W={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,f],[/opios[\/ ]+([\w\.]+)/i],[f,[l,R+" Mini"]],[/\bopr\/([\w\.]+)/i],[f,[l,R]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,f],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[l,"UC"+O]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[f,[l,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[f,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[l,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+O],f],[/\bfocus\/([\w\.]+)/i],[f,[l,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[l,R+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[l,R+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[l,"MIUI "+O]],[/fxios\/([-\w\.]+)/i],[f,[l,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360 "+O]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1 "+O],f],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[l,f],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,M],f],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[l,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[l,"GSA"]],[/musical_ly(?:.
vendor: 4,323 bytes, line 9
9+app_?version\/|_)([\w\.]+)/i],[f,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[l,T+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,T+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[l,"Android "+O]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[f,B,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[l,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[l,f],[/(cobalt)\/([\w\.]+)/i],[l,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,G]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",G]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,G]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[d,N],[h,v]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[c,[d,N],[h,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[d,E],[h,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[d,E],[h,v]],[/(macintosh);/i],[c,[d,E]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[d,D],[h,g]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[d,P],[h,v]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[d,P],[h,g]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[c,/_/g," "],[d,L],[h,g]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[d,L],[h,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[d,"OPPO"],[h,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[d,"Vivo"],[h,g]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[c,[d,"Realme"],[h,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[d,C],[h,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[d,C],[h,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[d,"LG"],[h,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[d,"LG"],[h,g]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[d,"Lenovo"],[h,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[d,"Nokia"],[h,g]],[/(pixel c)\b/i],[c,[d,I],[h,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[d,I],[h,g]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[d,j],[h,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[d,j],[h,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[d,"OnePlus"],[h,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[d,A],[h,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)
vendor: 4,191 bytes, line 9
9/g,"Fire Phone $1"],[d,A],[h,g]],[/(playbook);[-\w\),; ]+(rim)/i],[c,d,[h,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[d,S],[h,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[d,_],[h,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[d,_],[h,g]],[/(nexus 9)/i],[c,[d,"HTC"],[h,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[c,/_/g," "],[h,g]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[d,"Acer"],[h,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[d,"Meizu"],[h,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,c,[h,g]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,c,[h,v]],[/(surface duo)/i],[c,[d,x],[h,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[d,"Fairphone"],[h,g]],[/(u304aa)/i],[c,[d,"AT&T"],[h,g]],[/\bsie-(\w*)/i],[c,[d,"Siemens"],[h,g]],[/\b(rct\w+) b/i],[c,[d,"RCA"],[h,v]],[/\b(venue[\d ]{2,7}) b/i],[c,[d,"Dell"],[h,v]],[/\b(q(?:mv|ta)\w+) b/i],[c,[d,"Verizon"],[h,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[d,"Barnes & Noble"],[h,v]],[/\b(tm\d{3}\w+) b/i],[c,[d,"NuVision"],[h,v]],[/\b(k88) b/i],[c,[d,"ZTE"],[h,v]],[/\b(nx\d{3}j) b/i],[c,[d,"ZTE"],[h,g]],[/\b(gen\d{3}) b.+49h/i],[c,[d,"Swiss"],[h,g]],[/\b(zur\d{3}) b/i],[c,[d,"Swiss"],[h,v]],[/\b((zeki)?tb.*\b) b/i],[c,[d,"Zeki"],[h,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],c,[h,v]],[/\b(ns-?\w{0,9}) b/i],[c,[d,"Insignia"],[h,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[d,"NextBook"],[h,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],c,[h,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],c,[h,g]],[/\b(ph-1) /i],[c,[d,"Essential"],[h,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[d,"Envizen"],[h,v]],[/\b(trio[-\w\. ]+) b/i],[c,[d,"MachSpeed"],[h,v]],[/\btu_(1491) b/i],[c,[d,"Rotor"],[h,v]],[/(shield[\w ]+) b/i],[c,[d,"Nvidia"],[h,v]],[/(sprint) (\w+)/i],[d,c,[h,g]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[d,x],[h,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[d,U],[h,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[d,U],[h,g]],[/smart-tv.+(samsung)/i],[d,[h,w]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[d,N],[h,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,"LG"],[h,w]],[/(apple) ?tv/i],[d,[c,E+" TV"],[h,w]],[/crkey/i],[[c,T+"cast"],[d,I],[h,w]],[/droid.+aft(\w)( bui|\))/i],[c,[d,A],[h,w]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[d,D],[h,w]],[/(bravia[\w ]+)( bui|\))/i],[c,[d,j],[h,w]],[/(mitv-\w{5}) bui/i],[c,[d,L],[h,w]],[/Hbbtv.*(technisat) (.*);/i],[d,c,[h,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d,z],[c,z],[h,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,w]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,c,[h,b]],[/droid.+; (shield) bui/i],[c,[d,"Nvidia"],[h,b]],[/(playstation [345portablevi]+)/i],[c,[d,j],[h,b]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[d,x],[h,b]],[/((pebble))app/i],[d,c,[h,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[d,E],[h,y]],[/droid.+; (glass) \d/i],[c,[d,I],[h,y]],[/droid.+; (wt63?0{2,3})\)/i],[c,[d,U],[h,y]],[/(quest( 2| pro)?)/i],[c,[d,M],[h,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[h,m]],[/(aeobc)\b/i],[c,[d,A],[h,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[c,[h,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[h,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,v]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,g]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[l,"E
9dgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,f],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[l,[f,B,X]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[l,"Windows"],[f,B,X]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,V],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,f],[/\(bb(10);/i],[f,[l,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+);
9 rv:.+ gecko\/([\w\.]+)/i],[f,[l,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[l,T+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,q],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,f],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,f]]},J=function(e,t){if(typeof e===s&&(t=e,e=void 0),!(this instanceof J))return new J(e,t).getResult();var n=typeof r!==o&&r.navigator?r.navigator:void 0,b=e||(n&&n.userAgent?n.userAgent:""),w=n&&n.userAgentData?n.userAgentData:void 0,y=t?K(W,t):W,m=n&&n.userAgent==b;return this.getBrowser=function(){var e,t={};return t[l]=void 0,t[f]=void 0,$.call(t,b,y.browser),t[u]=typeof(e=t[f])===a?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0,m&&n&&n.brave&&typeof n.brave.isBrave==i&&(t[l]="Brave"),t},this.getCPU=function(){var e={};return e[p]=void 0,$.call(e,b,y.cpu),e},this.getDevice=function(){var e={};return e[d]=void 0,e[c]=void 0,e[h]=void 0,$.call(e,b,y.device),m&&!e[h]&&w&&w.mobile&&(e[h]=g),m&&"Macintosh"==e[c]&&n&&typeof n.standalone!==o&&n.maxTouchPoints&&n.maxTouchPoints>2&&(e[c]="iPad",e[h]=v),e},this.getEngine=function(){var e={};return e[l]=void 0,e[f]=void 0,$.call(e,b,y.engine),e},this.getOS=function(){var e={};return e[l]=void 0,e[f]=void 0,$.call(e,b,y.os),m&&!e[l]&&w&&"Unknown"!=w.platform&&(e[l]=w.platform.replace(/chrome os/i,q).replace(/macos/i,V)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(e){return b=typeof e===a&&e.length>350?z(e,350):e,this},this.setUA(b),this};if(J.VERSION="1.0.35",J.BROWSER=F([l,f,u]),J.CPU=F([p]),J.DEVICE=F([c,d,h,b,g,w,v,y,m]),J.ENGINE=J.OS=F([l,f]),typeof n!==o)t.exports&&(n=t.exports=J),n.UAParser=J;else if(typeof define===i&&define.amd)e.r,void 0!==J&&e.v(J);else typeof r!==o&&(r.UAParser=J);var Z=typeof r!==o&&(r.jQuery||r.Zepto);if(Z&&!Z.ua){var Y=new J;Z.ua=Y.getResult(),Z.ua.get=function(){return Y.getUA()},Z.ua.set=function(e){Y.setUA(e);var t=Y.getResult();for(var n in t)Z.ua[n]=t[n]}}}("object"==typeof window?window:this)}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}},s=!0;try{r[e].call(n.exports,n,n.exports,o),s=!1}finally{s&&delete i[e]}return n.exports}o.ab="/ROOT/node_modules/.pnpm/[email protected]_@[email protected][email protected]__@[email protected]_babel-plu_1e699694828bdbab3c0aef03f70f1c07/node_modules/next/dist/compiled/ua-parser-js/",t.exports=o(226)},50692,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i={isBot:function(){return a},userAgent:function(){return c},userAgentFromString:function(){return u}};for(var o in i)Object.defineProperty(n,o,{enumerable:!0,get:i[o]});let s=(r=e.r(497451))&&r.__esModule?r:{default:r};function a(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver|GPTBot/i.test(e)}function u(e){return{...(0,s.default)(e),isBot:void 0!==e&&a(e)}}function c({headers:e}){return u(e.get("user-agent")||void 0)}}
9,378555,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"URLPattern",{enumerable:!0,get:function(){return r}});let r="u"<typeof URLPattern?void 0:URLPattern},295956,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"after",{enumerable:!0,get:function(){return i}});let r=e.r(997528);function i(e){let t=r.workAsyncStorage.getStore();if(!t)throw Object.defineProperty(Error("`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context"),"__NEXT_ERROR_CODE",{value:"E468",enumerable:!1,configurable:!0});let{afterContext:n}=t;return n.after(e)}},273236,(e,t,n)=>{"use strict";var r,i;Object.defineProperty(n,"__esModule",{value:!0}),r=e.r(295956),i=n,Object.keys(r).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(i,e,{enumerable:!0,get:function(){return r[e]}})})},217572,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"connection",{enumerable:!0,get:function(){return l}});let r=e.r(997528),i=e.r(167799),o=e.r(747419),s=e.r(793132),a=e.r(797136),u=e.r(353053);e.r(621369);let c=e.r(588492);function l(){let e=r.workAsyncStorage.getStore(),t=i.workUnitAsyncStorage.getStore();if(e){if(t&&"after"===t.phase&&!(0,u.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside \`after()\`. The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but \`after()\` executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E827",enumerable:!1,configurable:!0});if(e.forceStatic)return Promise.resolve(void 0);if(e.dynamicShouldError)throw Object.defineProperty(new s.StaticGenBailoutError(`Route ${e.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E847",enumerable:!1,configurable:!0});if(t)switch(t.type){case"cache":{let t=Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E841",enumerable:!1,configurable:!0});throw Error.captureStackTrace(t,l),e.invalidDynamicUsageError??=t,t}case"private-cache":{let t=Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E837",enumerable:!1,configurable:!0});throw Error.captureStackTrace(t,l),e.invalidDynamicUsageError??=t,t}case"unstable-cache":throw Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside a function cached with \`unstable_cache()\`. The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E840",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1125",enumerable:!1,
9configurable:!0});case"prerender":case"prerender-client":case"prerender-runtime":return(0,a.makeHangingPromise)(t.renderSignal,e.route,"`connection()`");case"validation-client":{let e="`connection`";throw Object.defineProperty(new c.InvariantError(`${e} must not be used within a Client Component. Next.js should be preventing ${e} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1063",enumerable:!1,configurable:!0})}case"prerender-ppr":return(0,o.postponeWithTracking)(e.route,"connection",t.dynamicTracking);case"prerender-legacy":return(0,o.throwToInterruptStaticGeneration)("connection",e,t);case"request":if((0,o.trackDynamicDataInDynamicRender)(t),t.asyncApiPromises)return t.asyncApiPromises.connection;return Promise.resolve(void 0)}}(0,i.throwForMissingRequestStore)("connection")}},549742,(e,t,n)=>{let r={NextRequest:e.r(252658).NextRequest,NextResponse:e.r(69136).NextResponse,ImageResponse:e.r(139643).ImageResponse,userAgentFromString:e.r(50692).userAgentFromString,userAgent:e.r(50692).userAgent,URLPattern:e.r(378555).URLPattern,after:e.r(273236).after,connection:e.r(217572).connection};t.exports=r,n.NextRequest=r.NextRequest,n.NextResponse=r.NextResponse,n.ImageResponse=r.ImageResponse,n.userAgentFromString=r.userAgentFromString,n.userAgent=r.userAgent,n.URLPattern=r.URLPattern,n.after=r.after,n.connection=r.connection},752186,621959,e=>{"use strict";e.i(982816),e.i(79578);var t,n,r=e.i(578903),i=e.i(41054),o=e.i(311034),s=e.i(32864),a=e.i(139269),u=e.i(791606),c=e.i(793676);let l=function(e){return"string"==typeof e&&e.length>0};e.s(["default",0,l],621959);var h=e.i(272098),d=e.i(820686);function f(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,i)}var p=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")}return e=[{key:"generate",value:function(){var e;return(e=function(){return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var c=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){return[2,Promise.resolve("dummy-auth-state")]})},function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(e){f(o,r,i,s,a,"next",e)}function a(e){f(o,r,i,s,a,"throw",e)}s(void 0)})})()}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}(),b=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")}return e=[{key:"debug",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"OAuthKit";console.debug("[".concat(t,"] ").concat(e))}},{key:"exception",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"OAuthKit";console.error("[".concat(t,"] ").concat(e.message))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();function g(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,i)}function v(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(e){g(o,r,i,s,a,"next",e)}function a(e){g(o,r,i,s,a,"throw",e)}s(void 0)})}}function w(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var c=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var y=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")}return e=[{key:"generateCredentials",value:function(){return v(function(){var e,t;return w(this,function(n){switch(n.label){case 0:return e=Promise.resolve,t={verifier:"verifier"},[4,this.generateChallenge("verifier")];case 1:return[2,e.apply(Promise,[(t.challenge=n.sent(),t.challengeMethod="S256",t)])]}})}).call(this)}},{key:"generateChallenge",value:function(e){return v(function(){return w(this,function(t){return[2,Promise.resolve("".concat(e,"_challenge"))]})})()}},{key:"verifyChallenge",value:function(e,t){return v(function(){return w(this,function(n){return[2,Promise.resolve("".concat(e,"_challenge")===t)]})})()}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();function m(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,i)}function A(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(e){m(o,r,i,s,a,"next",e)}function a(e){m(o,r,i,s,a,"throw",e)}s(void 0)})}}function E(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var c=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var _=function(){var e;function t(){var e,n;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");n=void 0,(e="store")in this?Object.defineProperty(this,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[e]=n,this.store={}}return e=[{key:"get",value:function(e,t){return A(function(){var n;return E(this,function(r){return e?(n=t||"default",[2,Promise.resolve((this.store[n]||{})[e])]):[2,void 0]})}).call(this)}},{key:"set",value:function(e,t,n){return A(function(){var r;return E(this,function(i){return e?(r=n||"default",this.store[r]||(this.store[r]={}),this.store[r][e]=t,[2,Promise.resolve(!0)]):[2,!1]})}).call(this)}},{key:"delete",value:function(e,t){return A(function(){var n;return E(this,function(r){return e?(n=t||"default",this.store[n]&&delete this.store[n][e],[2,Promise.resolve(!0)]):[2,!1]})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}(),S=((t={}).AUTHORIZATION_CODE_MISSING="AUTHORIZATION_CODE_MISSING",t.INCOMPLETE_CONFIGURATION="INCOMPLETE_CONFIGURATION",t.LOCAL_TOKEN_INVALID="LOCAL_TOKEN_INVALID",t.REFRESH_TOKEN_MISSING="REFRESH_TOKEN_MISSING",t.RESPONSE_ACCESS_TOKEN_INVALID="RESPONSE_ACCESS_TOKEN_INVALID",t.RESPONSE_EXPIRES_IN_INVALID="RESPONSE_EXPIRES_IN_INVALID",t.RESPONSE_INVALID="RESPONSE_INVALID",t.RESPONSE_SCOPE_INVALID="RESPONSE_SCOPE_INVALID",t.RESPONSE_TOKEN_INVALID="RESPONSE_TOKEN_INVALID",t.RESPONSE_TOKEN_TYPE_INVALID="RESPONSE_TOKEN_TYPE_INVALID",t.RESPONSE_CREATED_AT_INVALID="RESPONSE_CREATED_AT_INVALID",t.STORED_STATE_MISSING="STORED_STATE_MISSING",t.STATE_MISSING="STATE_MISSING",t.STATE_MISMATCH="STATE_MISMATCH",t);function O(e,t,n){return(O=P()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&k(i,n.prototype),i}).apply(null,arguments)}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
9function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e){var t="function"==typeof Map?new Map:void 0;return(I=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return O(e,arguments,T(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),k(n,e)})(e)}function P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(P=function(){return!!e})()}var x=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(e,n){var r,i,o,s,a;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return i=t,o=[e],i=T(i),r=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,P()?Reflect.construct(i,o||[],T(this).constructor):i.apply(this,o)),a=void 0,(s="reason")in r?Object.defineProperty(r,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[s]=a,Object.setPrototypeOf(r,t.prototype),r.reason=n,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(r,t):r.stack=Error(e).stack,r}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&k(t,e),t}(I(Error));let C=function(e){return null!=e&&(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"},R=function(e){var t;return"number"==typeof e||C(e)&&(null!=(t=Number)&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t)},N=function(e){return!!(R(e)&&!isNaN(e)&&e!=e+1&&e!==1/0)&&e>0};function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){D(e,t,n[t])})}return e}var L={clientId:"",clientSecret:void 0,redirectUri:"",scopes:[],allowedAccountTypes:["all"],endpoints:{tokenEndpoint:"http://localhost:3000/oauth/token",introspectionEndpoint:"http://localhost:3000/oauth/token/info",userInfoEndpoint:"http://localhost:3000/api/v1/me",authorizationEndpoint:"http://localhost:4000/sign-in",registrationEndpoint:"http://localhost:4000/sign-up",endSessionEndpoint:"http://localhost:4000/sign-out",revocationEndpoint:"http://localhost:3000/oauth/revoke"},pkceAdapter:new y,storageAdapter:new _,authStateAdapter:new p,diagnosticsAdapter:new b,refreshTokenThresholdSeconds:60,validateState:!0,debug:!1},U=new(function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");D(this,"values",L)}return e=[{key:"get",value:function(){return this.values}},{key:"configure",value:function(e){if(this.values=j({},this.values,e),!l(this.values.clientId))throw new x("clientId is required",S.INCOMPLETE_CONFIGURATION);if(!l(this.values.redirectUri))throw new x("redirectUri is required",S.INCOMPLETE_CONFIGURATION);if(!(0,h.default)(this.values.scopes)||(0,d.default)(this.values.scopes))throw new x("scopes is required",S.INCOMPLETE_CONFIGURATION);if(!(0,u.default)(this.values.endpoints))throw new x("endpoints is required",S.INCOMPLETE_CONFIGURATION);if(!l(this.values.endpoints.tokenEndpoint))throw new x("endpoints.tokenEndpoint is required",S.INCOMPLETE_CONFIGURATION);if(!l(this.values.endpoints.introspectionEndpoint))throw new x("endpoints.introspectionEndpoint is required",S.INCOMPLETE_CONFIGURATION);if(!l(this.values.endpoints.userInfoEndpoint))throw new x("endpoints.userInfoEndpoint is required",S.INCOMPLETE_CONFIGURATION);if(!l(this.values.endpoints.authorizationEndpoint))throw new x("endpoints.authorizationEndpoint is required",S.INCOMPLETE_CONFIGURATION);if(!l(this.values.endpoints.registrationEndpoint))throw new x("endpoints.registrationEndpoint is required",S.INCOMPLETE_CONFIGURATION);if(!l(this.values.endpoints.endSessionEndpoint))throw new x("endpoints.endSessionEndpoint is required",S.INCOMPLETE_CONFIGURATION);if(!l(this.values.endpoints.revocationEndpoint))throw new x("endpoints.revocationEndpoint is required",S.INCOMPLETE_CONFIGURATION);if(!this.values.pkceAdapter)throw new x("pkceAdapter is required",S.INCOMPLETE_CONFIGURATION);if(!this.values.storageAdapter)throw new x("storageAdapter is required",S.INCOMPLETE_CONFIGURATION);if(!N(this.values.refreshTokenThresholdSeconds))throw new x("Config.get().refreshTokenThresholdSeconds is missing",S.INCOMPLETE_CONFIGURATION);return this.values}},{key:"_testReset",value:function(){this.values=j({},L)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}()),M=((n={}).AUTH_DATA="authData",n.USER_DATA="userData",n.PKCE_DATA="pkceData",n.STATE="state",n.USER_DATA_FETCHED_AT="userDataFetchedAt",n),q=e.i(431928),V=e.i(363883);function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"[OAuthKit]";if(U.get().debug){var n=(0,q.default)((0,h.default)(e)?e:[e]);if(0!==n.length){var r=U.get().diagnosticsAdapter;(null==r?void 0:r.debug)&&(0,V.default)(r.debug)?r.debug(F(n),t):console.debug("".concat(t,": ").concat(F(n)))}}}function F(e){return e.map(function(e){return JSON.stringify(e)}).join(" ;;; ")}function H(e){var t=U.get().diagnosticsAdapter;if((null==t?void 0:t.exception)&&(0,V.default)(t.exception))return t.exception(e),e;throw e}function G(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,i)}function z(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(e){G(o,r,i,s,a,"next",e)}function a(e){G(o,r,i,s,a,"throw",e)}s(void 0)})}}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function B(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var c=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var X=void 0;function W(){return X||(X=r.default.create()),X}function J(){return U.get().storageAdapter}function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=$({},e),(0,u.default)(e.headers)||(e.headers={}),e.headers.Accept||(e.headers.Accept="application/json"),e.maxRedirects||(e.maxRedirects=0),e.data||(e.data={}),e}function Y(e){return z(function(){var e,t,n,r=arguments;return B(this,function(i){switch(i.label){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t=r.length>1?r[1]:void 0,e=$({},e),(0,u.default)(e.headers)||(e.headers={}),[4,J().get(M.AUTH_DATA,t)];case 1:return n=i.sent()||{},e.headers.Authorization="".concat(n.tokenType," ").concat(n.token),(0,u.default)(e.meta)||(e.meta={}),e.meta.vayapinOAuth=!0,[2,e]}})}).apply(this,arguments)}function Q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};
9return"GET"!==e.method&&"get"!==e.method?e:(0,c.default)(e,"body","data")}function ee(e){return z(function(){var t,n,r,i,o,c,h,d,f,p,b,g,v,w;return B(this,function(y){switch(y.label){case 0:K(["fetchAccessTokenWithParams",e]),r=null==(n=U.get())||null==(t=n.endpoints)?void 0:t.tokenEndpoint,i=void 0,y.label=1;case 1:return y.trys.push([1,3,,4]),[4,et.call({method:"post",url:r,data:e})];case 2:return i=y.sent(),[3,4];case 3:if((d=(null!=(h=null==(c=o=y.sent())?void 0:c.response)?h:{}).data||{}).error)return[2,H(new x(null!=(f=d.error_description)?f:d.error))];return[2,H(o)];case 4:var m,A;if(m=i,null!=(A=Error)&&"u">typeof Symbol&&A[Symbol.hasInstance]?!!A[Symbol.hasInstance](m):m instanceof A)return[2,H(new x(null!=(w=null!=(v=(g=(null!=(b=null==(p=i)?void 0:p.response)?b:{}).data||{}).error_description)?v:g.error)?w:""))];if(!(0,u.default)(i)||!(0,u.default)(i.data))return[2,H(new x("OAuth authorization code response is not valid",S.RESPONSE_INVALID))];if(!l(i.data.access_token))return[2,H(new x("OAuth authorization code response - access_token is invalid or missing",S.RESPONSE_ACCESS_TOKEN_INVALID))];if(!l(i.data.token_type))return[2,H(new x("OAuth authorization code response - token_type is invalid or missing",S.RESPONSE_TOKEN_TYPE_INVALID))];if(!(0,a.default)(i.data.expires_in)||(0,s.default)(i.data.expires_in))return[2,H(new x("OAuth authorization code response - expires_in is invalid or missing",S.RESPONSE_EXPIRES_IN_INVALID))];if(!l(i.data.scope))return[2,H(new x("OAuth authorization code response - scope is
9invalid or missing",S.RESPONSE_SCOPE_INVALID))];if(!(0,a.default)(i.data.created_at)||(0,s.default)(i.data.created_at))return[2,H(new x("OAuth authorization code response - created_at is invalid or missing",S.RESPONSE_CREATED_AT_INVALID))];return[2,i.data]}})})()}var et={getInstance:W,prepareAxiosConfig:Z,prepareAxiosConfigAuthorized:Y,prepareAxiosConfigBody:Q,call:function(e){return z(function(){var e,t,n,r,i,s,a=arguments;return B(this,function(u){switch(u.label){case 0:if(e=a.length>0&&void 0!==a[0]?a[0]:{},t=a.length>1&&void 0!==a[1]?a[1]:{},n=a.length>2?a[2]:void 0,r=W(),e=Q(e=Z(e)),!0!==t.withOAuthConfig)return[3,2];return[4,Y(e,n)];case 1:e=u.sent(),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,r.request(e)];case 3:return[2,u.sent()];case 4:if(s=u.sent(),e.meta&&!0===e.meta.vayapinOAuth&&(null==s||null==(i=s.response)?void 0:i.status)&&(0,o.default)([401,"401"],s.response.status))return[2,s];return H(s),[2,s];case 5:return[2]}})}).apply(this,arguments)},fetchAccessTokenWithParams:ee,fetchAccessToken:function(e,t){return z(function(){var n,r,i,o,s,a;return B(this,function(u){switch(u.label){case 0:if(K(["fetchAccessToken(".concat(e,", ").concat(t,")")]),!l(e))return[2,H(new x("Authorization code is missing",S.AUTHORIZATION_CODE_MISSING))];return r=(n=U.get()).clientId,i=n.clientSecret,o=n.redirectUri,[4,n.storageAdapter.get(M.PKCE_DATA,t)];case 1:return s=u.sent(),a={grant_type:"authorization_code",client_id:r,code_verifier:(null==s?void 0:s.verifier)||"",redirect_uri:o,code:e},l(i)&&(a.client_secret=i),[4,ee(a)];case 2:return[2,u.sent()]}})})()},refetchAccessToken:function(e){return z(function(){var t,n,r,i;return B(this,function(o){switch(o.label){case 0:if(K(["refetchAccessToken(".concat(e,")")]),!l(e))return[2,H(new x("Refresh token is missing",S.REFRESH_TOKEN_MISSING))];return n=(t=U.get()).clientId,r=t.clientSecret,i={grant_type:"refresh_token",client_id:n,refresh_token:e},l(r)&&(i.client_secret=r),[4,ee(i)];case 1:return[2,o.sent()]}})})()},fetchUserInfo:function(e){return z(function(){var t,n,r,s,a,c,l,h;return B(this,function(d){switch(d.label){case 0:K(["fetchUserInfo(".concat(e,")")]),r=null==(n=U.get())||null==(t=n.endpoints)?void 0:t.userInfoEndpoint,d.label=1;case 1:return d.trys.push([1,3,,4]),[4,et.call({method:"get",url:r},{withOAuthConfig:!0},e)];case 2:if(a=d.sent(),(0,o.default)([401,"401"],null==a||null==(s=a.response)?void 0:s.status))return[2,H(new x("Token is not valid (anymore?)",S.RESPONSE_TOKEN_INVALID))];if(!(0,u.default)(a.data)||!(0,i.default)(a.data,"email"))return[2,H(new x("failed to load user information",S.RESPONSE_INVALID))];return[2,a.data];case 3:if(!(null==(h=c=d.sent())||null==(l=h.response)?void 0:l.status))return[2,H(c)];if((0,o.default)([401,"401"],h.response.status))return[2,H(new x("Token is not valid (anymore?)",S.RESPONSE_TOKEN_INVALID))];throw c;case 4:return[2]}})})()},fetchTokenInfo:function(e){return z(function(){var t,n,r,i,s,a,u;return B(this,function(c){switch(c.label){case 0:return K(["fetchTokenInfo(".concat(e,")")]),t=U.get().endpoints.introspectionEndpoint,[4,J().get(M.AUTH_DATA,e)];case 1:n=c.sent()||{},c.label=2;case 2:return c.trys.push([2,4,,5]),[4,et.call({method:"get",url:t,headers:{Authorization:"".concat(n.tokenType," ").concat(n.token)}},{withOAuthConfig:!0})];case 3:if(i=c.sent(),(0,o.default)([401,"401"],null==i||null==(r=i.response)?void 0:r.status)||!(null==i?void 0:i.status)||!(0,o.default)([200,"200",201,"201"],null==i?void 0:i.status))return[2,H(new x("response_invalid",S.RESPONSE_INVALID))];return[2,i.data];case 4:if((null==(u=s=c.sent())||null==(a=u.response)?void 0:a.status)&&(0,o.default)([401,"401"],u.response.status))return[2,H(new x("Token is not valid (anymore?)",S.RESPONSE_TOKEN_INVALID))];return[2,H(s)];case 5:return[2]}})})()},reset:function(){X=void 0}};let en=function(e){return Array.isArray(e)};var er=e.i(542922);function ei(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,i)}var eo=new(function(){var e;function t(){var e,n;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");n={},(e="_observables")in this?Object.defineProperty(this,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[e]=n,this._observables={}}return e=[{key:"subscribe",value:function(e,t){this.unsubscribe(e,t),this._observables[e].push(t)}},{key:"unsubscribe",value:function(e,t){this._observables[e]||(this._observables[e]=[]),this._observables[e]=(0,er.default)(this._observables[e],t)}},{key:"unsubscribeAll",value:function(e){delete this._observables[e]}},{key:"message",value:function(e,t){this.blockingMessage(e,t)}},{key:"blockingMessage",value:function(e,t){var n;return(n=function(){return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var c=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(n){return this._observables[e]?[2,Promise.all(this._observables[e].map(function(n){return n(e,t)}))]:[2,Promise.resolve()]})},function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function s(e){ei(o,r,i,s,a,"next",e)}function a(e){ei(o,r,i,s,a,"throw",e)}s(void 0)})}).call(this)}},{key:"getChannel",value:function(e){return this._observables[e]||[]}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}()),es=e.i(408234);function ea(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,i)}function eu(){return parseInt("".concat(new Date().getTime()/1e3),10)}function ec(e){return{token:e.access_token,tokenType:e.token_type,expiresAt:e.created_at+e.expires_in,refreshToken:e.refresh_token,createdAt:e.created_at,expires
9In:e.expires_in,fetchedAt:eu(),scopes:Array.isArray(e.scope)?e.scope:[e.scope]}}function el(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eh(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,i)}function ed(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(e){eh(o,r,i,s,a,"next",e)}function a(e){eh(o,r,i,s,a,"throw",e)}s(void 0)})}}function ef(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ep(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eb(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function eg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ep(e,t,n[t])})}return e}function ev(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function ew(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],s=!0,a=!1;try{for(i=i.call(e);!(s=(n=i.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return el(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return el(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ey(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var c=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var em={authData:{},userData:void 0,accessAllowed:!0,signedIn:!1,userDataFetchedAt:void 0,hasSyncedOnce:!1,isSyncing:!1,isFetchingUserData:!1,isRefreshingTokens:!1,initializationError:void 0,userDataFetchError:void 0},eA=function(){var e,t;function n(e){if(!(this instanceof n))throw TypeError("Cannot call a class as a function");if(ep(this,"queuePrefix",void 0),ep(this,"version","3.0.19"),ep(this,"sessionId",void 0),ep(this,"state",em),ep(this,"refreshPromise",null),!U.get().clientId)throw Error("OAuthKit.configure() must be called before creating instances");this.sessionId=null==e?void 0:e.sessionId,this.queuePrefix=(null==e?void 0:e.sessionId)?"oauthkit-".concat(e.sessionId):"oauthkit-default"}return e=[{key:"getConfig",value:function(){return U.get()}},{key:"getSessionId",value:function(){return this.sessionId}},{key:"syncState",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return ed(function(){var t,n,r,i,o,s,a,u,c,l,d,f,p,b,g,v,w,y,m;return ey(this,function(A){switch(A.label){case 0:K(["syncState",e]),this.state=(0,es.produce)(this.state,function(e){e.isSyncing=!0,e.initializationError=void 0}),e&&this.notifyChange(),A.label=1;case 1:if(A.trys.push([1,12,,13]),n=(t=this.getConfig()).storageAdapter,r=t.allowedAccountTypes,!("getCurrentData"in n&&"function"==typeof n.getCurrentData))return[3,6];return[4,n.getCurrentData(this.sessionId)];case 2:if(!(i=A.sent()))return[3,4];return a=i[M.AUTH_DATA],u=i[M.USER_DATA],c=i[M.USER_DATA_FETCHED_AT],[4,this.isTokenLocalValid(a||{})];case 3:return l=A.sent(),d=!!(r&&(0,h.default)(r))&&(!!r.includes("all")||r.includes(null==u||null==(s=u.accounts)||null==(o=s[0])?void 0:o.type)),this.state=(0,es.produce)(this.state,function(e){e.authData=a,e.userData=u,e.accessAllowed=d,e.signedIn=l,e.userDataFetchedAt=c,e.hasSyncedOnce=!0,e.isSyncing=!1,e.isFetchingUserData=!1,e.isRefreshingTokens=!1,e.initializationError=void 0}),[3,5];case 4:this.state=(0,es.produce)(this.state,function(e){e.authData={},e.userData=void 0,e.accessAllowed=!0,e.signedIn=!1,e.userDataFetchedAt=void 0,e.hasSyncedOnce=!0,e.isSyncing=!1,e.isFetchingUserData=!1,e.isRefreshingTokens=!1,e.initializationError=void 0}),A.label=5;case 5:return[3,11];case 6:return[4,n.get(M.AUTH_DATA,this.sessionId)];case 7:return b=A.sent(),[4,n.get(M.USER_DATA,this.sessionId)];case 8:return g=A.sent(),[4,n.get(M.USER_DATA_FETCHED_AT,this.sessionId)];case 9:return v=A.sent(),[4,this.isTokenLocalValid(b||{})];case 10:w=A.sent(),y=!!(r&&(0,h.default)(r))&&(!!r.includes("all")||r.includes(null==g||null==(p=g.accounts)||null==(f=p[0])?void 0:f.type)),this.state=(0,es.produce)(this.state,function(e){e.authData=b,e.userData=g,e.accessAllowed=y,e.signedIn=w,e.userDataFetchedAt=v,e.hasSyncedOnce=!0,e.isSyncing=!1,e.isFetchingUserData=!1,e.initializationError=void 0}),A.label=11;case 11:return e&&this.notifyChange(),[3,13];case 12:throw m=A.sent(),this.state=(0,es.produce)(this.state,function(e){e.hasSyncedOnce=!1,e.isSyncing=!1,e.initializationError=eb(m,Error)?m:Error("Unknown initialization error")}),e&&this.notifyChange(),m;case 13:return[2]}})}).call(this)}},{key:"getState",value:function(){return this.state}}
9,{key:"getAuthInfo",value:function(){return this.getState().authData}},{key:"getUserData",value:function(){return this.getState().userData}},{key:"subscribeChange",value:function(e){eo.subscribe(this.getUpdateChannelName(),e)}},{key:"unsubscribeChange",value:function(e){eo.unsubscribe(this.getUpdateChannelName(),e)}},{key:"notifyChange",value:function(){eo.message(this.getUpdateChannelName())}},{key:"isTokenLocalValid",value:function(e){return ed(function(){return ey(this,function(t){return K(["isTokenLocalValid"]),e||(e=this.getAuthInfo()),[2,n.isTokenLocalValid(e)]})}).call(this)}},{key:"tokenExpiresInSeconds",value:function(){return ed(function(){var e,t;return ey(this,function(n){switch(n.label){case 0:return K(["tokenExpiresInSeconds"]),[4,this.isTokenLocalValid()];case 1:if(!1===n.sent()||!N(t=null==(e=this.getAuthInfo())?void 0:e.expiresAt))return[2,0];return[2,t-this.nowSeconds()]}})}).call(this)}},{key:"fetchAccessToken",value:function(e,t){var n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return ed(function(){var r,i,o,s;return ey(this,function(a){switch(a.label){case 0:return K(["fetchAccessToken(".concat(e,", ").concat(t,", ").concat(n,")")]),r=this.getConfig().validateState,[4,(i=this.getConfig().storageAdapter).get(M.STATE,this.sessionId)];case 1:if(o=a.sent(),r&&!l(t))return H(new x("State is missing",S.STATE_MISSING)),[2,!1];if(r&&!l(o))return H(new x("Stored state is missing",S.STORED_STATE_MISSING)),[2,!1];if(r&&!function(e,t){if(null==e||null==t)return e===t;if(e.length!==t.length)return!1;for(var n=0,r=0;r<e.length;r++)n|=e.charCodeAt(r)^t.charCodeAt(r);return 0===n}(o,t))return H(new x("State mismatch",S.STATE_MISMATCH)),[2,!1];return[4,et.fetchAccessToken(e,this.sessionId)];case 2:if(eb(s=a.sent(),Error))return[2,!1];return[4,i.set(M.AUTH_DATA,ec(s),this.sessionId)];case 3:return a.sent(),[4,i.delete(M.STATE,this.sessionId)];case 4:return a.sent(),[4,i.delete(M.PKCE_DATA,this.sessionId)];case 5:return a.sent(),[4,this.syncState(n)];case 6:return a.sent(),[2,!0]}})}).call(this)}},{key:"renewAccessToken",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return ed(function(){return ey(this,function(t){switch(t.label){case 0:if(K(["renewAccessToken(".concat(e,")")]),this.refreshPromise)return K(["renewAccessToken(".concat(e,") > waiting for existing refresh operation")]),[2,this.refreshPromise];this.refreshPromise=this._doRenewAccessToken(e),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,this.refreshPromise];case 2:return[2,t.sent()];case 3:return this.refreshPromise=null,[7];case 4:return[2]}})}).call(this)}},{key:"_doRenewAccessToken",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return ed(function(){var t,n,r,i,o;return ey(this,function(s){switch(s.label){case 0:K(["_doRenewAccessToken(".concat(e,")")]),this.state=(0,es.produce)(this.state,function(e){e.isRefreshingTokens=!0}),e&&this.notifyChange(),s.label=1;case 1:return s.trys.push([1,9,,10]),[4,(t=this.getConfig().storageAdapter).get(M.AUTH_DATA,this.sessionId)];case 2:return r=null==(n=s.sent())?void 0:n.refreshToken,[4,et.refetchAccessToken(r)];case 3:if(!(!1===(i=s.sent())||eb(i,Error)))return[3,5];return this.state=(0,es.produce)(this.state,function(e){e.isRefreshingTokens=!1}),e&&this.notifyChange(),[4,this.localSignOut()];case 4:return s.sent(),[2,!1];case 5:return[4,t.set(M.AUTH_DATA,ec(i),this.sessionId)];case 6:return s.sent(),[4,t.delete(M.PKCE_DATA,this.sessionId)];case 7:return s.sent(),[4,this.syncState(e)];case 8:return s.sent(),[2,!0];case 9:throw o=s.sent(),this.state=(0,es.produce)(this.state,function(e){e.isRefreshingTokens=!1}),e&&this.notifyChange(),o;case 10:return[2]}})}).call(this)}},{key:"renewAccessTokenIfNecessary",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return ed(function(){var t,n,r;return ey(this,function(i){switch(i.label){case 0:return K(["renewAccessTokenIfNecessary"]),[4,this.getConfig().storageAdapter.get(M.AUTH_DATA,this.sessionId)];case 1:if(!l(null==(t=i.sent())?void 0:t.refreshToken))return[2,!1];return n=U.get().refreshTokenThresholdSeconds,[4,this.tokenExpiresInSeconds()];case 2:if(!N(r=i.sent())||r>n)return[2,!1];return[4,this.renewAccessToken(e)];case 3:return[2,i.sent()]}})}).call(this)}},{key:"fetchUserInfo",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return ed(function(){var t,n,r,i;return ey(this,function(o){switch(o.label){case 0:return K(["fetchUserInfo(".concat(e,")")]
9),[4,this.isTokenLocalValid()];case 1:if(!1===o.sent())return H(new x("Token data invalid",S.LOCAL_TOKEN_INVALID)),[2,!1];this.state=(0,es.produce)(this.state,function(e){e.isFetchingUserData=!0,e.userDataFetchError=void 0}),e&&this.notifyChange(),o.label=2;case 2:return o.trys.push([2,10,,11]),[4,et.fetchUserInfo(this.sessionId)];case 3:if(!eb(t=o.sent(),Error))return[3,6];if(this.state=(0,es.produce)(this.state,function(e){e.isFetchingUserData=!1,e.userDataFetchError=t}),e&&this.notifyChange(),(null==(n=t)?void 0:n.reason)!==S.RESPONSE_TOKEN_INVALID)return[3,5];return[4,this.localSignOut()];case 4:o.sent(),o.label=5;case 5:return[2,!1];case 6:var s,a,u,c;return[4,(r=this.getConfig().storageAdapter).set(M.USER_DATA,(u=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},s=t),c=c={currentAccount:null==(a=s.accounts)?void 0:a[0]},Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(c)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(c)).forEach(function(e){Object.defineProperty(u,e,Object.getOwnPropertyDescriptor(c,e))}),u),this.sessionId)];case 7:return o.sent(),[4,r.set(M.USER_DATA_FETCHED_AT,Date.now(),this.sessionId)];case 8:return o.sent(),[4,this.syncState(e)];case 9:return o.sent(),[2,!0];case 10:throw i=o.sent(),this.state=(0,es.produce)(this.state,function(e){e.isFetchingUserData=!1,e.userDataFetchError=eb(i,Error)?i:Error("Unknown error fetching user data")}),e&&this.notifyChange(),i;case 11:return[2]}})}).call(this)}},{key:"fetchOAuthTokenAndData",value:function(e,t){return ed(function(){var n,r;return ey(this,function(i){switch(i.label){case 0:return K(["fetchOAuthTokenAndData(".concat(e,", ").concat(t,")")]),[4,this.fetchAccessToken(e,t,!1)];case 1:return n=i.sent(),[4,this.fetchUserInfo(!1)];case 2:return r=i.sent(),[4,this.syncState()];case 3:return i.sent(),[2,n&&r]}})}).call(this)}},{key:"clearAuthData",value:function(){return ed(function(){var e;return ey(this,function(t){switch(t.label){case 0:return K(["clearAuthData"]),[4,(e=this.getConfig().storageAdapter).delete(M.AUTH_DATA,this.sessionId)];case 1:return t.sent(),[4,e.delete(M.USER_DATA,this.sessionId)];case 2:return t.sent(),[4,e.delete(M.PKCE_DATA,this.sessionId)];case 3:return t.sent(),[4,e.delete(M.STATE,this.sessionId)];case 4:return t.sent(),[4,e.delete(M.USER_DATA_FETCHED_AT,this.sessionId)];case 5:return t.sent(),[4,this.syncState()];case 6:return t.sent(),[2]}})}).call(this)}},{key:"clearUserInfo",value:function(){return ed(function(){var e;return ey(this,function(t){switch(t.label){case 0:return K(["clearUserInfo"]),[4,(e=this.getConfig().storageAdapter).delete(M.USER_DATA,this.sessionId)];case 1:return t.sent(),[4,e.delete(M.USER_DATA_FETCHED_AT,this.sessionId)];case 2:return t.sent(),[4,this.syncState()];case 3:return t.sent(),[2]}})}).call(this)}},{key:"isTokenRemoteValid",value:function(){return ed(function(){var e,t,n;return ey(this,function(r){switch(r.label){case 0:return K(["isTokenRemoteValid"]),[4,this.isTokenLocalValid()];case 1:if(!1===r.sent())return H(new x("Token data invalid",S.LOCAL_TOKEN_INVALID)),[2,!1];r.label=2;case 2:return r.trys.push([2,6,,9]),[4,et.fetchTokenInfo(this.sessionId)];case 3:if(eb(e=r.sent(),Error))return[2,!1];if(!(!en(null==e?void 0:e.scope)&&!l(null==e?void 0:e.scope)||!N(null==e?void 0:e.expires_in)||!N(null==e?void 0:e.created_at)))return[3,5];return[4,this.localSignOut()];case 4:case 7:return r.sent(),[2,!1];case 5:return[2,!0];case 6:if((null==(n=t=r.sent())?void 0:n.reason)!==S.RESPONSE_TOKEN_INVALID)return[3,8];return[4,this.localSignOut()];case 8:return H(t),[2,!1];case 9:return[2]}})}).call(this)}},{key:"isAccessAllowed",value:function(){return ed(function(){var e,t,n;return ey(this,function(r){switch(r.label){case 0:return K(["isAccessAllowed"]),[4,this.getConfig().storageAdapter.get(M.USER_DATA,this.sessionId)];case 1:if(t=null==(e=r.sent())?void 0:e.currentAccount,en(n=this.getConfig().allowedAccountTypes)||(n=[n]),(0,o.default)(n,"all"))return[2,!1];return[2,Promise.resolve((0,o.default)(n,null==t?void 0:t.type))]}})}).call(this)}},{key:"isFullSignInRequired",value:function(){return ed(function(){var e,t=arguments;return ey(this,function(n){switch(n.label){case 0:return t.length>0&&void 0!==t[0]&&t[0],K(["isFullSignInRequired"]),[4,this.isTokenLocalValid()];case 1:if(!1===n.sent())return[2,!0];return[4,this.getConfig().storageAdapter.get(M.AUTH_DATA,this.sessionId)];case 2:if(!l(null==(e=n.sent())?void 0:e.refreshToken))return[2,!0];return[4,this.renewAccessToken()];case 3:return n.sent(),[4,this.isTokenLocalValid()];case 4:return[2,!1===n.sent()]}})}).apply(this,arguments)}},{key:"generateAndStorePkceCredentials",value:function(){return ed(function(){return ey(this,function(e){switch(e.label){case 0:var t,n,r,i;return[4,(t=this.getConfig().storageAdapter,n=this.getConfig().pkceAdapter,r=this.sessionId,(i=function(){var e;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var c=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(i){switch(i.label){case 0:return[4,n.generateCredentials()];case 1:return e=i.sent(),[4,t.set(M.PKCE_DATA,e,r)];case 2:return i.sent(),[2,e]}})},function(){var e=this,t=arguments;return new Promise(function(n,r){var o=i.apply(e,t);function s(e){ea(o,n,r,s,a,"next",e)}function a(e){ea(o,n,r,s,a,"throw",e)}s(void 0)})})())];case 1:return[2,e.sent()]}})}).call(this)}},{key:"getPkceData",value:function(){return ed(function(){var e;return ey(this,function(t){switch(t.label){case 0:return[4,this.getConfig().storageAdapter.get(M.PKCE_DATA,this.sessionId)];case 1:return[2,null!=(e=t.sent())?e:void 0]}})}).call(this)}},{key:"setPkceData",value:function(e){return ed(function(){return ey(this,function(t){switch(t.label){case 0:return[4,this.getConfig().storageAdapter.set(M.PKCE_DATA,{verifier:e.verifier,challenge:e.challenge,challengeMethod:e.challengeMethod},this.sessionId)];case 1:return t.sent(),[2]}})}).call(this)}},{key:"generateAndStoreAuthState",value:function(){return ed(function(){var e;return ey(this,function(t){switch(t.label){case 0:return[4,this.getConfig().authStateAdapter.generate()];case 1:return e=t.sent(),[4,this.getConfig().storageAdapter.set(M.STATE,e,this.sessionId)];case 2:return t.sent(),[2,e]}})}).call(this)}},{key:"localSignOut",value:function(){return ed(function(){var e;return ey(this,function(t){switch(t.label){case 0:return K(["OAuthKit.localSignOut"]),[4,(e=this.getConfig().storageAdapter).delete(M.AUTH_DATA,this.sessionId)];case 1:return t.sent(),[4,e.delete(M.USER_DATA,this.sessionId)];case 2:return t.sent(),[4,e.delete(M.PKCE_DATA,this.sessionId)];case 3:return t.sent(),[4,e.delete(M.STATE,this.sessionId)];case 4:return t.sent(),[4,this.syncState()];case 5:return t.sent(),[2]}})}).call(this)}},{key:"hasRefreshToken",value:function(){return ed(function(){var e;return ey(this,function(t){switch(t.label){case 0:return K(["OAuthKit.hasRefreshToken"]),[4,this.getConfig().storageAdapter.get(M.AUTH_DATA,this.sessionId)];case 1:return[2,l(null==(e=t.sent())?void 0:e.refreshToken)]}})}).call(this)}},{key:"getSignInUri",value:function(e){return ed(function(){var t,n,r,i,o,s,a,u;return ey(this,function(c){switch(c.label){case 0:return t=this.getConfig(),r=null!=(n=null==e?void 0:e.additionalParams)?n:{},i=(null==e?void 0:e.autoSignIn)===!0,[4,this.generateAndStorePkceCredentials()];case 1:if(o=c.sent(),!t.validateState)return[3,3];return[4,this.generateAndStoreAuthState()];case 2:s=c.sent(),c.label=3;case 3:return a=ev(eg({},r),{client_id:t.clientId,response_type:"code",code_challenge:o.challenge,code_challenge_method:o.challengeMethod,scope:encodeURIComponent(t.scopes.join(" ")),redirect_uri:encodeURI(t.redirectUri)}
9),s&&(a.state=s),i&&(a.auto_sign_in="true"),u=Object.entries(a).map(function(e){var t=ew(e,2),n=t[0],r=t[1];return"".concat(n,"=").concat(r)}).join("&"),[2,"".concat(t.endpoints.authorizationEndpoint,"?").concat(u)]}})}).call(this)}},{key:"getSignUpUri",value:function(e){return ed(function(){var t,n,r,i,o,s,a,u;return ey(this,function(c){switch(c.label){case 0:return t=this.getConfig(),r=null!=(n=null==e?void 0:e.additionalParams)?n:{},i=(null==e?void 0:e.autoSignIn)===!0,[4,this.generateAndStorePkceCredentials()];case 1:if(o=c.sent(),!t.validateState)return[3,3];return[4,this.generateAndStoreAuthState()];case 2:s=c.sent(),c.label=3;case 3:return a=ev(eg({},r),{client_id:t.clientId,response_type:"code",code_challenge:o.challenge,code_challenge_method:o.challengeMethod,scope:t.scopes.join(","),redirect_uri:encodeURI(t.redirectUri)}),s&&(a.state=s),i&&(a.auto_sign_in="true"),u=Object.entries(a).map(function(e){var t=ew(e,2),n=t[0],r=t[1];return"".concat(n,"=").concat(r)}).join("&"),[2,"".concat(t.endpoints.registrationEndpoint,"?").concat(u)]}})}).call(this)}},{key:"getSignOutUri",value:function(){return ed(function(){return ey(this,function(e){return[2,Promise.resolve(this.getConfig().endpoints.endSessionEndpoint)]})}).call(this)}},{key:"nowSeconds",value:function(){return n.nowSeconds()}},{key:"getUpdateChannelName",value:function(){return"".concat(this.queuePrefix,"-update")}},{key:"_testReset",value:function(){eo.unsubscribeAll(this.getUpdateChannelName()),this.refreshPromise=null}},{key:"_testGetUpdateCallbacks",value:function(){return eo.getChannel(this.getUpdateChannelName())}}],t=[{key:"configure",value:function(e){return!0===e.debug&&(void 0===e.diagnosticsAdapter?console.debug(["OAuthKit.configure",e]):e.diagnosticsAdapter.debug(["configure",e].map(function(e){return JSON.stringify(e)}).join(" "),"[OAuthKit]")),U.configure(e)}},{key:"getConfig",value:function(){return U.get()}},{key:"isTokenLocalValid",value:function(e){return ed(function(){var t,n;return ey(this,function(r){return(K(["#isTokenLocalValid(...) with ".concat(JSON.stringify(e))]),e&&(t=null==e?void 0:e.token,n=null==e?void 0:e.expiresAt,l(t)&&N(n)))?(K(["#isTokenLocalValid(...) > expiresAt: ".concat(n,", now: ").concat(this.nowSeconds())]),[2,this.nowSeconds()<n]):[2,!1]})}).call(this)}},{key:"nowSeconds",value:function(){return eu()}}],e&&ef(n.prototype,e),t&&ef(n,t),n}();let eE=function(e){return"string"==typeof e&&e.length>0};var e_=e.i(622472),eS=e.i(624072);class eO{encryptionKey;delegate;cache=new Map;CACHE_TTL_MS=1e3;constructor(e){this.encryptionKey=e.encryptionKey,this.delegate=e.delegate}setDelegate(e){this.delegate=e}setEncryptionKey(e){this.encryptionKey=e}getCacheKey(e){return`vp-session:${e}`}isCacheValid(e){return Date.now()-e.timestamp<this.CACHE_TTL_MS}clearCache(e){e?this.cache.delete(this.getCacheKey(e)):this.cache.clear()}async get(e,t){if(this.debugLog(`get(${e}, ${t})`),eE(t))try{let n=await this.getCurrentData(t);return this.debugLog(`get(${e}, ${t}) > resolved data: ${JSON.stringify(n?.[e])}`),n?.[e]}catch(e){this.errorLog(e);return}}async set(e,t,n){if(this.debugLog(`set(${e}, ..., ${n}) with ${JSON.stringify(t)}`),!eE(n))return!1;let r=await this.getCurrentData(n)||{};try{let i={...r,[e]:t};return await this.setCurrentData(n,i)}catch(e){return this.errorLog(e),!1}}async delete(e,t){if(this.debugLog(`delete(${e}, ${t})`),!eE(t))return!1;try{let n=await this.getCurrentData(t)||{};delete n[e];let r=await this.setCurrentData(t,n);return r||this.clearCache(t),r}catch(e){return this.errorLog(e),!1}}async getCurrentData(e){if(this.debugLog(`getCurrentData(${e})`),!eE(e))return;let t=this.getCacheKey(e),n=this.cache.get(t);if(n&&this.isCacheValid(n))return this.debugLog(`getCurrentData(${e}) > returning cached data`),n.data;try{let n,r=await this.delegate.get(t);if(this.debugLog(`getCurrentData(${e}) > value: ${r?`${r.substring(0,30)}...`:r}`),eE(r)){let t=this.decryptValue(r);n=JSON.parse(t),this.debugLog(`getCurrentData(${e}) > data: ${JSON.stringify(n)}`)}else n=void 0;return this.cache.set(t,{data:n,timestamp:Date.now()}),n}catch(e){this.errorLog(e);return}}async setCurrentData(e,t){try{this.debugLog(`setCurrentData(${e}, ...) with ${JSON.stringify(t)}`);let n=this.encryptValue(JSON.stringify(t)),r=this.calculateTTL(t);this.debugLog(`setCurrentData(${e}, ...) > ttl: ${r}`);let i=this.getCacheKey(e),o=await this.delegate.set(i,n,r);return o?this.cache.set(i,{data:t,timestamp:Date.now()}):this.clearCache(e),o}catch(e){return this.errorLog(e),!1}}decryptValue(e){return this.encryptionKey?e_.Buffer.from(eS.default.AES.decrypt(e,this.encryptionKey).toString(eS.default.enc.Utf8),"base64").toString():e}encryptValue(e){return this.encryptionKey?eS.default.AES.encrypt
9(e_.Buffer.from(e).toString("base64"),this.encryptionKey).toString():e}getDiagnosticsAdapter(){return eA.getConfig().diagnosticsAdapter}debugLog(e){eA.getConfig()?.debug&&this.getDiagnosticsAdapter()?.debug(e,"[OAuthKitNextjs][KVStorageAdapter]")}errorLog(e){this.getDiagnosticsAdapter()?.exception(e,"[OAuthKitNextjs][KVStorageAdapter]")}calculateTTL(e){let t=e.authData;if(!t)return 3600;let n=Math.floor(Date.now()/1e3);return t.expiresAt?Math.max(t.expiresAt-n,60):t.fetchedAt&&t.expiresIn?Math.max(t.fetchedAt+t.expiresIn-n,60):t.expiresIn?Math.max(t.expiresIn,60):3600}}class eT{store=new Map;async get(e){return this.store.get(e)}async set(e,t,n){return this.store.set(e,t),!0}async delete(e){return this.store.delete(e)}clear(){this.store.clear()}}async function ek(){let{default:t}=await e.A(360248);return t}({...eA.getConfig(),clientId:"",redirectUri:"",scopes:[],endpoints:{tokenEndpoint:"",introspectionEndpoint:"",userInfoEndpoint:"",authorizationEndpoint:"",registrationEndpoint:"",endSessionEndpoint:"",revocationEndpoint:""},authStateAdapter:new class{async generate(){let e=new Uint8Array(32);return globalThis.crypto.getRandomValues(e),btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}},pkceAdapter:new class{async generateCredentials(){let e=await ek(),t=await e();return{verifier:t.code_verifier,challenge:t.code_challenge,challengeMethod:"S256"}}async generateChallenge(e){let t=await ek();return(await t(e)).code_challenge}async verifyChallenge(e,t){return await this.generateChallenge(e)===t}},storageAdapter:new eO({encryptionKey:"test-encryption-key-32-chars-long",delegate:new eT}),sessionTTL:3600,slidingSession:!0,cookieName:"vp-auth-session",cookieOptions:{httpOnly:!0,secure:!0,sameSite:"lax",domain:"localhost",path:"/"},encryptionKey:"test-encryption-key-32-chars-long"});e.i(280571),e.i(654457),e.i(549742),e.s([],752186)}]); 10 11//# debugId=56a7d706-4d6a-994f-4605-ebdfef1897d1
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.