1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,474831,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return i.callServer},createServerReference:function(){return u.createServerReference},findSourceMapURL:function(){return s.findSourceMapURL}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=e.r(837903),s=e.r(361276),u=e.r(374341)},573817,(e,t,r)=>{t.exports=e.r(286556)},393136,e=>{"use strict";var t=e.i(474831),r=(0,t.createServerReference)("601d5a3e3143d0ea93c958368e3e4b5e407691e654",t.callServer,void 0,t.findSourceMapURL,"getChatWithModel");e.s(["getChatWithModel",()=>r])},337692,e=>{"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:e.g;let r=t.fetch,n=t.fetch.bind(t),o=t.Headers,i=t.Request,s=t.Response;e.s(["Headers",0,o,"Request",0,i,"Response",0,s,"default",0,n,"fetch",0,r])},977091,(e,t,r)=>{var n={675:function(e,t){"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,i=a(e),s=i[0],u=i[1],f=new o((s+u)*3/4-u),l=0,c=u>0?s-4:s;for(r=0;r<c;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],f[l++]=t>>16&255,f[l++]=t>>8&255,f[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,f[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,f[l++]=t>>8&255,f[l++]=255&t),f},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=0,u=n-o;s<u;s+=16383)i.push(function(e,t,n){for(var o,i=[],s=t;s<n;s+=3)o=(e[s]<<16&0xff0000)+(e[s+1]<<8&65280)+(255&e[s+2]),i.push(r[o>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}(e,s,s+16383>u?u:s+16383));return 1===o?i.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===o&&i.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=i.length;s<u;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},72:function(e,t,r){"use strict";var n=r(675),o=r(783),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return l(e)}return a(e,t,r)}function a(e,t,r){if("string"==typeof e){var n=e,o=t;if(("string"!=typeof o||""===o)&&(o="utf8"),!u.isEncoding(o))throw TypeError("Unknown encoding: "+o);var i=0|d(n,o),a=s(i),f=a.write(n,o);return f!==i&&(a=a.slice(0,f)),a}if(ArrayBuffer.isView(e))return c(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(O(e,ArrayBuffer)||e&&O(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(O(e,SharedArrayBuffer)||e&&O(e.buffer,SharedArrayBuffer)))return function(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),u.prototype),n}(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var l=e.valueOf&&e.valueOf();if(null!=l&&l!==e)return u.from(l,t,r);var p=function(e){if(u.isBuffer(e)){var t=0|h(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?s(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(p)return p;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');
vendor: 16,517 bytes, line 1
1if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return f(e),s(e<0?0:0|h(e))}function c(e){for(var t=e.length<0?0:0|h(e.length),r=s(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,u.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return a(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return(f(e),e<=0)?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)},u.allocUnsafe=function(e){return l(e)},u.allocUnsafeSlow=function(e){return l(e)};function h(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||O(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return C(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return B(e).length;default:if(o)return n?-1:C(e).length;t=(""+t).toLowerCase(),o=!0}}function p(e,t,r){var o,i,s,u=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=T[e[i]];return o}(this,t,r);case"utf8":case"utf-8":return m(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}(this,t,r);case"base64":return o=this,i=t,s=r,0===i&&s===o.length?n.fromByteArray(o):n.fromByteArray(o.slice(i,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}(this,t,r);default:if(u)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),u=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,o){var i;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(i=r*=1)!=i&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(o)return -1;else r=e.length-1;else if(r<0)if(!o)return -1;else r=0;if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,o);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(o)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return v(e,[t],r,n,o)}throw TypeError("val must be string, number or Buffer")}function v(e,t,r,n,o){var i,s=1,u=e.length,a=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,u/=2,a/=2,r/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=r;i<u;i++)if(f(e,i)===f(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===a)return l*s}else -1!==l&&(i-=i-l),l=-1}else for(r+a>u&&(r=u-a),i=r;i>=0;i--){for(var c=!0,h=0;h<a;h++)if(f(e,i+h)!==f(t,h)){c=!1;break}if(c)return i}return -1}u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(O(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),O(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:+(n<r)},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=u.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(O(i,Uint8Array)&&(i=u.from(i)),!u.isBuffer(i))throw TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?m(this,0,e):p.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,o){if(O(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var i=o-n,s=r-t,a=Math.min(i,s),f=this.slice(n,o),l=e.slice(t,r),c=0;c<a;++c)if(f[c]!==l[c]){i=f[c],s=l[c];break}return i<s?-1:+(s<i)},u.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)};function m(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,s,u,a,f=e[o],l=null,c=f>239?4:f>223?3:f>191?2:1;if(o+c<=r)switch(c){case 1:f<128&&(l=f);break;case 2:(192&(i=e[o+1]))==128&&(a=(31&f)<<6|63&i)>127&&(l=a);break;case 3:i=e[o+1],s=e[o+2],(192&i)==128&&(192&s)==128&&(a=(15&f)<<12|(63&i)<<6|63&s)>2047&&(a<55296||a>57343)&&(l=a);break;case 4:i=e[o+1],s=e[o+2],u=e[o+3],(192&i)==128&&(192&s)==128&&(192&u)==128&&(a=(15&f)<<18|(63&i)<<12|(63&s)<<6|63&u)>65535&&a<1114112&&(l=a)}null===l?(l=65533,c=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=c}var h=n,d=h.length;if(d<=4096)return String.fromCharCode.apply(String,h);for(var p="",y=0;y<d;)p+=String.fromCharCode.apply(String,h.slice(y,y+=4096));return p}function b(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function w(e,t,r,n,o,i){if(!u.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function E(e,t,r,n,o,i){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function S(e,t,r,n,i){return t*=1,r>>>=0,i||E(e,t,r,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,r,n,23,4),r+4}function A(e,t,r,n,i){return t*=1,r>>>=0,i||E(e,t,r,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,r,n,52,8),r+8}u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o,i,s,u,a,f,l,c,h=this.length-t;if((void 0===r||r>h)&&(r=h),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var d=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s<n;++s){var u,a=parseInt(t.substr(2*s,2),16);if((u=a)!=u)break;e[r+s]=a}return s}(this,e,t,r);case"utf8":case"utf-8":return o=t,i=r,I(C(e,this.length-o),this,o,i);case"ascii":return s=t,u=r,I(R(e),this,s,u);case"latin1":case"binary":return function(e,t,r,n){return I(R(t),e,r,n)}(this,e,t,r);case"base64":return a=t,f=r,I(B(e),this,a,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=t,c=r,I(function(e,t){for(var r,n,o=[],i=0;i<e.length&&!((t-=2)<0);++i)n=(r=e.charCodeAt(i))>>8,o.push(r%256),o.push(n);return o}(e,this.length-l),this,l,c);default:if(d)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},u.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return(e>>>=0,t||b(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;w(this,e,t,r,o,0)}var i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;w(this,e,t,r,o,0)}var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var o=Math.pow(2,8*r-1);w(this,e,t,r,o-1,-o)}var i=0,s=1,u=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===u&&0!==this[t+i-1]&&(u=1),this[t+i]=(e/s|0)-u&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var o=Math.pow(2,8*r-1);w(this,e,t,r,o-1,-o)}var i=r-1,s=1,u=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/s|0)-u&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,r){return S(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return S(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return A(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return A(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var i=o-1;i>=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return o},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var o,i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=u.isBuffer(e)?e:u.from(e,n),a=s.length;
1if(0===a)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};var x=/[^+/0-9A-Za-z-_]/g;function C(e,t){t=t||1/0;for(var r,n=e.length,o=null,i=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319||s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return i}function R(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function B(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(x,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function I(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length)&&!(o>=e.length);++o)t[o+r]=e[o];return o}function O(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var T=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}()},783:function(e,t){t.read=function(e,t,r,n,o){var i,s,u=8*o-n-1,a=(1<<u)-1,f=a>>1,l=-7,c=r?o-1:0,h=r?-1:1,d=e[t+c];for(c+=h,i=d&(1<<-l)-1,d>>=-l,l+=u;l>0;i=256*i+e[t+c],c+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+e[t+c],c+=h,l-=8);if(0===i)i=1-f;else{if(i===a)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),i-=f}return(d?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,u,a,f=8*i-o-1,l=(1<<f)-1,c=l>>1,h=5960464477539062e-23*(23===o),d=n?0:i-1,p=n?1:-1,y=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(u=+!!isNaN(t),s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-s))<1&&(s--,a*=2),s+c>=1?t+=h/a:t+=h*Math.pow(2,1-c),t*a>=2&&(s++,a/=2),s+c>=l?(u=0,s=l):s+c>=1?(u=(t*a-1)*Math.pow(2,o),s+=c):(u=t*Math.pow(2,c-1)*Math.pow(2,o),s=0));o>=8;e[r+d]=255&u,d+=p,u/=256,o-=8);for(s=s<<o|u,f+=o;f>0;e[r+d]=255&s,d+=p,s/=256,f-=8);e[r+d-p]|=128*y}}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}},s=!0;try{n[e](r,r.exports,i),s=!1}finally{s&&delete o[e]}return r.exports}i.ab="/ROOT/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/buffer/",t.exports=i(72)},316058,e=>{"use strict";var t=e.i(260293),r=e.i(511795),n=e.i(809528),o=e.i(573817),i=e.i(393136),s=e.i(590863);let u=(0,n.createContext)({isOpen:!1,customImageUrl:null,openModal:()=>{},closeModal:()=>{}}),a="sexting-resume-modelId",f=(0,n.createContext)({isAuthenticated:!1,isLoading:!0,user:null,refreshAuthState:async()=>{}});e.s(["AuthModalProvider",0,({children:e})=>{let[r,o]=(0,n.useState)(!1),[i,s]=(0,n.useState)(null),a=(0,n.useCallback)(e=>{if(s(e?.imageUrl??null),e?.source&&"undefined"!=typeof document){let t="https:"===window.location.protocol?" Secure;":"";document.cookie=`signup_pending_source=${encodeURIComponent(e.source)}; path=/; max-age=3600;${t} SameSite=Lax`}o(!0)},[]),f=(0,n.useCallback)(()=>{o(!1),s(null)},[]),l=(0,n.useMemo)(()=>({isOpen:r,customImageUrl:i,openModal:a,closeModal:f}),[r,i,a,f]);return(0,t.jsx)(u.Provider,{value:l,children:e})},"AuthProvider",0,({children:u})=>{let[l,c]=(0,n.useState)(!1),[h,d]=(0,n.useState)(!0),[p,y]=(0,n.useState)(null),g=(0,o.useRouter)(),v=(0,n.useRef)(null);(0,n.useEffect)(()=>{v.current=p?.id??null},[p]);let m=(0,n.useCallback)(async()=>{try{d(!0);let e=(0,r.createClient)(),{data:{session:t}}=await e.auth.getSession();if(t)y(t.user),c(!0);else{let{data:t}=await e.auth.getUser();y(t.user),c(!!t.user)}}catch(e){console.error("Error refreshing auth state:",e)}finally{d(!1)}},[]);(0,n.useEffect)(()=>{let t=(0,r.createClient)(),n=async()=>{let t=localStorage.getItem(a);if(t){localStorage.removeItem(a);try{let{startSextingChat:r}=await e.A(293072),n=await r(t,"link",{localHour:new Date().getHours()});if(n.success&&n.data)return void g.push(`/chat/${n.data.chatId}`);
1if(n.requiresUpgrade)return void g.push("/plans?src=sexting_entry&tier=ELITE")}catch(e){console.error("[Sexting Resume] failed:",e)}}let r=localStorage.getItem("preview-modelId");if(r){console.log("[Preview Flow] Starting preview flow with modelId:",r);try{let e=localStorage.getItem("preview-scenarioId"),t=localStorage.getItem(`preview-draft-${r}`);console.log("[Preview Flow] Creating chat with:",{previewModelId:r,previewScenarioId:e,hasDraft:!!t});let n=await (0,i.getChatWithModel)(r,{forceNew:!0,style:s.ChatStyle.BALANCED,scenarioId:e||null,llm:s.LLMType.IVY});console.log("[Preview Flow] Chat creation result:",n),n.success&&n.data?(Object.keys(localStorage).forEach(e=>{e.startsWith("preview-")&&localStorage.removeItem(e)}),console.log("[Preview Flow] Redirecting to chat:",n.data),t?g.push(`/chat/${n.data}?draft=true&draftMessage=${encodeURIComponent(t)}`):g.push(`/chat/${n.data}`)):console.error("[Preview Flow] Chat creation failed:",n.error)}catch(e){console.error("[Preview Flow] Error handling preview flow:",e),Object.keys(localStorage).forEach(e=>{e.startsWith("preview-")&&localStorage.removeItem(e)})}}},{data:{subscription:o}}=t.auth.onAuthStateChange(async(e,t)=>{if("TOKEN_REFRESHED"===e&&t?.user?.id===v.current)return;let r=!!v.current;y(t?.user||null),c(!!t),d(!1),t&&!r&&("SIGNED_IN"===e||"INITIAL_SESSION"===e||"USER_UPDATED"===e)&&setTimeout(()=>{n()},300)});return(async()=>{try{d(!0);let{data:{session:e}}=await t.auth.getSession();y(e?.user||null),c(!!e)}catch(e){console.error("Error getting initial session:",e),y(null),c(!1)}finally{d(!1)}})(),()=>{o.unsubscribe()}},[]);let b=(0,n.useMemo)(()=>({isAuthenticated:l,isLoading:h,user:p,refreshAuthState:m}),[l,h,p,m]);return(0,t.jsx)(f.Provider,{value:b,children:u})},"SEXTING_RESUME_KEY",0,a,"useAuth",0,()=>(0,n.useContext)(f),"useAuthModal",0,()=>(0,n.useContext)(u)],316058)},132786,e=>{"use strict";let t=(0,e.i(286796).default)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);e.s(["Sparkles",()=>t],132786)},819232,188625,e=>{"use strict";var t=e.i(809528);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return t=>{let n=!1,o=e.map(e=>{let o=r(e,t);return n||"function"!=typeof o||(n=!0),o});if(n)return()=>{for(let t=0;t<o.length;t++){let n=o[t];"function"==typeof n?n():r(e[t],null)}}}}function o(...e){return t.useCallback(n(...e),e)}e.s(["composeRefs",()=>n,"useComposedRefs",()=>o],188625);var i=e.i(260293);function s(e){var r;let o,s=(r=e,(o=t.forwardRef((e,r)=>{let{children:o,...i}=e;if(t.isValidElement(o)){var s;let e,u,a=(s=o,(u=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(u=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),f=function(e,t){let r={...t};for(let n in t){let o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{let t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(i,o.props);return o.type!==t.Fragment&&(f.ref=r?n(r,a):a),t.cloneElement(o,f)}return t.Children.count(o)>1?t.Children.only(null):null})).displayName=`${r}.SlotClone`,o),u=t.forwardRef((e,r)=>{let{children:n,...o}=e,u=t.Children.toArray(n),a=u.find(l);if(a){let e=a.props.children,n=u.map(r=>r!==a?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,i.jsx)(s,{...o,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(s,{...o,ref:r,children:n})});return u.displayName=`${e}.Slot`,u}var u=s("Slot"),a=Symbol("radix.slottable");function f(e){let t=({children:e})=>(0,i.jsx)(i.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=a,t}function l(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===a}e.s(["Slot",()=>u,"createSlot",()=>s,"createSlottable",()=>f],819232)},294237,e=>{"use strict";var t=e.i(7284);let r=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=t.clsx;e.s(["cva",0,(e,t)=>o=>{var i;if((null==t?void 0:t.variants)==null)return n(e,null==o?void 0:o.class,null==o?void 0:o.className);let{variants:s,defaultVariants:u}=t,a=Object.keys(s).map(e=>{let t=null==o?void 0:o[e],n=null==u?void 0:u[e];
1if(null===t)return null;let i=r(t)||r(n);return s[e][i]}),f=o&&Object.entries(o).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return n(e,a,null==t||null==(i=t.compoundVariants)?void 0:i.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...u,...f}[t]):({...u,...f})[t]===r})?[...e,r,n]:e},[]),null==o?void 0:o.class,null==o?void 0:o.className)}])},519455,e=>{"use strict";var t=e.i(260293),r=e.i(809528),n=e.i(819232),o=e.i(294237),i=e.i(975157);let s=(0,o.cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:shadow-md hover:scale-[1.01] transition-all duration-200",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground font-medium",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary dark:text-primary-foreground underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 [&_svg]:size-4",sm:"h-8 rounded-xl px-3 text-xs [&_svg]:size-4",lg:"h-10 rounded-xl px-8 [&_svg]:size-5",icon:"h-9 w-9 [&_svg]:size-4","icon-lg":"h-10 w-10 [&_svg]:size-5"}},defaultVariants:{variant:"default",size:"default"}}),u=r.forwardRef(({className:e,variant:r,size:o,asChild:u=!1,...a},f)=>{let l=u?n.Slot:"button";return(0,t.jsx)(l,{className:(0,i.cn)(s({variant:r,size:o,className:e})),ref:f,...a})});u.displayName="Button",e.s(["Button",()=>u,"buttonVariants",()=>s])},707061,e=>{"use strict";var t=e.i(392472);function r(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let n=r(0,t.useTranslations),o=r(0,t.useFormatter);e.s(["useFormatter",()=>o,"useTranslations",()=>n])},557974,143340,e=>{"use strict";var t,r=e.i(809528),n=e.i(291967),o=e.i(413494),i=e.i(188625),s=e.i(935125),u=e.i(260293),a="dismissableLayer.update",f=r.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),l=r.forwardRef((e,l)=>{let{disableOutsidePointerEvents:d=!1,onEscapeKeyDown:p,onPointerDownOutside:y,onFocusOutside:g,onInteractOutside:v,onDismiss:m,...b}=e,w=r.useContext(f),[E,S]=r.useState(null),A=E?.ownerDocument??globalThis?.document,[,x]=r.useState({}),C=(0,i.useComposedRefs)(l,e=>S(e)),R=Array.from(w.layers),[B]=[...w.layersWithOutsidePointerEventsDisabled].slice(-1),I=R.indexOf(B),O=E?R.indexOf(E):-1,T=w.layersWithOutsidePointerEventsDisabled.size>0,L=O>=I,P=function(e,t=globalThis?.document){let n=(0,s.useCallbackRef)(e),o=r.useRef(!1),i=r.useRef(()=>{});return r.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let r=function(){h("dismissableLayer.pointerDownOutside",n,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=r,t.addEventListener("click",i.current,{once:!0})):r()}else t.removeEventListener("click",i.current);o.current=!1},r=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,r=[...w.branches].some(e=>e.contains(t));L&&!r&&(y?.(e),v?.(e),e.defaultPrevented||m?.())},A),U=function(e,t=globalThis?.document){let n=(0,s.useCallbackRef)(e),o=r.useRef(!1);return r.useEffect(()=>{let e=e=>{e.target&&!o.current&&h("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;![...w.branches].some(e=>e.contains(t))&&(g?.(e),v?.(e),e.defaultPrevented||m?.())},A);return!function(e,t=globalThis?.document){let n=(0,s.useCallbackRef)(e);r.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{O===w.layers.size-1&&(p?.(e),!e.defaultPrevented&&m&&(e.preventDefault(),m()))},A),r.useEffect(()=>{if(E)return d&&(0===w.layersWithOutsidePointerEventsDisabled.size&&(t=A.body.style.pointerEvents,A.body.style.pointerEvents="none"),w.layersWithOutsidePointerEventsDisabled.add(E)),w.layers.add(E),c(),()=>{d&&1===w.layersWithOutsidePointerEventsDisabled.size&&(A.body.style.pointerEvents=t)}},[E,A,d,w]),r.useEffect(()=>()=>{E&&(w.layers.delete(E),w.layersWithOutsidePointerEventsDisabled.delete(E),c())},[E,w]),r.useEffect(()=>{let e=()=>x({});return document.addEventListener(a,e),()=>document.removeEventListener(a,e)},[]),(0,u.jsx)(o.Primitive.div,{...b,ref:C,style:{pointerEvents:T?L?"auto":"none":void 0,...e.style},onFocusCapture:(0,n.composeEventHandlers)(e.onFocusCapture,U.onFocusCapture),onBlurCapture:(0,n.composeEventHandlers)(e.onBlurCapture,U.onBlurCapture),onPointerDownCapture:(0,n.composeEventHandlers)(e.onPointerDownCapture,P.onPointerDownCapture)})});function c(){let e=new CustomEvent(a);document.dispatchEvent(e)}function h(e,t,r,{discrete:n}){let i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?(0,o.dispatchDiscreteCustomEvent)(i,s):i.dispatchEvent(s)}l.displayName="DismissableLayer",r.forwardRef((e,t)=>
1{let n=r.useContext(f),s=r.useRef(null),a=(0,i.useComposedRefs)(t,s);return r.useEffect(()=>{let e=s.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,u.jsx)(o.Primitive.div,{...e,ref:a})}).displayName="DismissableLayerBranch",e.s(["DismissableLayer",()=>l],557974);var d=e.i(482480),p=e.i(385064),y=r.forwardRef((e,t)=>{let{container:n,...i}=e,[s,a]=r.useState(!1);(0,p.useLayoutEffect)(()=>a(!0),[]);let f=n||s&&globalThis?.document?.body;return f?d.default.createPortal((0,u.jsx)(o.Primitive.div,{...i,ref:t}),f):null});y.displayName="Portal",e.s(["Portal",()=>y],143340)},477272,e=>{"use strict";let t=(0,e.i(286796).default)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>t],477272)},413494,e=>{"use strict";var t=e.i(809528),r=e.i(482480),n=e.i(819232),o=e.i(260293),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{let i=(0,n.createSlot)(`Primitive.${r}`),s=t.forwardRef((e,t)=>{let{asChild:n,...s}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,o.jsx)(n?i:r,{...s,ref:t})});return s.displayName=`Primitive.${r}`,{...e,[r]:s}},{});function s(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}e.s(["Primitive",()=>i,"dispatchDiscreteCustomEvent",()=>s])},352162,385064,e=>{"use strict";var t=e.i(809528),r=e.i(260293);function n(e,n){let o=t.createContext(n),i=e=>{let{children:n,...i}=e,s=t.useMemo(()=>i,Object.values(i));return(0,r.jsx)(o.Provider,{value:s,children:n})};return i.displayName=e+"Provider",[i,function(r){let i=t.useContext(o);if(i)return i;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${e}\``)}]}function o(e,n=[]){let i=[],s=()=>{let r=i.map(e=>t.createContext(e));return function(n){let o=n?.[e]||r;return t.useMemo(()=>({[`__scope${e}`]:{...n,[e]:o}}),[n,o])}};return s.scopeName=e,[function(n,o){let s=t.createContext(o),u=i.length;i=[...i,o];let a=n=>{let{scope:o,children:i,...a}=n,f=o?.[e]?.[u]||s,l=t.useMemo(()=>a,Object.values(a));return(0,r.jsx)(f.Provider,{value:l,children:i})};return a.displayName=n+"Provider",[a,function(r,i){let a=i?.[e]?.[u]||s,f=t.useContext(a);if(f)return f;if(void 0!==o)return o;throw Error(`\`${r}\` must be used within \`${n}\``)}]},function(...e){let r=e[0];if(1===e.length)return r;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=n.reduce((t,{useScope:r,scopeName:n})=>{let o=r(e)[`__scope${n}`];return{...t,...o}},{});return t.useMemo(()=>({[`__scope${r.scopeName}`]:o}),[o])}};return n.scopeName=r.scopeName,n}(s,...n)]}e.s(["createContext",()=>n,"createContextScope",()=>o],352162);var i=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["useLayoutEffect",()=>i],385064)},935125,e=>{"use strict";var t=e.i(809528);function r(e){let r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])}e.s(["useCallbackRef",()=>r])},291967,e=>{"use strict";function t(e,r,{checkForDefaultPrevented:n=!0}={}){return function(t){if(e?.(t),!1===n||!t.defaultPrevented)return r?.(t)}}"undefined"!=typeof window&&window.document&&window.document.createElement,e.s(["composeEventHandlers",()=>t])},987438,e=>{"use strict";var t=e.i(809528),r=e.i(385064),n=t[" useId ".trim().toString()]||(()=>void 0),o=0;function i(e){let[i,s]=t.useState(n());return(0,r.useLayoutEffect)(()=>{e||s(e=>e??String(o++))},[e]),e||(i?`radix-${i}`:"")}e.s(["useId",()=>i])},575301,e=>{"use strict";var t=e.i(809528),r=e.i(385064);t[" useEffectEvent ".trim().toString()],t[" useInsertionEffect ".trim().toString()];var n=t[" useInsertionEffect ".trim().toString()]||r.useLayoutEffect;function o({prop:e,defaultProp:r,onChange:o=()=>{},caller:i}){let[s,u,a]=function({defaultProp:e,onChange:r}){let[o,i]=t.useState(e),s=t.useRef(o),u=t.useRef(r);return n(()=>{u.current=r},[r]),t.useEffect(()=>{s.current!==o&&(u.current?.(o),s.current=o)},[o,s]),[o,i,u]}({defaultProp:r,onChange:o}),f=void 0!==e,l=f?e:s;{let r=t.useRef(void 0!==e);t.useEffect(()=>{let e=r.current;if(e!==f){let t=f?"controlled":"uncontrolled";console.warn(`${i} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}r.current=f},[f,i])}return[l,t.useCallback(t=>{if(f){let r="function"==typeof t?t(e):t;r!==e&&a.current?.(r)}else u(t)},[f,e,u,a])]}Symbol("RADIX:SYNC_STATE"),e.s(["useControllableState",()=>o],575301)},162508,e=>{"use strict";var t=e.i(809528),r=e.i(188625),n=e.i(385064),o=e=>{var o;let s,u,{present:a,children:f}=e,l=function(e){var r,o;let[s,u]=t.useState(),a=t.useRef(null),f=t.useRef(e),l=t.useRef("none"),[c,h]=(r=e?"mounted":"unmounted",o={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>
1o[e][t]??e,r));return t.useEffect(()=>{let e=i(a.current);l.current="mounted"===c?e:"none"},[c]),(0,n.useLayoutEffect)(()=>{let t=a.current,r=f.current;if(r!==e){let n=l.current,o=i(t);e?h("MOUNT"):"none"===o||t?.display==="none"?h("UNMOUNT"):r&&n!==o?h("ANIMATION_OUT"):h("UNMOUNT"),f.current=e}},[e,h]),(0,n.useLayoutEffect)(()=>{if(s){let e,t=s.ownerDocument.defaultView??window,r=r=>{let n=i(a.current).includes(CSS.escape(r.animationName));if(r.target===s&&n&&(h("ANIMATION_END"),!f.current)){let r=s.style.animationFillMode;s.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===s.style.animationFillMode&&(s.style.animationFillMode=r)})}},n=e=>{e.target===s&&(l.current=i(a.current))};return s.addEventListener("animationstart",n),s.addEventListener("animationcancel",r),s.addEventListener("animationend",r),()=>{t.clearTimeout(e),s.removeEventListener("animationstart",n),s.removeEventListener("animationcancel",r),s.removeEventListener("animationend",r)}}h("ANIMATION_END")},[s,h]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:t.useCallback(e=>{a.current=e?getComputedStyle(e):null,u(e)},[])}}(a),c="function"==typeof f?f({present:l.isPresent}):t.Children.only(f),h=(0,r.useComposedRefs)(l.ref,(o=c,(u=(s=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?o.ref:(u=(s=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?o.props.ref:o.props.ref||o.ref));return"function"==typeof f||l.isPresent?t.cloneElement(c,{ref:h}):null};function i(e){return e?.animationName||"none"}o.displayName="Presence",e.s(["Presence",()=>o])}]);
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.