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]="d4dc61f8-8092-301d-be49-ded47e30d3b9")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,563471,e=>{"use strict";var t=e.i(762236),r=e.i(676546),n=e.i(784845),o=e.i(897301),i=e.i(581831),s=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};let a=(0,r.createContext)(null);function l(e){if(!e)return 0;let t=Date.parse(e);return Number.isFinite(t)?Math.floor(t/1e3):0}e.s(["SubscriptionContext",0,a,"SubscriptionProvider",0,function({children:e,getLocalSubscription:u,getLocalOrganizationSubscription:c,getProductPrices:d,subscribeToSubscriptionChanges:f,getCreditPlans:p,checkoutWithStripe:h,getStripeClient:v,pendingCheckoutKey:y="aethera_pending_checkout",organizationBillingEnabled:m=!1}){var b,g,w,E,_,x,O,C,L,P,T,R,S,A,j;let[D,B]=(0,r.useState)(null),I=(0,r.useContext)(n.AuthContext),M=(0,r.useContext)(o.OrganizationContext),H=(0,r.useRef)(!1),U=(0,r.useRef)(()=>s(this,void 0,void 0,function*(){})),N=(0,r.useRef)(null),z=(0,r.useRef)(0),F=(0,r.useCallback)(()=>s(this,void 0,void 0,function*(){if(N.current)return N.current;if(!d)return[];try{let e=yield d();return N.current=e,e}catch(e){return console.error("Error loading subscription prices:",e),[]}}),[d]);(0,r.useEffect)(()=>{var e,t;if(null==I||!I.isLoading){if(!(null==I?void 0:I.user)){z.current+=1,B(null);return}if(null==M||!M.isLoading){if(!(null==(e=null==I?void 0:I.user)?void 0:e.id)||!(null==(t=null==M?void 0:M.activeOrganization)?void 0:t.id)){z.current+=1,B(null);return}U.current()}}},[null==I?void 0:I.isLoading,null==(b=null==I?void 0:I.user)?void 0:b.id,null==(g=null==M?void 0:M.activeOrganization)?void 0:g.id,null==(w=null==M?void 0:M.activeOrganization)?void 0:w.role,null==M?void 0:M.isLoading]),(0,r.useEffect)(()=>{s(this,void 0,void 0,function*(){var e,t;if(!d||!p||!h||!v||H.current)return;let r=localStorage.getItem(y);if(!r)return;let n=(null==(e=null==I?void 0:I.user)?void 0:e.id)&&!I.isLoading&&(null==I?void 0:I.userMetadata),o=!(null==M?void 0:M.isLoading)&&(null==(t=null==M?void 0:M.activeOrganization)?void 0:t.id),s=(0,i.billingOrganizationId)(null==M?void 0:M.activeOrganization,m),a=null===s;if(n&&o){if(!a)return void localStorage.removeItem(y);try{let e=JSON.parse(r);if(Date.now()-e.timestamp>18e5)return void localStorage.removeItem(y);if(!D)return;if(D.activeSubscription||D.isPremium)return void localStorage.removeItem(y);H.current=!0,localStorage.removeItem(y);let t=Array.isArray(p)?p:yield p(),n=(Array.isArray(t)?t:yield t).slice(1).find(t=>t.id===e.planId);if(!n)return;let o=yield d(),i="yearly"===e.billing?n.price.yearly.stripePriceId:n.price.monthly.stripePriceId,a=o.find(e=>e.id===i);if(!a)return;let l=window.location.origin,{errorRedirect:u,sessionUrl:c}=yield h(a,"/chat?status=success&session_id={CHECKOUT_SESSION_ID}",null!=s?s:"","",l);if(u&&1){window.location.href=u;return}if(!c)return;window.location.href=c}catch(e){console.error("Error processing pending fast checkout:",e),localStorage.removeItem(y)}finally{H.current=!1}}})},[null==(E=null==I?void 0:I.user)?void 0:E.id,null==I?void 0:I.isLoading,null==I?void 0:I.userMetadata,null==M?void 0:M.isLoading,null==(_=null==M?void 0:M.activeOrganization)?void 0:_.id,null==(x=null==M?void 0:M.activeOrganization)?void 0:x.kind,null==(O=null==M?void 0:M.activeOrganization)?void 0:O.role,m,D]);let k=(0,r.useCallback)(()=>s(this,void 0,void 0,function*(){var e,t,r,n,o,s,a;if(!(null==(e=null==M?void 0:M.activeOrganization)?void 0:e.id)||!(null==(t=null==I?void 0:I.user)?void 0:t.id))return;if(!(0,i.isBillingScopeResolved)(M.activeOrganization,m)){z.current+=1,B(null);return}let d=`${M.activeOrganization.role}:${M.activeOrganization.id}`,f=++z.current;B(e=>e?Object.assign(Object.assign({},e),{isLoading:!0,error:null}):null);try{let e=(0,i.billingOrganizationId)(M.activeOrganization,m),t=null===e,[p,h]=yield Promise.all([t?u(I.user.id):c(e),F()]);if(f!==z.current)return;if(!(null==p?void 0:p.id))return void B({activeSubscription:null,localSubscription:null,reloadSubscription:k,isPremium:!1,isLoading:!1,prices:h,error:null,scopeKey:d});let v=null!=(r=p.price_id)?r:null,y=!p.id.startsWith("free_sub")&&!p.id.startsWith("member_sub")&&!!(v&&"free"!==v)&&"canceled"!==p.status,b=h.find(e=>e.id===v);B({activeSubscription:y?{id:p.id,status:p.status,cancel_at_period_end:null!=(n=p.cancel_at_period_end)&&n,cancel_at:p.cancel_at?l(p.cancel_at):null,current_period_start:l(p.current_period_start),current_period_end:l(p.current_period_end),items:{data:[{quantity:null!=(o=p.quantity)?o:1,price:{i
2d:p.price_id,unit_amount:null!=(s=null==b?void 0:b.unit_amount)?s:null,currency:null!=(a=null==b?void 0:b.currency)?a:null,recurring:(null==b?void 0:b.interval)?{interval:b.interval}:null}}]}}:null,localSubscription:p,reloadSubscription:k,isPremium:y,isLoading:!1,prices:h,error:null,scopeKey:d})}catch(e){if(f!==z.current)return;console.error("Error loading subscription:",e),B({activeSubscription:null,localSubscription:null,reloadSubscription:k,isPremium:!1,isLoading:!1,prices:[],error:e instanceof Error?e:Error("Could not load subscription"),scopeKey:d})}}),[null==(C=null==I?void 0:I.user)?void 0:C.id,F,c,u,null==(L=null==M?void 0:M.activeOrganization)?void 0:L.id,null==(P=null==M?void 0:M.activeOrganization)?void 0:P.kind,null==(T=null==M?void 0:M.activeOrganization)?void 0:T.role,m]);return U.current=k,(0,r.useEffect)(()=>{var e,t;let r=null==(e=null==I?void 0:I.user)?void 0:e.id,n=null==(t=null==M?void 0:M.activeOrganization)?void 0:t.id;if(f&&(null==I||!I.isLoading)&&(null==M||!M.isLoading)&&r&&n)return f({userId:r,organizationId:n,isPersonal:null===(0,i.billingOrganizationId)(M.activeOrganization,m)},()=>{k()})},[null==I?void 0:I.isLoading,null==(R=null==I?void 0:I.user)?void 0:R.id,null==(S=null==M?void 0:M.activeOrganization)?void 0:S.id,null==(A=null==M?void 0:M.activeOrganization)?void 0:A.kind,null==(j=null==M?void 0:M.activeOrganization)?void 0:j.role,null==M?void 0:M.isLoading,m,k,f]),(0,t.jsx)(a.Provider,{value:D,children:e})}])},655861,e=>{"use strict";let t=["code","reason","message","status","type","wasClean","error","details","hint"];function r(e){return Math.round(Math.min(3e4,1e3*2**Math.max(0,e-1))*(.8+.4*Math.random()))}function n(e){if(!e||"object"!=typeof e)return null;let t=e.code;return"string"==typeof t||"number"==typeof t?t:null}function o(e,r){if(null==e)return null;if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e;if(e instanceof Error)return{name:e.name,message:e.message,code:n(e),cause:r<3?o(e.cause,r+1):void 0};if("object"!=typeof e)return String(e);let i={};for(let n of t){let t=e[n];void 0!==t&&(i[n]="object"==typeof t&&null!==t&&r<3?o(t,r+1):t)}if(Object.keys(i).length>0)return i;for(let[t,r]of Object.entries(e).slice(0,8))(null===r||"object"!=typeof r)&&(i[t]=r);return Object.keys(i).length>0?i:String(e)}let i=0;e.s(["subscribeToPostgresChanges",0,function(e,t){let{topic:s,bindings:a,onSubscribed:l,onStateChange:u}=t,c=t.maxAttempts??8,d=t.backoffMs??r,f="connecting",p=0,h=0,v=0,y=null,m=null,b=!1,g=(e,t,r)=>{f=e,u?.(e,{topic:s,attempt:p,status:t,error:r})},w=t=>{if(t)try{Promise.resolve(e.removeChannel(t)).catch(()=>void 0)}catch{}},E=()=>
2{if(b)return;i+=1;let t=`${s}:${i.toString(36)}`,r=e.channel(t);for(let e of a){let t={event:e.event,schema:e.schema??"public",table:e.table,...e.filter?{filter:e.filter}:{}};r.on("postgres_changes",t,t=>{r===y&&e.handler(t)})}y=r,r.subscribe((e,i)=>{if(r===y&&!b){if("SUBSCRIBED"===e){let r=h>0||v>0,n=p;h+=1,p=0,r&&console.info("[realtime] channel rejoined",{topic:t,attempts:n}),g("live",e,null),l?.({rejoined:r,attempt:n});return}if("CHANNEL_ERROR"===e||"TIMED_OUT"===e||"CLOSED"===e){let s=void 0===i?null:i instanceof Error?{name:i.name,message:i.message,code:n(i),cause:o(i.cause,0)}:"string"==typeof i?{name:null,message:i,code:null,cause:null}:i&&"object"==typeof i?{name:null,message:"string"==typeof i.message?i.message:"string"==typeof i.reason&&i.reason?i.reason:null,code:n(i),cause:o(i,0)}:{name:null,message:null==i?null:String(i),code:null,cause:null};y=null,w(r),_(e,s,t)}}})},_=(e,t,r)=>{if(b)return;if(p>=c){console.error("[realtime] channel degraded, no more retries",{topic:r,status:e,attempts:p,...t??{}}),g("degraded",e,t);return}p+=1,v+=1;let n=d(p);console.warn("[realtime] channel dropped, rejoining",{topic:r,status:e,attempt:p,retryInMs:n,...t??{}}),g("reconnecting",e,t),m=setTimeout(()=>{m=null,E()},n)},x=()=>{if(b||"reconnecting"!==f&&"degraded"!==f)return;m&&(clearTimeout(m),m=null),p=0;let e=y;y=null,w(e),g("reconnecting",null,null),E()},O="function"==typeof window.addEventListener,C=()=>{("u"<typeof document||"visible"===document.visibilityState)&&x()};return O&&(window.addEventListener("online",x),document.addEventListener("visibilitychange",C)),E(),{stop:()=>{if(b)return;b=!0,m&&(clearTimeout(m),m=null),O&&(window.removeEventListener("online",x),document.removeEventListener("visibilitychange",C));let e=y;y=null,w(e),f="stopped"},retry:x,getState:()=>f}}])},679877,(e,t,r)=>{"use strict";var n,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(e,t){return new Promise(function(r,n){var o,i,s;function a(r){e.removeListener(t,l),n(r)}function l(){"function"==typeof e.removeListener&&e.removeListener("error",a),r([].slice.call(arguments))}m(e,t,l,{once:!0}),"error"!==t&&(o=e,i=a,s={once:!0},"function"==typeof o.on&&m(o,"error",i,s))})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function u(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function d(e,t,r,n){if(u(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var o,i,s,a=Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,console&&console.warn&&console.warn(a)}return e}function f(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=f.bind(n);return o.listener=r,n.wrapFn=o,o}function h(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):y(o,o.length)}function v(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function y(e,t){for(var r=Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else if("function"==typeof e.addEventListener)e.addEventListener(t,function o(i){n.once&&e.removeEventListener(t,o),r(i)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||s(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),a.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var s,a=Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else for(var u=l.length,c=y(l,u),r=0;r<u;++r)i(c[r],this,t);return!0},a.prototype.addListener=function(e,t){return d(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return d(this,e,t,!0)},a.prototype.once=function(e,t){return u(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,n,o,i,s;if(u(t),void 0===(n=this._events)||void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit
2("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},a.prototype.listenerCount=v,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},667337,(e,t,r)=>{var n="u">typeof globalThis&&globalThis||"u">typeof self&&self||e.g,o=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();(function(t){var r=void 0!==o&&o||"u">typeof self&&self||e.g||{},n={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};if(n.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function a(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function d(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}}function f(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function p(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function h(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){if(this.bodyUsed=this.bodyUsed,this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(n.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(n.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(n.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var t;n.arrayBuffer&&n.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=h(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=h(e):this._bodyText=e=Object.prototype.toString.call(e)}else this._noBody=!0,this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=d(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(n.blob)return this.blob().then(p);throw Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,n,o,i=d(this);if(i)return i;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),o=(n=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?n[1]:"utf-8",t.readAsText(e,o),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},n.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(e,t){e=a(e),t=l(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},c.prototype.delete=function(e){delete this.map[a(e)]},c.prototype.get=function(e){return e=a(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(a(e))},c.prototype.set=function(e,t){this.map[a(e)]=l(t)},c.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},c.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),u(e)},c.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),u(e)},c.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),u(e)},n.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var y=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function m(e,t){if(!(this instanceof m))throw TypeError('Please use the "new" operator, this DOM object c
2onstructor cannot be called as a function.');var n,o,i=(t=t||{}).body;if(e instanceof m){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new c(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new c(t.headers)),this.method=(o=(n=t.method||this.method||"GET").toUpperCase(),y.indexOf(o)>-1?o:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in r)return new AbortController().signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),("GET"===this.method||"HEAD"===this.method)&&("no-store"===t.cache||"no-cache"===t.cache)){var s=/([?&])_=[^&]*/;s.test(this.url)?this.url=this.url.replace(s,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function b(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function g(e,t){if(!(this instanceof g))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},v.call(m.prototype),v.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},g.error=function(){var e=new g(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var w=[301,302,303,307,308];g.redirect=function(e,t){if(-1===w.indexOf(t))throw RangeError("Invalid status code");return new g(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function E(e,o){return new Promise(function(i,s){var u=new m(e,o);if(u.signal&&u.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var d=new XMLHttpRequest;function f(){d.abort()}if(d.onload=function(){var e,t,r={statusText:d.statusText,headers:(e=d.getAllResponseHeaders()||"",t=new c,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();try{t.append(n,o)}catch(e){console.warn("Response "+e.message)}}}),t)};0===u.url.indexOf("file://")&&(d.status<200||d.status>599)?r.status=200:r.status=d.status,r.url="responseURL"in d?d.responseURL:r.headers.get("X-Request-URL");var n="response"in d?d.response:d.responseText;setTimeout(function(){i(new g(n,r))},0)},d.onerror=function(){setTimeout(function(){s(TypeError("Network request failed"))},0)},d.ontimeout=function(){setTimeout(function(){s(TypeError("Network request timed out"))},0)},d.onabort=function(){setTimeout(function(){s(new t.DOMException("Aborted","AbortError"))},0)},d.open(u.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(u.url),!0),"include"===u.credentials?d.withCredentials=!0:"omit"===u.credentials&&(d.withCredentials=!1),"responseType"in d&&(n.blob?d.responseType="blob":n.arrayBuffer&&(d.responseType="arraybuffer")),o&&"object"==typeof o.headers&&!(o.headers instanceof c||r.Headers&&o.headers instanceof r.Headers)){var p=[];
2Object.getOwnPropertyNames(o.headers).forEach(function(e){p.push(a(e)),d.setRequestHeader(e,l(o.headers[e]))}),u.headers.forEach(function(e,t){-1===p.indexOf(t)&&d.setRequestHeader(t,e)})}else u.headers.forEach(function(e,t){d.setRequestHeader(t,e)});u.signal&&(u.signal.addEventListener("abort",f),d.onreadystatechange=function(){4===d.readyState&&u.signal.removeEventListener("abort",f)}),d.send(void 0===u._bodyInit?null:u._bodyInit)})}E.polyfill=!0,r.fetch||(r.fetch=E,r.Headers=c,r.Request=m,r.Response=g),t.Headers=c,t.Request=m,t.Response=g,t.fetch=E,Object.defineProperty(t,"__esModule",{value:!0})})({}),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var i=n.fetch?n:o;(r=i.fetch).default=i.fetch,r.fetch=i.fetch,r.Headers=i.Headers,r.Request=i.Request,r.Response=i.Response,t.exports=r},318304,e=>{"use strict";let t=(0,e.i(442542).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],318304)},574926,e=>{"use strict";e.i(486225);var t=e.i(762236),r=e.i(676546),n=e.i(219454),o=e.i(548913),i=e.i(470212),s=e.i(920046),a=e.i(250438),l=r,u=e.i(574064);function c(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class d extends l.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if((0,a.isHTMLElement)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,r=(0,a.isHTMLElement)(e)&&e.offsetWidth||0,n=(0,a.isHTMLElement)(e)&&e.offsetHeight||0,o=getComputedStyle(t),i=this.props.sizeRef.current;i.height=parseFloat(o.height),i.width=parseFloat(o.width),i.top=t.offsetTop,i.left=t.offsetLeft,i.right=r-i.width-i.left,i.bottom=n-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function f({children:e,isPresent:n,anchorX:o,anchorY:i,root:s,pop:a}){let p=(0,l.useId)(),h=(0,l.useRef)(null),v=(0,l.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:y}=(0,l.useContext)(u.MotionConfigContext),m=function(...e){return r.useCallback(function(...e){return t=>{let r=!1,n=e.map(e=>{let n=c(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():c(e[t],null)}}}}(...e),e)}(h,e.props?.ref??e?.ref);return(0,l.useInsertionEffect)(()=>{let{width:e,height:t,top:r,left:l,right:u,bottom:c}=v.current;if(n||!1===a||!h.current||!e||!t)return;let d="left"===o?`left: ${l}`:`right: ${u}`,f="bottom"===i?`bottom: ${c}`:`top: ${r}`;h.current.dataset.motionPopId=p;let m=document.createElement("style");y&&(m.nonce=y);let b=s??document.head;return b.appendChild(m),m.sheet&&m.sheet.insertRule(` 3 [data-motion-pop-id="${p}"] { 4 position: absolute !important; 5 width: ${e}px !important; 6 height: ${t}px !important; 7 ${d}px !important; 8 ${f}px !important; 9 } 10 `),()=>{h.current?.removeAttribute("data-motion-pop-id"),b.contains(m)&&b.removeChild(m)}},[n]),(0,t.jsx)(d,{isPresent:n,childRef:h,sizeRef:v,pop:a,children:!1===a?e:l.cloneElement(e,{ref:m})})}let p=({children:e,initial:n,isPresent:i,onExitComplete:a,custom:l,presenceAffectsLayout:u,mode:c,anchorX:d,anchorY:p,root:v})=>{let y=(0,o.useConstant)(h),m=(0,r.useId)(),b=!0,g=(0,r.useMemo)(()=>(b=!1,{id:m,initial:n,isPresent:i,custom:l,onExitComplete:e=>{for(let t of(y.set(e,!0),y.values()))if(!t)return;a&&a()},register:e=>(y.set(e,!1),()=>y.delete(e))}),[i,y,a]);return u&&b&&(g={...g}),(0,r.useMemo)(()=>{y.forEach((e,t)=>y.set(t,!1))},[i]),r.useEffect(()=>{i||y.size||!a||a()},[i]),e=(0,t.jsx)(f,{pop:"popLayout"===c,isPresent:i,anchorX:d,anchorY:p,root:v,children:e}),(0,t.jsx)(s.PresenceContext.Provider,{value:g,children:e})};function h(){return new Map}var v=e.i(584874);let y=e=>e.key||"";function m(e){let t=[];return r.Children.forEach(e,e=>{(0,r.isValidElement)(e)&&t.push(e)}),t}e.s(["AnimatePresence",0,({children:e,custom:s,initial:a=!0,onExitComplete:l,presenceAffectsLayout:u=!0,mode:c="sync",propagate:d=!1,anchorX:f="left",anchorY:h="top",root:b})=>{let[g,w]=(0,v.usePresence)(d),E=(0,r.useMemo)(()=>
10m(e),[e]),_=d&&!g?[]:E.map(y),x=(0,r.useRef)(!0),O=(0,r.useRef)(E),C=(0,o.useConstant)(()=>new Map),L=(0,r.useRef)(new Set),[P,T]=(0,r.useState)(E),[R,S]=(0,r.useState)(E);(0,i.useIsomorphicLayoutEffect)(()=>{x.current=!1,O.current=E;for(let e=0;e<R.length;e++){let t=y(R[e]);_.includes(t)?(C.delete(t),L.current.delete(t)):!0!==C.get(t)&&C.set(t,!1)}},[R,_.length,_.join("-")]);let A=[];if(E!==P){let e=[...E];for(let t=0;t<R.length;t++){let r=R[t],n=y(r);_.includes(n)||(e.splice(t,0,r),A.push(r))}return"wait"===c&&A.length&&(e=A),S(m(e)),T(E),null}let{forceRender:j}=(0,r.useContext)(n.LayoutGroupContext);return(0,t.jsx)(t.Fragment,{children:R.map(e=>{let r=y(e),n=(!d||!!g)&&(E===R||_.includes(r));return(0,t.jsx)(p,{isPresent:n,initial:(!x.current||!!a)&&void 0,custom:s,presenceAffectsLayout:u,mode:c,root:b,onExitComplete:n?void 0:()=>{if(L.current.has(r)||!C.has(r))return;L.current.add(r),C.set(r,!0);let e=!0;C.forEach(t=>{t||(e=!1)}),e&&(j?.(),S(O.current),d&&w?.(),l&&l())},anchorX:f,anchorY:h,children:e},r)})})}],574926)},995790,324776,e=>{"use strict";var t,r=e.i(762236),n=e.i(676546),o=e.i(775453),i=e.i(15239),s=e.i(934155),a=e.i(174286),l=e.i(350216),u=e.i(206841),c=e.i(385619),d=e.i(31915),f=e.i(281376),p="HoverCard",[h,v]=(0,i.createContextScope)(p,[l.createPopperScope]),y=(0,l.createPopperScope)(),[m,b]=h(p),g=e=>{let{__scopeHoverCard:t,children:o,open:i,defaultOpen:a,onOpenChange:u,openDelay:c=700,closeDelay:d=300}=e,f=y(t),h=n.useRef(0),v=n.useRef(0),b=n.useRef(!1),g=n.useRef(!1),[w,E]=(0,s.useControllableState)({prop:i,defaultProp:a??!1,onChange:u,caller:p}),_=n.useCallback(()=>{clearTimeout(v.current),h.current=window.setTimeout(()=>E(!0),c)},[c,E]),x=n.useCallback(()=>{clearTimeout(h.current),b.current||g.current||(v.current=window.setTimeout(()=>E(!1),d))},[d,E]),O=n.useCallback(()=>E(!1),[E]);return n.useEffect(()=>()=>{clearTimeout(h.current),clearTimeout(v.current)},[]),(0,r.jsx)(m,{scope:t,open:w,onOpenChange:E,onOpen:_,onClose:x,onDismiss:O,hasSelectionRef:b,isPointerDownOnContentRef:g,children:(0,r.jsx)(l.Root,{...f,children:o})})};g.displayName=p;var w="HoverCardTrigger",E=n.forwardRef((e,t)=>{let{__scopeHoverCard:n,...i}=e,s=b(w,n),a=y(n);return(0,r.jsx)(l.Anchor,{asChild:!0,...a,children:(0,r.jsx)(d.Primitive.a,{"data-state":s.open?"open":"closed",...i,ref:t,onPointerEnter:(0,o.composeEventHandlers)(e.onPointerEnter,R(s.onOpen)),onPointerLeave:(0,o.composeEventHandlers)(e.onPointerLeave,R(s.onClose)),onFocus:(0,o.composeEventHandlers)(e.onFocus,s.onOpen),onBlur:(0,o.composeEventHandlers)(e.onBlur,s.onClose),onTouchStart:(0,o.composeEventHandlers)(e.onTouchStart,e=>e.preventDefault())})})});E.displayName=w;var _="HoverCardPortal",[x,O]=h(_,{forceMount:void 0}),C=e=>{let{__scopeHoverCard:t,forceMount:n,children:o,container:i}=e,s=b(_,t);return(0,r.jsx)(x,{scope:t,forceMount:n,children:(0,r.jsx)(c.Presence,{present:n||s.open,children:(0,r.jsx)(u.Portal,{asChild:!0,container:i,children:o})})})};C.displayName=_;var L="HoverCardContent",P=n.forwardRef((e,t)=>{let n=O(L,e.__scopeHoverCard),{forceMount:i=n.forceMount,...s}=e,a=b(L,e.__scopeHoverCard);return(0,r.jsx)(c.Presence,{present:i||a.open,children:(0,r.jsx)(T,{"data-state":a.open?"open":"closed",...s,onPointerEnter:(0,o.composeEventHandlers)(e.onPointerEnter,R(a.onOpen)),onPointerLeave:(0,o.composeEventHandlers)(e.onPointerLeave,R(a.onClose)),ref:t})})});P.displayName=L;var T=n.forwardRef((e,i)=>{let{__scopeHoverCard:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:p,...h}=e,v=b(L,s),m=y(s),g=n.useRef(null),w=(0,a.useComposedRefs)(i,g),[E,_]=n.useState(!1);return n.useEffect(()=>{if(E){let e=document.body;return t=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=t,e.style.webkitUserSelect=t}}},[E]),n.useEffect(()=>{if(g.current){let e=()=>{_(!1),v.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(v.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),v.hasSelectionRef.current=!1,v.isPointerDownOnContentRef.current=!1}}},[v.isPointerDownOnContentRef,v.hasSelectionRef]),n.useEffect(()=>{g.current&&(function(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t}
10)(g.current).forEach(e=>e.setAttribute("tabindex","-1"))}),(0,r.jsx)(f.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:p,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:(0,o.composeEventHandlers)(d,e=>{e.preventDefault()}),onDismiss:v.onDismiss,children:(0,r.jsx)(l.Content,{...m,...h,onPointerDown:(0,o.composeEventHandlers)(h.onPointerDown,e=>{e.currentTarget.contains(e.target)&&_(!0),v.hasSelectionRef.current=!1,v.isPointerDownOnContentRef.current=!0}),ref:w,style:{...h.style,userSelect:E?"text":void 0,WebkitUserSelect:E?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})});function R(e){return t=>"touch"===t.pointerType?void 0:e()}n.forwardRef((e,t)=>{let{__scopeHoverCard:n,...o}=e,i=y(n);return(0,r.jsx)(l.Arrow,{...i,...o,ref:t})}).displayName="HoverCardArrow";var S=e.i(47626),A=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let j=n.forwardRef((e,t)=>{var{className:n,align:o="center",sideOffset:i=4}=e,s=A(e,["className","align","sideOffset"]);return(0,r.jsx)(P,{ref:t,align:o,sideOffset:i,className:(0,S.cn)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]",n),...s})});j.displayName=P.displayName,e.s(["HoverCard",0,g,"HoverCardContent",0,j,"HoverCardPortal",0,C,"HoverCardTrigger",0,E],995790),e.i(486225);let D={status:["status","status_description"],error:["error","error_description"]};e.s(["getErrorRedirect",0,(e,t,r="",n=!1,o="")=>((e,t,r,n="",o=!1,i="")=>{let[s,a]=D[t],l=`${e}?${s}=${encodeURIComponent(r)}`;return n&&(l+=`&${a}=${encodeURIComponent(n)}`),o&&(l+="&disable_button=true"),i&&(l+=`&${i}`),l})(e,"error",t,r,n,o),"syncStateFlush",0,t=>{let{flushSync:r}=e.r(901740);r(t)},"toDate",0,e=>e instanceof Date?e:new Date(e)],324776)}]); 11 12//# debugId=d4dc61f8-8092-301d-be49-ded47e30d3b9 13//# sourceMappingURL=2y9fgh0qsyz83.js.map
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.