diff --git a/cooky/LICENSE b/cooky/LICENSE new file mode 100644 index 0000000..b77bf2a --- /dev/null +++ b/cooky/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/cooky/README.md b/cooky/README.md new file mode 100644 index 0000000..1773c9b --- /dev/null +++ b/cooky/README.md @@ -0,0 +1,102 @@ +# Cooky - The Pubky SDK Cookbook + +A developer-friendly, interactive cookbook for building on the Pubky ecosystem. Cooky provides ready-to-use code snippets and practical examples for working with the Pubky SDK. + +## What is Cooky? + +Cooky is an interactive web application that serves as a comprehensive guide for developers learning to build with Pubky. It features: + +- **Working Code Snippets**: Every recipe includes production-ready Rust code that compiles against Pubky 0.6 series +- **Syntax Highlighting**: Color-coded code for better readability +- **Copy & Paste Ready**: One-click copying of code snippets with instant feedback +- **Interactive Flipbook**: Smooth page-turning animations create an engaging cookbook experience +- **Organized Categories**: Recipes grouped by Identity, Storage, Authentication, Discovery, and Testing +- **Search Functionality**: Quick search across recipes, commands, and code +- **Responsive Design**: Works seamlessly on desktop and mobile devices + +## Why Cooky Matters + +Building decentralized applications requires understanding new protocols and patterns. Cooky bridges the gap between documentation and implementation by: + +1. **Reducing Friction**: Developers can immediately copy working examples instead of piecing together documentation +2. **Teaching Best Practices**: Each recipe demonstrates proper usage patterns, security considerations, and common pitfalls +3. **Accelerating Development**: Quick access to common operations (signup, file storage, authentication) speeds up prototyping +4. **Lowering the Learning Curve**: Structured, progressive examples help newcomers understand the Pubky ecosystem + +## What is Pubky? + +Pubky is a decentralized identity and data storage protocol that enables users to own and control their data. It provides: + +- Cryptographic identities (keypairs) +- Distributed storage (homeservers) +- Public key infrastructure for data access +- Authentication and authorization capabilities + +Cooky helps developers leverage these capabilities to build the next generation of user-controlled applications. + +## Getting Started + +### Prerequisites + +- Node.js (v18 or higher) +- npm or yarn + +### Installation + +```bash +npm install +``` + +### Development + +```bash +npm run dev +``` + +Visit `http://localhost:5173` to explore the cookbook. + +### Build + +```bash +npm run build +``` + +## Using the Recipes + +1. **Browse**: Navigate through categories using the sidebar or flip through pages +2. **Search**: Use the search bar to find specific operations or concepts +3. **Copy**: Click the copy button on any code snippet +4. **Implement**: Paste the code into your Rust project and customize as needed + +## Technology Stack + +- **React**: UI framework +- **TypeScript**: Type-safe development +- **Vite**: Fast build tool and dev server +- **Tailwind CSS**: Utility-first styling +- **Framer Motion**: Smooth animations +- **react-pageflip**: Interactive flipbook experience +- **Lucide React**: Beautiful icons + +## Recipe Categories + +- **Introduction**: Getting started with Pubky and Cooky +- **Identity**: Creating clients, signing up, generating keypairs +- **Storage**: Writing, reading, listing, and deleting files +- **Authentication**: Managing capabilities and tokens +- **Discovery**: Resolving homeservers and discovering peers +- **Testing**: Local development with pubky-testnet + +## Contributing + +Cooky is designed to grow with the Pubky ecosystem. Contributions for new recipes, improvements to existing examples, or documentation enhancements are welcome. Cooky was built by Aldert. + +## License + +MIT + +## Links + +- [Pubky.org](https://pubky.org) +- [Pubky App](https://pubky.app) +- [Pubkyring App](https://pubkyring.app) diff --git a/cooky/dist/_redirects b/cooky/dist/_redirects new file mode 100644 index 0000000..50a4633 --- /dev/null +++ b/cooky/dist/_redirects @@ -0,0 +1 @@ +/* /index.html 200 \ No newline at end of file diff --git a/cooky/dist/assets/apple-touch-icon-CURoy3cQ.png b/cooky/dist/assets/apple-touch-icon-CURoy3cQ.png new file mode 100644 index 0000000..88d8805 --- /dev/null +++ b/cooky/dist/assets/apple-touch-icon-CURoy3cQ.png @@ -0,0 +1 @@ +https://stackblitz.com/storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCR01WalFJPSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--a932a6ef0047a47d1d1a626f4f7d4fa5a9a662e1//apple-touch-icon.png \ No newline at end of file diff --git a/cooky/dist/assets/favicon-96x96-D730OAgd.png b/cooky/dist/assets/favicon-96x96-D730OAgd.png new file mode 100644 index 0000000..f41e240 --- /dev/null +++ b/cooky/dist/assets/favicon-96x96-D730OAgd.png @@ -0,0 +1 @@ +https://stackblitz.com/storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCR0VWalFJPSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--610ff3ec476d8c0cc70de380be1ecfcd92da4a0a//favicon-96x96.png \ No newline at end of file diff --git a/cooky/dist/assets/favicon-kJBMLEID.svg b/cooky/dist/assets/favicon-kJBMLEID.svg new file mode 100644 index 0000000..0d16081 --- /dev/null +++ b/cooky/dist/assets/favicon-kJBMLEID.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/cooky/dist/assets/index-B35vrJRm.js b/cooky/dist/assets/index-B35vrJRm.js new file mode 100644 index 0000000..11aef9a --- /dev/null +++ b/cooky/dist/assets/index-B35vrJRm.js @@ -0,0 +1,522 @@ +var D0=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ob=D0((Gb,ms)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var tt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function I0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function L0(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var ip={exports:{}},No={},sp={exports:{}},q={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var is=Symbol.for("react.element"),N0=Symbol.for("react.portal"),$0=Symbol.for("react.fragment"),F0=Symbol.for("react.strict_mode"),B0=Symbol.for("react.profiler"),V0=Symbol.for("react.provider"),U0=Symbol.for("react.context"),z0=Symbol.for("react.forward_ref"),W0=Symbol.for("react.suspense"),H0=Symbol.for("react.memo"),K0=Symbol.for("react.lazy"),ph=Symbol.iterator;function G0(e){return e===null||typeof e!="object"?null:(e=ph&&e[ph]||e["@@iterator"],typeof e=="function"?e:null)}var op={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ap=Object.assign,lp={};function Kr(e,t,n){this.props=e,this.context=t,this.refs=lp,this.updater=n||op}Kr.prototype.isReactComponent={};Kr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Kr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function up(){}up.prototype=Kr.prototype;function Mu(e,t,n){this.props=e,this.context=t,this.refs=lp,this.updater=n||op}var Ou=Mu.prototype=new up;Ou.constructor=Mu;ap(Ou,Kr.prototype);Ou.isPureReactComponent=!0;var gh=Array.isArray,cp=Object.prototype.hasOwnProperty,Du={current:null},hp={key:!0,ref:!0,__self:!0,__source:!0};function dp(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)cp.call(t,r)&&!hp.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,O=M[P];if(0>>1;Pi(H,T))Wi($,H)?(M[P]=$,M[W]=T,P=W):(M[P]=H,M[V]=T,P=V);else if(Wi($,T))M[P]=$,M[W]=T,P=W;else break e}}return N}function i(M,N){var T=M.sortIndex-N.sortIndex;return T!==0?T:M.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],h=1,d=null,p=3,v=!1,k=!1,_=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(M){for(var N=n(u);N!==null;){if(N.callback===null)r(u);else if(N.startTime<=M)r(u),N.sortIndex=N.expirationTime,t(l,N);else break;N=n(u)}}function c(M){if(_=!1,g(M),!k)if(n(l)!==null)k=!0,ee(f);else{var N=n(u);N!==null&&z(c,N.startTime-M)}}function f(M,N){k=!1,_&&(_=!1,w(S),S=-1),v=!0;var T=p;try{for(g(N),d=n(l);d!==null&&(!(d.expirationTime>N)||M&&!D());){var P=d.callback;if(typeof P=="function"){d.callback=null,p=d.priorityLevel;var O=P(d.expirationTime<=N);N=e.unstable_now(),typeof O=="function"?d.callback=O:d===n(l)&&r(l),g(N)}else r(l);d=n(l)}if(d!==null)var F=!0;else{var V=n(u);V!==null&&z(c,V.startTime-N),F=!1}return F}finally{d=null,p=T,v=!1}}var m=!1,x=null,S=-1,E=5,A=-1;function D(){return!(e.unstable_now()-AM||125P?(M.sortIndex=T,t(u,M),n(l)===null&&M===n(u)&&(_?(w(S),S=-1):_=!0,z(c,T-P))):(M.sortIndex=O,t(l,M),k||v||(k=!0,ee(f))),M},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(M){var N=p;return function(){var T=p;p=N;try{return M.apply(this,arguments)}finally{p=T}}}})(yp);mp.exports=yp;var iv=mp.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var sv=R,nt=iv;function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),al=Object.prototype.hasOwnProperty,ov=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,yh={},vh={};function av(e){return al.call(vh,e)?!0:al.call(yh,e)?!1:ov.test(e)?vh[e]=!0:(yh[e]=!0,!1)}function lv(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function uv(e,t,n,r){if(t===null||typeof t>"u"||lv(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ze(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Me={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Me[e]=new ze(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Me[t]=new ze(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Me[e]=new ze(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Me[e]=new ze(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Me[e]=new ze(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Me[e]=new ze(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Me[e]=new ze(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Me[e]=new ze(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Me[e]=new ze(e,5,!1,e.toLowerCase(),null,!1,!1)});var Lu=/[\-:]([a-z])/g;function Nu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Lu,Nu);Me[t]=new ze(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Lu,Nu);Me[t]=new ze(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Lu,Nu);Me[t]=new ze(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Me[e]=new ze(e,1,!1,e.toLowerCase(),null,!1,!1)});Me.xlinkHref=new ze("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Me[e]=new ze(e,1,!1,e.toLowerCase(),null,!0,!0)});function $u(e,t,n,r){var i=Me.hasOwnProperty(t)?Me[t]:null;(i!==null?i.type!==0:r||!(2a||i[o]!==s[a]){var l=` +`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{da=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?hi(e):""}function cv(e){switch(e.tag){case 5:return hi(e.type);case 16:return hi("Lazy");case 13:return hi("Suspense");case 19:return hi("SuspenseList");case 0:case 2:case 15:return e=fa(e.type,!1),e;case 11:return e=fa(e.type.render,!1),e;case 1:return e=fa(e.type,!0),e;default:return""}}function hl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case fr:return"Fragment";case dr:return"Portal";case ll:return"Profiler";case Fu:return"StrictMode";case ul:return"Suspense";case cl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xp:return(e.displayName||"Context")+".Consumer";case wp:return(e._context.displayName||"Context")+".Provider";case Bu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Vu:return t=e.displayName||null,t!==null?t:hl(e.type)||"Memo";case sn:t=e._payload,e=e._init;try{return hl(e(t))}catch{}}return null}function hv(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return hl(t);case 8:return t===Fu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function kn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dv(e){var t=Sp(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ws(e){e._valueTracker||(e._valueTracker=dv(e))}function _p(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Sp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function io(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function dl(e,t){var n=t.checked;return fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function xh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=kn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Pp(e,t){t=t.checked,t!=null&&$u(e,"checked",t,!1)}function fl(e,t){Pp(e,t);var n=kn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pl(e,t.type,n):t.hasOwnProperty("defaultValue")&&pl(e,t.type,kn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function kh(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function pl(e,t,n){(t!=="number"||io(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var di=Array.isArray;function Rr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=xs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ii(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var yi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fv=["Webkit","ms","Moz","O"];Object.keys(yi).forEach(function(e){fv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),yi[t]=yi[e]})});function Ep(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||yi.hasOwnProperty(e)&&yi[e]?(""+t).trim():t+"px"}function Rp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Ep(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var pv=fe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function yl(e,t){if(t){if(pv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function vl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wl=null;function Uu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xl=null,Ar=null,jr=null;function Ph(e){if(e=as(e)){if(typeof xl!="function")throw Error(j(280));var t=e.stateNode;t&&(t=Uo(t),xl(e.stateNode,e.type,t))}}function Ap(e){Ar?jr?jr.push(e):jr=[e]:Ar=e}function jp(){if(Ar){var e=Ar,t=jr;if(jr=Ar=null,Ph(e),t)for(e=0;e>>=0,e===0?32:31-(Tv(e)/bv|0)|0}var ks=64,Ss=4194304;function fi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function lo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=fi(a):(s&=o,s!==0&&(r=fi(s)))}else o=n&~i,o!==0?r=fi(o):s!==0&&(r=fi(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ss(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tt(t),e[t]=n}function Av(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=wi),Oh=" ",Dh=!1;function Xp(e,t){switch(e){case"keyup":return iw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pr=!1;function ow(e,t){switch(e){case"compositionend":return Jp(t);case"keypress":return t.which!==32?null:(Dh=!0,Oh);case"textInput":return e=t.data,e===Oh&&Dh?null:e;default:return null}}function aw(e,t){if(pr)return e==="compositionend"||!Qu&&Xp(e,t)?(e=Yp(),Hs=Gu=cn=null,pr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=$h(n)}}function ng(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ng(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rg(){for(var e=window,t=io();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=io(e.document)}return t}function Xu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function mw(e){var t=rg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ng(n.ownerDocument.documentElement,n)){if(r!==null&&Xu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Fh(n,s);var o=Fh(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,gr=null,bl=null,ki=null,Cl=!1;function Bh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cl||gr==null||gr!==io(r)||(r=gr,"selectionStart"in r&&Xu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ki&&Vi(ki,r)||(ki=r,r=ho(bl,"onSelect"),0vr||(e.current=Ol[vr],Ol[vr]=null,vr--)}function ie(e,t){vr++,Ol[vr]=e.current,e.current=t}var Sn={},Ne=Cn(Sn),Ye=Cn(!1),Qn=Sn;function Nr(e,t){var n=e.type.contextTypes;if(!n)return Sn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Qe(e){return e=e.childContextTypes,e!=null}function po(){ae(Ye),ae(Ne)}function Gh(e,t,n){if(Ne.current!==Sn)throw Error(j(168));ie(Ne,t),ie(Ye,n)}function dg(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(j(108,hv(e)||"Unknown",i));return fe({},n,r)}function go(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sn,Qn=Ne.current,ie(Ne,e),ie(Ye,Ye.current),!0}function qh(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=dg(e,t,Qn),r.__reactInternalMemoizedMergedChildContext=e,ae(Ye),ae(Ne),ie(Ne,e)):ae(Ye),ie(Ye,n)}var zt=null,zo=!1,Ca=!1;function fg(e){zt===null?zt=[e]:zt.push(e)}function Ew(e){zo=!0,fg(e)}function En(){if(!Ca&&zt!==null){Ca=!0;var e=0,t=te;try{var n=zt;for(te=1;e>=o,i-=o,Wt=1<<32-Tt(t)+i|n<S?(E=x,x=null):E=x.sibling;var A=p(w,x,g[S],c);if(A===null){x===null&&(x=E);break}e&&x&&A.alternate===null&&t(w,x),y=s(A,y,S),m===null?f=A:m.sibling=A,m=A,x=E}if(S===g.length)return n(w,x),le&&In(w,S),f;if(x===null){for(;SS?(E=x,x=null):E=x.sibling;var D=p(w,x,A.value,c);if(D===null){x===null&&(x=E);break}e&&x&&D.alternate===null&&t(w,x),y=s(D,y,S),m===null?f=D:m.sibling=D,m=D,x=E}if(A.done)return n(w,x),le&&In(w,S),f;if(x===null){for(;!A.done;S++,A=g.next())A=d(w,A.value,c),A!==null&&(y=s(A,y,S),m===null?f=A:m.sibling=A,m=A);return le&&In(w,S),f}for(x=r(w,x);!A.done;S++,A=g.next())A=v(x,w,S,A.value,c),A!==null&&(e&&A.alternate!==null&&x.delete(A.key===null?S:A.key),y=s(A,y,S),m===null?f=A:m.sibling=A,m=A);return e&&x.forEach(function(X){return t(w,X)}),le&&In(w,S),f}function b(w,y,g,c){if(typeof g=="object"&&g!==null&&g.type===fr&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case vs:e:{for(var f=g.key,m=y;m!==null;){if(m.key===f){if(f=g.type,f===fr){if(m.tag===7){n(w,m.sibling),y=i(m,g.props.children),y.return=w,w=y;break e}}else if(m.elementType===f||typeof f=="object"&&f!==null&&f.$$typeof===sn&&Xh(f)===m.type){n(w,m.sibling),y=i(m,g.props),y.ref=si(w,m,g),y.return=w,w=y;break e}n(w,m);break}else t(w,m);m=m.sibling}g.type===fr?(y=Gn(g.props.children,w.mode,c,g.key),y.return=w,w=y):(c=Zs(g.type,g.key,g.props,null,w.mode,c),c.ref=si(w,y,g),c.return=w,w=c)}return o(w);case dr:e:{for(m=g.key;y!==null;){if(y.key===m)if(y.tag===4&&y.stateNode.containerInfo===g.containerInfo&&y.stateNode.implementation===g.implementation){n(w,y.sibling),y=i(y,g.children||[]),y.return=w,w=y;break e}else{n(w,y);break}else t(w,y);y=y.sibling}y=Ia(g,w.mode,c),y.return=w,w=y}return o(w);case sn:return m=g._init,b(w,y,m(g._payload),c)}if(di(g))return k(w,y,g,c);if(ei(g))return _(w,y,g,c);Rs(w,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,y!==null&&y.tag===6?(n(w,y.sibling),y=i(y,g),y.return=w,w=y):(n(w,y),y=Da(g,w.mode,c),y.return=w,w=y),o(w)):n(w,y)}return b}var Fr=yg(!0),vg=yg(!1),vo=Cn(null),wo=null,kr=null,tc=null;function nc(){tc=kr=wo=null}function rc(e){var t=vo.current;ae(vo),e._currentValue=t}function Ll(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Or(e,t){wo=e,tc=kr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ge=!0),e.firstContext=null)}function pt(e){var t=e._currentValue;if(tc!==e)if(e={context:e,memoizedValue:t,next:null},kr===null){if(wo===null)throw Error(j(308));kr=e,wo.dependencies={lanes:0,firstContext:e}}else kr=kr.next=e;return t}var Un=null;function ic(e){Un===null?Un=[e]:Un.push(e)}function wg(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ic(t)):(n.next=i.next,i.next=n),t.interleaved=n,Yt(e,r)}function Yt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var on=!1;function sc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Kt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function yn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Z&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Yt(e,n)}return i=r.interleaved,i===null?(t.next=t,ic(r)):(t.next=i.next,i.next=t),r.interleaved=t,Yt(e,n)}function Gs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Wu(e,n)}}function Jh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function xo(e,t,n,r){var i=e.updateQueue;on=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==o&&(a===null?h.firstBaseUpdate=u:a.next=u,h.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;o=0,h=u=l=null,a=s;do{var p=a.lane,v=a.eventTime;if((r&p)===p){h!==null&&(h=h.next={eventTime:v,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var k=e,_=a;switch(p=t,v=n,_.tag){case 1:if(k=_.payload,typeof k=="function"){d=k.call(v,d,p);break e}d=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=_.payload,p=typeof k=="function"?k.call(v,d,p):k,p==null)break e;d=fe({},d,p);break e;case 2:on=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[a]:p.push(a))}else v={eventTime:v,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(u=h=v,l=d):h=h.next=v,o|=p;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;p=a,a=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(h===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=h,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Zn|=o,e.lanes=o,e.memoizedState=d}}function Zh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ra.transition;Ra.transition={};try{e(!1),t()}finally{te=n,Ra.transition=r}}function Ng(){return gt().memoizedState}function Mw(e,t,n){var r=wn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},$g(e))Fg(t,n);else if(n=wg(e,t,n,r),n!==null){var i=Ve();bt(n,e,r,i),Bg(n,t,r)}}function Ow(e,t,n){var r=wn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if($g(e))Fg(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Ct(a,o)){var l=t.interleaved;l===null?(i.next=i,ic(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=wg(e,t,i,r),n!==null&&(i=Ve(),bt(n,e,r,i),Bg(n,t,r))}}function $g(e){var t=e.alternate;return e===de||t!==null&&t===de}function Fg(e,t){Si=So=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Wu(e,n)}}var _o={readContext:pt,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useInsertionEffect:Oe,useLayoutEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useMutableSource:Oe,useSyncExternalStore:Oe,useId:Oe,unstable_isNewReconciler:!1},Dw={readContext:pt,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:pt,useEffect:td,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ys(4194308,4,Mg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ys(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ys(4,2,e,t)},useMemo:function(e,t){var n=jt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=jt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Mw.bind(null,de,e),[r.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:ed,useDebugValue:fc,useDeferredValue:function(e){return jt().memoizedState=e},useTransition:function(){var e=ed(!1),t=e[0];return e=jw.bind(null,e[1]),jt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=de,i=jt();if(le){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),Ce===null)throw Error(j(349));Jn&30||Pg(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,td(bg.bind(null,r,s,e),[e]),r.flags|=2048,Yi(9,Tg.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=jt(),t=Ce.identifierPrefix;if(le){var n=Ht,r=Wt;n=(r&~(1<<32-Tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Gi++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Ot]=t,e[Wi]=r,Qg(e,t,!1,!1),t.stateNode=e;e:{switch(o=vl(n,r),n){case"dialog":oe("cancel",e),oe("close",e),i=r;break;case"iframe":case"object":case"embed":oe("load",e),i=r;break;case"video":case"audio":for(i=0;iUr&&(t.flags|=128,r=!0,oi(s,!1),t.lanes=4194304)}else{if(!r)if(e=ko(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),oi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!le)return De(t),null}else 2*we()-s.renderingStartTime>Ur&&n!==1073741824&&(t.flags|=128,r=!0,oi(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=we(),t.sibling=null,n=ce.current,ie(ce,r?n&1|2:n&1),t):(De(t),null);case 22:case 23:return wc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Je&1073741824&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function Uw(e,t){switch(Zu(t),t.tag){case 1:return Qe(t.type)&&po(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Br(),ae(Ye),ae(Ne),lc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ac(t),null;case 13:if(ae(ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));$r()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(ce),null;case 4:return Br(),null;case 10:return rc(t.type._context),null;case 22:case 23:return wc(),null;case 24:return null;default:return null}}var js=!1,Ie=!1,zw=typeof WeakSet=="function"?WeakSet:Set,I=null;function Sr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ye(e,t,r)}else n.current=null}function Hl(e,t,n){try{n()}catch(r){ye(e,t,r)}}var dd=!1;function Ww(e,t){if(El=uo,e=rg(),Xu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,h=0,d=e,p=null;t:for(;;){for(var v;d!==n||i!==0&&d.nodeType!==3||(a=o+i),d!==s||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(v=d.firstChild)!==null;)p=d,d=v;for(;;){if(d===e)break t;if(p===n&&++u===i&&(a=o),p===s&&++h===r&&(l=o),(v=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=v}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rl={focusedElem:e,selectionRange:n},uo=!1,I=t;I!==null;)if(t=I,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,I=e;else for(;I!==null;){t=I;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var _=k.memoizedProps,b=k.memoizedState,w=t.stateNode,y=w.getSnapshotBeforeUpdate(t.elementType===t.type?_:kt(t.type,_),b);w.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(c){ye(t,t.return,c)}if(e=t.sibling,e!==null){e.return=t.return,I=e;break}I=t.return}return k=dd,dd=!1,k}function _i(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Hl(t,n,s)}i=i.next}while(i!==r)}}function Ko(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Kl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Zg(e){var t=e.alternate;t!==null&&(e.alternate=null,Zg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ot],delete t[Wi],delete t[Ml],delete t[bw],delete t[Cw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function em(e){return e.tag===5||e.tag===3||e.tag===4}function fd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||em(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Gl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=fo));else if(r!==4&&(e=e.child,e!==null))for(Gl(e,t,n),e=e.sibling;e!==null;)Gl(e,t,n),e=e.sibling}function ql(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ql(e,t,n),e=e.sibling;e!==null;)ql(e,t,n),e=e.sibling}var Re=null,St=!1;function en(e,t,n){for(n=n.child;n!==null;)tm(e,t,n),n=n.sibling}function tm(e,t,n){if(Dt&&typeof Dt.onCommitFiberUnmount=="function")try{Dt.onCommitFiberUnmount($o,n)}catch{}switch(n.tag){case 5:Ie||Sr(n,t);case 6:var r=Re,i=St;Re=null,en(e,t,n),Re=r,St=i,Re!==null&&(St?(e=Re,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Re.removeChild(n.stateNode));break;case 18:Re!==null&&(St?(e=Re,n=n.stateNode,e.nodeType===8?ba(e.parentNode,n):e.nodeType===1&&ba(e,n),Fi(e)):ba(Re,n.stateNode));break;case 4:r=Re,i=St,Re=n.stateNode.containerInfo,St=!0,en(e,t,n),Re=r,St=i;break;case 0:case 11:case 14:case 15:if(!Ie&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Hl(n,t,o),i=i.next}while(i!==r)}en(e,t,n);break;case 1:if(!Ie&&(Sr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ye(n,t,a)}en(e,t,n);break;case 21:en(e,t,n);break;case 22:n.mode&1?(Ie=(r=Ie)||n.memoizedState!==null,en(e,t,n),Ie=r):en(e,t,n);break;default:en(e,t,n)}}function pd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new zw),t.forEach(function(r){var i=Zw.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function vt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=we()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Kw(r/1960))-r,10e?16:e,hn===null)var r=!1;else{if(e=hn,hn=null,bo=0,Z&6)throw Error(j(331));var i=Z;for(Z|=4,I=e.current;I!==null;){var s=I,o=s.child;if(I.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lwe()-yc?Kn(e,0):mc|=n),Xe(e,t)}function um(e,t){t===0&&(e.mode&1?(t=Ss,Ss<<=1,!(Ss&130023424)&&(Ss=4194304)):t=1);var n=Ve();e=Yt(e,t),e!==null&&(ss(e,t,n),Xe(e,n))}function Jw(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),um(e,n)}function Zw(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(j(314))}r!==null&&r.delete(t),um(e,n)}var cm;cm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ye.current)Ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ge=!1,Bw(e,t,n);Ge=!!(e.flags&131072)}else Ge=!1,le&&t.flags&1048576&&pg(t,yo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qs(e,t),e=t.pendingProps;var i=Nr(t,Ne.current);Or(t,n),i=cc(null,t,r,e,i,n);var s=hc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qe(r)?(s=!0,go(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,sc(t),i.updater=Ho,t.stateNode=i,i._reactInternals=t,$l(t,r,e,n),t=Vl(null,t,r,!0,s,n)):(t.tag=0,le&&s&&Ju(t),Fe(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=tx(r),e=kt(r,e),i){case 0:t=Bl(null,t,r,e,n);break e;case 1:t=ud(null,t,r,e,n);break e;case 11:t=ad(null,t,r,e,n);break e;case 14:t=ld(null,t,r,kt(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),Bl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),ud(e,t,r,i,n);case 3:e:{if(Gg(t),e===null)throw Error(j(387));r=t.pendingProps,s=t.memoizedState,i=s.element,xg(e,t),xo(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Vr(Error(j(423)),t),t=cd(e,t,r,n,i);break e}else if(r!==i){i=Vr(Error(j(424)),t),t=cd(e,t,r,n,i);break e}else for(Ze=mn(t.stateNode.containerInfo.firstChild),et=t,le=!0,Pt=null,n=vg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($r(),r===i){t=Qt(e,t,n);break e}Fe(e,t,r,n)}t=t.child}return t;case 5:return kg(t),e===null&&Il(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Al(r,i)?o=null:s!==null&&Al(r,s)&&(t.flags|=32),Kg(e,t),Fe(e,t,o,n),t.child;case 6:return e===null&&Il(t),null;case 13:return qg(e,t,n);case 4:return oc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fr(t,null,r,n):Fe(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),ad(e,t,r,i,n);case 7:return Fe(e,t,t.pendingProps,n),t.child;case 8:return Fe(e,t,t.pendingProps.children,n),t.child;case 12:return Fe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,ie(vo,r._currentValue),r._currentValue=o,s!==null)if(Ct(s.value,o)){if(s.children===i.children&&!Ye.current){t=Qt(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Kt(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Ll(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(j(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ll(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Fe(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Or(t,n),i=pt(i),r=r(i),t.flags|=1,Fe(e,t,r,n),t.child;case 14:return r=t.type,i=kt(r,t.pendingProps),i=kt(r.type,i),ld(e,t,r,i,n);case 15:return Wg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),Qs(e,t),t.tag=1,Qe(r)?(e=!0,go(t)):e=!1,Or(t,n),Vg(t,r,i),$l(t,r,i,n),Vl(null,t,r,!0,e,n);case 19:return Yg(e,t,n);case 22:return Hg(e,t,n)}throw Error(j(156,t.tag))};function hm(e,t){return $p(e,t)}function ex(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ct(e,t,n,r){return new ex(e,t,n,r)}function kc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tx(e){if(typeof e=="function")return kc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Bu)return 11;if(e===Vu)return 14}return 2}function xn(e,t){var n=e.alternate;return n===null?(n=ct(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Zs(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")kc(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case fr:return Gn(n.children,i,s,t);case Fu:o=8,i|=8;break;case ll:return e=ct(12,n,t,i|2),e.elementType=ll,e.lanes=s,e;case ul:return e=ct(13,n,t,i),e.elementType=ul,e.lanes=s,e;case cl:return e=ct(19,n,t,i),e.elementType=cl,e.lanes=s,e;case kp:return qo(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case wp:o=10;break e;case xp:o=9;break e;case Bu:o=11;break e;case Vu:o=14;break e;case sn:o=16,r=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=ct(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Gn(e,t,n,r){return e=ct(7,e,r,t),e.lanes=n,e}function qo(e,t,n,r){return e=ct(22,e,r,t),e.elementType=kp,e.lanes=n,e.stateNode={isHidden:!1},e}function Da(e,t,n){return e=ct(6,e,null,t),e.lanes=n,e}function Ia(e,t,n){return t=ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nx(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ga(0),this.expirationTimes=ga(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ga(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Sc(e,t,n,r,i,s,o,a,l){return e=new nx(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=ct(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},sc(s),e}function rx(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gm)}catch(e){console.error(e)}}gm(),gp.exports=rt;var lx=gp.exports,mm,Sd=lx;mm=Sd.createRoot,Sd.hydrateRoot;var Zl={exports:{}};(function(e,t){(function(n,r){r(t)})(tt,function(n){class r{constructor(c,f){this.state={angle:0,area:[],position:{x:0,y:0},hardAngle:0,hardDrawingAngle:0},this.createdDensity=f,this.nowDrawingDensity=this.createdDensity,this.render=c}setDensity(c){this.createdDensity=c,this.nowDrawingDensity=c}setDrawingDensity(c){this.nowDrawingDensity=c}setPosition(c){this.state.position=c}setAngle(c){this.state.angle=c}setArea(c){this.state.area=c}setHardDrawingAngle(c){this.state.hardDrawingAngle=c}setHardAngle(c){this.state.hardAngle=c,this.state.hardDrawingAngle=c}setOrientation(c){this.orientation=c}getDrawingDensity(){return this.nowDrawingDensity}getDensity(){return this.createdDensity}getHardAngle(){return this.state.hardAngle}}class i extends r{constructor(c,f,m){super(c,m),this.image=null,this.isLoad=!1,this.loadingAngle=0,this.image=new Image,this.image.src=f}draw(c){const f=this.render.getContext(),m=this.render.convertToGlobal(this.state.position),x=this.render.getRect().pageWidth,S=this.render.getRect().height;f.save(),f.translate(m.x,m.y),f.beginPath();for(let E of this.state.area)E!==null&&(E=this.render.convertToGlobal(E),f.lineTo(E.x-m.x,E.y-m.y));f.rotate(this.state.angle),f.clip(),this.isLoad?f.drawImage(this.image,0,0,x,S):this.drawLoader(f,{x:0,y:0},x,S),f.restore()}simpleDraw(c){const f=this.render.getRect(),m=this.render.getContext(),x=f.pageWidth,S=f.height,E=c===1?f.left+f.pageWidth:f.left,A=f.top;this.isLoad?m.drawImage(this.image,E,A,x,S):this.drawLoader(m,{x:E,y:A},x,S)}drawLoader(c,f,m,x){c.beginPath(),c.strokeStyle="rgb(200, 200, 200)",c.fillStyle="rgb(255, 255, 255)",c.lineWidth=1,c.rect(f.x+1,f.y+1,m-1,x-1),c.stroke(),c.fill();const S={x:f.x+m/2,y:f.y+x/2};c.beginPath(),c.lineWidth=10,c.arc(S.x,S.y,20,this.loadingAngle,3*Math.PI/2+this.loadingAngle),c.stroke(),c.closePath(),this.loadingAngle+=.07,this.loadingAngle>=2*Math.PI&&(this.loadingAngle=0)}load(){this.isLoad||(this.image.onload=()=>{this.isLoad=!0})}newTemporaryCopy(){return this}getTemporaryCopy(){return this}hideTemporaryCopy(){}}class s{constructor(c,f){this.pages=[],this.currentPageIndex=0,this.currentSpreadIndex=0,this.landscapeSpread=[],this.portraitSpread=[],this.render=f,this.app=c,this.currentPageIndex=0,this.isShowCover=this.app.getSettings().showCover}destroy(){this.pages=[]}createSpread(){this.landscapeSpread=[],this.portraitSpread=[];for(let f=0;f=0&&c0?this.pages[f-1]:null}getFlippingPage(c){const f=this.currentSpreadIndex;if(this.render.getOrientation()==="portrait")return c===0?this.pages[f].newTemporaryCopy():this.pages[f-1];{const m=c===0?this.getSpread()[f+1]:this.getSpread()[f-1];return m.length===1||c===0?this.pages[m[0]]:this.pages[m[1]]}}getBottomPage(c){const f=this.currentSpreadIndex;if(this.render.getOrientation()==="portrait")return c===0?this.pages[f+1]:this.pages[f-1];{const m=c===0?this.getSpread()[f+1]:this.getSpread()[f-1];return m.length===1?this.pages[m[0]]:c===0?this.pages[m[1]]:this.pages[m[0]]}}showNext(){this.currentSpreadIndex0&&(this.currentSpreadIndex--,this.showSpread())}getCurrentPageIndex(){return this.currentPageIndex}show(c=null){if(c===null&&(c=this.currentPageIndex),c<0||c>=this.pages.length)return;const f=this.getSpreadIndexByPage(c);f!==null&&(this.currentSpreadIndex=f,this.showSpread())}getCurrentSpreadIndex(){return this.currentSpreadIndex}setCurrentSpreadIndex(c){if(!(c>=0&&c=c.left&&f.x<=c.width+c.left&&f.y>=c.top&&f.y<=c.top+c.height?f:null}static GetRotatedPoint(c,f,m){return{x:c.x*Math.cos(m)+c.y*Math.sin(m)+f.x,y:c.y*Math.cos(m)-c.x*Math.sin(m)+f.y}}static LimitPointToCircle(c,f,m){if(a.GetDistanceBetweenTwoPoint(c,m)<=f)return m;const x=c.x,S=c.y,E=m.x,A=m.y;let D=Math.sqrt(Math.pow(f,2)*Math.pow(x-E,2)/(Math.pow(x-E,2)+Math.pow(S-A,2)))+x;m.x<0&&(D*=-1);let X=(D-x)*(S-A)/(x-E)+S;return x-E+S===0&&(X=f),{x:D,y:X}}static GetIntersectBetweenTwoSegment(c,f,m){return a.PointInRect(c,a.GetIntersectBeetwenTwoLine(f,m))}static GetIntersectBeetwenTwoLine(c,f){const m=c[0].y-c[1].y,x=f[0].y-f[1].y,S=c[1].x-c[0].x,E=f[1].x-f[0].x,A=c[0].x*c[1].y-c[1].x*c[0].y,D=f[0].x*f[1].y-f[1].x*f[0].y,X=m*D-x*A,Q=S*D-E*A,L=-(A*E-D*S)/(m*E-x*S),U=-(m*D-x*A)/(m*E-x*S);if(isFinite(L)&&isFinite(U))return{x:L,y:U};if(Math.abs(X-Q)<.1)throw new Error("Segment included");return null}static GetCordsFromTwoPoint(c,f){const m=Math.abs(c.x-f.x),x=Math.abs(c.y-f.y),S=Math.max(m,x),E=[c];function A(D,X,Q,L,U){return X>D?D+U*(Q/L):X=10&&c.push(this.sideIntersectPoint):this.corner==="top"&&c.push({x:this.pageWidth,y:this.pageHeight}),c.push(this.bottomIntersectPoint),c.push(this.topIntersectPoint),c}getAngle(){return this.direction===0?-this.angle:this.angle}getRect(){return this.rect}getPosition(){return this.position}getActiveCorner(){return this.direction===0?this.rect.topLeft:this.rect.topRight}getDirection(){return this.direction}getFlippingProgress(){return Math.abs((this.position.x-this.pageWidth)/(2*this.pageWidth)*100)}getCorner(){return this.corner}getBottomPagePosition(){return this.direction===1?{x:this.pageWidth,y:0}:{x:0,y:0}}getShadowStartPoint(){return this.corner==="top"?this.topIntersectPoint:this.sideIntersectPoint!==null?this.sideIntersectPoint:this.topIntersectPoint}getShadowAngle(){const c=a.GetAngleBetweenTwoLine(this.getSegmentToShadowLine(),[{x:0,y:0},{x:this.pageWidth,y:0}]);return this.direction===0?c:Math.PI-c}calcAngleAndPosition(c){let f=c;if(this.updateAngleAndGeometry(f),f=this.corner==="top"?this.checkPositionAtCenterLine(f,{x:0,y:0},{x:0,y:this.pageHeight}):this.checkPositionAtCenterLine(f,{x:0,y:this.pageHeight},{x:0,y:0}),Math.abs(f.x-this.pageWidth)<1&&Math.abs(f.y)<1)throw new Error("Point is too small");return f}updateAngleAndGeometry(c){this.angle=this.calculateAngle(c),this.rect=this.getPageRect(c)}calculateAngle(c){const f=this.pageWidth-c.x+1,m=this.corner==="bottom"?this.pageHeight-c.y:c.y;let x=2*Math.acos(f/Math.sqrt(m*m+f*f));m<0&&(x=-x);const S=Math.PI-x;if(!isFinite(x)||S>=0&&S<.003)throw new Error("The G point is too small");return this.corner==="bottom"&&(x=-x),x}getPageRect(c){return this.corner==="top"?this.getRectFromBasePoint([{x:0,y:0},{x:this.pageWidth,y:0},{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}],c):this.getRectFromBasePoint([{x:0,y:-this.pageHeight},{x:this.pageWidth,y:-this.pageHeight},{x:0,y:0},{x:this.pageWidth,y:0}],c)}getRectFromBasePoint(c,f){return{topLeft:this.getRotatedPoint(c[0],f),topRight:this.getRotatedPoint(c[1],f),bottomLeft:this.getRotatedPoint(c[2],f),bottomRight:this.getRotatedPoint(c[3],f)}}getRotatedPoint(c,f){return{x:c.x*Math.cos(this.angle)+c.y*Math.sin(this.angle)+f.x,y:c.y*Math.cos(this.angle)-c.x*Math.sin(this.angle)+f.y}}calculateIntersectPoint(c){const f={left:-1,top:-1,width:this.pageWidth+2,height:this.pageHeight+2};this.corner==="top"?(this.topIntersectPoint=a.GetIntersectBetweenTwoSegment(f,[c,this.rect.topRight],[{x:0,y:0},{x:this.pageWidth,y:0}]),this.sideIntersectPoint=a.GetIntersectBetweenTwoSegment(f,[c,this.rect.bottomLeft],[{x:this.pageWidth,y:0},{x:this.pageWidth,y:this.pageHeight}]),this.bottomIntersectPoint=a.GetIntersectBetweenTwoSegment(f,[this.rect.bottomLeft,this.rect.bottomRight],[{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}])):(this.topIntersectPoint=a.GetIntersectBetweenTwoSegment(f,[this.rect.topLeft,this.rect.topRight],[{x:0,y:0},{x:this.pageWidth,y:0}]),this.sideIntersectPoint=a.GetIntersectBetweenTwoSegment(f,[c,this.rect.topLeft],[{x:this.pageWidth,y:0},{x:this.pageWidth,y:this.pageHeight}]),this.bottomIntersectPoint=a.GetIntersectBetweenTwoSegment(f,[this.rect.bottomLeft,this.rect.bottomRight],[{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}]))}checkPositionAtCenterLine(c,f,m){let x=c;const S=a.LimitPointToCircle(f,this.pageWidth,x);x!==S&&(x=S,this.updateAngleAndGeometry(x));const E=Math.sqrt(Math.pow(this.pageWidth,2)+Math.pow(this.pageHeight,2));let A=this.rect.bottomRight,D=this.rect.topLeft;if(this.corner==="bottom"&&(A=this.rect.topRight,D=this.rect.bottomLeft),A.x<=0){const X=a.LimitPointToCircle(m,E,D);X!==x&&(x=X,this.updateAngleAndGeometry(x))}return x}getSegmentToShadowLine(){const c=this.getShadowStartPoint();return[c,c!==this.sideIntersectPoint&&this.sideIntersectPoint!==null?this.sideIntersectPoint:this.bottomIntersectPoint]}}class d{constructor(c,f){this.flippingPage=null,this.bottomPage=null,this.calc=null,this.state="read",this.render=c,this.app=f}fold(c){this.setState("user_fold"),this.calc===null&&this.start(c),this.do(this.render.convertToPage(c))}flip(c){if(this.app.getSettings().disableFlipByClick&&!this.isPointOnCorners(c)||(this.calc!==null&&this.render.finishAnimation(),!this.start(c)))return;const f=this.getBoundsRect();this.setState("flipping");const m=f.height/10,x=this.calc.getCorner()==="bottom"?f.height-m:m,S=this.calc.getCorner()==="bottom"?f.height:0;this.calc.calc({x:f.pageWidth-m,y:x}),this.animateFlippingTo({x:f.pageWidth-m,y:x},{x:-f.pageWidth,y:S},!0)}start(c){this.reset();const f=this.render.convertToBook(c),m=this.getBoundsRect(),x=this.getDirectionByPoint(f),S=f.y>=m.height/2?"bottom":"top";if(!this.checkDirection(x))return!1;try{if(this.flippingPage=this.app.getPageCollection().getFlippingPage(x),this.bottomPage=this.app.getPageCollection().getBottomPage(x),this.render.getOrientation()==="landscape")if(x===1){const E=this.app.getPageCollection().nextBy(this.flippingPage);E!==null&&this.flippingPage.getDensity()!==E.getDensity()&&(this.flippingPage.setDrawingDensity("hard"),E.setDrawingDensity("hard"))}else{const E=this.app.getPageCollection().prevBy(this.flippingPage);E!==null&&this.flippingPage.getDensity()!==E.getDensity()&&(this.flippingPage.setDrawingDensity("hard"),E.setDrawingDensity("hard"))}return this.render.setDirection(x),this.calc=new h(x,S,m.pageWidth.toString(10),m.height.toString(10)),!0}catch{return!1}}do(c){if(this.calc!==null&&this.calc.calc(c)){const f=this.calc.getFlippingProgress();this.bottomPage.setArea(this.calc.getBottomClipArea()),this.bottomPage.setPosition(this.calc.getBottomPagePosition()),this.bottomPage.setAngle(0),this.bottomPage.setHardAngle(0),this.flippingPage.setArea(this.calc.getFlippingClipArea()),this.flippingPage.setPosition(this.calc.getActiveCorner()),this.flippingPage.setAngle(this.calc.getAngle()),this.calc.getDirection()===0?this.flippingPage.setHardAngle(90*(200-2*f)/100):this.flippingPage.setHardAngle(-90*(200-2*f)/100),this.render.setPageRect(this.calc.getRect()),this.render.setBottomPage(this.bottomPage),this.render.setFlippingPage(this.flippingPage),this.render.setShadowData(this.calc.getShadowStartPoint(),this.calc.getShadowAngle(),f,this.calc.getDirection())}}flipToPage(c,f){const m=this.app.getPageCollection().getCurrentSpreadIndex(),x=this.app.getPageCollection().getSpreadIndexByPage(c);try{x>m&&(this.app.getPageCollection().setCurrentSpreadIndex(x-1),this.flipNext(f)),xthis.do(D));const A=this.getAnimationDuration(S.length);this.render.startAnimation(E,A,()=>{this.calc&&(m&&(this.calc.getDirection()===1?this.app.turnToPrevPage():this.app.turnToNextPage()),x&&(this.render.setBottomPage(null),this.render.setFlippingPage(null),this.render.clearShadow(),this.setState("read"),this.reset()))})}getCalculation(){return this.calc}getState(){return this.state}setState(c){this.state!==c&&(this.app.updateState(c),this.state=c)}getDirectionByPoint(c){const f=this.getBoundsRect();if(this.render.getOrientation()==="portrait"){if(c.x-f.pageWidth<=f.width/5)return 1}else if(c.x=1e3?f:c/1e3*f}checkDirection(c){return c===0?this.app.getCurrentPageIndex()=1}reset(){this.calc=null,this.flippingPage=null,this.bottomPage=null}getBoundsRect(){return this.render.getRect()}checkState(...c){for(const f of c)if(this.state===f)return!0;return!1}isPointOnCorners(c){const f=this.getBoundsRect(),m=f.pageWidth,x=Math.sqrt(Math.pow(m,2)+Math.pow(f.height,2))/5,S=this.render.convertToBook(c);return S.x>0&&S.y>0&&S.xf.width-x)&&(S.yf.height-x)}}class p{constructor(c,f){this.leftPage=null,this.rightPage=null,this.flippingPage=null,this.bottomPage=null,this.direction=null,this.orientation=null,this.shadow=null,this.animation=null,this.pageRect=null,this.boundsRect=null,this.timer=0,this.safari=!1,this.setting=f,this.app=c;const m=new RegExp("Version\\/[\\d\\.]+.*Safari/");this.safari=m.exec(window.navigator.userAgent)!==null}render(c){if(this.animation!==null){const f=Math.round((c-this.animation.startedAt)/this.animation.durationFrame);f{this.render(f),requestAnimationFrame(c)};requestAnimationFrame(c)}startAnimation(c,f,m){this.finishAnimation(),this.animation={frames:c,duration:f,durationFrame:f/c.length,onAnimateEnd:m,startedAt:this.timer}}finishAnimation(){this.animation!==null&&(this.animation.frames[this.animation.frames.length-1](),this.animation.onAnimateEnd!==null&&this.animation.onAnimateEnd()),this.animation=null}update(){this.boundsRect=null;const c=this.calculateBoundsRect();this.orientation!==c&&(this.orientation=c,this.app.updateOrientation(c))}calculateBoundsRect(){let c="landscape";const f=this.getBlockWidth(),m=f/2,x=this.getBlockHeight()/2,S=this.setting.width/this.setting.height;let E=this.setting.width,A=this.setting.height,D=m-E;return this.setting.size==="stretch"?(f<2*this.setting.minWidth&&this.app.getSettings().usePortrait&&(c="portrait"),E=c==="portrait"?this.getBlockWidth():this.getBlockWidth()/2,E>this.setting.maxWidth&&(E=this.setting.maxWidth),A=E/S,A>this.getBlockHeight()&&(A=this.getBlockHeight(),E=A*S),D=c==="portrait"?m-E/2-E:m-E):f<2*E&&this.app.getSettings().usePortrait&&(c="portrait",D=m-E/2-E),this.boundsRect={left:D,top:x-A/2,width:2*E,height:A,pageWidth:E},c}setShadowData(c,f,m,x){if(!this.app.getSettings().drawShadow)return;const S=100*this.getSettings().maxShadowOpacity;this.shadow={pos:c,angle:f,width:3*this.getRect().pageWidth/4*m/100,opacity:(100-m)*S/100/100,direction:x,progress:2*m}}clearShadow(){this.shadow=null}getBlockWidth(){return this.app.getUI().getDistElement().offsetWidth}getBlockHeight(){return this.app.getUI().getDistElement().offsetHeight}getDirection(){return this.direction}getRect(){return this.boundsRect===null&&this.calculateBoundsRect(),this.boundsRect}getSettings(){return this.app.getSettings()}getOrientation(){return this.orientation}setPageRect(c){this.pageRect=c}setDirection(c){this.direction=c}setRightPage(c){c!==null&&c.setOrientation(1),this.rightPage=c}setLeftPage(c){c!==null&&c.setOrientation(0),this.leftPage=c}setBottomPage(c){c!==null&&c.setOrientation(this.direction===1?0:1),this.bottomPage=c}setFlippingPage(c){c!==null&&c.setOrientation(this.direction===0&&this.orientation!=="portrait"?0:1),this.flippingPage=c}convertToBook(c){const f=this.getRect();return{x:c.x-f.left,y:c.y-f.top}}isSafari(){return this.safari}convertToPage(c,f){f||(f=this.direction);const m=this.getRect();return{x:f===0?c.x-m.left-m.width/2:m.width/2-c.x+m.left,y:c.y-m.top}}convertToGlobal(c,f){if(f||(f=this.direction),c==null)return null;const m=this.getRect();return{x:f===0?c.x+m.left+m.width/2:m.width/2-c.x+m.left,y:c.y+m.top}}convertRectToGlobal(c,f){return f||(f=this.direction),{topLeft:this.convertToGlobal(c.topLeft,f),topRight:this.convertToGlobal(c.topRight,f),bottomLeft:this.convertToGlobal(c.bottomLeft,f),bottomRight:this.convertToGlobal(c.bottomRight,f)}}}class v extends p{constructor(c,f,m){super(c,f),this.canvas=m,this.ctx=m.getContext("2d")}getContext(){return this.ctx}reload(){}drawFrame(){this.clear(),this.orientation!=="portrait"&&this.leftPage!=null&&this.leftPage.simpleDraw(0),this.rightPage!=null&&this.rightPage.simpleDraw(1),this.bottomPage!=null&&this.bottomPage.draw(),this.drawBookShadow(),this.flippingPage!=null&&this.flippingPage.draw(),this.shadow!=null&&(this.drawOuterShadow(),this.drawInnerShadow());const c=this.getRect();this.orientation==="portrait"&&(this.ctx.beginPath(),this.ctx.rect(c.left+c.pageWidth,c.top,c.width,c.height),this.ctx.clip())}drawBookShadow(){const c=this.getRect();this.ctx.save(),this.ctx.beginPath();const f=c.width/20;this.ctx.rect(c.left,c.top,c.width,c.height);const m={x:c.left+c.width/2-f/2,y:0};this.ctx.translate(m.x,m.y);const x=this.ctx.createLinearGradient(0,0,f,0);x.addColorStop(0,"rgba(0, 0, 0, 0)"),x.addColorStop(.4,"rgba(0, 0, 0, 0.2)"),x.addColorStop(.49,"rgba(0, 0, 0, 0.1)"),x.addColorStop(.5,"rgba(0, 0, 0, 0.5)"),x.addColorStop(.51,"rgba(0, 0, 0, 0.4)"),x.addColorStop(1,"rgba(0, 0, 0, 0)"),this.ctx.clip(),this.ctx.fillStyle=x,this.ctx.fillRect(0,0,f,2*c.height),this.ctx.restore()}drawOuterShadow(){const c=this.getRect();this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(c.left,c.top,c.width,c.height);const f=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y});this.ctx.translate(f.x,f.y),this.ctx.rotate(Math.PI+this.shadow.angle+Math.PI/2);const m=this.ctx.createLinearGradient(0,0,this.shadow.width,0);this.shadow.direction===0?(this.ctx.translate(0,-100),m.addColorStop(0,"rgba(0, 0, 0, "+this.shadow.opacity+")"),m.addColorStop(1,"rgba(0, 0, 0, 0)")):(this.ctx.translate(-this.shadow.width,-100),m.addColorStop(0,"rgba(0, 0, 0, 0)"),m.addColorStop(1,"rgba(0, 0, 0, "+this.shadow.opacity+")")),this.ctx.clip(),this.ctx.fillStyle=m,this.ctx.fillRect(0,0,this.shadow.width,2*c.height),this.ctx.restore()}drawInnerShadow(){const c=this.getRect();this.ctx.save(),this.ctx.beginPath();const f=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y}),m=this.convertRectToGlobal(this.pageRect);this.ctx.moveTo(m.topLeft.x,m.topLeft.y),this.ctx.lineTo(m.topRight.x,m.topRight.y),this.ctx.lineTo(m.bottomRight.x,m.bottomRight.y),this.ctx.lineTo(m.bottomLeft.x,m.bottomLeft.y),this.ctx.translate(f.x,f.y),this.ctx.rotate(Math.PI+this.shadow.angle+Math.PI/2);const x=3*this.shadow.width/4,S=this.ctx.createLinearGradient(0,0,x,0);this.shadow.direction===0?(this.ctx.translate(-x,-100),S.addColorStop(1,"rgba(0, 0, 0, "+this.shadow.opacity+")"),S.addColorStop(.9,"rgba(0, 0, 0, 0.05)"),S.addColorStop(.7,"rgba(0, 0, 0, "+this.shadow.opacity+")"),S.addColorStop(0,"rgba(0, 0, 0, 0)")):(this.ctx.translate(0,-100),S.addColorStop(0,"rgba(0, 0, 0, "+this.shadow.opacity+")"),S.addColorStop(.1,"rgba(0, 0, 0, 0.05)"),S.addColorStop(.3,"rgba(0, 0, 0, "+this.shadow.opacity+")"),S.addColorStop(1,"rgba(0, 0, 0, 0)")),this.ctx.clip(),this.ctx.fillStyle=S,this.ctx.fillRect(0,0,x,2*c.height),this.ctx.restore()}clear(){this.ctx.fillStyle="white",this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}}class k{constructor(c,f,m){this.touchPoint=null,this.swipeTimeout=250,this.onResize=()=>{this.update()},this.onMouseDown=S=>{if(this.checkTarget(S.target)){const E=this.getMousePos(S.clientX,S.clientY);this.app.startUserTouch(E),S.preventDefault()}},this.onTouchStart=S=>{if(this.checkTarget(S.target)&&S.changedTouches.length>0){const E=S.changedTouches[0],A=this.getMousePos(E.clientX,E.clientY);this.touchPoint={point:A,time:Date.now()},setTimeout(()=>{this.touchPoint!==null&&this.app.startUserTouch(A)},this.swipeTimeout),this.app.getSettings().mobileScrollSupport||S.preventDefault()}},this.onMouseUp=S=>{const E=this.getMousePos(S.clientX,S.clientY);this.app.userStop(E)},this.onMouseMove=S=>{const E=this.getMousePos(S.clientX,S.clientY);this.app.userMove(E,!1)},this.onTouchMove=S=>{if(S.changedTouches.length>0){const E=S.changedTouches[0],A=this.getMousePos(E.clientX,E.clientY);this.app.getSettings().mobileScrollSupport?(this.touchPoint!==null&&(Math.abs(this.touchPoint.point.x-A.x)>10||this.app.getState()!=="read")&&S.cancelable&&this.app.userMove(A,!0),this.app.getState()!=="read"&&S.preventDefault()):this.app.userMove(A,!0)}},this.onTouchEnd=S=>{if(S.changedTouches.length>0){const E=S.changedTouches[0],A=this.getMousePos(E.clientX,E.clientY);let D=!1;if(this.touchPoint!==null){const X=A.x-this.touchPoint.point.x,Q=Math.abs(A.y-this.touchPoint.point.y);Math.abs(X)>this.swipeDistance&&Q<2*this.swipeDistance&&Date.now()-this.touchPoint.time0?this.app.flipPrev(this.touchPoint.point.y'),this.wrapper=c.querySelector(".stf__wrapper"),this.app=f;const x=this.app.getSettings().usePortrait?1:2;c.style.minWidth=m.minWidth*x+"px",c.style.minHeight=m.minHeight+"px",m.size==="fixed"&&(c.style.minWidth=m.width*x+"px",c.style.minHeight=m.height+"px"),m.autoSize&&(c.style.width="100%",c.style.maxWidth=2*m.maxWidth+"px"),c.style.display="block",window.addEventListener("resize",this.onResize,!1),this.swipeDistance=m.swipeDistance}destroy(){this.app.getSettings().useMouseEvents&&this.removeHandlers(),this.distElement.remove(),this.wrapper.remove()}getDistElement(){return this.distElement}getWrapper(){return this.wrapper}setOrientationStyle(c){this.wrapper.classList.remove("--portrait","--landscape"),c==="portrait"?(this.app.getSettings().autoSize&&(this.wrapper.style.paddingBottom=this.app.getSettings().height/this.app.getSettings().width*100+"%"),this.wrapper.classList.add("--portrait")):(this.app.getSettings().autoSize&&(this.wrapper.style.paddingBottom=this.app.getSettings().height/(2*this.app.getSettings().width)*100+"%"),this.wrapper.classList.add("--landscape")),this.update()}removeHandlers(){window.removeEventListener("resize",this.onResize),this.distElement.removeEventListener("mousedown",this.onMouseDown),this.distElement.removeEventListener("touchstart",this.onTouchStart),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("touchend",this.onTouchEnd)}setHandlers(){window.addEventListener("resize",this.onResize,!1),this.app.getSettings().useMouseEvents&&(this.distElement.addEventListener("mousedown",this.onMouseDown),this.distElement.addEventListener("touchstart",this.onTouchStart),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("touchmove",this.onTouchMove,{passive:!this.app.getSettings().mobileScrollSupport}),window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("touchend",this.onTouchEnd))}getMousePos(c,f){const m=this.distElement.getBoundingClientRect();return{x:c-m.left,y:f-m.top}}checkTarget(c){return!this.app.getSettings().clickEventForward||!["a","button"].includes(c.tagName.toLowerCase())}}class _ extends k{constructor(c,f,m,x){super(c,f,m),this.wrapper.insertAdjacentHTML("afterbegin",'
'),this.distElement=c.querySelector(".stf__block"),this.items=x;for(const S of x)this.distElement.appendChild(S);this.setHandlers()}clear(){for(const c of this.items)this.parentElement.appendChild(c)}updateItems(c){this.removeHandlers(),this.distElement.innerHTML="";for(const f of c)this.distElement.appendChild(f);this.items=c,this.setHandlers()}update(){this.app.getRender().update()}}class b extends k{constructor(c,f,m){super(c,f,m),this.wrapper.innerHTML='',this.canvas=c.querySelectorAll("canvas")[0],this.distElement=this.canvas,this.resizeCanvas(),this.setHandlers()}resizeCanvas(){const c=getComputedStyle(this.canvas),f=parseInt(c.getPropertyValue("width"),10),m=parseInt(c.getPropertyValue("height"),10);this.canvas.width=f,this.canvas.height=m}getCanvas(){return this.canvas}update(){this.resizeCanvas(),this.app.getRender().update()}}class w extends p{constructor(c,f,m){super(c,f),this.outerShadow=null,this.innerShadow=null,this.hardShadow=null,this.hardInnerShadow=null,this.element=m,this.createShadows()}createShadows(){this.element.insertAdjacentHTML("beforeend",`
+
+
+
`),this.outerShadow=this.element.querySelector(".stf__outerShadow"),this.innerShadow=this.element.querySelector(".stf__innerShadow"),this.hardShadow=this.element.querySelector(".stf__hardShadow"),this.hardInnerShadow=this.element.querySelector(".stf__hardInnerShadow")}clearShadow(){super.clearShadow(),this.outerShadow.style.cssText="display: none",this.innerShadow.style.cssText="display: none",this.hardShadow.style.cssText="display: none",this.hardInnerShadow.style.cssText="display: none"}reload(){this.element.querySelector(".stf__outerShadow")||this.createShadows()}drawHardInnerShadow(){const c=this.getRect(),f=this.shadow.progress>100?200-this.shadow.progress:this.shadow.progress;let m=(100-f)*(2.5*c.pageWidth)/100+20;m>c.pageWidth&&(m=c.pageWidth);let x=` + display: block; + z-index: ${(this.getSettings().startZIndex+5).toString(10)}; + width: ${m}px; + height: ${c.height}px; + background: linear-gradient(to right, + rgba(0, 0, 0, ${this.shadow.opacity*f/100}) 5%, + rgba(0, 0, 0, 0) 100%); + left: ${c.left+c.width/2}px; + transform-origin: 0 0; + `;x+=this.getDirection()===0&&this.shadow.progress>100||this.getDirection()===1&&this.shadow.progress<=100?"transform: translate3d(0, 0, 0);":"transform: translate3d(0, 0, 0) rotateY(180deg);",this.hardInnerShadow.style.cssText=x}drawHardOuterShadow(){const c=this.getRect();let f=(100-(this.shadow.progress>100?200-this.shadow.progress:this.shadow.progress))*(2.5*c.pageWidth)/100+20;f>c.pageWidth&&(f=c.pageWidth);let m=` + display: block; + z-index: ${(this.getSettings().startZIndex+4).toString(10)}; + width: ${f}px; + height: ${c.height}px; + background: linear-gradient(to left, rgba(0, 0, 0, ${this.shadow.opacity}) 5%, rgba(0, 0, 0, 0) 100%); + left: ${c.left+c.width/2}px; + transform-origin: 0 0; + `;m+=this.getDirection()===0&&this.shadow.progress>100||this.getDirection()===1&&this.shadow.progress<=100?"transform: translate3d(0, 0, 0) rotateY(180deg);":"transform: translate3d(0, 0, 0);",this.hardShadow.style.cssText=m}drawInnerShadow(){const c=this.getRect(),f=3*this.shadow.width/4,m=this.getDirection()===0?f:0,x=this.getDirection()===0?"to left":"to right",S=this.convertToGlobal(this.shadow.pos),E=this.shadow.angle+3*Math.PI/2,A=[this.pageRect.topLeft,this.pageRect.topRight,this.pageRect.bottomRight,this.pageRect.bottomLeft];let D="polygon( ";for(const Q of A){let L=this.getDirection()===1?{x:-Q.x+this.shadow.pos.x,y:Q.y-this.shadow.pos.y}:{x:Q.x-this.shadow.pos.x,y:Q.y-this.shadow.pos.y};L=a.GetRotatedPoint(L,{x:m,y:100},E),D+=L.x+"px "+L.y+"px, "}D=D.slice(0,-2),D+=")";const X=` + display: block; + z-index: ${(this.getSettings().startZIndex+10).toString(10)}; + width: ${f}px; + height: ${2*c.height}px; + background: linear-gradient(${x}, + rgba(0, 0, 0, ${this.shadow.opacity}) 5%, + rgba(0, 0, 0, 0.05) 15%, + rgba(0, 0, 0, ${this.shadow.opacity}) 35%, + rgba(0, 0, 0, 0) 100%); + transform-origin: ${m}px 100px; + transform: translate3d(${S.x-m}px, ${S.y-100}px, 0) rotate(${E}rad); + clip-path: ${D}; + -webkit-clip-path: ${D}; + `;this.innerShadow.style.cssText=X}drawOuterShadow(){const c=this.getRect(),f=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y}),m=this.shadow.angle+3*Math.PI/2,x=this.getDirection()===1?this.shadow.width:0,S=this.getDirection()===0?"to right":"to left",E=[{x:0,y:0},{x:c.pageWidth,y:0},{x:c.pageWidth,y:c.height},{x:0,y:c.height}];let A="polygon( ";for(const X of E)if(X!==null){let Q=this.getDirection()===1?{x:-X.x+this.shadow.pos.x,y:X.y-this.shadow.pos.y}:{x:X.x-this.shadow.pos.x,y:X.y-this.shadow.pos.y};Q=a.GetRotatedPoint(Q,{x,y:100},m),A+=Q.x+"px "+Q.y+"px, "}A=A.slice(0,-2),A+=")";const D=` + display: block; + z-index: ${(this.getSettings().startZIndex+10).toString(10)}; + width: ${this.shadow.width}px; + height: ${2*c.height}px; + background: linear-gradient(${S}, rgba(0, 0, 0, ${this.shadow.opacity}), rgba(0, 0, 0, 0)); + transform-origin: ${x}px 100px; + transform: translate3d(${f.x-x}px, ${f.y-100}px, 0) rotate(${m}rad); + clip-path: ${A}; + -webkit-clip-path: ${A}; + `;this.outerShadow.style.cssText=D}drawLeftPage(){this.orientation!=="portrait"&&this.leftPage!==null&&(this.direction===1&&this.flippingPage!==null&&this.flippingPage.getDrawingDensity()==="hard"?(this.leftPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10),this.leftPage.setHardDrawingAngle(180+this.flippingPage.getHardAngle()),this.leftPage.draw(this.flippingPage.getDrawingDensity())):this.leftPage.simpleDraw(0))}drawRightPage(){this.rightPage!==null&&(this.direction===0&&this.flippingPage!==null&&this.flippingPage.getDrawingDensity()==="hard"?(this.rightPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10),this.rightPage.setHardDrawingAngle(180+this.flippingPage.getHardAngle()),this.rightPage.draw(this.flippingPage.getDrawingDensity())):this.rightPage.simpleDraw(1))}drawBottomPage(){if(this.bottomPage===null)return;const c=this.flippingPage!=null?this.flippingPage.getDrawingDensity():null;this.orientation==="portrait"&&this.direction===1||(this.bottomPage.getElement().style.zIndex=(this.getSettings().startZIndex+3).toString(10),this.bottomPage.draw(c))}drawFrame(){this.clear(),this.drawLeftPage(),this.drawRightPage(),this.drawBottomPage(),this.flippingPage!=null&&(this.flippingPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10),this.flippingPage.draw()),this.shadow!=null&&this.flippingPage!==null&&(this.flippingPage.getDrawingDensity()==="soft"?(this.drawOuterShadow(),this.drawInnerShadow()):(this.drawHardOuterShadow(),this.drawHardInnerShadow()))}clear(){for(const c of this.app.getPageCollection().getPages())c!==this.leftPage&&c!==this.rightPage&&c!==this.flippingPage&&c!==this.bottomPage&&(c.getElement().style.cssText="display: none"),c.getTemporaryCopy()!==this.flippingPage&&c.hideTemporaryCopy()}update(){super.update(),this.rightPage!==null&&this.rightPage.setOrientation(1),this.leftPage!==null&&this.leftPage.setOrientation(0)}}class y{constructor(){this._default={startPage:0,size:"fixed",width:0,height:0,minWidth:0,maxWidth:0,minHeight:0,maxHeight:0,drawShadow:!0,flippingTime:1e3,usePortrait:!0,startZIndex:0,autoSize:!0,maxShadowOpacity:1,showCover:!1,mobileScrollSupport:!0,swipeDistance:30,clickEventForward:!0,useMouseEvents:!0,showPageCorners:!0,disableFlipByClick:!1}}getSettings(c){const f=this._default;if(Object.assign(f,c),f.size!=="stretch"&&f.size!=="fixed")throw new Error('Invalid size type. Available only "fixed" and "stretch" value');if(f.width<=0||f.height<=0)throw new Error("Invalid width or height");if(f.flippingTime<=0)throw new Error("Invalid flipping time");return f.size==="stretch"?(f.minWidth<=0&&(f.minWidth=100),f.maxWidth{this.ui.update(),this.trigger("init",this,{page:this.setting.startPage,mode:this.render.getOrientation()})},1)}loadFromHTML(g){this.ui=new _(this.block,this,this.setting,g),this.render=new w(this,this.setting,this.ui.getDistElement()),this.flipController=new d(this.render,this),this.pages=new u(this,this.render,this.ui.getDistElement(),g),this.pages.load(),this.render.start(),this.pages.show(this.setting.startPage),setTimeout(()=>{this.ui.update(),this.trigger("init",this,{page:this.setting.startPage,mode:this.render.getOrientation()})},1)}updateFromImages(g){const c=this.pages.getCurrentPageIndex();this.pages.destroy(),this.pages=new o(this,this.render,g),this.pages.load(),this.pages.show(c),this.trigger("update",this,{page:c,mode:this.render.getOrientation()})}updateFromHtml(g){const c=this.pages.getCurrentPageIndex();this.pages.destroy(),this.pages=new u(this,this.render,this.ui.getDistElement(),g),this.pages.load(),this.ui.updateItems(g),this.render.reload(),this.pages.show(c),this.trigger("update",this,{page:c,mode:this.render.getOrientation()})}clear(){this.pages.destroy(),this.ui.clear()}turnToPrevPage(){this.pages.showPrev()}turnToNextPage(){this.pages.showNext()}turnToPage(g){this.pages.show(g)}flipNext(g="top"){this.flipController.flipNext(g)}flipPrev(g="top"){this.flipController.flipPrev(g)}flip(g,c="top"){this.flipController.flipToPage(g,c)}updateState(g){this.trigger("changeState",this,g)}updatePageIndex(g){this.trigger("flip",this,g)}updateOrientation(g){this.ui.setOrientationStyle(g),this.update(),this.trigger("changeOrientation",this,g)}getPageCount(){return this.pages.getPageCount()}getCurrentPageIndex(){return this.pages.getCurrentPageIndex()}getPage(g){return this.pages.getPage(g)}getRender(){return this.render}getFlipController(){return this.flipController}getOrientation(){return this.render.getOrientation()}getBoundsRect(){return this.render.getRect()}getSettings(){return this.setting}getUI(){return this.ui}getState(){return this.flipController.getState()}getPageCollection(){return this.pages}startUserTouch(g){this.mousePosition=g,this.isUserTouch=!0,this.isUserMove=!1}userMove(g,c){this.isUserTouch||c||!this.setting.showPageCorners?this.isUserTouch&&a.GetDistanceBetweenTwoPoint(this.mousePosition,g)>5&&(this.isUserMove=!0,this.flipController.fold(g)):this.flipController.showCorner(g)}userStop(g,c=!1){this.isUserTouch&&(this.isUserTouch=!1,c||(this.isUserMove?this.flipController.stopMove():this.flipController.flip(g)))}},Object.defineProperty(n,"__esModule",{value:!0})})})(Zl,Zl.exports);var ux=Zl.exports;const cx=ci.forwardRef((e,t)=>{const n=R.useRef(null),r=R.useRef([]),i=R.useRef(),[s,o]=R.useState([]);R.useImperativeHandle(t,()=>({pageFlip:()=>i.current}));const a=R.useCallback(()=>{i.current&&i.current.clear()},[]),l=R.useCallback(()=>{const u=i.current;u&&(u.off("flip"),u.off("changeOrientation"),u.off("changeState"),u.off("init"),u.off("update"))},[]);return R.useEffect(()=>{if(r.current=[],e.children){const u=ci.Children.map(e.children,h=>ci.cloneElement(h,{ref:d=>{d&&r.current.push(d)}}));(!e.renderOnlyPageLengthChange||s.length!==u.length)&&(u.length{const u=()=>{const h=i.current;h&&(e.onFlip&&h.on("flip",d=>e.onFlip(d)),e.onChangeOrientation&&h.on("changeOrientation",d=>e.onChangeOrientation(d)),e.onChangeState&&h.on("changeState",d=>e.onChangeState(d)),e.onInit&&h.on("init",d=>e.onInit(d)),e.onUpdate&&h.on("update",d=>e.onUpdate(d)))};s.length>0&&r.current.length>0&&(l(),n.current&&!i.current&&(i.current=new ux.PageFlip(n.current,e)),i.current.getFlipController()?i.current.updateFromHtml(r.current):i.current.loadFromHTML(r.current),u())},[s]),ci.createElement("div",{ref:n,className:e.className,style:e.style},s)}),hx=ci.memo(cx);function dn({variant:e="default",size:t="default",className:n="",children:r,...i}){const s="inline-flex items-center justify-center rounded-lg font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none",o={default:"bg-orange-600 text-white hover:bg-orange-700 focus:ring-orange-600",secondary:"bg-white text-orange-900 hover:bg-orange-50 border border-orange-200 focus:ring-orange-500"},a={default:"px-4 py-2 text-sm",sm:"px-3 py-1.5 text-xs",icon:"p-2"};return C.jsx("button",{className:`${s} ${o[e]} ${a[t]} ${n}`,...i,children:r})}function dx({className:e="",...t}){return C.jsx("input",{className:`flex h-10 w-full rounded-lg border border-orange-200 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-orange-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-orange-600 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${e}`,...t})}function fx({className:e="",children:t,...n}){return C.jsx("div",{className:`rounded-lg border bg-white text-zinc-950 shadow-m ${e}`,...n,children:t})}function px({className:e="",children:t,...n}){return C.jsx("div",{className:`p-6 ${e}`,...n,children:t})}/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var gx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mx=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),st=(e,t)=>{const n=R.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:l,...u},h)=>R.createElement("svg",{ref:h,...gx,width:i,height:i,stroke:r,strokeWidth:o?Number(s)*24/Number(i):s,className:["lucide",`lucide-${mx(e)}`,a].join(" "),...u},[...t.map(([d,p])=>R.createElement(d,p)),...Array.isArray(l)?l:[l]]));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ym=st("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vm=st("BookmarkCheck",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2Z",key:"169p4p"}],["path",{d:"m9 10 2 2 4-4",key:"1gnqz4"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wm=st("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xm=st("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const km=st("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yx=st("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vx=st("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wx=st("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sm=st("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xx=st("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kx=st("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sx=st("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _d=st("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),bc=R.createContext({});function Cc(e){const t=R.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ec=typeof window<"u",_m=Ec?R.useLayoutEffect:R.useEffect,Zo=R.createContext(null);function Rc(e,t){e.indexOf(t)===-1&&e.push(t)}function Ac(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Xt=(e,t,n)=>n>t?t:n{};const Jt={},Pm=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Tm(e){return typeof e=="object"&&e!==null}const bm=e=>/^0[^.\s]+$/u.test(e);function jc(e){let t;return()=>(t===void 0&&(t=e()),t)}const ft=e=>e,_x=(e,t)=>n=>t(e(n)),us=(...e)=>e.reduce(_x),Xi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Mc{constructor(){this.subscriptions=[]}add(t){return Rc(this.subscriptions,t),()=>Ac(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;se*1e3,ht=e=>e/1e3;function Cm(e,t){return t?e*(1e3/t):0}const Em=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Px=1e-7,Tx=12;function bx(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=Em(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>Px&&++abx(s,0,1,e,n);return s=>s===0||s===1?s:Em(i(s),t,r)}const Rm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Am=e=>t=>1-e(1-t),jm=cs(.33,1.53,.69,.99),Oc=Am(jm),Mm=Rm(Oc),Om=e=>(e*=2)<1?.5*Oc(e):.5*(2-Math.pow(2,-10*(e-1))),Dc=e=>1-Math.sin(Math.acos(e)),Dm=Am(Dc),Im=Rm(Dc),Cx=cs(.42,0,1,1),Ex=cs(0,0,.58,1),Lm=cs(.42,0,.58,1),Rx=e=>Array.isArray(e)&&typeof e[0]!="number",Nm=e=>Array.isArray(e)&&typeof e[0]=="number",Pd={linear:ft,easeIn:Cx,easeInOut:Lm,easeOut:Ex,circIn:Dc,circInOut:Im,circOut:Dm,backIn:Oc,backInOut:Mm,backOut:jm,anticipate:Om},Ax=e=>typeof e=="string",Td=e=>{if(Nm(e)){Ro(e.length===4);const[t,n,r,i]=e;return cs(t,n,r,i)}else if(Ax(e))return Ro(Pd[e]!==void 0),Pd[e];return e},Ds=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],bd={value:null,addProjectionMetrics:null};function jx(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(d){o.has(d)&&(h.schedule(d),e()),l++,d(a)}const h={schedule:(d,p=!1,v=!1)=>{const _=v&&i?n:r;return p&&o.add(d),_.has(d)||_.add(d),d},cancel:d=>{r.delete(d),o.delete(d)},process:d=>{if(a=d,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&bd.value&&bd.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,h.process(d))}};return h}const Mx=40;function $m(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Ds.reduce((g,c)=>(g[c]=jx(s,t?c:void 0),g),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:v,postRender:k}=o,_=()=>{const g=Jt.useManualTiming?i.timestamp:performance.now();n=!1,Jt.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,Mx),1)),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),h.process(i),d.process(i),p.process(i),v.process(i),k.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(_))},b=()=>{n=!0,r=!0,i.isProcessing||e(_)};return{schedule:Ds.reduce((g,c)=>{const f=o[c];return g[c]=(m,x=!1,S=!1)=>(n||b(),f.schedule(m,x,S)),g},{}),cancel:g=>{for(let c=0;c(eo===void 0&&qe.set(Ae.isProcessing||Jt.useManualTiming?Ae.timestamp:performance.now()),eo),set:e=>{eo=e,queueMicrotask(Ox)}},Fm=e=>t=>typeof t=="string"&&t.startsWith(e),Ic=Fm("--"),Dx=Fm("var(--"),Lc=e=>Dx(e)?Ix.test(e.split("/*")[0].trim()):!1,Ix=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Yr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ji={...Yr,transform:e=>Xt(0,1,e)},Is={...Yr,default:1},bi=e=>Math.round(e*1e5)/1e5,Nc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Lx(e){return e==null}const Nx=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,$c=(e,t)=>n=>!!(typeof n=="string"&&Nx.test(n)&&n.startsWith(e)||t&&!Lx(n)&&Object.prototype.hasOwnProperty.call(n,t)),Bm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Nc);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},$x=e=>Xt(0,255,e),Na={...Yr,transform:e=>Math.round($x(e))},Wn={test:$c("rgb","red"),parse:Bm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Na.transform(e)+", "+Na.transform(t)+", "+Na.transform(n)+", "+bi(Ji.transform(r))+")"};function Fx(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const eu={test:$c("#"),parse:Fx,transform:Wn.transform},hs=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),nn=hs("deg"),Nt=hs("%"),B=hs("px"),Bx=hs("vh"),Vx=hs("vw"),Cd={...Nt,parse:e=>Nt.parse(e)/100,transform:e=>Nt.transform(e*100)},Pr={test:$c("hsl","hue"),parse:Bm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Nt.transform(bi(t))+", "+Nt.transform(bi(n))+", "+bi(Ji.transform(r))+")"},xe={test:e=>Wn.test(e)||eu.test(e)||Pr.test(e),parse:e=>Wn.test(e)?Wn.parse(e):Pr.test(e)?Pr.parse(e):eu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Wn.transform(e):Pr.transform(e),getAnimatableNone:e=>{const t=xe.parse(e);return t.alpha=0,xe.transform(t)}},Ux=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function zx(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Nc))==null?void 0:t.length)||0)+(((n=e.match(Ux))==null?void 0:n.length)||0)>0}const Vm="number",Um="color",Wx="var",Hx="var(",Ed="${}",Kx=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Zi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(Kx,l=>(xe.test(l)?(r.color.push(s),i.push(Um),n.push(xe.parse(l))):l.startsWith(Hx)?(r.var.push(s),i.push(Wx),n.push(l)):(r.number.push(s),i.push(Vm),n.push(parseFloat(l))),++s,Ed)).split(Ed);return{values:n,split:a,indexes:r,types:i}}function zm(e){return Zi(e).values}function Wm(e){const{split:t,types:n}=Zi(e),r=t.length;return i=>{let s="";for(let o=0;otypeof e=="number"?0:xe.test(e)?xe.getAnimatableNone(e):e;function qx(e){const t=zm(e);return Wm(e)(t.map(Gx))}const Pn={test:zx,parse:zm,createTransformer:Wm,getAnimatableNone:qx};function $a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Yx({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=$a(l,a,e+1/3),s=$a(l,a,e),o=$a(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Ao(e,t){return n=>n>0?t:e}const he=(e,t,n)=>e+(t-e)*n,Fa=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Qx=[eu,Wn,Pr],Xx=e=>Qx.find(t=>t.test(e));function Rd(e){const t=Xx(e);if(!t)return!1;let n=t.parse(e);return t===Pr&&(n=Yx(n)),n}const Ad=(e,t)=>{const n=Rd(e),r=Rd(t);if(!n||!r)return Ao(e,t);const i={...n};return s=>(i.red=Fa(n.red,r.red,s),i.green=Fa(n.green,r.green,s),i.blue=Fa(n.blue,r.blue,s),i.alpha=he(n.alpha,r.alpha,s),Wn.transform(i))},tu=new Set(["none","hidden"]);function Jx(e,t){return tu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Zx(e,t){return n=>he(e,t,n)}function Fc(e){return typeof e=="number"?Zx:typeof e=="string"?Lc(e)?Ao:xe.test(e)?Ad:n1:Array.isArray(e)?Hm:typeof e=="object"?xe.test(e)?Ad:e1:Ao}function Hm(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Fc(s)(s,t[o]));return s=>{for(let o=0;o{for(const s in r)n[s]=r[s](i);return n}}function t1(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i{const n=Pn.createTransformer(t),r=Zi(e),i=Zi(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?tu.has(e)&&!i.values.length||tu.has(t)&&!r.values.length?Jx(e,t):us(Hm(t1(r,i),i.values),n):Ao(e,t)};function Km(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?he(e,t,n):Fc(e)(e,t)}const r1=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ue.update(t,n),stop:()=>_n(t),now:()=>Ae.isProcessing?Ae.timestamp:qe.now()}},Gm=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s=jo?1/0:t}function i1(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Bc(r),jo);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:ht(i)}}const s1=5;function qm(e,t,n){const r=Math.max(t-s1,0);return Cm(n-e(r),t-r)}const me={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ba=.001;function o1({duration:e=me.duration,bounce:t=me.bounce,velocity:n=me.velocity,mass:r=me.mass}){let i,s,o=1-t;o=Xt(me.minDamping,me.maxDamping,o),e=Xt(me.minDuration,me.maxDuration,ht(e)),o<1?(i=u=>{const h=u*o,d=h*e,p=h-n,v=nu(u,o),k=Math.exp(-d);return Ba-p/v*k},s=u=>{const d=u*o*e,p=d*n+n,v=Math.pow(o,2)*Math.pow(u,2)*e,k=Math.exp(-d),_=nu(Math.pow(u,2),o);return(-i(u)+Ba>0?-1:1)*((p-v)*k)/_}):(i=u=>{const h=Math.exp(-u*e),d=(u-n)*e+1;return-Ba+h*d},s=u=>{const h=Math.exp(-u*e),d=(n-u)*(e*e);return h*d});const a=5/e,l=l1(i,s,a);if(e=Lt(e),isNaN(l))return{stiffness:me.stiffness,damping:me.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const a1=12;function l1(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function h1(e){let t={velocity:me.velocity,stiffness:me.stiffness,damping:me.damping,mass:me.mass,isResolvedFromDuration:!1,...e};if(!jd(e,c1)&&jd(e,u1))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Xt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:me.mass,stiffness:i,damping:s}}else{const n=o1(e);t={...t,...n,mass:me.mass},t.isResolvedFromDuration=!0}return t}function Mo(e=me.visualDuration,t=me.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:h,duration:d,velocity:p,isResolvedFromDuration:v}=h1({...n,velocity:-ht(n.velocity||0)}),k=p||0,_=u/(2*Math.sqrt(l*h)),b=o-s,w=ht(Math.sqrt(l/h)),y=Math.abs(b)<5;r||(r=y?me.restSpeed.granular:me.restSpeed.default),i||(i=y?me.restDelta.granular:me.restDelta.default);let g;if(_<1){const f=nu(w,_);g=m=>{const x=Math.exp(-_*w*m);return o-x*((k+_*w*b)/f*Math.sin(f*m)+b*Math.cos(f*m))}}else if(_===1)g=f=>o-Math.exp(-w*f)*(b+(k+w*b)*f);else{const f=w*Math.sqrt(_*_-1);g=m=>{const x=Math.exp(-_*w*m),S=Math.min(f*m,300);return o-x*((k+_*w*b)*Math.sinh(S)+f*b*Math.cosh(S))/f}}const c={calculatedDuration:v&&d||null,next:f=>{const m=g(f);if(v)a.done=f>=d;else{let x=f===0?k:0;_<1&&(x=f===0?Lt(k):qm(g,f,m));const S=Math.abs(x)<=r,E=Math.abs(o-m)<=i;a.done=S&&E}return a.value=a.done?o:m,a},toString:()=>{const f=Math.min(Bc(c),jo),m=Gm(x=>c.next(f*x).value,f,30);return f+"ms "+m},toTransition:()=>{}};return c}Mo.applyToOptions=e=>{const t=i1(e,100,Mo);return e.ease=t.ease,e.duration=Lt(t.duration),e.type="keyframes",e};function ru({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:h}){const d=e[0],p={done:!1,value:d},v=S=>a!==void 0&&Sl,k=S=>a===void 0?l:l===void 0||Math.abs(a-S)-_*Math.exp(-S/r),g=S=>w+y(S),c=S=>{const E=y(S),A=g(S);p.done=Math.abs(E)<=u,p.value=p.done?w:A};let f,m;const x=S=>{v(p.value)&&(f=S,m=Mo({keyframes:[p.value,k(p.value)],velocity:qm(g,S,p.value),damping:i,stiffness:s,restDelta:u,restSpeed:h}))};return x(0),{calculatedDuration:null,next:S=>{let E=!1;return!m&&f===void 0&&(E=!0,c(S),x(S)),f!==void 0&&S>=f?m.next(S-f):(!E&&c(S),p)}}}function d1(e,t,n){const r=[],i=n||Jt.mix||Km,s=e.length-1;for(let o=0;ot[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=d1(t,r,i),l=a.length,u=h=>{if(o&&h1)for(;du(Xt(e[0],e[s-1],h)):u}function p1(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Xi(0,t,r);e.push(he(n,1,i))}}function g1(e){const t=[0];return p1(t,e.length-1),t}function m1(e,t){return e.map(n=>n*t)}function y1(e,t){return e.map(()=>t||Lm).splice(0,e.length-1)}function Ci({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Rx(r)?r.map(Td):Td(r),s={done:!1,value:t[0]},o=m1(n&&n.length===t.length?n:g1(t),e),a=f1(o,t,{ease:Array.isArray(i)?i:y1(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const v1=e=>e!==null;function Vc(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(v1),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const w1={decay:ru,inertia:ru,tween:Ci,keyframes:Ci,spring:Mo};function Ym(e){typeof e.type=="string"&&(e.type=w1[e.type])}class Uc{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const x1=e=>e/100;class zc extends Uc{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==qe.now()&&this.tick(qe.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ym(t);const{type:n=Ci,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||Ci;l!==Ci&&typeof a[0]!="number"&&(this.mixKeyframes=us(x1,Km(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Bc(u));const{calculatedDuration:h}=u;this.calculatedDuration=h,this.resolvedDuration=h+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:h,repeat:d,repeatType:p,repeatDelay:v,type:k,onUpdate:_,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?w<0:w>i;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let g=this.currentTime,c=r;if(d){const S=Math.min(this.currentTime,i)/a;let E=Math.floor(S),A=S%1;!A&&S>=1&&(A=1),A===1&&E--,E=Math.min(E,d+1),!!(E%2)&&(p==="reverse"?(A=1-A,v&&(A-=v/a)):p==="mirror"&&(c=o)),g=Xt(0,1,A)*a}const f=y?{done:!1,value:h[0]}:c.next(g);s&&(f.value=s(f.value));let{done:m}=f;!y&&l!==null&&(m=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const x=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&m);return x&&k!==ru&&(f.value=Vc(h,this.options,b,this.speed)),_&&_(f.value),x&&this.finish(),f}then(t,n){return this.finished.then(t,n)}get duration(){return ht(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ht(t)}get time(){return ht(this.currentTime)}set time(t){var n;t=Lt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(qe.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ht(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=r1,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(qe.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function k1(e){for(let t=1;te*180/Math.PI,iu=e=>{const t=Hn(Math.atan2(e[1],e[0]));return su(t)},S1={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:iu,rotateZ:iu,skewX:e=>Hn(Math.atan(e[1])),skewY:e=>Hn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},su=e=>(e=e%360,e<0&&(e+=360),e),Md=iu,Od=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Dd=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),_1={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Od,scaleY:Dd,scale:e=>(Od(e)+Dd(e))/2,rotateX:e=>su(Hn(Math.atan2(e[6],e[5]))),rotateY:e=>su(Hn(Math.atan2(-e[2],e[0]))),rotateZ:Md,rotate:Md,skewX:e=>Hn(Math.atan(e[4])),skewY:e=>Hn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ou(e){return e.includes("scale")?1:0}function au(e,t){if(!e||e==="none")return ou(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=_1,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=S1,i=a}if(!i)return ou(t);const s=r[t],o=i[1].split(",").map(T1);return typeof s=="function"?s(o):o[s]}const P1=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return au(n,t)};function T1(e){return parseFloat(e.trim())}const Qr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xr=new Set(Qr),Id=e=>e===Yr||e===B,b1=new Set(["x","y","z"]),C1=Qr.filter(e=>!b1.has(e));function E1(e){const t=[];return C1.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const qn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>au(t,"x"),y:(e,{transform:t})=>au(t,"y")};qn.translateX=qn.x;qn.translateY=qn.y;const Yn=new Set;let lu=!1,uu=!1,cu=!1;function Qm(){if(uu){const e=Array.from(Yn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=E1(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}uu=!1,lu=!1,Yn.forEach(e=>e.complete(cu)),Yn.clear()}function Xm(){Yn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(uu=!0)})}function R1(){cu=!0,Xm(),Qm(),cu=!1}class Wc{constructor(t,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Yn.add(this),lu||(lu=!0,ue.read(Xm),ue.resolveKeyframes(Qm))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const s=i==null?void 0:i.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&s===void 0&&i.set(t[0])}k1(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Yn.delete(this)}cancel(){this.state==="scheduled"&&(Yn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const A1=e=>e.startsWith("--");function j1(e,t,n){A1(t)?e.style.setProperty(t,n):e.style[t]=n}const M1=jc(()=>window.ScrollTimeline!==void 0),O1={};function D1(e,t){const n=jc(e);return()=>O1[t]??n()}const Jm=D1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),gi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ld={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gi([0,.65,.55,1]),circOut:gi([.55,0,1,.45]),backIn:gi([.31,.01,.66,-.59]),backOut:gi([.33,1.53,.69,.99])};function Zm(e,t){if(e)return typeof e=="function"?Jm()?Gm(e,t):"ease-out":Nm(e)?gi(e):Array.isArray(e)?e.map(n=>Zm(n,t)||Ld.easeOut):Ld[e]}function I1(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const h={[t]:n};l&&(h.offset=l);const d=Zm(a,i);Array.isArray(d)&&(h.easing=d);const p={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(p.pseudoElement=u),e.animate(h,p)}function ey(e){return typeof e=="function"&&"applyToOptions"in e}function L1({type:e,...t}){return ey(e)&&Jm()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class N1 extends Uc{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,Ro(typeof t.type!="string");const u=L1(t);this.animation=I1(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const h=Vc(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(h):j1(n,r,h),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return ht(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ht(t)}get time(){return ht(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Lt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&M1()?(this.animation.timeline=t,ft):n(this)}}const ty={anticipate:Om,backInOut:Mm,circInOut:Im};function $1(e){return e in ty}function F1(e){typeof e.ease=="string"&&$1(e.ease)&&(e.ease=ty[e.ease])}const Nd=10;class B1 extends N1{constructor(t){F1(t),Ym(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new zc({...o,autoplay:!1}),l=Lt(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Nd).value,a.sample(l).value,Nd),a.stop()}}const $d=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Pn.test(e)||e==="0")&&!e.startsWith("url("));function V1(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function H1(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:o}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return W1()&&n&&z1.has(n)&&(n!=="transform"||!u)&&!l&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const K1=40;class G1 extends Uc{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:h,...d}){var k;super(),this.stop=()=>{var _,b;this._animation&&(this._animation.stop(),(_=this.stopTimeline)==null||_.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=qe.now();const p={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:u,element:h,...d},v=(h==null?void 0:h.KeyframeResolver)||Wc;this.keyframeResolver=new v(a,(_,b,w)=>this.onKeyframesResolved(_,b,p,!w),l,u,h),(k=this.keyframeResolver)==null||k.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:h}=r;this.resolvedAt=qe.now(),U1(t,s,o,a)||((Jt.instantAnimations||!l)&&(h==null||h(Vc(t,r,n))),t[0]=t[t.length-1],hu(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>K1?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=!u&&H1(p)?new B1({...p,element:p.motionValue.owner.current}):new zc(p);v.finished.then(()=>this.notifyFinished()).catch(ft),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),R1()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const q1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Y1(e){const t=q1.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function ny(e,t,n=1){const[r,i]=Y1(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Pm(o)?parseFloat(o):o}return Lc(i)?ny(i,t,n+1):i}function Hc(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const ry=new Set(["width","height","top","left","right","bottom",...Qr]),Q1={test:e=>e==="auto",parse:e=>e},iy=e=>t=>t.test(e),sy=[Yr,B,Nt,nn,Vx,Bx,Q1],Fd=e=>sy.find(iy(e));function X1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||bm(e):!0}const J1=new Set(["brightness","contrast","saturate","opacity"]);function Z1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Nc)||[];if(!r)return e;const i=n.replace(r,"");let s=J1.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const ek=/\b([a-z-]*)\(.*?\)/gu,du={...Pn,getAnimatableNone:e=>{const t=e.match(ek);return t?t.map(Z1).join(" "):e}},Bd={...Yr,transform:Math.round},tk={rotate:nn,rotateX:nn,rotateY:nn,rotateZ:nn,scale:Is,scaleX:Is,scaleY:Is,scaleZ:Is,skew:nn,skewX:nn,skewY:nn,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:Ji,originX:Cd,originY:Cd,originZ:B},Kc={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,radius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,top:B,right:B,bottom:B,left:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,backgroundPositionX:B,backgroundPositionY:B,...tk,zIndex:Bd,fillOpacity:Ji,strokeOpacity:Ji,numOctaves:Bd},nk={...Kc,color:xe,backgroundColor:xe,outlineColor:xe,fill:xe,stroke:xe,borderColor:xe,borderTopColor:xe,borderRightColor:xe,borderBottomColor:xe,borderLeftColor:xe,filter:du,WebkitFilter:du},oy=e=>nk[e];function ay(e,t){let n=oy(e);return n!==du&&(n=Pn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const rk=new Set(["auto","none","0"]);function ik(e,t,n){let r=0,i;for(;r{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function ok(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const ly=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function uy(e){return Tm(e)&&"offsetHeight"in e}const Vd=30,ak=e=>!isNaN(parseFloat(e));class lk{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=qe.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=qe.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ak(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Mc);const r=this.events[t].add(n);return t==="change"?()=>{r(),ue.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=qe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Vd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Vd);return Cm(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zr(e,t){return new lk(e,t)}const{schedule:Gc,cancel:Ib}=$m(queueMicrotask,!1),xt={x:!1,y:!1};function cy(){return xt.x||xt.y}function uk(e){return e==="x"||e==="y"?xt[e]?null:(xt[e]=!0,()=>{xt[e]=!1}):xt.x||xt.y?null:(xt.x=xt.y=!0,()=>{xt.x=xt.y=!1})}function hy(e,t){const n=ok(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Ud(e){return!(e.pointerType==="touch"||cy())}function ck(e,t,n={}){const[r,i,s]=hy(e,n),o=a=>{if(!Ud(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const h=d=>{Ud(d)&&(u(d),l.removeEventListener("pointerleave",h))};l.addEventListener("pointerleave",h,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const dy=(e,t)=>t?e===t?!0:dy(e,t.parentElement):!1,qc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,hk=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function dk(e){return hk.has(e.tagName)||e.tabIndex!==-1}const to=new WeakSet;function zd(e){return t=>{t.key==="Enter"&&e(t)}}function Va(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const fk=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=zd(()=>{if(to.has(n))return;Va(n,"down");const i=zd(()=>{Va(n,"up")}),s=()=>Va(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Wd(e){return qc(e)&&!cy()}function pk(e,t,n={}){const[r,i,s]=hy(e,n),o=a=>{const l=a.currentTarget;if(!Wd(a))return;to.add(l);const u=t(l,a),h=(v,k)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),to.has(l)&&to.delete(l),Wd(v)&&typeof u=="function"&&u(v,{success:k})},d=v=>{h(v,l===window||l===document||n.useGlobalTarget||dy(l,v.target))},p=v=>{h(v,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",p,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),uy(a)&&(a.addEventListener("focus",u=>fk(u,i)),!dk(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function fy(e){return Tm(e)&&"ownerSVGElement"in e}function gk(e){return fy(e)&&e.tagName==="svg"}const Le=e=>!!(e&&e.getVelocity),mk=[...sy,xe,Pn],yk=e=>mk.find(iy(e)),Yc=R.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Hd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vk(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Hd(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i{const{width:u,height:h,top:d,left:p,right:v}=o.current;if(t||!s.current||!u||!h)return;const k=n==="left"?`left: ${p}`:`right: ${v}`;s.current.dataset.motionPopId=i;const _=document.createElement("style");a&&(_.nonce=a);const b=r??document.head;return b.appendChild(_),_.sheet&&_.sheet.insertRule(` + [data-motion-pop-id="${i}"] { + position: absolute !important; + width: ${u}px !important; + height: ${h}px !important; + ${k}px !important; + top: ${d}px !important; + } + `),()=>{b.contains(_)&&b.removeChild(_)}},[t]),C.jsx(xk,{isPresent:t,childRef:s,sizeRef:o,children:R.cloneElement(e,{ref:l})})}const Sk=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,root:l})=>{const u=Cc(_k),h=R.useId();let d=!0,p=R.useMemo(()=>(d=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:v=>{u.set(v,!0);for(const k of u.values())if(!k)return;r&&r()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[n,u,r]);return s&&d&&(p={...p}),R.useMemo(()=>{u.forEach((v,k)=>u.set(k,!1))},[n]),R.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),o==="popLayout"&&(e=C.jsx(kk,{isPresent:n,anchorX:a,root:l,children:e})),C.jsx(Zo.Provider,{value:p,children:e})};function _k(){return new Map}function py(e=!0){const t=R.useContext(Zo);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=R.useId();R.useEffect(()=>{if(e)return i(s)},[e]);const o=R.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Ls=e=>e.key||"";function Kd(e){const t=[];return R.Children.forEach(e,n=>{R.isValidElement(n)&&t.push(n)}),t}const Nn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",root:l})=>{const[u,h]=py(o),d=R.useMemo(()=>Kd(e),[e]),p=o&&!u?[]:d.map(Ls),v=R.useRef(!0),k=R.useRef(d),_=Cc(()=>new Map),[b,w]=R.useState(d),[y,g]=R.useState(d);_m(()=>{v.current=!1,k.current=d;for(let m=0;m{const x=Ls(m),S=o&&!u?!1:d===y||p.includes(x),E=()=>{if(_.has(x))_.set(x,!0);else return;let A=!0;_.forEach(D=>{D||(A=!1)}),A&&(f==null||f(),g(k.current),o&&(h==null||h()),r&&r())};return C.jsx(Sk,{isPresent:S,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:l,onExitComplete:S?void 0:E,anchorX:a,children:m},x)})})},gy=R.createContext({strict:!1}),Gd={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Wr={};for(const e in Gd)Wr[e]={isEnabled:t=>Gd[e].some(n=>!!t[n])};function Pk(e){for(const t in e)Wr[t]={...Wr[t],...e[t]}}const Tk=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Oo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Tk.has(e)}let my=e=>!Oo(e);function bk(e){typeof e=="function"&&(my=t=>t.startsWith("on")?!Oo(t):e(t))}try{bk(require("@emotion/is-prop-valid").default)}catch{}function Ck(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(my(i)||n===!0&&Oo(i)||!t&&!Oo(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const ea=R.createContext({});function ta(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function es(e){return typeof e=="string"||Array.isArray(e)}const Qc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xc=["initial",...Qc];function na(e){return ta(e.animate)||Xc.some(t=>es(e[t]))}function yy(e){return!!(na(e)||e.variants)}function Ek(e,t){if(na(e)){const{initial:n,animate:r}=e;return{initial:n===!1||es(n)?n:void 0,animate:es(r)?r:void 0}}return e.inherit!==!1?t:{}}function Rk(e){const{initial:t,animate:n}=Ek(e,R.useContext(ea));return R.useMemo(()=>({initial:t,animate:n}),[qd(t),qd(n)])}function qd(e){return Array.isArray(e)?e.join(" "):e}const ts={};function Ak(e){for(const t in e)ts[t]=e[t],Ic(t)&&(ts[t].isCSSVariable=!0)}function vy(e,{layout:t,layoutId:n}){return Xr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ts[e]||e==="opacity")}const jk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Mk=Qr.length;function Ok(e,t,n){let r="",i=!0;for(let s=0;s({style:{},transform:{},transformOrigin:{},vars:{}});function wy(e,t,n){for(const r in t)!Le(t[r])&&!vy(r,n)&&(e[r]=t[r])}function Dk({transformTemplate:e},t){return R.useMemo(()=>{const n=Zc();return Jc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Ik(e,t){const n=e.style||{},r={};return wy(r,n,e),Object.assign(r,Dk(e,t)),r}function Lk(e,t){const n={},r=Ik(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Nk={offset:"stroke-dashoffset",array:"stroke-dasharray"},$k={offset:"strokeDashoffset",array:"strokeDasharray"};function Fk(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?Nk:$k;e[s.offset]=B.transform(-r);const o=B.transform(t),a=B.transform(n);e[s.array]=`${o} ${a}`}function xy(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,h){if(Jc(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:p}=e;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=(h==null?void 0:h.transformBox)??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Fk(d,i,s,o,!1)}const ky=()=>({...Zc(),attrs:{}}),Sy=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Bk(e,t,n,r){const i=R.useMemo(()=>{const s=ky();return xy(s,t,Sy(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};wy(s,e.style,e),i.style={...s,...i.style}}return i}const Vk=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function eh(e){return typeof e!="string"||e.includes("-")?!1:!!(Vk.indexOf(e)>-1||/[A-Z]/u.test(e))}function Uk(e,t,n,{latestValues:r},i,s=!1){const a=(eh(e)?Bk:Lk)(t,r,i,e),l=Ck(t,typeof e=="string",s),u=e!==R.Fragment?{...l,...a,ref:n}:{},{children:h}=t,d=R.useMemo(()=>Le(h)?h.get():h,[h]);return R.createElement(e,{...u,children:d})}function Yd(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function th(e,t,n,r){if(typeof t=="function"){const[i,s]=Yd(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=Yd(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function no(e){return Le(e)?e.get():e}function zk({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Wk(n,r,i,e),renderState:t()}}function Wk(e,t,n,r){const i={},s=r(e,{});for(const p in s)i[p]=no(s[p]);let{initial:o,animate:a}=e;const l=na(e),u=yy(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let h=n?n.initial===!1:!1;h=h||o===!1;const d=h?a:o;if(d&&typeof d!="boolean"&&!ta(d)){const p=Array.isArray(d)?d:[d];for(let v=0;v(t,n)=>{const r=R.useContext(ea),i=R.useContext(Zo),s=()=>zk(e,t,r,i);return n?s():Cc(s)};function nh(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(Le(r[o])||t.style&&Le(t.style[o])||vy(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const Hk=_y({scrapeMotionValuesFromProps:nh,createRenderState:Zc});function Py(e,t,n){const r=nh(e,t,n);for(const i in e)if(Le(e[i])||Le(t[i])){const s=Qr.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const Kk=_y({scrapeMotionValuesFromProps:Py,createRenderState:ky}),Gk=Symbol.for("motionComponentSymbol");function Tr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function qk(e,t,n){return R.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Tr(n)&&(n.current=r))},[t])}const rh=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Yk="framerAppearId",Ty="data-"+rh(Yk),by=R.createContext({});function Qk(e,t,n,r,i){var _,b;const{visualElement:s}=R.useContext(ea),o=R.useContext(gy),a=R.useContext(Zo),l=R.useContext(Yc).reducedMotion,u=R.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const h=u.current,d=R.useContext(by);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&Xk(u.current,n,i,d);const p=R.useRef(!1);R.useInsertionEffect(()=>{h&&p.current&&h.update(n,a)});const v=n[Ty],k=R.useRef(!!v&&!((_=window.MotionHandoffIsComplete)!=null&&_.call(window,v))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,v)));return _m(()=>{h&&(p.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),k.current&&h.animationState&&h.animationState.animateChanges())}),R.useEffect(()=>{h&&(!k.current&&h.animationState&&h.animationState.animateChanges(),k.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)==null||w.call(window,v)}),k.current=!1),h.enteringChildren=void 0)}),h}function Xk(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Cy(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Tr(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:l,layoutRoot:u})}function Cy(e){if(e)return e.options.allowProjection!==!1?e.projection:Cy(e.parent)}function Ua(e,{forwardMotionProps:t=!1}={},n,r){n&&Pk(n);const i=eh(e)?Kk:Hk;function s(a,l){let u;const h={...R.useContext(Yc),...a,layoutId:Jk(a)},{isStatic:d}=h,p=Rk(a),v=i(a,d);if(!d&&Ec){Zk();const k=eS(h);u=k.MeasureLayout,p.visualElement=Qk(e,v,h,r,k.ProjectionNode)}return C.jsxs(ea.Provider,{value:p,children:[u&&p.visualElement?C.jsx(u,{visualElement:p.visualElement,...h}):null,Uk(e,a,qk(v,p.visualElement,l),v,d,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=R.forwardRef(s);return o[Gk]=e,o}function Jk({layoutId:e}){const t=R.useContext(bc).id;return t&&e!==void 0?t+"-"+e:e}function Zk(e,t){R.useContext(gy).strict}function eS(e){const{drag:t,layout:n}=Wr;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function tS(e,t){if(typeof Proxy>"u")return Ua;const n=new Map,r=(s,o)=>Ua(s,o,e,t),i=(s,o)=>r(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?r:(n.has(o)||n.set(o,Ua(o,void 0,e,t)),n.get(o))})}function Ey({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function nS({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function rS(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function za(e){return e===void 0||e===1}function fu({scale:e,scaleX:t,scaleY:n}){return!za(e)||!za(t)||!za(n)}function $n(e){return fu(e)||Ry(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ry(e){return Qd(e.x)||Qd(e.y)}function Qd(e){return e&&e!=="0%"}function Do(e,t,n){const r=e-n,i=t*r;return n+i}function Xd(e,t,n,r,i){return i!==void 0&&(e=Do(e,i,r)),Do(e,n,r)+t}function pu(e,t=0,n=1,r,i){e.min=Xd(e.min,t,n,r,i),e.max=Xd(e.max,t,n,r,i)}function Ay(e,{x:t,y:n}){pu(e.x,t.translate,t.scale,t.originPoint),pu(e.y,n.translate,n.scale,n.originPoint)}const Jd=.999999999999,Zd=1.0000000000001;function iS(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;aJd&&(t.x=1),t.yJd&&(t.y=1)}function br(e,t){e.min=e.min+t,e.max=e.max+t}function ef(e,t,n,r,i=.5){const s=he(e.min,e.max,i);pu(e,t,n,s,r)}function Cr(e,t){ef(e.x,t.x,t.scaleX,t.scale,t.originX),ef(e.y,t.y,t.scaleY,t.scale,t.originY)}function jy(e,t){return Ey(rS(e.getBoundingClientRect(),t))}function sS(e,t,n){const r=jy(e,n),{scroll:i}=t;return i&&(br(r.x,i.offset.x),br(r.y,i.offset.y)),r}const tf=()=>({translate:0,scale:1,origin:0,originPoint:0}),Er=()=>({x:tf(),y:tf()}),nf=()=>({min:0,max:0}),ve=()=>({x:nf(),y:nf()}),gu={current:null},My={current:!1};function oS(){if(My.current=!0,!!Ec)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gu.current=e.matches;e.addEventListener("change",t),t()}else gu.current=!1}const aS=new WeakMap;function lS(e,t,n){for(const r in t){const i=t[r],s=n[r];if(Le(i))e.addValue(r,i);else if(Le(s))e.addValue(r,zr(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,zr(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const rf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class uS{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Wc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=qe.now();this.renderScheduledAtthis.bindToMotionValue(i,r)),My.current||oS(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gu.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),_n(this.notifyUpdate),_n(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Xr.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ue.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Wr){const n=Wr[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ve()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=zr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Pm(r)||bm(r))?r=parseFloat(r):!yk(r)&&Pn.test(n)&&(r=ay(t,n)),this.setBaseTarget(t,Le(r)?r.get():r)),Le(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=th(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Le(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Mc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Gc.render(this.render)}}class Oy extends uS{constructor(){super(...arguments),this.KeyframeResolver=sk}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Le(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Dy(e,{style:t,vars:n},r,i){const s=e.style;let o;for(o in t)s[o]=t[o];i==null||i.applyProjectionStyles(s,r);for(o in n)s.setProperty(o,n[o])}function cS(e){return window.getComputedStyle(e)}class hS extends Oy{constructor(){super(...arguments),this.type="html",this.renderInstance=Dy}readValueFromInstance(t,n){var r;if(Xr.has(n))return(r=this.projection)!=null&&r.isProjecting?ou(n):P1(t,n);{const i=cS(t),s=(Ic(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return jy(t,n)}build(t,n,r){Jc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return nh(t,n,r)}}const Iy=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function dS(e,t,n,r){Dy(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Iy.has(i)?i:rh(i),t.attrs[i])}class fS extends Oy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ve}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Xr.has(n)){const r=oy(n);return r&&r.default||0}return n=Iy.has(n)?n:rh(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Py(t,n,r)}build(t,n,r){xy(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){dS(t,n,r,i)}mount(t){this.isSVGTag=Sy(t.tagName),super.mount(t)}}const pS=(e,t)=>eh(e)?new fS(t):new hS(t,{allowProjection:e!==R.Fragment});function Ir(e,t,n){const r=e.getProps();return th(r,t,n!==void 0?n:r.custom,e)}const mu=e=>Array.isArray(e);function gS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zr(n))}function mS(e){return mu(e)?e[e.length-1]||0:e}function yS(e,t){const n=Ir(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=mS(s[o]);gS(e,o,a)}}function vS(e){return!!(Le(e)&&e.add)}function yu(e,t){const n=e.getValue("willChange");if(vS(n))return n.add(t);if(!n&&Jt.WillChange){const r=new Jt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Ly(e){return e.props[Ty]}const wS=e=>e!==null;function xS(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(wS),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const kS={type:"spring",stiffness:500,damping:25,restSpeed:10},SS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_S={type:"keyframes",duration:.8},PS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},TS=(e,{keyframes:t})=>t.length>2?_S:Xr.has(e)?e.startsWith("scale")?SS(t[1]):kS:PS;function bS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...h}){return!!Object.keys(h).length}const ih=(e,t,n,r={},i,s)=>o=>{const a=Hc(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Lt(l);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};bS(a)||Object.assign(h,TS(e,h)),h.duration&&(h.duration=Lt(h.duration)),h.repeatDelay&&(h.repeatDelay=Lt(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let d=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(hu(h),h.delay===0&&(d=!0)),(Jt.instantAnimations||Jt.skipAnimations)&&(d=!0,hu(h),h.delay=0),h.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const p=xS(h.keyframes,a);if(p!==void 0){ue.update(()=>{h.onUpdate(p),h.onComplete()});return}}return a.isSync?new zc(h):new G1(h)};function CS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ny(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const h in a){const d=e.getValue(h,e.latestValues[h]??null),p=a[h];if(p===void 0||u&&CS(u,h))continue;const v={delay:n,...Hc(s||{},h)},k=d.get();if(k!==void 0&&!d.isAnimating&&!Array.isArray(p)&&p===k&&!v.velocity)continue;let _=!1;if(window.MotionHandoffAnimation){const w=Ly(e);if(w){const y=window.MotionHandoffAnimation(w,h,ue);y!==null&&(v.startTime=y,_=!0)}}yu(e,h),d.start(ih(h,d,p,e.shouldReduceMotion&&ry.has(h)?{type:!1}:v,e,_));const b=d.animation;b&&l.push(b)}return o&&Promise.all(l).then(()=>{ue.update(()=>{o&&yS(e,o)})}),l}function $y(e,t,n,r=0,i=1){const s=Array.from(e).sort((u,h)=>u.sortNodePosition(h)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}function vu(e,t,n={}){var l;const r=Ir(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Ny(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:d,staggerDirection:p}=i;return ES(e,t,u,h,d,p,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,h]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>h())}else return Promise.all([s(),o(n.delay)])}function ES(e,t,n=0,r=0,i=0,s=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(vu(l,t,{...o,delay:n+(typeof r=="function"?0:r)+$y(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function RS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>vu(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=vu(e,t,n);else{const i=typeof t=="function"?Ir(e,t,n.custom):t;r=Promise.all(Ny(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Fy(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:n,options:r})=>RS(e,n,r)))}function DS(e){let t=OS(e),n=sf(),r=!0;const i=l=>(u,h)=>{var p;const d=Ir(e,h,l==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(d){const{transition:v,transitionEnd:k,..._}=d;u={...u,..._,...k}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,h=By(e.parent)||{},d=[],p=new Set;let v={},k=1/0;for(let b=0;bk&&c,E=!1;const A=Array.isArray(g)?g:[g];let D=A.reduce(i(w),{});f===!1&&(D={});const{prevResolvedValues:X={}}=y,Q={...X,...D},L=z=>{S=!0,p.has(z)&&(E=!0,p.delete(z)),y.needsAnimating[z]=!0;const M=e.getValue(z);M&&(M.liveStyle=!1)};for(const z in Q){const M=D[z],N=X[z];if(v.hasOwnProperty(z))continue;let T=!1;mu(M)&&mu(N)?T=!Fy(M,N):T=M!==N,T?M!=null?L(z):p.add(z):M!==void 0&&p.has(z)?L(z):y.protectedKeys[z]=!0}y.prevProp=g,y.prevResolvedValues=D,y.isActive&&(v={...v,...D}),r&&e.blockInitialAnimation&&(S=!1);const U=m&&x;S&&(!U||E)&&d.push(...A.map(z=>{const M={type:w};if(typeof z=="string"&&r&&!U&&e.manuallyAnimateOnMount&&e.parent){const{parent:N}=e,T=Ir(N,z);if(N.enteringChildren&&T){const{delayChildren:P}=T.transition||{};M.delay=$y(N.enteringChildren,e,P)}}return{animation:z,options:M}}))}if(p.size){const b={};if(typeof u.initial!="boolean"){const w=Ir(e,Array.isArray(u.initial)?u.initial[0]:u.initial);w&&w.transition&&(b.transition=w.transition)}p.forEach(w=>{const y=e.getBaseTarget(w),g=e.getValue(w);g&&(g.liveStyle=!0),b[w]=y??null}),d.push({animation:b})}let _=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(_=!1),r=!1,_?t(d):Promise.resolve()}function a(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(p=>{var v;return(v=p.animationState)==null?void 0:v.setActive(l,u)}),n[l].isActive=u;const h=o(l);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=sf()}}}function IS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Fy(t,e):!1}function Mn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sf(){return{animate:Mn(!0),whileInView:Mn(),whileHover:Mn(),whileTap:Mn(),whileDrag:Mn(),whileFocus:Mn(),exit:Mn()}}class Rn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class LS extends Rn{constructor(t){super(t),t.animationState||(t.animationState=DS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ta(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let NS=0;class $S extends Rn{constructor(){super(...arguments),this.id=NS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const FS={animation:{Feature:LS},exit:{Feature:$S}};function ns(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ds(e){return{point:{x:e.pageX,y:e.pageY}}}const BS=e=>t=>qc(t)&&e(t,ds(t));function Ei(e,t,n,r){return ns(e,t,BS(n),r)}const Vy=1e-4,VS=1-Vy,US=1+Vy,Uy=.01,zS=0-Uy,WS=0+Uy;function Be(e){return e.max-e.min}function HS(e,t,n){return Math.abs(e-t)<=n}function of(e,t,n,r=.5){e.origin=r,e.originPoint=he(t.min,t.max,e.origin),e.scale=Be(n)/Be(t),e.translate=he(n.min,n.max,e.origin)-e.originPoint,(e.scale>=VS&&e.scale<=US||isNaN(e.scale))&&(e.scale=1),(e.translate>=zS&&e.translate<=WS||isNaN(e.translate))&&(e.translate=0)}function Ri(e,t,n,r){of(e.x,t.x,n.x,r?r.originX:void 0),of(e.y,t.y,n.y,r?r.originY:void 0)}function af(e,t,n){e.min=n.min+t.min,e.max=e.min+Be(t)}function KS(e,t,n){af(e.x,t.x,n.x),af(e.y,t.y,n.y)}function lf(e,t,n){e.min=t.min-n.min,e.max=e.min+Be(t)}function Ai(e,t,n){lf(e.x,t.x,n.x),lf(e.y,t.y,n.y)}function at(e){return[e("x"),e("y")]}const zy=({current:e})=>e?e.ownerDocument.defaultView:null,uf=(e,t)=>Math.abs(e-t);function GS(e,t){const n=uf(e.x,t.x),r=uf(e.y,t.y);return Math.sqrt(n**2+r**2)}class Wy{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Ha(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,k=GS(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!k)return;const{point:_}=p,{timestamp:b}=Ae;this.history.push({..._,timestamp:b});const{onStart:w,onMove:y}=this.handlers;v||(w&&w(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,p)},this.handlePointerMove=(p,v)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Wa(v,this.transformPagePoint),ue.update(this.updatePoint,!0)},this.handlePointerUp=(p,v)=>{this.end();const{onEnd:k,onSessionEnd:_,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Ha(p.type==="pointercancel"?this.lastMoveEventInfo:Wa(v,this.transformPagePoint),this.history);this.startEvent&&k&&k(p,w),_&&_(p,w)},!qc(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const a=ds(t),l=Wa(a,this.transformPagePoint),{point:u}=l,{timestamp:h}=Ae;this.history=[{...u,timestamp:h}];const{onSessionStart:d}=n;d&&d(t,Ha(l,this.history)),this.removeListeners=us(Ei(this.contextWindow,"pointermove",this.handlePointerMove),Ei(this.contextWindow,"pointerup",this.handlePointerUp),Ei(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),_n(this.updatePoint)}}function Wa(e,t){return t?{point:t(e.point)}:e}function cf(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ha({point:e},t){return{point:e,delta:cf(e,Hy(t)),offset:cf(e,qS(t)),velocity:YS(t,.1)}}function qS(e){return e[0]}function Hy(e){return e[e.length-1]}function YS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Hy(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Lt(t)));)n--;if(!r)return{x:0,y:0};const s=ht(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function QS(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?he(n,e,r.max):Math.min(e,n)),e}function hf(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function XS(e,{top:t,left:n,bottom:r,right:i}){return{x:hf(e.x,n,i),y:hf(e.y,t,r)}}function df(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Xi(t.min,t.max-r,e.min):r>i&&(n=Xi(e.min,e.max-i,t.min)),Xt(0,1,n)}function e_(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const wu=.35;function t_(e=wu){return e===!1?e=0:e===!0&&(e=wu),{x:ff(e,"left","right"),y:ff(e,"top","bottom")}}function ff(e,t,n){return{min:pf(e,t),max:pf(e,n)}}function pf(e,t){return typeof e=="number"?e:e[t]||0}const n_=new WeakMap;class r_{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ve(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ds(d).point)},o=(d,p)=>{const{drag:v,dragPropagation:k,onDragStart:_}=this.getProps();if(v&&!k&&(this.openDragLock&&this.openDragLock(),this.openDragLock=uk(v),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),at(w=>{let y=this.getAxisMotionValue(w).get()||0;if(Nt.test(y)){const{projection:g}=this.visualElement;if(g&&g.layout){const c=g.layout.layoutBox[w];c&&(y=Be(c)*(parseFloat(y)/100))}}this.originPoint[w]=y}),_&&ue.postRender(()=>_(d,p)),yu(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p;const{dragPropagation:v,dragDirectionLock:k,onDirectionLock:_,onDrag:b}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:w}=p;if(k&&this.currentDirection===null){this.currentDirection=i_(w),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",p.point,w),this.updateAxis("y",p.point,w),this.visualElement.render(),b&&b(d,p)},l=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p,this.stop(d,p),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>at(d=>{var p;return this.getAnimationState(d)==="paused"&&((p=this.getAxisMotionValue(d).animation)==null?void 0:p.play())}),{dragSnapToOrigin:h}=this.getProps();this.panSession=new Wy(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:zy(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ue.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Ns(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=QS(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&Tr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=XS(r.layoutBox,t):this.constraints=!1,this.elastic=t_(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&at(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=e_(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Tr(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=sS(r,i.root,this.visualElement.getTransformPagePoint());let o=JS(i.layout.layoutBox,s);if(n){const a=n(nS(o));this.hasMutatedConstraints=!!a,a&&(o=Ey(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=at(h=>{if(!Ns(h,n,this.currentDirection))return;let d=l&&l[h]||{};o&&(d={min:0,max:0});const p=i?200:1e6,v=i?40:1e7,k={type:"inertia",velocity:r?t[h]:0,bounceStiffness:p,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(h,k)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return yu(this.visualElement,t),r.start(ih(t,r,0,n,this.visualElement,!1))}stopAnimation(){at(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){at(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){at(n=>{const{drag:r}=this.getProps();if(!Ns(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-he(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Tr(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};at(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=ZS({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),at(o=>{if(!Ns(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(he(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;n_.set(this.visualElement,this);const t=this.visualElement.current,n=Ei(t,"pointerdown",l=>{const{drag:u,dragListener:h=!0}=this.getProps();u&&h&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Tr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ue.read(r);const o=ns(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(at(h=>{const d=this.getAxisMotionValue(h);d&&(this.originPoint[h]+=l[h].translate,d.set(d.get()+l[h].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=wu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Ns(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function i_(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class s_ extends Rn{constructor(t){super(t),this.removeGroupControls=ft,this.removeListeners=ft,this.controls=new r_(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ft}unmount(){this.removeGroupControls(),this.removeListeners()}}const gf=e=>(t,n)=>{e&&ue.postRender(()=>e(t,n))};class o_ extends Rn{constructor(){super(...arguments),this.removePointerDownListener=ft}onPointerDown(t){this.session=new Wy(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:zy(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:gf(t),onStart:gf(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&ue.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Ei(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ro={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function mf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const li={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(B.test(e))e=parseFloat(e);else return e;const n=mf(e,t.target.x),r=mf(e,t.target.y);return`${n}% ${r}%`}},a_={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Pn.parse(e);if(i.length>5)return r;const s=Pn.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=he(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};let Ka=!1;class l_ extends R.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;Ak(u_),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),Ka&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ro.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,Ka=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||ue.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Gc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Ka=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ky(e){const[t,n]=py(),r=R.useContext(bc);return C.jsx(l_,{...e,layoutGroup:r,switchLayoutGroup:R.useContext(by),isPresent:t,safeToRemove:n})}const u_={borderRadius:{...li,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:li,borderTopRightRadius:li,borderBottomLeftRadius:li,borderBottomRightRadius:li,boxShadow:a_};function c_(e,t,n){const r=Le(e)?e:zr(e);return r.start(ih("",r,t,n)),r.animation}const h_=(e,t)=>e.depth-t.depth;class d_{constructor(){this.children=[],this.isDirty=!1}add(t){Rc(this.children,t),this.isDirty=!0}remove(t){Ac(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(h_),this.isDirty=!1,this.children.forEach(t)}}function f_(e,t){const n=qe.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(_n(r),e(s-t))};return ue.setup(r,!0),()=>_n(r)}const Gy=["TopLeft","TopRight","BottomLeft","BottomRight"],p_=Gy.length,yf=e=>typeof e=="string"?parseFloat(e):e,vf=e=>typeof e=="number"||B.test(e);function g_(e,t,n,r,i,s){i?(e.opacity=he(0,n.opacity??1,m_(r)),e.opacityExit=he(t.opacity??1,0,y_(r))):s&&(e.opacity=he(t.opacity??1,n.opacity??1,r));for(let o=0;ort?1:n(Xi(e,t,r))}function xf(e,t){e.min=t.min,e.max=t.max}function ot(e,t){xf(e.x,t.x),xf(e.y,t.y)}function kf(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Sf(e,t,n,r,i){return e-=t,e=Do(e,1/n,r),i!==void 0&&(e=Do(e,1/i,r)),e}function v_(e,t=0,n=1,r=.5,i,s=e,o=e){if(Nt.test(t)&&(t=parseFloat(t),t=he(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=he(s.min,s.max,r);e===s&&(a-=t),e.min=Sf(e.min,t,n,a,i),e.max=Sf(e.max,t,n,a,i)}function _f(e,t,[n,r,i],s,o){v_(e,t[n],t[r],t[i],t.scale,s,o)}const w_=["x","scaleX","originX"],x_=["y","scaleY","originY"];function Pf(e,t,n,r){_f(e.x,t,w_,n?n.x:void 0,r?r.x:void 0),_f(e.y,t,x_,n?n.y:void 0,r?r.y:void 0)}function Tf(e){return e.translate===0&&e.scale===1}function Yy(e){return Tf(e.x)&&Tf(e.y)}function bf(e,t){return e.min===t.min&&e.max===t.max}function k_(e,t){return bf(e.x,t.x)&&bf(e.y,t.y)}function Cf(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Qy(e,t){return Cf(e.x,t.x)&&Cf(e.y,t.y)}function Ef(e){return Be(e.x)/Be(e.y)}function Rf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class S_{constructor(){this.members=[]}add(t){Rc(this.members,t),t.scheduleRender()}remove(t){if(Ac(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function __(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:h,rotateX:d,rotateY:p,skewX:v,skewY:k}=n;u&&(r=`perspective(${u}px) ${r}`),h&&(r+=`rotate(${h}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),v&&(r+=`skewX(${v}deg) `),k&&(r+=`skewY(${k}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Ga=["","X","Y","Z"],P_=1e3;let T_=0;function qa(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Xy(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ly(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ue,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Xy(r)}function Jy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=T_++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(E_),this.nodes.forEach(M_),this.nodes.forEach(O_),this.nodes.forEach(R_)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;ue.read(()=>{d=window.innerWidth}),e(o,()=>{const v=window.innerWidth;v!==d&&(d=v,this.root.updateBlockedByResize=!0,h&&h(),h=f_(p,250),ro.hasAnimatedSinceResize&&(ro.hasAnimatedSinceResize=!1,this.nodes.forEach(Mf)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:d,hasRelativeLayoutChanged:p,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=this.options.transition||u.getDefaultTransition()||$_,{onLayoutAnimationStart:_,onLayoutAnimationComplete:b}=u.getProps(),w=!this.targetLayout||!Qy(this.targetLayout,v),y=!d&&p;if(this.options.layoutRoot||this.resumeFrom||y||d&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const g={...Hc(k,"layout"),onPlay:_,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(g.delay=0,g.type=!1),this.startAnimation(g),this.setAnimationOrigin(h,y)}else d||Mf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),_n(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(D_),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Xy(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Be(this.snapshot.measuredBox.x)&&!Be(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const f=c/1e3;Of(d.x,o.x,f),Of(d.y,o.y,f),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ai(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),L_(this.relativeTarget,this.relativeTargetOrigin,p,f),g&&k_(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=ve()),ot(g,this.relativeTarget)),_&&(this.animationValues=h,g_(h,u,this.latestValues,f,y,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=f},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(_n(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ue.update(()=>{ro.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=zr(0)),this.currentAnimation=c_(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),o.onUpdate&&o.onUpdate(h)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(P_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:h}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Zy(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ve();const d=Be(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const p=Be(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}ot(a,l),Cr(a,h),Ri(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new S_),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&qa("z",o,u,this.animationValues);for(let h=0;h{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Af),this.root.sharedNodes.clear()}}}function b_(e){e.updateLayout()}function C_(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?at(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],v=Be(p);p.min=r[d].min,p.max=p.min+v}):Zy(s,t.layoutBox,r)&&at(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],v=Be(r[d]);p.max=p.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+v)});const a=Er();Ri(a,r,t.layoutBox);const l=Er();o?Ri(l,e.applyTransform(i,!0),t.measuredBox):Ri(l,r,t.layoutBox);const u=!Yy(a);let h=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:v}=d;if(p&&v){const k=ve();Ai(k,t.layoutBox,p.layoutBox);const _=ve();Ai(_,r,v.layoutBox),Qy(k,_)||(h=!0),d.options.layoutRoot&&(e.relativeTarget=_,e.relativeTargetOrigin=k,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function E_(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function R_(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function A_(e){e.clearSnapshot()}function Af(e){e.clearMeasurements()}function jf(e){e.isLayoutDirty=!1}function j_(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function M_(e){e.resolveTargetDelta()}function O_(e){e.calcProjection()}function D_(e){e.resetSkewAndRotation()}function I_(e){e.removeLeadSnapshot()}function Of(e,t,n){e.translate=he(t.translate,0,n),e.scale=he(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Df(e,t,n,r){e.min=he(t.min,n.min,r),e.max=he(t.max,n.max,r)}function L_(e,t,n,r){Df(e.x,t.x,n.x,r),Df(e.y,t.y,n.y,r)}function N_(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const $_={duration:.45,ease:[.4,0,.1,1]},If=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Lf=If("applewebkit/")&&!If("chrome/")?Math.round:ft;function Nf(e){e.min=Lf(e.min),e.max=Lf(e.max)}function F_(e){Nf(e.x),Nf(e.y)}function Zy(e,t,n){return e==="position"||e==="preserve-aspect"&&!HS(Ef(t),Ef(n),.2)}function B_(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const V_=Jy({attachResizeListener:(e,t)=>ns(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ya={current:void 0},e0=Jy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ya.current){const e=new V_({});e.mount(window),e.setOptions({layoutScroll:!0}),Ya.current=e}return Ya.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),U_={pan:{Feature:o_},drag:{Feature:s_,ProjectionNode:e0,MeasureLayout:Ky}};function $f(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&ue.postRender(()=>s(t,ds(t)))}class z_ extends Rn{mount(){const{current:t}=this.node;t&&(this.unmount=ck(t,(n,r)=>($f(this.node,r,"Start"),i=>$f(this.node,i,"End"))))}unmount(){}}class W_ extends Rn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=us(ns(this.node.current,"focus",()=>this.onFocus()),ns(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ff(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&ue.postRender(()=>s(t,ds(t)))}class H_ extends Rn{mount(){const{current:t}=this.node;t&&(this.unmount=pk(t,(n,r)=>(Ff(this.node,r,"Start"),(i,{success:s})=>Ff(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const xu=new WeakMap,Qa=new WeakMap,K_=e=>{const t=xu.get(e.target);t&&t(e)},G_=e=>{e.forEach(K_)};function q_({root:e,...t}){const n=e||document;Qa.has(n)||Qa.set(n,{});const r=Qa.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(G_,{root:e,...t})),r[i]}function Y_(e,t,n){const r=q_(t);return xu.set(e,n),r.observe(e),()=>{xu.delete(e),r.unobserve(e)}}const Q_={some:0,all:1};class X_ extends Rn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Q_[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:h,onViewportLeave:d}=this.node.getProps(),p=u?h:d;p&&p(l)};return Y_(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(J_(t,n))&&this.startObserver()}unmount(){}}function J_({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Z_={inView:{Feature:X_},tap:{Feature:H_},focus:{Feature:W_},hover:{Feature:z_}},eP={layout:{ProjectionNode:e0,MeasureLayout:Ky}},tP={...FS,...Z_,...U_,...eP},Ft=tS(tP,pS);function t0({code:e,language:t="rust"}){const n=R.useMemo(()=>e.split(` +`).map((i,s)=>({number:s+1,code:nP(i)})),[e]);return C.jsx("pre",{className:"text-sm overflow-x-auto bg-zinc-900 rounded-lg p-2",style:{fontFamily:"'Fira Code', Fira Code, 'Courier New', monospace"},children:C.jsx("code",{className:"block",children:n.map(r=>C.jsxs("div",{className:"flex",children:[C.jsx("span",{className:"inline-block w-8 text-right pr-4 text-zinc-500 select-none flex-shrink-0 py-0 leading-relaxed",children:r.number}),C.jsx("span",{className:"flex-1 py-0 leading-relaxed",dangerouslySetInnerHTML:{__html:r.code}})]},r.number))})})}function nP(e){const t=["use","async","await","fn","let","mut","return","if","else","match","while","for","loop","break","continue","impl","trait","struct","enum","pub","mod","const","static","type","where","unsafe","extern","crate","move","as","ref","in","self","Self"],n=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","bool","char","str","String","Vec","Option","Result","Box","Rc","Arc","HashMap","HashSet","BTreeMap","BTreeSet","Ok","Err","Some","None","Client","PublicKey","ListBuilder","anyhow"],r=["println!","print!","vec!","format!","panic!","assert!","tokio::main"];let i=e;return i=i.replace(/&/g,"&").replace(//g,">"),i=i.replace(/"([^"\\]*(\\.[^"\\]*)*)"/g,'"$1"'),i=i.replace(/\/\/.*/g,'$&'),i=i.replace(/\/\*[\s\S]*?\*\//g,'$&'),i=i.replace(/\b(\d+\.?\d*|\.\d+)\b/g,'$1'),t.forEach(s=>{const o=new RegExp(`\\b${s}\\b`,"g");i=i.replace(o,`${s}`)}),n.forEach(s=>{const o=new RegExp(`\\b${s}\\b`,"g");i=i.replace(o,`${s}`)}),r.forEach(s=>{const o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(o,"g");i=i.replace(a,`${s}`)}),i=i.replace(/#\[([^\]]+)\]/g,'#[$1]'),i=i.replace(/\b([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/g,'$1('),i=i.replace(/(\?|&|\||->|=>|::)/g,'$1'),`${i}`}const rP="modulepreload",iP=function(e){return"/"+e},Bf={},fs=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=iP(l),l in Bf)return;Bf[l]=!0;const u=l.endsWith(".css"),h=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${h}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":rP,u||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)return new Promise((p,v)=>{d.addEventListener("load",p),d.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},sP=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>fs(async()=>{const{default:r}=await Promise.resolve().then(()=>Jr);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)};class sh extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class oP extends sh{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Vf extends sh{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Uf extends sh{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var ku;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(ku||(ku={}));var aP=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class lP{constructor(t,{headers:n={},customFetch:r,region:i=ku.Any}={}){this.url=t,this.headers=n,this.region=i,this.fetch=sP(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var r;return aP(this,void 0,void 0,function*(){try{const{headers:i,method:s,body:o}=n;let a={},{region:l}=n;l||(l=this.region);const u=new URL(`${this.url}/${t}`);l&&l!=="any"&&(a["x-region"]=l,u.searchParams.set("forceFunctionRegion",l));let h;o&&(i&&!Object.prototype.hasOwnProperty.call(i,"Content-Type")||!i)&&(typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",h=o):typeof o=="string"?(a["Content-Type"]="text/plain",h=o):typeof FormData<"u"&&o instanceof FormData?h=o:(a["Content-Type"]="application/json",h=JSON.stringify(o)));const d=yield this.fetch(u.toString(),{method:s||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),i),body:h}).catch(_=>{throw new oP(_)}),p=d.headers.get("x-relay-error");if(p&&p==="true")throw new Vf(d);if(!d.ok)throw new Uf(d);let v=((r=d.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),k;return v==="application/json"?k=yield d.json():v==="application/octet-stream"?k=yield d.blob():v==="text/event-stream"?k=d:v==="multipart/form-data"?k=yield d.formData():k=yield d.text(),{data:k,error:null,response:d}}catch(i){return{data:null,error:i,response:i instanceof Uf||i instanceof Vf?i.context:void 0}}})}}var Ke={},oh={},ra={},ps={},ia={},sa={},uP=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},Hr=uP();const cP=Hr.fetch,n0=Hr.fetch.bind(Hr),r0=Hr.Headers,hP=Hr.Request,dP=Hr.Response,Jr=Object.freeze(Object.defineProperty({__proto__:null,Headers:r0,Request:hP,Response:dP,default:n0,fetch:cP},Symbol.toStringTag,{value:"Module"})),fP=L0(Jr);var oa={};Object.defineProperty(oa,"__esModule",{value:!0});let pP=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}};oa.default=pP;var i0=tt&&tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sa,"__esModule",{value:!0});const gP=i0(fP),mP=i0(oa);let yP=class{constructor(t){var n,r;this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(n=t.shouldThrowOnError)!==null&&n!==void 0?n:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,t.fetch?this.fetch=t.fetch:typeof fetch>"u"?this.fetch=gP.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,n){return this.headers=new Headers(this.headers),this.headers.set(t,n),this}then(t,n){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const r=this.fetch;let i=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async s=>{var o,a,l,u;let h=null,d=null,p=null,v=s.status,k=s.statusText;if(s.ok){if(this.method!=="HEAD"){const y=await s.text();y===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((o=this.headers.get("Accept"))===null||o===void 0)&&o.includes("application/vnd.pgrst.plan+text"))?d=y:d=JSON.parse(y))}const b=(a=this.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),w=(l=s.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");b&&w&&w.length>1&&(p=parseInt(w[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(d)&&(d.length>1?(h={code:"PGRST116",details:`Results contain ${d.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},d=null,p=null,v=406,k="Not Acceptable"):d.length===1?d=d[0]:d=null)}else{const b=await s.text();try{h=JSON.parse(b),Array.isArray(h)&&s.status===404&&(d=[],h=null,v=200,k="OK")}catch{s.status===404&&b===""?(v=204,k="No Content"):h={message:b}}if(h&&this.isMaybeSingle&&(!((u=h==null?void 0:h.details)===null||u===void 0)&&u.includes("0 rows"))&&(h=null,v=200,k="OK"),h&&this.shouldThrowOnError)throw new mP.default(h)}return{error:h,data:d,count:p,status:v,statusText:k}});return this.shouldThrowOnError||(i=i.catch(s=>{var o,a,l;return{error:{message:`${(o=s==null?void 0:s.name)!==null&&o!==void 0?o:"FetchError"}: ${s==null?void 0:s.message}`,details:`${(a=s==null?void 0:s.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=s==null?void 0:s.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),i.then(t,n)}returns(){return this}overrideTypes(){return this}};sa.default=yP;var vP=tt&&tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ia,"__esModule",{value:!0});const wP=vP(sa);let xP=class extends wP.default{select(t){let n=!1;const r=(t??"*").split("").map(i=>/\s/.test(i)&&!n?"":(i==='"'&&(n=!n),i)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:n=!0,nullsFirst:r,foreignTable:i,referencedTable:s=i}={}){const o=s?`${s}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${t}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:n,referencedTable:r=n}={}){const i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${t}`),this}range(t,n,{foreignTable:r,referencedTable:i=r}={}){const s=typeof i>"u"?"offset":`${i}.offset`,o=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(o,`${n-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:n=!1,settings:r=!1,buffers:i=!1,wal:s=!1,format:o="text"}={}){var a;const l=[t?"analyze":null,n?"verbose":null,r?"settings":null,i?"buffers":null,s?"wal":null].filter(Boolean).join("|"),u=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${u}"; options=${l};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};ia.default=xP;var kP=tt&&tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ps,"__esModule",{value:!0});const SP=kP(ia);let _P=class extends SP.default{eq(t,n){return this.url.searchParams.append(t,`eq.${n}`),this}neq(t,n){return this.url.searchParams.append(t,`neq.${n}`),this}gt(t,n){return this.url.searchParams.append(t,`gt.${n}`),this}gte(t,n){return this.url.searchParams.append(t,`gte.${n}`),this}lt(t,n){return this.url.searchParams.append(t,`lt.${n}`),this}lte(t,n){return this.url.searchParams.append(t,`lte.${n}`),this}like(t,n){return this.url.searchParams.append(t,`like.${n}`),this}likeAllOf(t,n){return this.url.searchParams.append(t,`like(all).{${n.join(",")}}`),this}likeAnyOf(t,n){return this.url.searchParams.append(t,`like(any).{${n.join(",")}}`),this}ilike(t,n){return this.url.searchParams.append(t,`ilike.${n}`),this}ilikeAllOf(t,n){return this.url.searchParams.append(t,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(t,n){return this.url.searchParams.append(t,`ilike(any).{${n.join(",")}}`),this}is(t,n){return this.url.searchParams.append(t,`is.${n}`),this}in(t,n){const r=Array.from(new Set(n)).map(i=>typeof i=="string"&&new RegExp("[,()]").test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}contains(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cs.{${n.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(n)}`),this}containedBy(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cd.{${n.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(n)}`),this}rangeGt(t,n){return this.url.searchParams.append(t,`sr.${n}`),this}rangeGte(t,n){return this.url.searchParams.append(t,`nxl.${n}`),this}rangeLt(t,n){return this.url.searchParams.append(t,`sl.${n}`),this}rangeLte(t,n){return this.url.searchParams.append(t,`nxr.${n}`),this}rangeAdjacent(t,n){return this.url.searchParams.append(t,`adj.${n}`),this}overlaps(t,n){return typeof n=="string"?this.url.searchParams.append(t,`ov.${n}`):this.url.searchParams.append(t,`ov.{${n.join(",")}}`),this}textSearch(t,n,{config:r,type:i}={}){let s="";i==="plain"?s="pl":i==="phrase"?s="ph":i==="websearch"&&(s="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${s}fts${o}.${n}`),this}match(t){return Object.entries(t).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(t,n,r){return this.url.searchParams.append(t,`not.${n}.${r}`),this}or(t,{foreignTable:n,referencedTable:r=n}={}){const i=r?`${r}.or`:"or";return this.url.searchParams.append(i,`(${t})`),this}filter(t,n,r){return this.url.searchParams.append(t,`${n}.${r}`),this}};ps.default=_P;var PP=tt&&tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ra,"__esModule",{value:!0});const ui=PP(ps);let TP=class{constructor(t,{headers:n={},schema:r,fetch:i}){this.url=t,this.headers=new Headers(n),this.schema=r,this.fetch=i}select(t,{head:n=!1,count:r}={}){const i=n?"HEAD":"GET";let s=!1;const o=(t??"*").split("").map(a=>/\s/.test(a)&&!s?"":(a==='"'&&(s=!s),a)).join("");return this.url.searchParams.set("select",o),r&&this.headers.append("Prefer",`count=${r}`),new ui.default({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(t,{count:n,defaultToNull:r=!0}={}){var i;const s="POST";if(n&&this.headers.append("Prefer",`count=${n}`),r||this.headers.append("Prefer","missing=default"),Array.isArray(t)){const o=t.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(o.length>0){const a=[...new Set(o)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new ui.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}upsert(t,{onConflict:n,ignoreDuplicates:r=!1,count:i,defaultToNull:s=!0}={}){var o;const a="POST";if(this.headers.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),n!==void 0&&this.url.searchParams.set("on_conflict",n),i&&this.headers.append("Prefer",`count=${i}`),s||this.headers.append("Prefer","missing=default"),Array.isArray(t)){const l=t.reduce((u,h)=>u.concat(Object.keys(h)),[]);if(l.length>0){const u=[...new Set(l)].map(h=>`"${h}"`);this.url.searchParams.set("columns",u.join(","))}}return new ui.default({method:a,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}update(t,{count:n}={}){var r;const i="PATCH";return n&&this.headers.append("Prefer",`count=${n}`),new ui.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:t}={}){var n;const r="DELETE";return t&&this.headers.append("Prefer",`count=${t}`),new ui.default({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}};ra.default=TP;var s0=tt&&tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oh,"__esModule",{value:!0});const bP=s0(ra),CP=s0(ps);let EP=class o0{constructor(t,{headers:n={},schema:r,fetch:i}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.fetch=i}from(t){const n=new URL(`${this.url}/${t}`);return new bP.default(n,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new o0(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:i=!1,count:s}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;r||i?(a=r?"HEAD":"GET",Object.entries(n).filter(([d,p])=>p!==void 0).map(([d,p])=>[d,Array.isArray(p)?`{${p.join(",")}}`:`${p}`]).forEach(([d,p])=>{l.searchParams.append(d,p)})):(a="POST",u=n);const h=new Headers(this.headers);return s&&h.set("Prefer",`count=${s}`),new CP.default({method:a,url:l,headers:h,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}};oh.default=EP;var Zr=tt&&tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.PostgrestError=Ke.PostgrestBuilder=Ke.PostgrestTransformBuilder=Ke.PostgrestFilterBuilder=Ke.PostgrestQueryBuilder=Ke.PostgrestClient=void 0;const a0=Zr(oh);Ke.PostgrestClient=a0.default;const l0=Zr(ra);Ke.PostgrestQueryBuilder=l0.default;const u0=Zr(ps);Ke.PostgrestFilterBuilder=u0.default;const c0=Zr(ia);Ke.PostgrestTransformBuilder=c0.default;const h0=Zr(sa);Ke.PostgrestBuilder=h0.default;const d0=Zr(oa);Ke.PostgrestError=d0.default;var RP=Ke.default={PostgrestClient:a0.default,PostgrestQueryBuilder:l0.default,PostgrestFilterBuilder:u0.default,PostgrestTransformBuilder:c0.default,PostgrestBuilder:h0.default,PostgrestError:d0.default};const{PostgrestClient:AP,PostgrestQueryBuilder:Ub,PostgrestFilterBuilder:zb,PostgrestTransformBuilder:Wb,PostgrestBuilder:Hb,PostgrestError:Kb}=RP;class jP{static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"){const n=process.versions;if(n&&n.node){const r=n.node,i=parseInt(r.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: +import ws from "ws" +new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=` + +Suggested solution: ${t.workaround}`),new Error(n)}static createWebSocket(t,n){const r=this.getWebSocketConstructor();return new r(t,n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const MP="2.15.5",OP=`realtime-js/${MP}`,DP="1.0.0",Su=1e4,IP=1e3,LP=100;var ji;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(ji||(ji={}));var Se;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Se||(Se={}));var _t;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(_t||(_t={}));var _u;(function(e){e.websocket="websocket"})(_u||(_u={}));var Bn;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Bn||(Bn={}));class NP{constructor(){this.HEADER_LENGTH=1}decode(t,n){return t.constructor===ArrayBuffer?n(this._binaryDecode(t)):n(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const n=new DataView(t),r=new TextDecoder;return this._decodeBroadcast(t,n,r)}_decodeBroadcast(t,n,r){const i=n.getUint8(1),s=n.getUint8(2);let o=this.HEADER_LENGTH+2;const a=r.decode(t.slice(o,o+i));o=o+i;const l=r.decode(t.slice(o,o+s));o=o+s;const u=JSON.parse(r.decode(t.slice(o,t.byteLength)));return{ref:null,topic:a,event:l,payload:u}}}class f0{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var re;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(re||(re={}));const zf=(e,t,n={})=>{var r;const i=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(t).reduce((s,o)=>(s[o]=$P(o,e,t,i),s),{})},$P=(e,t,n,r)=>{const i=t.find(a=>a.name===e),s=i==null?void 0:i.type,o=n[e];return s&&!r.includes(s)?p0(s,o):Pu(o)},p0=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return UP(t,n)}switch(e){case re.bool:return FP(t);case re.float4:case re.float8:case re.int2:case re.int4:case re.int8:case re.numeric:case re.oid:return BP(t);case re.json:case re.jsonb:return VP(t);case re.timestamp:return zP(t);case re.abstime:case re.date:case re.daterange:case re.int4range:case re.int8range:case re.money:case re.reltime:case re.text:case re.time:case re.timestamptz:case re.timetz:case re.tsrange:case re.tstzrange:return Pu(t);default:return Pu(t)}},Pu=e=>e,FP=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},BP=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},VP=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},UP=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let s;const o=e.slice(1,n);try{s=JSON.parse("["+o+"]")}catch{s=o?o.split(","):[]}return s.map(a=>p0(t,a))}return e},zP=e=>typeof e=="string"?e.replace(" ","T"):e,g0=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")+"/api/broadcast"};class Xa{constructor(t,n,r={},i=Su){this.channel=t,this.event=n,this.payload=r,this.timeout=i,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var Wf;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Wf||(Wf={}));class Mi{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},i=>{const{onJoin:s,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Mi.syncState(this.state,i,s,o),this.pendingDiffs.forEach(l=>{this.state=Mi.syncDiff(this.state,l,s,o)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},i=>{const{onJoin:s,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Mi.syncDiff(this.state,i,s,o),a())}),this.onJoin((i,s,o)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:s,newPresences:o})}),this.onLeave((i,s,o)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:s,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,i){const s=this.cloneDeep(t),o=this.transformState(n),a={},l={};return this.map(s,(u,h)=>{o[u]||(l[u]=h)}),this.map(o,(u,h)=>{const d=s[u];if(d){const p=h.map(b=>b.presence_ref),v=d.map(b=>b.presence_ref),k=h.filter(b=>v.indexOf(b.presence_ref)<0),_=d.filter(b=>p.indexOf(b.presence_ref)<0);k.length>0&&(a[u]=k),_.length>0&&(l[u]=_)}else a[u]=h}),this.syncDiff(s,{joins:a,leaves:l},r,i)}static syncDiff(t,n,r,i){const{joins:s,leaves:o}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),i||(i=()=>{}),this.map(s,(a,l)=>{var u;const h=(u=t[a])!==null&&u!==void 0?u:[];if(t[a]=this.cloneDeep(l),h.length>0){const d=t[a].map(v=>v.presence_ref),p=h.filter(v=>d.indexOf(v.presence_ref)<0);t[a].unshift(...p)}r(a,h,l)}),this.map(o,(a,l)=>{let u=t[a];if(!u)return;const h=l.map(d=>d.presence_ref);u=u.filter(d=>h.indexOf(d.presence_ref)<0),t[a]=u,i(a,u,l),u.length===0&&delete t[a]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const i=t[r];return"metas"in i?n[r]=i.metas.map(s=>(s.presence_ref=s.phx_ref,delete s.phx_ref,delete s.phx_ref_prev,s)):n[r]=i,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Hf;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Hf||(Hf={}));var Oi;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Oi||(Oi={}));var Ut;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Ut||(Ut={}));class ah{constructor(t,n={config:{}},r){this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=Se.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new Xa(this,_t.join,this.params,this.timeout),this.rejoinTimer=new f0(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Se.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Se.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Se.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Se.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Se.errored,this.rejoinTimer.scheduleTimeout())}),this._on(_t.reply,{},(i,s)=>{this._trigger(this._replyEventName(s),i)}),this.presence=new Mi(this),this.broadcastEndpointURL=g0(this.socket.endPoint),this.private=this.params.config.private||!1}subscribe(t,n=this.timeout){var r,i,s;if(this.socket.isConnected()||this.socket.connect(),this.state==Se.closed){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(i=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(v=>v.filter))!==null&&i!==void 0?i:[],h=!!this.bindings[Oi.PRESENCE]&&this.bindings[Oi.PRESENCE].length>0||((s=this.params.config.presence)===null||s===void 0?void 0:s.enabled)===!0,d={},p={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:h}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(v=>t==null?void 0:t(Ut.CHANNEL_ERROR,v)),this._onClose(()=>t==null?void 0:t(Ut.CLOSED)),this.updateJoinPayload(Object.assign({config:p},d)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:v})=>{var k;if(this.socket.setAuth(),v===void 0){t==null||t(Ut.SUBSCRIBED);return}else{const _=this.bindings.postgres_changes,b=(k=_==null?void 0:_.length)!==null&&k!==void 0?k:0,w=[];for(let y=0;y{this.state=Se.errored,t==null||t(Ut.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(v).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Ut.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this.state===Se.joined&&t===Oi.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(t,n,r)}async send(t,n={}){var r,i;if(!this._canPush()&&t.type==="broadcast"){const{event:s,payload:o}=t,l={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((i=u.body)===null||i===void 0?void 0:i.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var o,a,l;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&s("ok"),u.receive("ok",()=>s("ok")),u.receive("error",()=>s("error")),u.receive("timeout",()=>s("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Se.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(_t.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(i=>{r=new Xa(this,_t.leave,{},t),r.receive("ok",()=>{n(),i("ok")}).receive("timeout",()=>{n(),i("timed out")}).receive("error",()=>{i("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Se.closed,this.bindings={}}async _fetchWithTimeout(t,n,r){const i=new AbortController,s=setTimeout(()=>i.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(s),o}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new Xa(this,t,n,r);return this._canPush()?i.send():this._addToPushBuffer(i),i}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>LP){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var i,s;const o=t.toLocaleLowerCase(),{close:a,error:l,leave:u,join:h}=_t;if(r&&[a,l,u,h].indexOf(o)>=0&&r!==this._joinRef())return;let p=this._onMessage(o,n,r);if(n&&!p)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(v=>{var k,_,b;return((k=v.filter)===null||k===void 0?void 0:k.event)==="*"||((b=(_=v.filter)===null||_===void 0?void 0:_.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===o}).map(v=>v.callback(p,r)):(s=this.bindings[o])===null||s===void 0||s.filter(v=>{var k,_,b,w,y,g;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in v){const c=v.id,f=(k=v.filter)===null||k===void 0?void 0:k.event;return c&&((_=n.ids)===null||_===void 0?void 0:_.includes(c))&&(f==="*"||(f==null?void 0:f.toLocaleLowerCase())===((b=n.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const c=(y=(w=v==null?void 0:v.filter)===null||w===void 0?void 0:w.event)===null||y===void 0?void 0:y.toLocaleLowerCase();return c==="*"||c===((g=n==null?void 0:n.event)===null||g===void 0?void 0:g.toLocaleLowerCase())}else return v.type.toLocaleLowerCase()===o}).map(v=>{if(typeof p=="object"&&"ids"in p){const k=p.data,{schema:_,table:b,commit_timestamp:w,type:y,errors:g}=k;p=Object.assign(Object.assign({},{schema:_,table:b,commit_timestamp:w,eventType:y,new:{},old:{},errors:g}),this._getPayloadRecords(k))}v.callback(p,r)})}_isClosed(){return this.state===Se.closed}_isJoined(){return this.state===Se.joined}_isJoining(){return this.state===Se.joining}_isLeaving(){return this.state===Se.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const i=t.toLocaleLowerCase(),s={type:i,filter:n,callback:r};return this.bindings[i]?this.bindings[i].push(s):this.bindings[i]=[s],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(i=>{var s;return!(((s=i.type)===null||s===void 0?void 0:s.toLocaleLowerCase())===r&&ah.isEqual(i.filter,n))})),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(_t.close,{},t)}_onError(t){this._on(_t.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Se.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=zf(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=zf(t.columns,t.old_record)),n}}const Ja=()=>{},$s={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},WP=[1e3,2e3,5e3,1e4],HP=1e4,KP=` + addEventListener("message", (e) => { + if (e.data.event === "start") { + setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); + } + });`;class GP{constructor(t,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Su,this.transport=null,this.heartbeatIntervalMs=$s.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Ja,this.ref=0,this.reconnectTimer=null,this.logger=Ja,this.conn=null,this.sendBuffer=[],this.serializer=new NP,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=i=>{let s;return i?s=i:typeof fetch>"u"?s=(...o)=>fs(async()=>{const{default:a}=await Promise.resolve().then(()=>Jr);return{default:a}},void 0).then(({default:a})=>a(...o)).catch(a=>{throw new Error(`Failed to load @supabase/node-fetch: ${a.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):s=fetch,(...o)=>s(...o)},!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${t}/${_u.websocket}`,this.httpEndpoint=g0(t),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=jP.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n} + +To use Realtime in Node.js, you need to provide a WebSocket implementation: + +Option 1: Use Node.js 22+ which has native WebSocket support +Option 2: Install and provide the "ws" package: + + npm install ws + + import ws from "ws" + const client = new RealtimeClient(url, { + ...options, + transport: ws + })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:DP}))}disconnect(t,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},t?this.conn.close(t,n??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case ji.connecting:return Bn.Connecting;case ji.open:return Bn.Open;case ji.closing:return Bn.Closing;default:return Bn.Closed}}isConnected(){return this.connectionState()===Bn.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,n={config:{}}){const r=`realtime:${t}`,i=this.getChannels().find(s=>s.topic===r);if(i)return i;{const s=new ah(`realtime:${t}`,n,this);return this.channels.push(s),s}}push(t){const{topic:n,event:r,payload:i,ref:s}=t,o=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${r} (${s})`,i),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(IP,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},$s.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,n=>{if(n.topic==="phoenix"&&n.event==="phx_reply")try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error")}catch(u){this.log("error","error in heartbeat callback",u)}n.ref&&n.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:r,event:i,payload:s,ref:o}=n,a=o?`(${o})`:"",l=s.status||"";this.log("receive",`${l} ${r} ${i} ${a}`.trim(),s),this.channels.filter(u=>u._isMember(r)).forEach(u=>u._trigger(i,s,o)),this._triggerStateCallbacks("message",n)})}_clearTimer(t){var n;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this.workerRef.terminate()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(t){var n;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(_t.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",i=new URLSearchParams(n);return`${t}${r}${i}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([KP],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(t,n=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(t=null){let n;t?n=t:this.accessToken?n=await this.accessToken():n=this.accessTokenValue,this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(r=>{const i={access_token:n,version:OP};n&&r.updateJoinPayload(i),r.joinedOnce&&r._isJoined()&&r._push(_t.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this.setAuth().catch(n=>{this.log("error",`error setting auth in ${t}`,n)})}_triggerStateCallbacks(t,n){try{this.stateChangeCallbacks[t].forEach(r=>{try{r(n)}catch(i){this.log("error",`error in ${t} callback`,i)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new f0(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},$s.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var n,r,i,s,o,a,l,u,h;if(this.transport=(n=t==null?void 0:t.transport)!==null&&n!==void 0?n:null,this.timeout=(r=t==null?void 0:t.timeout)!==null&&r!==void 0?r:Su,this.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:$s.HEARTBEAT_INTERVAL,this.worker=(s=t==null?void 0:t.worker)!==null&&s!==void 0?s:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(a=t==null?void 0:t.heartbeatCallback)!==null&&a!==void 0?a:Ja,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(l=t==null?void 0:t.reconnectAfterMs)!==null&&l!==void 0?l:d=>WP[d-1]||HP,this.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:(d,p)=>p(JSON.stringify(d)),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}class lh extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function _e(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class qP extends lh{constructor(t,n,r){super(t),this.name="StorageApiError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Tu extends lh{constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var YP=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const m0=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>fs(async()=>{const{default:r}=await Promise.resolve().then(()=>Jr);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},QP=()=>YP(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield fs(()=>Promise.resolve().then(()=>Jr),void 0)).Response:Response}),bu=e=>{if(Array.isArray(e))return e.map(n=>bu(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const i=n.replace(/([-_][a-z])/gi,s=>s.toUpperCase().replace(/[-_]/g,""));t[i]=bu(r)}),t},XP=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var rr=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const Za=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),JP=(e,t,n)=>rr(void 0,void 0,void 0,function*(){const r=yield QP();e instanceof r&&!(n!=null&&n.noResolveJson)?e.json().then(i=>{const s=e.status||500,o=(i==null?void 0:i.statusCode)||s+"";t(new qP(Za(i),s,o))}).catch(i=>{t(new Tu(Za(i),i))}):t(new Tu(Za(e),e))}),ZP=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!r?i:(XP(r)?(i.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(r)):i.body=r,t!=null&&t.duplex&&(i.duplex=t.duplex),Object.assign(Object.assign({},i),n))};function gs(e,t,n,r,i,s){return rr(this,void 0,void 0,function*(){return new Promise((o,a)=>{e(n,ZP(t,r,i,s)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>JP(l,a,r))})})}function Io(e,t,n,r){return rr(this,void 0,void 0,function*(){return gs(e,"GET",t,n,r)})}function Mt(e,t,n,r,i){return rr(this,void 0,void 0,function*(){return gs(e,"POST",t,r,i,n)})}function Cu(e,t,n,r,i){return rr(this,void 0,void 0,function*(){return gs(e,"PUT",t,r,i,n)})}function eT(e,t,n,r){return rr(this,void 0,void 0,function*(){return gs(e,"HEAD",t,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}function y0(e,t,n,r,i){return rr(this,void 0,void 0,function*(){return gs(e,"DELETE",t,r,i,n)})}var $e=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const tT={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Kf={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class nT{constructor(t,n={},r,i){this.shouldThrowOnError=!1,this.url=t,this.headers=n,this.bucketId=r,this.fetch=m0(i)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(t,n,r,i){return $e(this,void 0,void 0,function*(){try{let s;const o=Object.assign(Object.assign({},Kf),i);let a=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&r instanceof Blob?(s=new FormData,s.append("cacheControl",o.cacheControl),l&&s.append("metadata",this.encodeMetadata(l)),s.append("",r)):typeof FormData<"u"&&r instanceof FormData?(s=r,s.append("cacheControl",o.cacheControl),l&&s.append("metadata",this.encodeMetadata(l))):(s=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),i!=null&&i.headers&&(a=Object.assign(Object.assign({},a),i.headers));const u=this._removeEmptyFolders(n),h=this._getFinalPath(u),d=yield(t=="PUT"?Cu:Mt)(this.fetch,`${this.url}/object/${h}`,s,Object.assign({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:u,id:d.Id,fullPath:d.Key},error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(_e(s))return{data:null,error:s};throw s}})}upload(t,n,r){return $e(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,i){return $e(this,void 0,void 0,function*(){const s=this._removeEmptyFolders(t),o=this._getFinalPath(s),a=new URL(this.url+`/object/upload/sign/${o}`);a.searchParams.set("token",n);try{let l;const u=Object.assign({upsert:Kf.upsert},i),h=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,h["cache-control"]=`max-age=${u.cacheControl}`,h["content-type"]=u.contentType);const d=yield Cu(this.fetch,a.toString(),l,{headers:h});return{data:{path:s,fullPath:d.Key},error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(_e(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,n){return $e(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t);const i=Object.assign({},this.headers);n!=null&&n.upsert&&(i["x-upsert"]="true");const s=yield Mt(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:i}),o=new URL(this.url+s.url),a=o.searchParams.get("token");if(!a)throw new lh("No token returned by API");return{data:{signedUrl:o.toString(),path:t,token:a},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(_e(r))return{data:null,error:r};throw r}})}update(t,n,r){return $e(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n,r){return $e(this,void 0,void 0,function*(){try{return{data:yield Mt(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(_e(i))return{data:null,error:i};throw i}})}copy(t,n,r){return $e(this,void 0,void 0,function*(){try{return{data:{path:(yield Mt(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(_e(i))return{data:null,error:i};throw i}})}createSignedUrl(t,n,r){return $e(this,void 0,void 0,function*(){try{let i=this._getFinalPath(t),s=yield Mt(this.fetch,`${this.url}/object/sign/${i}`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return s={signedUrl:encodeURI(`${this.url}${s.signedURL}${o}`)},{data:s,error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(_e(i))return{data:null,error:i};throw i}})}createSignedUrls(t,n,r){return $e(this,void 0,void 0,function*(){try{const i=yield Mt(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),s=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:i.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${s}`):null})),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(_e(i))return{data:null,error:i};throw i}})}download(t,n){return $e(this,void 0,void 0,function*(){const i=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),o=s?`?${s}`:"";try{const a=this._getFinalPath(t);return{data:yield(yield Io(this.fetch,`${this.url}/${i}/${a}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(_e(a))return{data:null,error:a};throw a}})}info(t){return $e(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{const r=yield Io(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:bu(r),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(_e(r))return{data:null,error:r};throw r}})}exists(t){return $e(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{return yield eT(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(_e(r)&&r instanceof Tu){const i=r.originalError;if([400,404].includes(i==null?void 0:i.status))return{data:!1,error:r}}throw r}})}getPublicUrl(t,n){const r=this._getFinalPath(t),i=[],s=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";s!==""&&i.push(s);const a=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});l!==""&&i.push(l);let u=i.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${u}`)}}}remove(t){return $e(this,void 0,void 0,function*(){try{return{data:yield y0(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(_e(n))return{data:null,error:n};throw n}})}list(t,n,r){return $e(this,void 0,void 0,function*(){try{const i=Object.assign(Object.assign(Object.assign({},tT),n),{prefix:t||""});return{data:yield Mt(this.fetch,`${this.url}/object/list/${this.bucketId}`,i,{headers:this.headers},r),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(_e(i))return{data:null,error:i};throw i}})}listV2(t,n){return $e(this,void 0,void 0,function*(){try{const r=Object.assign({},t);return{data:yield Mt(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,r,{headers:this.headers},n),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(_e(r))return{data:null,error:r};throw r}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const n=[];return t.width&&n.push(`width=${t.width}`),t.height&&n.push(`height=${t.height}`),t.resize&&n.push(`resize=${t.resize}`),t.format&&n.push(`format=${t.format}`),t.quality&&n.push(`quality=${t.quality}`),n.join("&")}}const rT="2.12.1",iT={"X-Client-Info":`storage-js/${rT}`};var sr=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class sT{constructor(t,n={},r,i){this.shouldThrowOnError=!1;const s=new URL(t);i!=null&&i.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase.")),this.url=s.href,this.headers=Object.assign(Object.assign({},iT),n),this.fetch=m0(r)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(){return sr(this,void 0,void 0,function*(){try{return{data:yield Io(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(_e(t))return{data:null,error:t};throw t}})}getBucket(t){return sr(this,void 0,void 0,function*(){try{return{data:yield Io(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(_e(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return sr(this,void 0,void 0,function*(){try{return{data:yield Mt(this.fetch,`${this.url}/bucket`,{id:t,name:t,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(_e(r))return{data:null,error:r};throw r}})}updateBucket(t,n){return sr(this,void 0,void 0,function*(){try{return{data:yield Cu(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(_e(r))return{data:null,error:r};throw r}})}emptyBucket(t){return sr(this,void 0,void 0,function*(){try{return{data:yield Mt(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(_e(n))return{data:null,error:n};throw n}})}deleteBucket(t){return sr(this,void 0,void 0,function*(){try{return{data:yield y0(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(_e(n))return{data:null,error:n};throw n}})}}class oT extends sT{constructor(t,n={},r,i){super(t,n,r,i)}from(t){return new nT(this.url,this.headers,t,this.fetch)}}const aT="2.57.4";let mi="";typeof Deno<"u"?mi="deno":typeof document<"u"?mi="web":typeof navigator<"u"&&navigator.product==="ReactNative"?mi="react-native":mi="node";const lT={"X-Client-Info":`supabase-js-${mi}/${aT}`},uT={headers:lT},cT={schema:"public"},hT={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},dT={};var fT=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const pT=e=>{let t;return e?t=e:typeof fetch>"u"?t=n0:t=fetch,(...n)=>t(...n)},gT=()=>typeof Headers>"u"?r0:Headers,mT=(e,t,n)=>{const r=pT(n),i=gT();return(s,o)=>fT(void 0,void 0,void 0,function*(){var a;const l=(a=yield t())!==null&&a!==void 0?a:e;let u=new i(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(s,Object.assign(Object.assign({},o),{headers:u}))})};var yT=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};function vT(e){return e.endsWith("/")?e:e+"/"}function wT(e,t){var n,r;const{db:i,auth:s,realtime:o,global:a}=e,{db:l,auth:u,realtime:h,global:d}=t,p={db:Object.assign(Object.assign({},l),i),auth:Object.assign(Object.assign({},u),s),realtime:Object.assign(Object.assign({},h),o),storage:{},global:Object.assign(Object.assign(Object.assign({},d),a),{headers:Object.assign(Object.assign({},(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:()=>yT(this,void 0,void 0,function*(){return""})};return e.accessToken?p.accessToken=e.accessToken:delete p.accessToken,p}function xT(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(vT(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}const v0="2.71.1",cr=30*1e3,Eu=3,el=Eu*cr,kT="http://localhost:9999",ST="supabase.auth.token",_T={"X-Client-Info":`gotrue-js/${v0}`},Ru="X-Supabase-Api-Version",w0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},PT=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,TT=10*60*1e3;class uh extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function K(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class bT extends uh{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function CT(e){return K(e)&&e.name==="AuthApiError"}class x0 extends uh{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class An extends uh{constructor(t,n,r,i){super(t,r,i),this.name=n,this.status=r}}class rn extends An{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function ET(e){return K(e)&&e.name==="AuthSessionMissingError"}class Fs extends An{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Bs extends An{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Vs extends An{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function RT(e){return K(e)&&e.name==="AuthImplicitGrantRedirectError"}class Gf extends An{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Au extends An{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function tl(e){return K(e)&&e.name==="AuthRetryableFetchError"}class qf extends An{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class ju extends An{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Lo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Yf=` +\r=`.split(""),AT=(()=>{const e=new Array(128);for(let t=0;t=6;){const r=t.queue>>t.queuedBits-6&63;n(Lo[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Lo[r]),t.queuedBits-=6}}function k0(e,t,n){const r=AT[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Xf(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},s=o=>{OT(o,r,n)};for(let o=0;o>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function MT(e,t){for(let n=0;n55295&&r<=56319){const i=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|i)+65536,n+=1}jT(r,t)}}function OT(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function DT(e){const t=[],n={queue:0,queuedBits:0},r=i=>{t.push(i)};for(let i=0;it.push(n)),new Uint8Array(t)}function LT(e){const t=[],n={queue:0,queuedBits:0},r=i=>{t.push(i)};return e.forEach(i=>Qf(i,n,r)),Qf(null,n,r),t.join("")}function NT(e){return Math.round(Date.now()/1e3)+e}function $T(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const wt=()=>typeof window<"u"&&typeof document<"u",On={tested:!1,writable:!1},S0=()=>{if(!wt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(On.tested)return On.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),On.tested=!0,On.writable=!0}catch{On.tested=!0,On.writable=!1}return On.writable};function FT(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((i,s)=>{t[s]=i})}catch{}return n.searchParams.forEach((r,i)=>{t[i]=r}),t}const _0=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>fs(async()=>{const{default:r}=await Promise.resolve().then(()=>Jr);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},BT=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",hr=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Dn=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},tn=async(e,t)=>{await e.removeItem(t)};class aa{constructor(){this.promise=new aa.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}aa.promiseConstructor=Promise;function nl(e){const t=e.split(".");if(t.length!==3)throw new ju("Invalid JWT structure");for(let r=0;r{setTimeout(()=>t(null),e)})}function UT(e,t){return new Promise((r,i)=>{(async()=>{for(let s=0;s<1/0;s++)try{const o=await e(s);if(!t(s,null,o)){r(o);return}}catch(o){if(!t(s,o)){i(o);return}}})()})}function zT(e){return("0"+e.toString(16)).substr(-2)}function WT(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let i="";for(let s=0;s<56;s++)i+=n.charAt(Math.floor(Math.random()*r));return i}return crypto.getRandomValues(t),Array.from(t,zT).join("")}async function HT(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(s=>String.fromCharCode(s)).join("")}async function KT(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await HT(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function or(e,t,n=!1){const r=WT();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await hr(e,`${t}-code-verifier`,i);const s=await KT(r);return[s,r===s?"plain":"s256"]}const GT=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function qT(e){const t=e.headers.get(Ru);if(!t||!t.match(GT))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function YT(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function QT(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const XT=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ar(e){if(!XT.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function rl(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Jf(e){return JSON.parse(JSON.stringify(e))}var JT=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);ie.msg||e.message||e.error_description||e.error||JSON.stringify(e),ZT=[502,503,504];async function Zf(e){var t;if(!BT(e))throw new Au(Fn(e),0);if(ZT.includes(e.status))throw new Au(Fn(e),e.status);let n;try{n=await e.json()}catch(s){throw new x0(Fn(s),s)}let r;const i=qT(e);if(i&&i.getTime()>=w0["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new qf(Fn(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new rn}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((s,o)=>s&&typeof o=="string",!0))throw new qf(Fn(n),e.status,n.weak_password.reasons);throw new bT(Fn(n),e.status||500,r)}const eb=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function G(e,t,n,r){var i;const s=Object.assign({},r==null?void 0:r.headers);s[Ru]||(s[Ru]=w0["2024-01-01"].name),r!=null&&r.jwt&&(s.Authorization=`Bearer ${r.jwt}`);const o=(i=r==null?void 0:r.query)!==null&&i!==void 0?i:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await tb(e,t,n+a,{headers:s,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function tb(e,t,n,r,i,s){const o=eb(t,r,i,s);let a;try{a=await e(n,Object.assign({},o))}catch(l){throw console.error(l),new Au(Fn(l),0)}if(a.ok||await Zf(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await Zf(l)}}function Bt(e){var t;let n=null;sb(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=NT(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function ep(e){const t=Bt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function un(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function nb(e){return{data:e,error:null}}function rb(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:s}=e,o=JT(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:s},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function ib(e){return e}function sb(e){return e.access_token&&e.refresh_token&&e.expires_in}const il=["global","local","others"];var ob=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i0&&(v.forEach(k=>{const _=parseInt(k.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(k.split(";")[1].split("=")[1]);u[`${b}Page`]=_}),u.total=parseInt(p)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(K(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){ar(t);try{return await G(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:un})}catch(n){if(K(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){ar(t);try{return await G(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:un})}catch(r){if(K(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){ar(t);try{return await G(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:un})}catch(r){if(K(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){ar(t.userId);try{const{data:n,error:r}=await G(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:r}}catch(n){if(K(n))return{data:null,error:n};throw n}}async _deleteFactor(t){ar(t.userId),ar(t.id);try{return{data:await G(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(K(n))return{data:null,error:n};throw n}}}function tp(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function lb(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const lr={debug:!!(globalThis&&S0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class P0 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class ub extends P0{}async function cb(e,t,n){lr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),lr.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){lr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{lr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw lr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new ub(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(lr.debug)try{const s=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(s,null," "))}catch(s){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",s)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}}))}lb();const hb={url:kT,storageKey:ST,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:_T,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function np(e,t,n){return await n()}const ur={};class rs{constructor(t){var n,r;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=rs.nextInstanceID,rs.nextInstanceID+=1,this.instanceID>0&&wt()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const i=Object.assign(Object.assign({},hb),t);if(this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.persistSession=i.persistSession,this.storageKey=i.storageKey,this.autoRefreshToken=i.autoRefreshToken,this.admin=new ab({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=_0(i.fetch),this.lock=i.lock||np,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,i.lock?this.lock=i.lock:wt()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=cb:this.lock=np,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:S0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=tp(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=tp(this.memoryStorage)),wt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(s){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",s)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async s=>{this._debug("received broadcast notification from other tab or client",s),await this._notifyAllSubscribers(s.data.event,s.data.session,!1)})}this.initialize()}get jwks(){var t,n;return(n=(t=ur[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){ur[this.storageKey]=Object.assign(Object.assign({},ur[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=ur[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){ur[this.storageKey]=Object.assign(Object.assign({},ur[this.storageKey]),{cachedAt:t})}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${v0}) ${new Date().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{const n=FT(window.location.href);let r="none";if(this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce"),wt()&&this.detectSessionInUrl&&r!=="none"){const{data:i,error:s}=await this._getSessionFromURL(n,r);if(s){if(this._debug("#_initialize()","error detecting session from URL",s),RT(s)){const l=(t=s.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:s}}return await this._removeSession(),{error:s}}const{session:o,redirectType:a}=i;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return K(n)?{error:n}:{error:new x0("Unexpected error during initialization",n)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,i;try{const s=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:Bt}),{data:o,error:a}=s;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(s){if(K(s))return{data:{user:null,session:null},error:s};throw s}}async signUp(t){var n,r,i;try{let s;if("email"in t){const{email:h,password:d,options:p}=t;let v=null,k=null;this.flowType==="pkce"&&([v,k]=await or(this.storage,this.storageKey)),s=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:h,password:d,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:v,code_challenge_method:k},xform:Bt})}else if("phone"in t){const{phone:h,password:d,options:p}=t;s=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:h,password:d,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},channel:(i=p==null?void 0:p.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:Bt})}else throw new Bs("You must provide either an email or phone number and a password");const{data:o,error:a}=s;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(s){if(K(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithPassword(t){try{let n;if("email"in t){const{email:s,password:o,options:a}=t;n=await G(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:ep})}else if("phone"in t){const{phone:s,password:o,options:a}=t;n=await G(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:ep})}else throw new Bs("You must provide either an email or phone number and a password");const{data:r,error:i}=n;return i?{data:{user:null,session:null},error:i}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new Fs}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:i})}catch(n){if(K(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(t){var n,r,i,s;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(s=t.options)===null||s===void 0?void 0:s.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;if(n==="solana")return await this.signInWithSolana(t);throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}async signInWithSolana(t){var n,r,i,s,o,a,l,u,h,d,p,v;let k,_;if("message"in t)k=t.message,_=t.signature;else{const{chain:b,wallet:w,statement:y,options:g}=t;let c;if(wt())if(typeof w=="object")c=w;else{const m=window;if("solana"in m&&typeof m.solana=="object"&&("signIn"in m.solana&&typeof m.solana.signIn=="function"||"signMessage"in m.solana&&typeof m.solana.signMessage=="function"))c=m.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof w!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");c=w}const f=new URL((n=g==null?void 0:g.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in c&&c.signIn){const m=await c.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},g==null?void 0:g.signInWithSolana),{version:"1",domain:f.host,uri:f.href}),y?{statement:y}:null));let x;if(Array.isArray(m)&&m[0]&&typeof m[0]=="object")x=m[0];else if(m&&typeof m=="object"&&"signedMessage"in m&&"signature"in m)x=m;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in x&&"signature"in x&&(typeof x.signedMessage=="string"||x.signedMessage instanceof Uint8Array)&&x.signature instanceof Uint8Array)k=typeof x.signedMessage=="string"?x.signedMessage:new TextDecoder().decode(x.signedMessage),_=x.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in c)||typeof c.signMessage!="function"||!("publicKey"in c)||typeof c!="object"||!c.publicKey||!("toBase58"in c.publicKey)||typeof c.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");k=[`${f.host} wants you to sign in with your Solana account:`,c.publicKey.toBase58(),...y?["",y,""]:[""],"Version: 1",`URI: ${f.href}`,`Issued At: ${(i=(r=g==null?void 0:g.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((s=g==null?void 0:g.signInWithSolana)===null||s===void 0)&&s.notBefore?[`Not Before: ${g.signInWithSolana.notBefore}`]:[],...!((o=g==null?void 0:g.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${g.signInWithSolana.expirationTime}`]:[],...!((a=g==null?void 0:g.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${g.signInWithSolana.chainId}`]:[],...!((l=g==null?void 0:g.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${g.signInWithSolana.nonce}`]:[],...!((u=g==null?void 0:g.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${g.signInWithSolana.requestId}`]:[],...!((d=(h=g==null?void 0:g.signInWithSolana)===null||h===void 0?void 0:h.resources)===null||d===void 0)&&d.length?["Resources",...g.signInWithSolana.resources.map(x=>`- ${x}`)]:[]].join(` +`);const m=await c.signMessage(new TextEncoder().encode(k),"utf8");if(!m||!(m instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");_=m}}try{const{data:b,error:w}=await G(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:k,signature:LT(_)},!((p=t.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(v=t.options)===null||v===void 0?void 0:v.captchaToken}}:null),xform:Bt});if(w)throw w;return!b||!b.session||!b.user?{data:{user:null,session:null},error:new Fs}:(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),{data:Object.assign({},b),error:w})}catch(b){if(K(b))return{data:{user:null,session:null},error:b};throw b}}async _exchangeCodeForSession(t){const n=await Dn(this.storage,`${this.storageKey}-code-verifier`),[r,i]=(n??"").split("/");try{const{data:s,error:o}=await G(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Bt});if(await tn(this.storage,`${this.storageKey}-code-verifier`),o)throw o;return!s||!s.session||!s.user?{data:{user:null,session:null,redirectType:null},error:new Fs}:(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:Object.assign(Object.assign({},s),{redirectType:i??null}),error:o})}catch(s){if(K(s))return{data:{user:null,session:null,redirectType:null},error:s};throw s}}async signInWithIdToken(t){try{const{options:n,provider:r,token:i,access_token:s,nonce:o}=t,a=await G(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:i,access_token:s,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Bt}),{data:l,error:u}=a;return u?{data:{user:null,session:null},error:u}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Fs}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:u})}catch(n){if(K(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(t){var n,r,i,s,o;try{if("email"in t){const{email:a,options:l}=t;let u=null,h=null;this.flowType==="pkce"&&([u,h]=await or(this.storage,this.storageKey));const{error:d}=await G(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:h},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:d}}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:h}=await G(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(s=l==null?void 0:l.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:h}}throw new Bs("You must provide either an email or phone number.")}catch(a){if(K(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(t){var n,r;try{let i,s;"options"in t&&(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo,s=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await G(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:s}}),redirectTo:i,xform:Bt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(i){if(K(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithSSO(t){var n,r,i;try{let s=null,o=null;return this.flowType==="pkce"&&([s,o]=await or(this.storage,this.storageKey)),await G(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:s,code_challenge_method:o}),headers:this.headers,xform:nb})}catch(s){if(K(s))return{data:null,error:s};throw s}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new rn;const{error:i}=await G(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:i}})}catch(t){if(K(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:i,options:s}=t,{error:o}=await G(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},redirectTo:s==null?void 0:s.emailRedirectTo});return{data:{user:null,session:null},error:o}}else if("phone"in t){const{phone:r,type:i,options:s}=t,{data:o,error:a}=await G(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a}}throw new Bs("You must provide either an email or phone number and a type")}catch(n){if(K(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await Dn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()(!o&&u==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),o=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,u,h))})}return{data:{session:t},error:null}}const{session:i,error:s}=await this._callRefreshToken(t.refresh_token);return s?{data:{session:null},error:s}:{data:{session:i},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await G(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:un}):await this._useSession(async n=>{var r,i,s;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new rn}:await G(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(i=o.session)===null||i===void 0?void 0:i.access_token)!==null&&s!==void 0?s:void 0,xform:un})})}catch(n){if(K(n))return ET(n)&&(await this._removeSession(),await tn(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:n};throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:i,error:s}=r;if(s)throw s;if(!i.session)throw new rn;const o=i.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await or(this.storage,this.storageKey));const{data:u,error:h}=await G(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:un});if(h)throw h;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(r){if(K(r))return{data:{user:null},error:r};throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new rn;const n=Date.now()/1e3;let r=n,i=!0,s=null;const{payload:o}=nl(t.access_token);if(o.exp&&(r=o.exp,i=r<=n),i){const{session:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!a)return{data:{user:null,session:null},error:null};s=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)throw l;s={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)}return{data:{user:s.user,session:s},error:null}}catch(n){if(K(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:a}=n;if(a)throw a;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new rn;const{session:i,error:s}=await this._callRefreshToken(t.refresh_token);return s?{data:{user:null,session:null},error:s}:i?{data:{user:i.user,session:i},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(K(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t,n){try{if(!wt())throw new Vs("No browser detected.");if(t.error||t.error_description||t.error_code)throw new Vs(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Gf("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Vs("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Gf("No code detected.");const{data:y,error:g}=await this._exchangeCodeForSession(t.code);if(g)throw g;const c=new URL(window.location.href);return c.searchParams.delete("code"),window.history.replaceState(window.history.state,"",c.toString()),{data:{session:y.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:i,access_token:s,refresh_token:o,expires_in:a,expires_at:l,token_type:u}=t;if(!s||!a||!o||!u)throw new Vs("No session defined in URL");const h=Math.round(Date.now()/1e3),d=parseInt(a);let p=h+d;l&&(p=parseInt(l));const v=p-h;v*1e3<=cr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${v}s, should have been closer to ${d}s`);const k=p-d;h-k>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",k,p,h):h-k<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",k,p,h);const{data:_,error:b}=await this._getUser(s);if(b)throw b;const w={provider_token:r,provider_refresh_token:i,access_token:s,expires_in:d,expires_at:p,refresh_token:o,token_type:u,user:_.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:w,redirectType:t.type},error:null}}catch(r){if(K(r))return{data:{session:null,redirectType:null},error:r};throw r}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await Dn(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:i,error:s}=n;if(s)return{error:s};const o=(r=i.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(CT(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return t!=="others"&&(await this._removeSession(),await tn(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(t){const n=$T(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,i;try{const{data:{session:s},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",s)),this._debug("INITIAL_SESSION","callback id",t,"session",s)}catch(s){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",s),console.error(s)}})}async resetPasswordForEmail(t,n={}){let r=null,i=null;this.flowType==="pkce"&&([r,i]=await or(this.storage,this.storageKey,!0));try{return await G(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(s){if(K(s))return{data:null,error:s};throw s}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(n){if(K(n))return{data:null,error:n};throw n}}async linkIdentity(t){var n;try{const{data:r,error:i}=await this._useSession(async s=>{var o,a,l,u,h;const{data:d,error:p}=s;if(p)throw p;const v=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await G(this.fetch,"GET",v,{headers:this.headers,jwt:(h=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&h!==void 0?h:void 0})});if(i)throw i;return wt()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:t.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(K(r))return{data:{provider:t.provider,url:null},error:r};throw r}}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,i;const{data:s,error:o}=n;if(o)throw o;return await G(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(r=s.session)===null||r===void 0?void 0:r.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(K(n))return{data:null,error:n};throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await UT(async i=>(i>0&&await VT(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await G(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Bt})),(i,s)=>{const o=200*Math.pow(2,i);return s&&tl(s)&&Date.now()+o-r{try{await a.callback(t,n)}catch(l){s.push(l)}});if(await Promise.all(o),s.length>0){for(let a=0;athis._autoRefreshTokenTick(),cr);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((r.expires_at*1e3-t)/cr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${cr}ms, refresh threshold is ${Eu} ticks`),i<=Eu&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof P0)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!wt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const i=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&i.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&i.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[s,o]=await or(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(o)}`});i.push(a.toString())}if(r!=null&&r.queryParams){const s=new URLSearchParams(r.queryParams);i.push(s.toString())}return r!=null&&r.skipBrowserRedirect&&i.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;return s?{data:null,error:s}:await G(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(K(n))return{data:null,error:n};throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,i;const{data:s,error:o}=n;if(o)return{data:null,error:o};const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:{issuer:t.issuer}),{data:l,error:u}=await G(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return u?{data:null,error:u}:(t.factorType==="totp"&&(!((i=l==null?void 0:l.totp)===null||i===void 0)&&i.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})})}catch(n){if(K(n))return{data:null,error:n};throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;if(s)return{data:null,error:s};const{data:o,error:a}=await G(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:a})})}catch(n){if(K(n))return{data:null,error:n};throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;return s?{data:null,error:s}:await G(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:{channel:t.channel},headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(K(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?{data:null,error:r}:await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){const{data:{user:t},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(t==null?void 0:t.factors)||[],i=r.filter(o=>o.factor_type==="totp"&&o.status==="verified"),s=r.filter(o=>o.factor_type==="phone"&&o.status==="verified");return{data:{all:r,totp:i,phone:s},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var n,r;const{data:{session:i},error:s}=t;if(s)return{data:null,error:s};if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=nl(i.access_token);let a=null;o.aal&&(a=o.aal);let l=a;((r=(n=i.user.factors)===null||n===void 0?void 0:n.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const h=o.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:h},error:null}}))}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(a=>a.kid===t);if(r)return r;const i=Date.now();if(r=this.jwks.keys.find(a=>a.kid===t),r&&this.jwks_cached_at+TT>i)return r;const{data:s,error:o}=await G(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!s.keys||s.keys.length===0||(this.jwks=s,this.jwks_cached_at=i,r=s.keys.find(a=>a.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:v,error:k}=await this.getSession();if(k||!v.session)return{data:null,error:k};r=v.session.access_token}const{header:i,payload:s,signature:o,raw:{header:a,payload:l}}=nl(r);n!=null&&n.allowExpired||YT(s.exp);const u=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:v}=await this.getUser(r);if(v)throw v;return{data:{claims:s,header:i,signature:o},error:null}}const h=QT(i.alg),d=await crypto.subtle.importKey("jwk",u,h,!0,["verify"]);if(!await crypto.subtle.verify(h,d,o,IT(`${a}.${l}`)))throw new ju("Invalid JWT signature");return{data:{claims:s,header:i,signature:o},error:null}}catch(r){if(K(r))return{data:null,error:r};throw r}}}rs.nextInstanceID=0;const db=rs;class fb extends db{constructor(t){super(t)}}var pb=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class gb{constructor(t,n,r){var i,s,o;this.supabaseUrl=t,this.supabaseKey=n;const a=xT(t);if(!n)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const l=`sb-${a.hostname.split(".")[0]}-auth-token`,u={db:cT,realtime:dT,auth:Object.assign(Object.assign({},hT),{storageKey:l}),global:uT},h=wT(r??{},u);this.storageKey=(i=h.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(s=h.global.headers)!==null&&s!==void 0?s:{},h.accessToken?(this.accessToken=h.accessToken,this.auth=new Proxy({},{get:(d,p)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(p)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=h.auth)!==null&&o!==void 0?o:{},this.headers,h.global.fetch),this.fetch=mT(n,this._getAccessToken.bind(this),h.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},h.realtime)),this.rest=new AP(new URL("rest/v1",a).href,{headers:this.headers,schema:h.db.schema,fetch:this.fetch}),this.storage=new oT(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),h.accessToken||this._listenForAuthEvents()}get functions(){return new lP(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},r={}){return this.rest.rpc(t,n,r)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,n;return pb(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:r}=yield this.auth.getSession();return(n=(t=r.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:this.supabaseKey})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:i,userStorage:s,storageKey:o,flowType:a,lock:l,debug:u},h,d){const p={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new fb({url:this.authUrl.href,headers:Object.assign(Object.assign({},p),h),storageKey:o,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:i,userStorage:s,flowType:a,lock:l,debug:u,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(v=>v.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new GP(this.realtimeUrl.href,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(t,n,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?this.changedAccessToken=r:t==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const mb=(e,t,n)=>new gb(e,t,n);function yb(){if(typeof window<"u"||typeof process>"u")return!1;const e=process.version;if(e==null)return!1;const t=e.match(/^v(\d+)\./);return t?parseInt(t[1],10)<=18:!1}yb()&&console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const vb="https://eynxipjyamdwblmegsmc.supabase.co",wb="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImV5bnhpcGp5YW1kd2JsbWVnc21jIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjEwNzkxMDAsImV4cCI6MjA3NjY1NTEwMH0.OAQA1FwXiKSxasQ0JjsGCdrJ73M8MMjZg4xmOEBqqgs",Tn=mb(vb,wb);function xb(){let e=localStorage.getItem("cooky_session_id");return e||(e=crypto.randomUUID(),localStorage.setItem("cooky_session_id",e)),e}async function sl(e){const{data:t,error:n}=await Tn.from("recipe_bookmarks").select("*").eq("session_id",e).order("created_at",{ascending:!1});return n?(console.error("Error fetching bookmarks:",n),[]):t||[]}async function kb(e,t){const{data:n}=await Tn.from("recipe_bookmarks").select("id").eq("recipe_id",e).eq("session_id",t).maybeSingle();if(n)return console.log("Bookmark already exists, skipping insert"),!0;const{error:r}=await Tn.from("recipe_bookmarks").insert({recipe_id:e,session_id:t,notes:null});return r?(console.error("Error adding bookmark:",r),!1):!0}async function Sb(e,t){console.log("removeBookmark called with:",{recipeId:e,sessionId:t});const{data:n,error:r,count:i}=await Tn.from("recipe_bookmarks").delete().eq("recipe_id",e).eq("session_id",t).select();return console.log("removeBookmark response:",{data:n,error:r,count:i}),r?(console.error("Error removing bookmark:",r),!1):!0}async function ol(e){const{data:t,error:n}=await Tn.from("tried_recipes").select("*").eq("session_id",e).order("created_at",{ascending:!1});return n?(console.error("Error fetching tried recipes:",n),[]):t||[]}async function _b(e,t){const{data:n}=await Tn.from("tried_recipes").select("id").eq("recipe_id",e).eq("session_id",t).maybeSingle();if(n)return console.log("Recipe already marked as tried, skipping insert"),!0;const{error:r}=await Tn.from("tried_recipes").insert({recipe_id:e,session_id:t});return r?(console.error("Error marking recipe as tried:",r),!1):!0}async function Pb(e,t){console.log("unmarkRecipeAsTried called with:",{recipeId:e,sessionId:t});const{data:n,error:r,count:i}=await Tn.from("tried_recipes").delete().eq("recipe_id",e).eq("session_id",t).select();return console.log("unmarkRecipeAsTried response:",{data:n,error:r,count:i}),r?(console.error("Error unmarking recipe:",r),!1):!0}var ms={};(function e(t,n,r,i){var s=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),o=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!t.OffscreenCanvas)return!1;var T=new OffscreenCanvas(1,1),P=T.getContext("2d");P.fillRect(0,0,1,1);var O=T.transferToImageBitmap();try{P.createPattern(O,"no-repeat")}catch{return!1}return!0}();function l(){}function u(T){var P=n.exports.Promise,O=P!==void 0?P:t.Promise;return typeof O=="function"?new O(T):(T(l,l),null)}var h=function(T,P){return{transform:function(O){if(T)return O;if(P.has(O))return P.get(O);var F=new OffscreenCanvas(O.width,O.height),V=F.getContext("2d");return V.drawImage(O,0,0),P.set(O,F),F},clear:function(){P.clear()}}}(a,new Map),d=function(){var T=Math.floor(16.666666666666668),P,O,F={},V=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(P=function(H){var W=Math.random();return F[W]=requestAnimationFrame(function $(Y){V===Y||V+T-1/pub//...\` for public files and HTTPS relay forms for read-only examples. +• Keys. Generate a keypair locally, store an encrypted recovery file, and keep secrets out of your repo.`},{id:"welcome-2",title:"Let's cook",kind:"intro",estimatedTime:"1 min read",body:`## Quick start +1) cargo add pubky@=0.6.0 tokio --features macros,rt-multi-thread +2) Pick a backend: local \`pubky-testnet\` for offline dev or staging (see beta guide for host key and tokens). +3) Paste "Create a client," then try "Sign up," then "Write a file," and verify with "HEAD" and "List." + +## Beta shortcuts +• Staging homeserver public key, example signup tokens, and the admin endpoint are in the tester PDF (currently only available internally or on request). Rotate as needed. + +## Safety tips +• Treat recovery files like secrets. Use strong passphrases. +• When in doubt, first test against \`pubky-testnet\` first, then stage, and then prod. + +Ready? Let's cook. 👨‍🍳`},{id:"client",title:"Create a Pubky instance",kind:"identity",estimatedTime:"1 min",code:`use pubky::Pubky; + +fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + Ok(()) +}`,notes:"Every program needs one. The Pubky instance is your entry point to the SDK."},{id:"signup",title:"Sign up a new user to a homeserver",kind:"identity",estimatedTime:"3 min",code:`use pubky::{Pubky, Keypair}; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + let keypair = Keypair::random(); + let homeserver = "ufib...u1uy"; + let token = Some("G12J-824M-F0V0"); + + let signer = pubky.signer(keypair); + let session = signer.signup(&homeserver, token).await?; + println!("Signed up: {:?}", session); + Ok(()) +}`,notes:"Use staging host key and token during beta. Keypair::random() generates a new key."},{id:"signin",title:"Sign in later with the same keypair",kind:"identity",estimatedTime:"2 min",code:`use pubky::{Pubky, Keypair}; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + let keypair = Keypair::random(); // load your real key from recovery file + let signer = pubky.signer(keypair); + let session = signer.signin().await?; + println!("Signed in: {:?}", session); + Ok(()) +}`,notes:"Use recovery file to restore your keypair securely."},{id:"putget",title:"Write a file and read it back (public)",kind:"storage",estimatedTime:"3 min",code:`use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + // Assume you have a session from signin/signup + let session = /* your session */; + + // Write to public storage + session.storage().put("/pub/my.app/hello.txt", "hello world").await?; + + // Read back using public storage (no auth needed) + let text = pubky.public_storage() + .get("/pub/my.app/hello.txt") + .await? + .text() + .await?; + println!("Got: {}", text); + Ok(()) +}`,notes:"Use domain-like paths: /pub/mycoolnew.app/ for public data."},{id:"head",title:"HEAD check for size and existence",kind:"storage",estimatedTime:"2 min",code:`use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + let session = /* your session */; + + let resp = session.storage().head("/pub/my.app/hello.txt").await?; + if let Some(size) = resp.content_length() { + println!("Size: {} bytes", size); + } else { + println!("File exists, size unknown"); + } + Ok(()) +}`,notes:"HEAD is efficient for checking existence without downloading content."},{id:"list",title:"List files with cursor and limit",kind:"storage",estimatedTime:"3 min",code:`use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + let session = /* your session */; + let base = "/pub/my.app/"; + + // List files with pagination + let files = session.storage().list(base).await?; + println!("Files: {:?}", files); + Ok(()) +}`,notes:"List returns file paths under the specified directory."},{id:"delete",title:"Delete a file",kind:"storage",estimatedTime:"1 min",code:`use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + let session = /* your session */; + + session.storage().delete("/pub/my.app/hello.txt").await?; + println!("File deleted"); + Ok(()) +}`,notes:"Deletes are permanent. Make sure you have the right path!"},{id:"public-get",title:"Get public data from any user",kind:"storage",estimatedTime:"2 min",code:`use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + + // Read public data from any user (no auth needed) + let url = "pubky://USER_PUBKY/pub/pubky.app/profile.json"; + let data = pubky.public_storage() + .get(url) + .await? + .text() + .await?; + + println!("Public data: {}", data); + Ok(()) +}`,notes:"Access public data from any Pubky user without authentication."},{id:"resolve",title:"Resolve homeserver for a given Pubky",kind:"discovery",estimatedTime:"2 min",code:`use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + let user_id = "YOUR_PUBKY"; + + if let Some(homeserver) = pubky.resolve_homeserver(user_id).await? { + println!("Homeserver: {}", homeserver); + } else { + println!("Not found"); + } + Ok(()) +}`,notes:"Uses Pkarr DNS to discover where a user's data lives."},{id:"pairing",title:"Pubky Ring pairing (QR login flow)",kind:"auth",estimatedTime:"4 min",code:`use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + + // Start authentication flow + let auth_flow = pubky.start_auth_flow().await?; + println!("Show this URL as QR code: {}", auth_flow.url()); + + // Wait for user to scan and approve + let session = auth_flow.wait_for_auth().await?; + println!("Authenticated! Session: {:?}", session); + Ok(()) +}`,notes:"Display the URL as a QR code for users to scan with Pubky Ring app."},{id:"recovery",title:"Create and decrypt a recovery file",kind:"identity",estimatedTime:"3 min",code:`use pubky::Keypair; + +fn main() -> anyhow::Result<()> { + let keypair = Keypair::random(); + let passphrase = "strong passphrase"; + + // Save keypair to encrypted file + keypair.save_to_file("my_recovery.bin", passphrase)?; + + // Restore keypair from file + let restored = Keypair::from_file("my_recovery.bin", passphrase)?; + assert_eq!(restored.public_key(), keypair.public_key()); + println!("Recovery successful!"); + Ok(()) +}`,notes:"NEVER share your recovery file or passphrase. Store them securely like passwords."},{id:"logging",title:"Enable debug logging",kind:"testing",estimatedTime:"2 min",code:`use tracing_subscriber; + +fn main() -> anyhow::Result<()> { + // Initialize tracing subscriber for debug output + tracing_subscriber::fmt() + .with_max_level(tracing::Level::DEBUG) + .init(); + + // Now run your Pubky operations + // You'll see detailed debug logs for all SDK activity + println!("Logging enabled!"); + Ok(()) +}`,notes:"See what's happening under the hood. Great for debugging storage roundtrips."},{id:"testnet",title:"Run an embedded local testnet",kind:"testing",estimatedTime:"2 min",code:`use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + // Create Pubky instance with testnet config + let pubky = Pubky::testnet().await?; + + // Now you can test signup, signin, and storage operations + // without connecting to staging or production servers + println!("Testnet ready for testing!"); + Ok(()) +}`,notes:"Perfect for offline development and testing. No internet required!"},{id:"capabilities",title:"Define granular access with Capabilities",kind:"auth",estimatedTime:"3 min",code:`use pubky::{Pubky, Capabilities}; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + + // Define specific permissions for auth flow + let caps = Capabilities::builder() + .read("/pub/my.app/**") + .write("/pub/my.app/posts/**") + .delete("/pub/my.app/drafts/**") + .build(); + + let auth_flow = pubky.start_auth_flow_with_caps(caps).await?; + println!("Auth URL: {}", auth_flow.url()); + Ok(()) +}`,notes:"Limit what apps can access. Use wildcards for flexible path matching."},{id:"pkdns",title:"Publish and resolve PKDNS records",kind:"discovery",estimatedTime:"3 min",code:`use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + let session = /* your session */; + + // Publish a DNS-like record using Pkarr + session.publish_pkarr_record("myapp", "example.com").await?; + + // Resolve it later + let record = pubky.resolve_pkarr("YOUR_PUBKY", "myapp").await?; + println!("Record: {:?}", record); + Ok(()) +}`,notes:"Pkarr enables decentralized DNS using your Pubky as the root of trust."},{id:"session-persist",title:"Persist and restore sessions",kind:"identity",estimatedTime:"2 min",code:`use pubky::{Pubky, PubkySession}; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + + // After signin/signup, save session + let session = /* your session */; + let session_data = session.to_bytes()?; + std::fs::write("session.dat", session_data)?; + + // Restore later + let saved = std::fs::read("session.dat")?; + let restored = PubkySession::from_bytes(&saved)?; + println!("Session restored!"); + Ok(()) +}`,notes:"Store session secrets securely. Treat them like passwords!"}],la=[{id:"intro",label:"Intro"},{id:"identity",label:"Identity"},{id:"storage",label:"Storage"},{id:"auth",label:"Auth"},{id:"discovery",label:"Discovery"},{id:"testing",label:"Testing"}],At=(()=>{const e=la.map(t=>t.id);return[...bb].sort((t,n)=>{const r=e.indexOf(t.kind),i=e.indexOf(n.kind);return r-i})})();function Cb(){const[e,t]=R.useState(!1);return R.useEffect(()=>{const n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>t(n.matches);return r(),n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}function Eb(e){const t=e.split(` +`),n=[];let r=[],i=0;const s=()=>{r.length>0&&(n.push(C.jsx("div",{className:"text-sm leading-relaxed text-zinc-700 mb-3",children:r.join(` +`)},i++)),r=[])};return t.forEach(o=>{o.startsWith("## ")?(s(),n.push(C.jsx("h3",{className:"text-lg font-bold text-orange-600 mt-4 mb-2 first:mt-0",children:o.substring(3)},i++))):r.push(o)}),s(),C.jsx("div",{className:"whitespace-pre-wrap flex-1",children:n})}function Rb({items:e,currentId:t,onSelect:n,open:r,bookmarkedIds:i,triedIds:s}){return C.jsx(Nn,{children:(r||typeof r>"u")&&C.jsxs(Ft.aside,{initial:{x:-16,opacity:0},animate:{x:0,opacity:1},exit:{x:-16,opacity:0},transition:{duration:.2},className:"h-full w-72 shrink-0 p-6 hidden md:flex md:flex-col gap-3",children:[C.jsxs("div",{className:"flex items-center gap-2 px-1 py-1",children:[C.jsx(ym,{className:"size-5"}),C.jsx("div",{className:"font-semibold tracking-tight",children:"Pubky SDK Cookbook"})]}),C.jsx("nav",{className:"flex-1 overflow-auto pr-1",children:la.map(o=>C.jsxs("div",{className:"mb-2",children:[C.jsx("div",{className:"px-1 pb-1 text-xs uppercase tracking-wide text-orange-600 font-semibold",children:o.label}),C.jsx("ul",{className:"space-y-1",children:e.filter(a=>a.kind===o.id).map(a=>C.jsx("li",{children:C.jsxs("button",{onClick:()=>n(a.id),className:`text-left w-full rounded-xl px-3 py-1 hover:bg-orange-50 transition-colors flex items-center justify-between gap-2 ${t===a.id?"bg-orange-100 text-orange-600":"text-zinc-700"}`,children:[C.jsx("div",{className:"text-xs font-medium leading-snug flex-1",children:a.title}),C.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.has(a.id)&&C.jsx(km,{className:"size-3.5 text-orange-600"}),i.has(a.id)&&C.jsx(vm,{className:"size-3.5 fill-orange-600 text-orange-600"})]})]})},a.id))})]},o.id))})]})})}function T0({recipe:e,copyFeedback:t,setCopyFeedback:n,bookmarkFeedback:r,triedFeedback:i,isBookmarked:s,onToggleBookmark:o,isTried:a,onToggleTried:l,onEnlargeCode:u}){var h;return C.jsx("div",{className:"w-full h-full shadow-xl rounded-3xl",children:C.jsx(fx,{className:"w-full h-full rounded-3xl shadow-[0_8px_40px_rgba(217,119,6,0.12)] border-orange-300/50 bg-orange-100",children:C.jsxs(px,{className:"p-7 h-full flex flex-col relative overflow-auto",children:[C.jsxs("div",{className:"flex items-center justify-between mb-1",children:[C.jsx("div",{className:"text-xs uppercase tracking-wide text-orange-600 font-semibold",children:(h=la.find(d=>d.id===e.kind))==null?void 0:h.label}),e.estimatedTime&&C.jsxs("div",{className:"flex items-center gap-1 text-xs text-orange-600",children:[C.jsx(wx,{className:"size-3"}),e.estimatedTime]})]}),C.jsx("h2",{className:"text-2xl font-bold leading-snug mb-3 tracking-tight text-zinc-900",children:e.title}),e.body&&Eb(e.body),e.code&&C.jsxs("div",{className:"mt-1 flex-1 space-y-3",children:[C.jsxs("div",{className:"flex flex-wrap gap-2",children:[C.jsxs(dn,{size:"sm",variant:"secondary",onClick:()=>{navigator.clipboard.writeText(e.code),n(!0),setTimeout(()=>n(!1),2e3)},title:"Copy to clipboard",children:[C.jsx(Sm,{className:"size-4 mr-1"}),t?"Copied!":"Copy"]}),u&&C.jsxs(dn,{size:"sm",variant:"secondary",onClick:()=>u(e.code),title:"Enlarge code view",children:[C.jsx(xx,{className:"size-4 mr-1"}),"Enlarge"]}),C.jsxs(dn,{size:"sm",variant:"secondary",onClick:()=>o(e.id),className:s?"!bg-orange-600 !border-orange-600 hover:!bg-orange-700 !text-white":"",title:s?"Bookmarked":"Bookmark recipe",children:[C.jsx(wm,{className:`size-4 mr-1 ${s?"fill-white text-white":""}`}),s?"Bookmarked":"Bookmark"]}),C.jsxs(dn,{size:"sm",variant:"secondary",onClick:()=>l(e.id),className:a?"!bg-orange-600 !border-orange-600 hover:!bg-orange-700 !text-white":"",title:a?"Mark as not tried":"Mark as tried",children:[C.jsx(xm,{className:`size-4 mr-1 ${a?"text-white":""}`}),"Cooked!"]})]}),C.jsx("div",{className:"relative",children:C.jsx("div",{className:"rounded-xl overflow-auto max-h-[420px]",children:C.jsx(t0,{code:e.code})})})]}),e.notes&&C.jsx("div",{className:"mt-3 text-xs text-orange-600",children:e.notes})]})})})}function Ab({recipes:e,currentId:t,onFlip:n,copyFeedback:r,setCopyFeedback:i,bookmarkFeedback:s,triedFeedback:o,bookmarkedIds:a,onToggleBookmark:l,triedIds:u,onToggleTried:h,onEnlargeCode:d}){const p=R.useRef(null),v=R.useRef(!1),k=R.useMemo(()=>{const _=new Map;return e.forEach((b,w)=>_.set(b.id,w)),_},[e]);return R.useEffect(()=>{const _=k.get(t);if(_!=null&&p.current)try{v.current=!0,p.current.pageFlip().turnToPage(_)}catch{}},[t,k]),e.length===0?C.jsx("div",{className:"relative flex-1 h-full p-2 md:p-6 flex items-center justify-center",children:C.jsx("p",{className:"text-orange-600 text-center",children:"No recipes found"})}):C.jsxs("div",{className:"relative flex-1 h-full p-2 md:p-6",children:[C.jsx(hx,{width:680,height:900,minWidth:300,maxWidth:900,minHeight:600,maxHeight:1400,className:"mx-auto",size:"stretch",showCover:!1,mobileScrollSupport:!0,onFlip:_=>{var y;if(v.current){v.current=!1;return}const b=(_==null?void 0:_.data)??0,w=(y=e[b])==null?void 0:y.id;w&&n(w)},ref:p,children:e.map(_=>C.jsx("div",{className:"bg-transparent",children:C.jsx(T0,{recipe:_,copyFeedback:r,setCopyFeedback:i,bookmarkFeedback:s,triedFeedback:o,isBookmarked:a.has(_.id),onToggleBookmark:l,isTried:u.has(_.id),onToggleTried:h,onEnlargeCode:d})},_.id))},e.map(_=>_.id).join(",")),C.jsxs("div",{className:"absolute inset-x-0 bottom-8 gap-3 flex justify-center pointer-events-none",children:[C.jsx("span",{className:"pointer-events-auto",children:C.jsx(dn,{size:"icon",variant:"secondary",onClick:()=>{var _;return(_=p.current)==null?void 0:_.pageFlip().flipPrev()},"aria-label":"Previous page",children:C.jsx(yx,{className:"size-5"})})}),C.jsx("span",{className:"pointer-events-auto",children:C.jsx(dn,{size:"icon",variant:"secondary",onClick:()=>{var _;return(_=p.current)==null?void 0:_.pageFlip().flipNext()},"aria-label":"Next page",children:C.jsx(vx,{className:"size-5"})})})]})]})}function jb({recipes:e,currentId:t,copyFeedback:n,setCopyFeedback:r,bookmarkFeedback:i,triedFeedback:s,bookmarkedIds:o,onToggleBookmark:a,triedIds:l,onToggleTried:u,onEnlargeCode:h}){const d=R.useRef(null);return R.useEffect(()=>{var v;const p=(v=d.current)==null?void 0:v.querySelector(`[data-id='${t}']`);p==null||p.scrollIntoView({behavior:"smooth",block:"start"})},[t]),e.length===0?C.jsx("div",{className:"flex-1 h-full overflow-auto px-6 py-8 flex items-center justify-center",children:C.jsx("p",{className:"text-orange-600 text-center",children:"No recipes found"})}):C.jsx("div",{ref:d,className:"flex-1 h-full overflow-auto px-6 py-8 space-y-6",children:e.map(p=>C.jsx("div",{"data-id":p.id,children:C.jsx(T0,{recipe:p,copyFeedback:n,setCopyFeedback:r,bookmarkFeedback:i,triedFeedback:s,isBookmarked:o.has(p.id),onToggleBookmark:a,isTried:l.has(p.id),onToggleTried:u,onEnlargeCode:h})},p.id))})}function Mb(){const[e,t]=R.useState(""),[n,r]=R.useState(!1),[i,s]=R.useState(At[0].id),[o,a]=R.useState(!1),[l,u]=R.useState(null),[h,d]=R.useState(null),[p,v]=R.useState([]),[k,_]=R.useState([]),[b]=R.useState(()=>xb()),[w,y]=R.useState(null),[g,c]=R.useState(!1),f=Cb(),m=R.useMemo(()=>new Set(p.map(L=>L.recipe_id)),[p]),x=R.useMemo(()=>new Set(k.map(L=>L.recipe_id)),[k]),S=R.useMemo(()=>At.filter(L=>L.kind!=="intro"),[]),E=S.length;R.useEffect(()=>{sl(b).then(v),ol(b).then(_)},[b]);const A=async L=>{const U=m.has(L);if(console.log("handleToggleBookmark called:",{recipeId:L,isCurrentlyBookmarked:U,sessionId:b,currentBookmarks:p.map(ee=>ee.recipe_id)}),U){console.log("Removing bookmark...");const ee=await Sb(L,b);if(console.log("Remove bookmark result:",ee),ee){const z=await sl(b);console.log("Updated bookmarks after removal:",z.map(M=>M.recipe_id)),v(z)}}else{console.log("Adding bookmark...");const ee=await kb(L,b);if(console.log("Add bookmark result:",ee),ee){const z=await sl(b);console.log("Updated bookmarks after addition:",z.map(M=>M.recipe_id)),v(z),u(L),setTimeout(()=>u(null),2e3)}}},D=async L=>{const U=x.has(L);if(console.log("handleToggleTried called:",{recipeId:L,isCurrentlyTried:U,sessionId:b,currentTried:k.map(ee=>ee.recipe_id)}),U){console.log("Removing tried status...");const ee=await Pb(L,b);if(console.log("Remove tried result:",ee),ee){const z=await ol(b);console.log("Updated tried recipes after removal:",z.map(M=>M.recipe_id)),_(z)}}else{console.log("Adding tried status...");const ee=await _b(L,b);if(console.log("Add tried result:",ee),ee){const z=await ol(b);console.log("Updated tried recipes after addition:",z.map(N=>N.recipe_id)),_(z),d(L),setTimeout(()=>d(null),2e3),z.filter(N=>S.some(T=>T.id===N.recipe_id)).length===E&&X()}}},X=()=>{c(!0);const U=Date.now()+4e3,ee=["#ea580c","#fb923c","#fdba74","#fed7aa"];(function z(){rp({particleCount:3,angle:60,spread:55,origin:{x:0},colors:ee}),rp({particleCount:3,angle:120,spread:55,origin:{x:1},colors:ee}),Date.now()c(!1),5e3)},Q=R.useMemo(()=>{const L=e.trim().toLowerCase();return L?At.filter(U=>{var ee,z;return U.title.toLowerCase().includes(L)||((ee=U.code)==null?void 0:ee.toLowerCase().includes(L))||((z=U.body)==null?void 0:z.toLowerCase().includes(L))}):At},[e]);return R.useEffect(()=>{Q.length>0&&!Q.some(L=>L.id===i)&&s(Q[0].id)},[Q,i]),R.useEffect(()=>{console.assert(Array.isArray(At)&&At.length>0,"SORTED_RECIPES should be a non-empty array"),console.assert(At[0].id==="welcome"&&At[1].id==="welcome-2","Intro should span two pages: welcome, welcome-2");const L=new Set(At.map(U=>U.id));console.assert(L.size===At.length,"Recipe IDs must be unique")},[]),R.useEffect(()=>{const L=U=>{var ee,z;U.key==="ArrowLeft"?(ee=document.querySelector("[aria-label='Previous page']"))==null||ee.click():U.key==="ArrowRight"&&((z=document.querySelector("[aria-label='Next page']"))==null||z.click())};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[]),C.jsxs("div",{className:"min-h-screen h-screen w-full bg-gradient-to-br from-orange-50 via-white to-amber-50 text-zinc-900",children:[C.jsx("header",{className:"sticky top-0 z-30 border-b border-orange-200 bg-white/80 backdrop-blur supports-[backdrop-filter]:bg-white/60",children:C.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 md:px-6 md:py-6 flex items-center gap-4",children:[C.jsx("button",{className:"md:hidden",onClick:()=>r(L=>!L),"aria-label":"Toggle menu",children:n?C.jsx(_d,{className:"size-6"}):C.jsx(kx,{className:"size-6"})}),C.jsx(Tb,{className:"scale-100"}),C.jsxs("div",{className:"hidden md:flex items-center gap-2 flex-1 max-w-xs px-8",children:[C.jsx("div",{className:"flex-1 h-2 bg-orange-200 rounded-full overflow-hidden",children:C.jsx("div",{className:"h-full bg-orange-600 transition-all duration-300 ease-out rounded-full",style:{width:`${k.filter(L=>S.some(U=>U.id===L.recipe_id)).length/E*100}%`}})}),C.jsxs("div",{className:"text-xs text-orange-600 font-medium whitespace-nowrap",children:[k.filter(L=>S.some(U=>U.id===L.recipe_id)).length,"/",E," cooked"]})]}),C.jsxs("div",{className:"ml-auto w-full max-w-md relative hidden md:block",children:[C.jsx(dx,{value:e,onChange:L=>t(L.target.value),placeholder:"Search recipes, commands, or code",className:"pl-8 text-orange-600"}),C.jsx(Sx,{className:"absolute left-3 top-3 size-4 text-orange-600"})]})]})}),C.jsxs("main",{className:"max-w-7xl mx-auto h-[calc(100vh-60px)] md:h-[calc(100vh-130px)] flex relative",children:[C.jsx("div",{className:"hidden md:block",children:C.jsx(Rb,{items:Q,currentId:i,onSelect:s,open:!0,bookmarkedIds:m,triedIds:x})}),C.jsx(Nn,{children:n&&C.jsx(Ft.div,{initial:{x:-280},animate:{x:0},exit:{x:-280},transition:{duration:.18},className:"fixed z-40 top-[61px] md:top-[89px] bottom-0 left-0 w-72 bg-white border-r border-orange-200 md:hidden overflow-auto shadow-lg",children:C.jsxs("div",{className:"h-full w-full p-6 flex flex-col gap-3",children:[C.jsxs("div",{className:"flex items-center gap-2 px-1 py-1",children:[C.jsx(ym,{className:"size-5"}),C.jsx("div",{className:"font-semibold tracking-tight",children:"Pubky SDK Cookbook"})]}),C.jsx("nav",{className:"flex-1 overflow-auto pr-1",children:la.map(L=>C.jsxs("div",{className:"mb-2",children:[C.jsx("div",{className:"px-1 pb-1 text-xs uppercase tracking-wide text-orange-600 font-semibold",children:L.label}),C.jsx("ul",{className:"space-y-1",children:Q.filter(U=>U.kind===L.id).map(U=>C.jsx("li",{children:C.jsxs("button",{onClick:()=>{s(U.id),r(!1)},className:`text-left w-full rounded-xl px-3 py-1 hover:bg-orange-50 transition-colors flex items-center justify-between gap-2 ${i===U.id?"bg-orange-100 text-orange-600":"text-zinc-700"}`,children:[C.jsx("div",{className:"text-xs font-medium leading-snug flex-1",children:U.title}),C.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[x.has(U.id)&&C.jsx(km,{className:"size-3.5 text-orange-600"}),m.has(U.id)&&C.jsx(vm,{className:"size-3.5 fill-orange-600 text-orange-600"})]})]})},U.id))})]},L.id))})]})})}),C.jsx("section",{className:"flex-1 h-full relative",children:f?C.jsx(jb,{recipes:Q,currentId:i,copyFeedback:o,setCopyFeedback:a,bookmarkFeedback:l,triedFeedback:h,bookmarkedIds:m,onToggleBookmark:A,triedIds:x,onToggleTried:D,onEnlargeCode:y}):C.jsx(Ab,{recipes:Q,currentId:i,onFlip:s,copyFeedback:o,setCopyFeedback:a,bookmarkFeedback:l,triedFeedback:h,bookmarkedIds:m,onToggleBookmark:A,triedIds:x,onToggleTried:D,onEnlargeCode:y})})]}),C.jsx("footer",{className:"border-t border-orange-200 text-xs text-orange-600 py-3 bg-white/50",children:C.jsxs("div",{className:"max-w-7xl mx-auto px-4 flex items-center justify-between",children:[C.jsxs("div",{children:["Cooky v.0.7 © ",new Date().getFullYear()," • Built for Pubky SDK v0.6 • ",C.jsx("a",{className:"hover:underline",href:"https://docs.rs/pubky/0.6.0-rc.6/pubky/index.html",target:"_blank",rel:"noreferrer",children:"Docs •"})," ",C.jsx("a",{className:"hover:underline",href:"https://crates.io/crates/pubky/0.6.0-rc.6",target:"_blank",rel:"noreferrer",children:"Crates"})]}),C.jsxs("div",{className:"flex items-center gap-3",children:[C.jsx("a",{className:"hover:underline",href:"https://pubky.org",target:"_blank",rel:"noreferrer",children:"pubky.org"}),C.jsx("a",{className:"hover:underline",href:"https://pubky.app",target:"_blank",rel:"noreferrer",children:"pubky.app"}),C.jsx("a",{className:"hover:underline",href:"https://pubkyring.app",target:"_blank",rel:"noreferrer",children:"pubkyring.app"})]})]})}),C.jsx(Nn,{children:o&&C.jsx(Ft.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},className:"fixed bottom-8 left-1/2 -translate-x-1/2 bg-orange-600 text-white px-6 py-3 rounded-full shadow-lg font-semibold text-sm z-50",children:"Code copied! Let's cook! 👨‍🍳"})}),C.jsx(Nn,{children:h&&C.jsxs(Ft.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},className:"fixed bottom-8 left-1/2 -translate-x-1/2 bg-orange-600 text-white px-6 py-3 rounded-full shadow-lg font-semibold text-sm z-50 flex items-center gap-2",children:[C.jsx(xm,{className:"size-5"}),"Cooked Recipe! 👨‍🍳 🍔"]})}),C.jsx(Nn,{children:l&&C.jsxs(Ft.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},className:"fixed bottom-8 left-1/2 -translate-x-1/2 bg-orange-600 text-white px-6 py-3 rounded-full shadow-lg font-semibold text-sm z-50 flex items-center gap-2",children:[C.jsx(wm,{className:"size-5"}),"Bookmarked! 📖"]})}),C.jsx(Nn,{children:w&&C.jsx(Ft.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-50 flex items-center justify-center p-4",onClick:()=>y(null),children:C.jsxs(Ft.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",damping:25,stiffness:300},className:"bg-white rounded-2xl shadow-2xl max-w-5xl w-full max-h-[90vh] overflow-hidden relative",onClick:L=>L.stopPropagation(),children:[C.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-orange-200 bg-orange-50",children:[C.jsx("h3",{className:"text-lg font-semibold text-orange-600",children:"Code View"}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsxs(dn,{size:"sm",variant:"secondary",onClick:()=>{navigator.clipboard.writeText(w),a(!0),setTimeout(()=>a(!1),2e3)},title:"Copy to clipboard",children:[C.jsx(Sm,{className:"size-4 mr-1"}),"Copy"]}),C.jsx(dn,{size:"sm",variant:"secondary",onClick:()=>y(null),title:"Close",children:C.jsx(_d,{className:"size-5"})})]})]}),C.jsx("div",{className:"overflow-auto max-h-[calc(90vh-80px)] p-6",children:C.jsx(t0,{code:w})})]})})}),C.jsx(Nn,{children:g&&C.jsx(Ft.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{type:"spring",damping:15,stiffness:200},className:"fixed inset-0 z-[60] flex items-center justify-center pointer-events-none",children:C.jsxs("div",{className:"bg-orange-600 text-white px-12 py-8 rounded-3xl shadow-2xl text-center",children:[C.jsx(Ft.div,{initial:{rotate:-10},animate:{rotate:10},transition:{repeat:1/0,repeatType:"reverse",duration:.5},className:"text-7xl mb-4",children:"🎉"}),C.jsx("h2",{className:"text-4xl font-bold mb-2",children:"Congratulations!"}),C.jsx("p",{className:"text-2xl",children:"You're a Pubky Chef now!"})]})})})]})}mm(document.getElementById("root")).render(C.jsx(R.StrictMode,{children:C.jsx(Mb,{})}))});export default Ob(); diff --git a/cooky/dist/assets/index-Bgo_tuuw.css b/cooky/dist/assets/index-Bgo_tuuw.css new file mode 100644 index 0000000..7e4d3cc --- /dev/null +++ b/cooky/dist/assets/index-Bgo_tuuw.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&display=swap";@import"https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter Tight,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{font-family:Inter Tight,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}pre,code,code span{font-family:Fira Code,Fira Code,Courier New,monospace!important;font-feature-settings:"calt" 1}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.bottom-0{bottom:0}.bottom-8{bottom:2rem}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:.75rem}.top-0{top:0}.top-3{top:.75rem}.top-\[61px\]{top:61px}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[60\]{z-index:60}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-1{margin-top:.25rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-10{height:2.5rem}.h-2{height:.5rem}.h-\[calc\(100vh-60px\)\]{height:calc(100vh - 60px)}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[420px\]{max-height:420px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(90vh-80px\)\]{max-height:calc(90vh - 80px)}.min-h-screen{min-height:100vh}.w-72{width:18rem}.w-8{width:2rem}.w-auto{width:auto}.w-full{width:100%}.max-w-5xl{max-width:64rem}.max-w-7xl{max-width:80rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.\!border-orange-600{--tw-border-opacity: 1 !important;border-color:rgb(234 88 12 / var(--tw-border-opacity, 1))!important}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-orange-300\/50{border-color:#fdba7480}.\!bg-orange-600{--tw-bg-opacity: 1 !important;background-color:rgb(234 88 12 / var(--tw-bg-opacity, 1))!important}.bg-black\/60{background-color:#0009}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-200{--tw-bg-opacity: 1;background-color:rgb(254 215 170 / var(--tw-bg-opacity, 1))}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-orange-600{--tw-bg-opacity: 1;background-color:rgb(234 88 12 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/50{background-color:#ffffff80}.bg-white\/80{background-color:#fffc}.bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity, 1))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-orange-50{--tw-gradient-from: #fff7ed var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 247 237 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-white{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #fff var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-amber-50{--tw-gradient-to: #fffbeb var(--tw-gradient-to-position)}.fill-orange-600{fill:#ea580c}.fill-white{fill:#fff}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-7{padding:1.75rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-12{padding-left:3rem;padding-right:3rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-4{padding-right:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-7xl{font-size:4.5rem;line-height:1}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.\!text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-900{--tw-text-opacity: 1;color:rgb(124 45 18 / var(--tw-text-opacity, 1))}.text-pink-400{--tw-text-opacity: 1;color:rgb(244 114 182 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-zinc-200{--tw-text-opacity: 1;color:rgb(228 228 231 / var(--tw-text-opacity, 1))}.text-zinc-500{--tw-text-opacity: 1;color:rgb(113 113 122 / var(--tw-text-opacity, 1))}.text-zinc-700{--tw-text-opacity: 1;color:rgb(63 63 70 / var(--tw-text-opacity, 1))}.text-zinc-900{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.text-zinc-950{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity, 1))}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_8px_40px_rgba\(217\,119\,6\,0\.12\)\]{--tw-shadow: 0 8px 40px rgba(217,119,6,.12);--tw-shadow-colored: 0 8px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-offset-white{--tw-ring-offset-color: #fff}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-orange-600::-moz-placeholder{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.placeholder\:text-orange-600::placeholder{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.first\:mt-0:first-child{margin-top:0}.hover\:\!bg-orange-700:hover{--tw-bg-opacity: 1 !important;background-color:rgb(194 65 12 / var(--tw-bg-opacity, 1))!important}.hover\:bg-orange-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.hover\:bg-orange-700:hover{--tw-bg-opacity: 1;background-color:rgb(194 65 12 / var(--tw-bg-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-orange-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 115 22 / var(--tw-ring-opacity, 1))}.focus\:ring-orange-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 88 12 / var(--tw-ring-opacity, 1))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-orange-600:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 88 12 / var(--tw-ring-opacity, 1))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@supports ((-webkit-backdrop-filter: var(--tw)) or (backdrop-filter: var(--tw))){.supports-\[backdrop-filter\]\:bg-white\/60{background-color:#fff9}}@media (min-width: 768px){.md\:top-\[89px\]{top:89px}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-\[calc\(100vh-130px\)\]{height:calc(100vh - 130px)}.md\:flex-col{flex-direction:column}.md\:p-6{padding:1.5rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}} diff --git a/cooky/dist/cooky-logo-animated.mp4 b/cooky/dist/cooky-logo-animated.mp4 new file mode 100644 index 0000000..4812197 Binary files /dev/null and b/cooky/dist/cooky-logo-animated.mp4 differ diff --git a/cooky/dist/cooky-logo-big.png b/cooky/dist/cooky-logo-big.png new file mode 100644 index 0000000..fec4f6f Binary files /dev/null and b/cooky/dist/cooky-logo-big.png differ diff --git a/cooky/dist/cooky-logo.png b/cooky/dist/cooky-logo.png new file mode 100644 index 0000000..8467f95 Binary files /dev/null and b/cooky/dist/cooky-logo.png differ diff --git a/cooky/dist/index.html b/cooky/dist/index.html new file mode 100644 index 0000000..4573e49 --- /dev/null +++ b/cooky/dist/index.html @@ -0,0 +1,19 @@ + + + + + + + Cooky + + + + + + + + + +
+ + diff --git a/cooky/eslint.config.js b/cooky/eslint.config.js new file mode 100644 index 0000000..82c2e20 --- /dev/null +++ b/cooky/eslint.config.js @@ -0,0 +1,28 @@ +import js from '@eslint/js'; +import globals from 'globals'; +import reactHooks from 'eslint-plugin-react-hooks'; +import reactRefresh from 'eslint-plugin-react-refresh'; +import tseslint from 'typescript-eslint'; + +export default tseslint.config( + { ignores: ['dist'] }, + { + extends: [js.configs.recommended, ...tseslint.configs.recommended], + files: ['**/*.{ts,tsx}'], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + plugins: { + 'react-hooks': reactHooks, + 'react-refresh': reactRefresh, + }, + rules: { + ...reactHooks.configs.recommended.rules, + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, + } +); diff --git a/cooky/favicon/apple-touch-icon.png b/cooky/favicon/apple-touch-icon.png new file mode 100644 index 0000000..88d8805 --- /dev/null +++ b/cooky/favicon/apple-touch-icon.png @@ -0,0 +1 @@ +https://stackblitz.com/storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCR01WalFJPSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--a932a6ef0047a47d1d1a626f4f7d4fa5a9a662e1//apple-touch-icon.png \ No newline at end of file diff --git a/cooky/favicon/favicon-96x96.png b/cooky/favicon/favicon-96x96.png new file mode 100644 index 0000000..f41e240 --- /dev/null +++ b/cooky/favicon/favicon-96x96.png @@ -0,0 +1 @@ +https://stackblitz.com/storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCR0VWalFJPSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--610ff3ec476d8c0cc70de380be1ecfcd92da4a0a//favicon-96x96.png \ No newline at end of file diff --git a/cooky/favicon/favicon.svg b/cooky/favicon/favicon.svg new file mode 100644 index 0000000..0d16081 --- /dev/null +++ b/cooky/favicon/favicon.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/cooky/favicon/web-app-manifest-192x192.png b/cooky/favicon/web-app-manifest-192x192.png new file mode 100644 index 0000000..272a97c --- /dev/null +++ b/cooky/favicon/web-app-manifest-192x192.png @@ -0,0 +1 @@ +https://stackblitz.com/storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCR1FWalFJPSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--19a61fff6b0084c40f49a9c33d98822ee9f698c1//web-app-manifest-192x192.png \ No newline at end of file diff --git a/cooky/favicon/web-app-manifest-512x512.png b/cooky/favicon/web-app-manifest-512x512.png new file mode 100644 index 0000000..47aec3d --- /dev/null +++ b/cooky/favicon/web-app-manifest-512x512.png @@ -0,0 +1 @@ +https://stackblitz.com/storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCR0lWalFJPSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--747eef982f06edd49c429f5a8892883ce1419565//web-app-manifest-512x512.png \ No newline at end of file diff --git a/cooky/index.html b/cooky/index.html new file mode 100644 index 0000000..db6b5d7 --- /dev/null +++ b/cooky/index.html @@ -0,0 +1,18 @@ + + + + + + + Cooky + + + + + + + +
+ + + diff --git a/cooky/package-lock.json b/cooky/package-lock.json new file mode 100644 index 0000000..9010cba --- /dev/null +++ b/cooky/package-lock.json @@ -0,0 +1,4251 @@ +{ + "name": "vite-react-typescript-starter", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "vite-react-typescript-starter", + "version": "0.0.0", + "dependencies": { + "@supabase/supabase-js": "^2.57.4", + "canvas-confetti": "^1.9.3", + "framer-motion": "^12.23.24", + "lucide-react": "^0.344.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-pageflip": "^2.0.3" + }, + "devDependencies": { + "@eslint/js": "^9.9.1", + "@types/react": "^18.3.5", + "@types/react-dom": "^18.3.0", + "@vitejs/plugin-react": "^4.3.1", + "autoprefixer": "^10.4.18", + "eslint": "^9.9.1", + "eslint-plugin-react-hooks": "^5.1.0-rc.0", + "eslint-plugin-react-refresh": "^0.4.11", + "globals": "^15.9.0", + "postcss": "^8.4.35", + "tailwindcss": "^3.4.1", + "typescript": "^5.5.3", + "typescript-eslint": "^8.3.0", + "vite": "^5.4.2" + } + }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.7.tgz", + "integrity": "sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.25.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.7.tgz", + "integrity": "sha512-9ickoLz+hcXCeh7jrcin+/SLWm+GkxE2kTvoYyp38p4WkdFXfQJxDFGWp/YHjiKLPx06z2A7W8XKuqbReXDzsw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.7.tgz", + "integrity": "sha512-yJ474Zv3cwiSOO9nXJuqzvwEeM+chDuQ8GJirw+pZ91sCGCyOZ3dJkVE09fTV0VEVzXyLWhh3G/AolYTPX7Mow==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.25.7", + "@babel/generator": "^7.25.7", + "@babel/helper-compilation-targets": "^7.25.7", + "@babel/helper-module-transforms": "^7.25.7", + "@babel/helpers": "^7.25.7", + "@babel/parser": "^7.25.7", + "@babel/template": "^7.25.7", + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.7.tgz", + "integrity": "sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.25.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz", + "integrity": "sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.25.7", + "@babel/helper-validator-option": "^7.25.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz", + "integrity": "sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz", + "integrity": "sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.25.7", + "@babel/helper-simple-access": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.7", + "@babel/traverse": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz", + "integrity": "sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.7.tgz", + "integrity": "sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", + "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", + "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz", + "integrity": "sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.7.tgz", + "integrity": "sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==", + "dev": true, + "dependencies": { + "@babel/template": "^7.25.7", + "@babel/types": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", + "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.7.tgz", + "integrity": "sha512-aZn7ETtQsjjGG5HruveUK06cU3Hljuhd9Iojm4M8WWv3wLE6OkE5PWbDUkItmMgegmccaITudyuW5RPYrYlgWw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.25.7" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.25.7.tgz", + "integrity": "sha512-JD9MUnLbPL0WdVK8AWC7F7tTG2OS6u/AKKnsK+NdRhUiVdnzyR1S3kKQCaRLOiaULvUiqK6Z4JQE635VgtCFeg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.25.7.tgz", + "integrity": "sha512-S/JXG/KrbIY06iyJPKfxr0qRxnhNOdkNXYBl/rmwgDd72cQLH9tEGkDm/yJPGvcSIUoikzfjMios9i+xT/uv9w==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.7.tgz", + "integrity": "sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.25.7", + "@babel/parser": "^7.25.7", + "@babel/types": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.7.tgz", + "integrity": "sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.25.7", + "@babel/generator": "^7.25.7", + "@babel/parser": "^7.25.7", + "@babel/template": "^7.25.7", + "@babel/types": "^7.25.7", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.7.tgz", + "integrity": "sha512-vwIVdXG+j+FOpkwqHRcBgHLYNL7XMkufrlaFvL9o6Ai9sJn9+PdyIL5qa0XzTZw084c+u9LOls53eoZWP/W5WQ==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "dev": true, + "dependencies": { + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.6.0.tgz", + "integrity": "sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.12.0.tgz", + "integrity": "sha512-eohesHH8WFRUprDNyEREgqP6beG6htMeUYeCpkEgBCieCMme5r9zFWjzAJp//9S+Kub4rqE+jXe9Cp1a7IYIIA==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz", + "integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==", + "dev": true, + "dependencies": { + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.0.tgz", + "integrity": "sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==", + "dev": true, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.5", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.5.tgz", + "integrity": "sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==", + "dev": true, + "dependencies": { + "@humanfs/core": "^0.19.0", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.0.tgz", + "integrity": "sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.0.tgz", + "integrity": "sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.0.tgz", + "integrity": "sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.0.tgz", + "integrity": "sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.0.tgz", + "integrity": "sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.0.tgz", + "integrity": "sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.0.tgz", + "integrity": "sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.0.tgz", + "integrity": "sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.0.tgz", + "integrity": "sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.0.tgz", + "integrity": "sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.0.tgz", + "integrity": "sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.0.tgz", + "integrity": "sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.0.tgz", + "integrity": "sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.0.tgz", + "integrity": "sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.0.tgz", + "integrity": "sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.0.tgz", + "integrity": "sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@supabase/auth-js": { + "version": "2.71.1", + "resolved": "https://registry.npmjs.org/@supabase/auth-js/-/auth-js-2.71.1.tgz", + "integrity": "sha512-mMIQHBRc+SKpZFRB2qtupuzulaUhFYupNyxqDj5Jp/LyPvcWvjaJzZzObv6URtL/O6lPxkanASnotGtNpS3H2Q==", + "dependencies": { + "@supabase/node-fetch": "^2.6.14" + } + }, + "node_modules/@supabase/functions-js": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@supabase/functions-js/-/functions-js-2.4.6.tgz", + "integrity": "sha512-bhjZ7rmxAibjgmzTmQBxJU6ZIBCCJTc3Uwgvdi4FewueUTAGO5hxZT1Sj6tiD+0dSXf9XI87BDdJrg12z8Uaew==", + "dependencies": { + "@supabase/node-fetch": "^2.6.14" + } + }, + "node_modules/@supabase/node-fetch": { + "version": "2.6.15", + "resolved": "https://registry.npmjs.org/@supabase/node-fetch/-/node-fetch-2.6.15.tgz", + "integrity": "sha512-1ibVeYUacxWYi9i0cf5efil6adJ9WRyZBLivgjs+AUpewx1F3xPi7gLgaASI2SmIQxPoCEjAsLAzKPgMJVgOUQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/@supabase/postgrest-js": { + "version": "1.21.4", + "resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-1.21.4.tgz", + "integrity": "sha512-TxZCIjxk6/dP9abAi89VQbWWMBbybpGWyvmIzTd79OeravM13OjR/YEYeyUOPcM1C3QyvXkvPZhUfItvmhY1IQ==", + "dependencies": { + "@supabase/node-fetch": "^2.6.14" + } + }, + "node_modules/@supabase/realtime-js": { + "version": "2.15.5", + "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.15.5.tgz", + "integrity": "sha512-/Rs5Vqu9jejRD8ZeuaWXebdkH+J7V6VySbCZ/zQM93Ta5y3mAmocjioa/nzlB6qvFmyylUgKVS1KpE212t30OA==", + "dependencies": { + "@supabase/node-fetch": "^2.6.13", + "@types/phoenix": "^1.6.6", + "@types/ws": "^8.18.1", + "ws": "^8.18.2" + } + }, + "node_modules/@supabase/storage-js": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/@supabase/storage-js/-/storage-js-2.12.1.tgz", + "integrity": "sha512-QWg3HV6Db2J81VQx0PqLq0JDBn4Q8B1FYn1kYcbla8+d5WDmTdwwMr+EJAxNOSs9W4mhKMv+EYCpCrTFlTj4VQ==", + "dependencies": { + "@supabase/node-fetch": "^2.6.14" + } + }, + "node_modules/@supabase/supabase-js": { + "version": "2.57.4", + "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.57.4.tgz", + "integrity": "sha512-LcbTzFhHYdwfQ7TRPfol0z04rLEyHabpGYANME6wkQ/kLtKNmI+Vy+WEM8HxeOZAtByUFxoUTTLwhXmrh+CcVw==", + "dependencies": { + "@supabase/auth-js": "2.71.1", + "@supabase/functions-js": "2.4.6", + "@supabase/node-fetch": "2.6.15", + "@supabase/postgrest-js": "1.21.4", + "@supabase/realtime-js": "2.15.5", + "@supabase/storage-js": "2.12.1" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "24.3.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.1.tgz", + "integrity": "sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g==", + "dependencies": { + "undici-types": "~7.10.0" + } + }, + "node_modules/@types/phoenix": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/@types/phoenix/-/phoenix-1.6.6.tgz", + "integrity": "sha512-PIzZZlEppgrpoT2QgbnDU+MMzuR6BbCjllj0bM70lWoejMeNJAxCchxnv7J3XFkI8MpygtRpzXrIlmWUBclP5A==" + }, + "node_modules/@types/prop-types": { + "version": "15.7.13", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", + "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==", + "dev": true + }, + "node_modules/@types/react": { + "version": "18.3.11", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.11.tgz", + "integrity": "sha512-r6QZ069rFTjrEYgFdOck1gK7FLVsgJE7tTz0pQBczlBNUhBNk0MQH4UbnFSwjpQLMkLzgqvBBa+qGpLje16eTQ==", + "dev": true, + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz", + "integrity": "sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==", + "dev": true, + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/ws": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.1.tgz", + "integrity": "sha512-xfvdgA8AP/vxHgtgU310+WBnLB4uJQ9XdyP17RebG26rLtDrQJV3ZYrcopX91GrHmMoH8bdSwMRh2a//TiJ1jQ==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.8.1", + "@typescript-eslint/type-utils": "8.8.1", + "@typescript-eslint/utils": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.8.1.tgz", + "integrity": "sha512-hQUVn2Lij2NAxVFEdvIGxT9gP1tq2yM83m+by3whWFsWC+1y8pxxxHUFE1UqDu2VsGi2i6RLcv4QvouM84U+ow==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "8.8.1", + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/typescript-estree": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.1.tgz", + "integrity": "sha512-X4JdU+66Mazev/J0gfXlcC/dV6JI37h+93W9BRYXrSn0hrE64IoWgVkO9MSJgEzoWkxONgaQpICWg8vAN74wlA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.8.1.tgz", + "integrity": "sha512-qSVnpcbLP8CALORf0za+vjLYj1Wp8HSoiI8zYU5tHxRVj30702Z1Yw4cLwfNKhTPWp5+P+k1pjmD5Zd1nhxiZA==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "8.8.1", + "@typescript-eslint/utils": "8.8.1", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.1.tgz", + "integrity": "sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.1.tgz", + "integrity": "sha512-A5d1R9p+X+1js4JogdNilDuuq+EHZdsH9MjTVxXOdVFfTJXunKJR/v+fNNyO4TnoOn5HqobzfRlc70NC6HTcdg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.1.tgz", + "integrity": "sha512-/QkNJDbV0bdL7H7d0/y0qBbV2HTtf0TIyjSDTvvmQEzeVx8jEImEbLuOA4EsvE8gIgqMitns0ifb5uQhMj8d9w==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.8.1", + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/typescript-estree": "8.8.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.1.tgz", + "integrity": "sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.2.tgz", + "integrity": "sha512-hieu+o05v4glEBucTcKMK3dlES0OeJlD9YVOAPraVMOInBCwzumaIFiUjr4bHK7NPgnAHgiskUoceKercrN8vg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.25.2", + "@babel/plugin-transform-react-jsx-self": "^7.24.7", + "@babel/plugin-transform-react-jsx-source": "^7.24.7", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.14.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0" + } + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/autoprefixer": { + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", + "integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "browserslist": "^4.23.3", + "caniuse-lite": "^1.0.30001646", + "fraction.js": "^4.3.7", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.1", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", + "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001663", + "electron-to-chromium": "^1.5.28", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001667", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", + "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/canvas-confetti": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/canvas-confetti/-/canvas-confetti-1.9.3.tgz", + "integrity": "sha512-rFfTURMvmVEX1gyXFgn5QMn81bYk70qa0HLzcIOSVEyl57n6o9ItHeBtUSWdvKAPY0xlvBHno4/v3QPrT83q9g==", + "license": "ISC", + "funding": { + "type": "donate", + "url": "https://www.paypal.me/kirilvatev" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true + }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.5.33", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.33.tgz", + "integrity": "sha512-+cYTcFB1QqD4j4LegwLfpCNxifb6dDFUAwk6RsLusCwIaZI6or2f+q8rs5tTB2YC53HhOlIbEaqHMAAC8IOIwA==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.12.0.tgz", + "integrity": "sha512-UVIOlTEWxwIopRL1wgSQYdnVDcEvs2wyaO6DGo5mXqe3r16IoCNWkR29iHhyaP4cICWjbgbmFUGAhh0GJRuGZw==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.18.0", + "@eslint/core": "^0.6.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.12.0", + "@eslint/plugin-kit": "^0.2.0", + "@humanfs/node": "^0.16.5", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.3.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.1.0", + "eslint-visitor-keys": "^4.1.0", + "espree": "^10.2.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "5.1.0-rc-fb9a90fa48-20240614", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.1.0-rc-fb9a90fa48-20240614.tgz", + "integrity": "sha512-xsiRwaDNF5wWNC4ZHLut+x/YcAxksUd9Rizt7LaEn3bV8VyYRpXnRJQlLOfYaVy9esk4DFP4zPPnoNVjq5Gc0w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" + } + }, + "node_modules/eslint-plugin-react-refresh": { + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.12.tgz", + "integrity": "sha512-9neVjoGv20FwYtCP6CB1dzR1vr57ZDNOXst21wd2xJ/cTlM2xLq0GWVlSNTdMn/4BtP6cHYBMCSp1wFBJ9jBsg==", + "dev": true, + "peerDependencies": { + "eslint": ">=7" + } + }, + "node_modules/eslint-scope": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.1.0.tgz", + "integrity": "sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", + "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/espree": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", + "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", + "dev": true, + "dependencies": { + "acorn": "^8.12.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fraction.js": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/framer-motion": { + "version": "12.23.24", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.23.24.tgz", + "integrity": "sha512-HMi5HRoRCTou+3fb3h9oTLyJGBxHfW+HnNE25tAXOvVx/IvwMHK0cx7IR4a2ZU6sh3IX1Z+4ts32PcYBOqka8w==", + "license": "MIT", + "dependencies": { + "motion-dom": "^12.23.23", + "motion-utils": "^12.23.6", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "@emotion/is-prop-valid": "*", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/is-prop-valid": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "15.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.11.0.tgz", + "integrity": "sha512-yeyNSjdbyVaWurlwCpcA6XNBrHTMIeDdj0/hnvX/OLJ9ekOXYbLsLinH/MucQyGvNnXhidTdNhTtJaffL2sMfw==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jiti": { + "version": "1.21.6", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz", + "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/lucide-react": { + "version": "0.344.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.344.0.tgz", + "integrity": "sha512-6YyBnn91GB45VuVT96bYCOKElbJzUHqp65vX8cDcu55MQL9T969v4dhGClpljamuI/+KMO9P6w9Acq1CVQGvIQ==", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/motion-dom": { + "version": "12.23.23", + "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.23.23.tgz", + "integrity": "sha512-n5yolOs0TQQBRUFImrRfs/+6X4p3Q4n1dUEqt/H58Vx7OW6RF+foWEgmTVDhIWJIMXOuNNL0apKH2S16en9eiA==", + "license": "MIT", + "dependencies": { + "motion-utils": "^12.23.6" + } + }, + "node_modules/motion-utils": { + "version": "12.23.6", + "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-12.23.6.tgz", + "integrity": "sha512-eAWoPgr4eFEOFfg2WjIsMoqJTW6Z8MTUCgn/GZ3VRpClWBdnbjryiA3ZSNLyxCTmCQx4RmYX6jX1iWHbenUPNQ==", + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true + }, + "node_modules/page-flip": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/page-flip/-/page-flip-2.0.7.tgz", + "integrity": "sha512-96lQFUUz7r/LZzEUZJ3yBIMEKU9+m8HMFDzTvTdD6P7Ag/wXINjp9n0W7b4wanwnDbQETo4uNUoL3zMqpFxwGA==", + "license": "MIT" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/postcss": { + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-import": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-js": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", + "dev": true, + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, + "node_modules/postcss-load-config": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "lilconfig": "^3.0.0", + "yaml": "^2.3.4" + }, + "engines": { + "node": ">= 14" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/postcss-nested": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", + "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-pageflip": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/react-pageflip/-/react-pageflip-2.0.3.tgz", + "integrity": "sha512-k81mHhRvUM52y8jyzTCh5t4O0lepkLhp+XGSUzq2C3uD+iW99Cv0jfRlqFCjZbD5N3jKkIFr7/3giucoXKDP3Q==", + "license": "MIT", + "dependencies": { + "page-flip": "latest" + } + }, + "node_modules/react-refresh": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", + "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz", + "integrity": "sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.6" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.24.0", + "@rollup/rollup-android-arm64": "4.24.0", + "@rollup/rollup-darwin-arm64": "4.24.0", + "@rollup/rollup-darwin-x64": "4.24.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.24.0", + "@rollup/rollup-linux-arm-musleabihf": "4.24.0", + "@rollup/rollup-linux-arm64-gnu": "4.24.0", + "@rollup/rollup-linux-arm64-musl": "4.24.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.24.0", + "@rollup/rollup-linux-riscv64-gnu": "4.24.0", + "@rollup/rollup-linux-s390x-gnu": "4.24.0", + "@rollup/rollup-linux-x64-gnu": "4.24.0", + "@rollup/rollup-linux-x64-musl": "4.24.0", + "@rollup/rollup-win32-arm64-msvc": "4.24.0", + "@rollup/rollup-win32-ia32-msvc": "4.24.0", + "@rollup/rollup-win32-x64-msvc": "4.24.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tailwindcss": { + "version": "3.4.17", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz", + "integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==", + "dev": true, + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "arg": "^5.0.2", + "chokidar": "^3.6.0", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.3.2", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.21.6", + "lilconfig": "^3.1.3", + "micromatch": "^4.0.8", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.1.1", + "postcss": "^8.4.47", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.2", + "postcss-nested": "^6.2.0", + "postcss-selector-parser": "^6.1.2", + "resolve": "^1.22.8", + "sucrase": "^3.35.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.8.1.tgz", + "integrity": "sha512-R0dsXFt6t4SAFjUSKFjMh4pXDtq04SsFKCVGDP3ZOzNP7itF0jBcZYU4fMsZr4y7O7V7Nc751dDeESbe4PbQMQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.8.1", + "@typescript-eslint/parser": "8.8.1", + "@typescript-eslint/utils": "8.8.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==" + }, + "node_modules/update-browserslist-db": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/vite": { + "version": "5.4.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz", + "integrity": "sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==", + "dev": true, + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yaml": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", + "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", + "dev": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/cooky/package.json b/cooky/package.json new file mode 100644 index 0000000..03171fe --- /dev/null +++ b/cooky/package.json @@ -0,0 +1,38 @@ +{ + "name": "vite-react-typescript-starter", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "lint": "eslint .", + "preview": "vite preview", + "typecheck": "tsc --noEmit -p tsconfig.app.json" + }, + "dependencies": { + "@supabase/supabase-js": "^2.57.4", + "canvas-confetti": "^1.9.3", + "framer-motion": "^12.23.24", + "lucide-react": "^0.344.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-pageflip": "^2.0.3" + }, + "devDependencies": { + "@eslint/js": "^9.9.1", + "@types/react": "^18.3.5", + "@types/react-dom": "^18.3.0", + "@vitejs/plugin-react": "^4.3.1", + "autoprefixer": "^10.4.18", + "eslint": "^9.9.1", + "eslint-plugin-react-hooks": "^5.1.0-rc.0", + "eslint-plugin-react-refresh": "^0.4.11", + "globals": "^15.9.0", + "postcss": "^8.4.35", + "tailwindcss": "^3.4.1", + "typescript": "^5.5.3", + "typescript-eslint": "^8.3.0", + "vite": "^5.4.2" + } +} diff --git a/cooky/postcss.config.js b/cooky/postcss.config.js new file mode 100644 index 0000000..2aa7205 --- /dev/null +++ b/cooky/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/cooky/public/cooky-logo-animated.mp4 b/cooky/public/cooky-logo-animated.mp4 new file mode 100644 index 0000000..4812197 Binary files /dev/null and b/cooky/public/cooky-logo-animated.mp4 differ diff --git a/cooky/public/cooky-logo-big.png b/cooky/public/cooky-logo-big.png new file mode 100644 index 0000000..fec4f6f Binary files /dev/null and b/cooky/public/cooky-logo-big.png differ diff --git a/cooky/public/cooky-logo.png b/cooky/public/cooky-logo.png new file mode 100644 index 0000000..8467f95 Binary files /dev/null and b/cooky/public/cooky-logo.png differ diff --git a/cooky/src/App.tsx b/cooky/src/App.tsx new file mode 100644 index 0000000..f2b11da --- /dev/null +++ b/cooky/src/App.tsx @@ -0,0 +1,1116 @@ +import React, { useMemo, useRef, useState, useEffect } from "react"; +import HTMLFlipBook from "react-pageflip"; +import { Button } from "./components/Button"; +import { Input } from "./components/Input"; +import { Card, CardContent } from "./components/Card"; +import { Copy, Search, Menu, X, ChevronLeft, ChevronRight, BookOpen, Bookmark, BookmarkCheck, Clock, Check, CheckCircle, Maximize2 } from "lucide-react"; +import { motion, AnimatePresence } from "framer-motion"; +import { CodeHighlight } from "./components/CodeHighlight"; +import { getSessionId, getBookmarks, addBookmark, removeBookmark, type Bookmark as BookmarkType, getTriedRecipes, markRecipeAsTried, unmarkRecipeAsTried, type TriedRecipe } from "./lib/supabase"; +import confetti from "canvas-confetti"; + +// ----------------------------- +// Types +// ----------------------------- +interface Recipe { + id: string; + title: string; + kind: "intro" | "identity" | "storage" | "auth" | "discovery" | "testing"; + body?: string; + code?: string; + notes?: string; + estimatedTime?: string; +} + +interface Kind { id: Recipe["kind"]; label: string } + +function LogoCooky({ className = "" }: { className?: string }) { + return ( +
+ Cooky logo +
+ ); +} + +/** + * Cooky: Pubky SDK Cookbook + * Single-file demo React app that looks like a cookbook with page turning. + * - Left vertical navigation with multi-line menu items + * - Flipbook view with page-turn transitions + * - Search, copy-to-clipboard, and responsive layout + * - Tailwind + lucide-react + */ + +// ---- Demo content ---- +const RECIPES: Recipe[] = [ + { + id: "welcome", + title: "Pubky SDK Cookbook", + kind: "intro", + estimatedTime: "1 min read", + body: `## About Cooky +Cooky is a developer-friendly, copy-and-paste cookbook for building on the Pubky ecosystem. + +## What you can expect +• Code snippets. Every page starts with a working snippet that compiles against pubky 0.6 series. +• Practical defaults. Staging and local testnet examples. +• Short context. When to use, what to tweak, and common gotchas. + +## Conventions +• Version. Recipes target \`pubky = "=0.6.0"\` and Tokio runtime. +• Paths. We use \`pubky:///pub//...\` for public files and HTTPS relay forms for read-only examples. +• Keys. Generate a keypair locally, store an encrypted recovery file, and keep secrets out of your repo.`, + }, + { + id: "welcome-2", + title: "Let's cook", + kind: "intro", + estimatedTime: "1 min read", + body: `## Quick start +1) cargo add pubky@=0.6.0 tokio --features macros,rt-multi-thread +2) Pick a backend: local \`pubky-testnet\` for offline dev or staging (see beta guide for host key and tokens). +3) Paste "Create a client," then try "Sign up," then "Write a file," and verify with "HEAD" and "List." + +## Beta shortcuts +• Staging homeserver public key, example signup tokens, and the admin endpoint are in the tester PDF (currently only available internally or on request). Rotate as needed. + +## Safety tips +• Treat recovery files like secrets. Use strong passphrases. +• When in doubt, first test against \`pubky-testnet\` first, then stage, and then prod. + +Ready? Let's cook. 👨‍🍳`, + }, + { + id: "client", + title: "Create a Pubky instance", + kind: "identity", + estimatedTime: "1 min", + code: `use pubky::Pubky; + +fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + Ok(()) +}`, + notes: "Every program needs one. The Pubky instance is your entry point to the SDK.", + }, + { + id: "signup", + title: "Sign up a new user to a homeserver", + kind: "identity", + estimatedTime: "3 min", + code: `use pubky::{Pubky, Keypair}; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + let keypair = Keypair::random(); + let homeserver = "ufib...u1uy"; + let token = Some("G12J-824M-F0V0"); + + let signer = pubky.signer(keypair); + let session = signer.signup(&homeserver, token).await?; + println!("Signed up: {:?}", session); + Ok(()) +}`, + notes: "Use staging host key and token during beta. Keypair::random() generates a new key.", + }, + { + id: "signin", + title: "Sign in later with the same keypair", + kind: "identity", + estimatedTime: "2 min", + code: `use pubky::{Pubky, Keypair}; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + let keypair = Keypair::random(); // load your real key from recovery file + let signer = pubky.signer(keypair); + let session = signer.signin().await?; + println!("Signed in: {:?}", session); + Ok(()) +}`, + notes: "Use recovery file to restore your keypair securely.", + }, + { + id: "putget", + title: "Write a file and read it back (public)", + kind: "storage", + estimatedTime: "3 min", + code: `use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + // Assume you have a session from signin/signup + let session = /* your session */; + + // Write to public storage + session.storage().put("/pub/my.app/hello.txt", "hello world").await?; + + // Read back using public storage (no auth needed) + let text = pubky.public_storage() + .get("/pub/my.app/hello.txt") + .await? + .text() + .await?; + println!("Got: {}", text); + Ok(()) +}`, + notes: "Use domain-like paths: /pub/mycoolnew.app/ for public data.", + }, + { + id: "head", + title: "HEAD check for size and existence", + kind: "storage", + estimatedTime: "2 min", + code: `use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + let session = /* your session */; + + let resp = session.storage().head("/pub/my.app/hello.txt").await?; + if let Some(size) = resp.content_length() { + println!("Size: {} bytes", size); + } else { + println!("File exists, size unknown"); + } + Ok(()) +}`, + notes: "HEAD is efficient for checking existence without downloading content.", + }, + { + id: "list", + title: "List files with cursor and limit", + kind: "storage", + estimatedTime: "3 min", + code: `use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + let session = /* your session */; + let base = "/pub/my.app/"; + + // List files with pagination + let files = session.storage().list(base).await?; + println!("Files: {:?}", files); + Ok(()) +}`, + notes: "List returns file paths under the specified directory.", + }, + { + id: "delete", + title: "Delete a file", + kind: "storage", + estimatedTime: "1 min", + code: `use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + let session = /* your session */; + + session.storage().delete("/pub/my.app/hello.txt").await?; + println!("File deleted"); + Ok(()) +}`, + notes: "Deletes are permanent. Make sure you have the right path!", + }, + { + id: "public-get", + title: "Get public data from any user", + kind: "storage", + estimatedTime: "2 min", + code: `use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + + // Read public data from any user (no auth needed) + let url = "pubky://USER_PUBKY/pub/pubky.app/profile.json"; + let data = pubky.public_storage() + .get(url) + .await? + .text() + .await?; + + println!("Public data: {}", data); + Ok(()) +}`, + notes: "Access public data from any Pubky user without authentication.", + }, + { + id: "resolve", + title: "Resolve homeserver for a given Pubky", + kind: "discovery", + estimatedTime: "2 min", + code: `use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + let user_id = "YOUR_PUBKY"; + + if let Some(homeserver) = pubky.resolve_homeserver(user_id).await? { + println!("Homeserver: {}", homeserver); + } else { + println!("Not found"); + } + Ok(()) +}`, + notes: "Uses Pkarr DNS to discover where a user's data lives.", + }, + { + id: "pairing", + title: "Pubky Ring pairing (QR login flow)", + kind: "auth", + estimatedTime: "4 min", + code: `use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + + // Start authentication flow + let auth_flow = pubky.start_auth_flow().await?; + println!("Show this URL as QR code: {}", auth_flow.url()); + + // Wait for user to scan and approve + let session = auth_flow.wait_for_auth().await?; + println!("Authenticated! Session: {:?}", session); + Ok(()) +}`, + notes: "Display the URL as a QR code for users to scan with Pubky Ring app.", + }, + { + id: "recovery", + title: "Create and decrypt a recovery file", + kind: "identity", + estimatedTime: "3 min", + code: `use pubky::Keypair; + +fn main() -> anyhow::Result<()> { + let keypair = Keypair::random(); + let passphrase = "strong passphrase"; + + // Save keypair to encrypted file + keypair.save_to_file("my_recovery.bin", passphrase)?; + + // Restore keypair from file + let restored = Keypair::from_file("my_recovery.bin", passphrase)?; + assert_eq!(restored.public_key(), keypair.public_key()); + println!("Recovery successful!"); + Ok(()) +}`, + notes: "NEVER share your recovery file or passphrase. Store them securely like passwords.", + }, + { + id: "logging", + title: "Enable debug logging", + kind: "testing", + estimatedTime: "2 min", + code: `use tracing_subscriber; + +fn main() -> anyhow::Result<()> { + // Initialize tracing subscriber for debug output + tracing_subscriber::fmt() + .with_max_level(tracing::Level::DEBUG) + .init(); + + // Now run your Pubky operations + // You'll see detailed debug logs for all SDK activity + println!("Logging enabled!"); + Ok(()) +}`, + notes: "See what's happening under the hood. Great for debugging storage roundtrips.", + }, + { + id: "testnet", + title: "Run an embedded local testnet", + kind: "testing", + estimatedTime: "2 min", + code: `use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + // Create Pubky instance with testnet config + let pubky = Pubky::testnet().await?; + + // Now you can test signup, signin, and storage operations + // without connecting to staging or production servers + println!("Testnet ready for testing!"); + Ok(()) +}`, + notes: "Perfect for offline development and testing. No internet required!", + }, + { + id: "capabilities", + title: "Define granular access with Capabilities", + kind: "auth", + estimatedTime: "3 min", + code: `use pubky::{Pubky, Capabilities}; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + + // Define specific permissions for auth flow + let caps = Capabilities::builder() + .read("/pub/my.app/**") + .write("/pub/my.app/posts/**") + .delete("/pub/my.app/drafts/**") + .build(); + + let auth_flow = pubky.start_auth_flow_with_caps(caps).await?; + println!("Auth URL: {}", auth_flow.url()); + Ok(()) +}`, + notes: "Limit what apps can access. Use wildcards for flexible path matching.", + }, + { + id: "pkdns", + title: "Publish and resolve PKDNS records", + kind: "discovery", + estimatedTime: "3 min", + code: `use pubky::Pubky; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + let session = /* your session */; + + // Publish a DNS-like record using Pkarr + session.publish_pkarr_record("myapp", "example.com").await?; + + // Resolve it later + let record = pubky.resolve_pkarr("YOUR_PUBKY", "myapp").await?; + println!("Record: {:?}", record); + Ok(()) +}`, + notes: "Pkarr enables decentralized DNS using your Pubky as the root of trust.", + }, + { + id: "session-persist", + title: "Persist and restore sessions", + kind: "identity", + estimatedTime: "2 min", + code: `use pubky::{Pubky, PubkySession}; +use tokio; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let pubky = Pubky::new()?; + + // After signin/signup, save session + let session = /* your session */; + let session_data = session.to_bytes()?; + std::fs::write("session.dat", session_data)?; + + // Restore later + let saved = std::fs::read("session.dat")?; + let restored = PubkySession::from_bytes(&saved)?; + println!("Session restored!"); + Ok(()) +}`, + notes: "Store session secrets securely. Treat them like passwords!", + }, +]; + +const KINDS: Kind[] = [ + { id: "intro", label: "Intro" }, + { id: "identity", label: "Identity" }, + { id: "storage", label: "Storage" }, + { id: "auth", label: "Auth" }, + { id: "discovery", label: "Discovery" }, + { id: "testing", label: "Testing" }, +]; + +const SORTED_RECIPES = (() => { + const kindOrder = KINDS.map(k => k.id); + return [...RECIPES].sort((a, b) => { + const aIndex = kindOrder.indexOf(a.kind); + const bIndex = kindOrder.indexOf(b.kind); + return aIndex - bIndex; + }); +})(); + +function usePrefersReducedMotion() { + const [reduced, setReduced] = useState(false); + useEffect(() => { + const q = window.matchMedia("(prefers-reduced-motion: reduce)"); + const up = () => setReduced(q.matches); + up(); + q.addEventListener("change", up); + return () => q.removeEventListener("change", up); + }, []); + return reduced; +} + +function parseBodyWithHeadings(body: string) { + const lines = body.split('\n'); + const elements: JSX.Element[] = []; + let currentParagraph: string[] = []; + let key = 0; + + const flushParagraph = () => { + if (currentParagraph.length > 0) { + elements.push( +
+ {currentParagraph.join('\n')} +
+ ); + currentParagraph = []; + } + }; + + lines.forEach((line) => { + if (line.startsWith('## ')) { + flushParagraph(); + elements.push( +

+ {line.substring(3)} +

+ ); + } else { + currentParagraph.push(line); + } + }); + + flushParagraph(); + return
{elements}
; +} + +function Sidebar({ items, currentId, onSelect, open, bookmarkedIds, triedIds }: { items: Recipe[]; currentId: string; onSelect: (id: string) => void; open?: boolean; bookmarkedIds: Set; triedIds: Set }) { + return ( + + {(open || typeof open === "undefined") && ( + +
+ +
Pubky SDK Cookbook
+
+ + + +
+ )} +
+ ); +} + +function Page({ recipe, copyFeedback, setCopyFeedback, bookmarkFeedback, triedFeedback, isBookmarked, onToggleBookmark, isTried, onToggleTried, onEnlargeCode }: { recipe: Recipe; copyFeedback: boolean; setCopyFeedback: (value: boolean) => void; bookmarkFeedback: string | null; triedFeedback: string | null; isBookmarked: boolean; onToggleBookmark: (recipeId: string) => void; isTried: boolean; onToggleTried: (recipeId: string) => void; onEnlargeCode?: (code: string) => void }) { + return ( +
+ + +
+
+ {KINDS.find((k) => k.id === recipe.kind)?.label} +
+ {recipe.estimatedTime && ( +
+ + {recipe.estimatedTime} +
+ )} +
+

{recipe.title}

+ {recipe.body && parseBodyWithHeadings(recipe.body)} + {recipe.code && ( +
+
+ + {onEnlargeCode && ( + + )} + + +
+
+
+ +
+
+
+ )} + {recipe.notes && ( +
+ {recipe.notes} +
+ )} +
+
+
+ ); +} + +function FlipBookView({ recipes, currentId, onFlip, copyFeedback, setCopyFeedback, bookmarkFeedback, triedFeedback, bookmarkedIds, onToggleBookmark, triedIds, onToggleTried, onEnlargeCode }: { recipes: Recipe[]; currentId: string; onFlip: (id: string) => void; copyFeedback: boolean; setCopyFeedback: (value: boolean) => void; bookmarkFeedback: string | null; triedFeedback: string | null; bookmarkedIds: Set; onToggleBookmark: (recipeId: string) => void; triedIds: Set; onToggleTried: (recipeId: string) => void; onEnlargeCode: (code: string) => void }) { + const bookRef = useRef(null); + const isProgrammaticFlip = useRef(false); + const indexById = useMemo(() => { + const map = new Map(); + recipes.forEach((r, i) => map.set(r.id, i)); + return map; + }, [recipes]); + + useEffect(() => { + const idx = indexById.get(currentId); + if (idx != null && bookRef.current) { + try { + isProgrammaticFlip.current = true; + bookRef.current.pageFlip().turnToPage(idx); + } catch {} + } + }, [currentId, indexById]); + + if (recipes.length === 0) { + return ( +
+

No recipes found

+
+ ); + } + + return ( +
+ r.id).join(',')} + width={680} + height={900} + minWidth={300} + maxWidth={900} + minHeight={600} + maxHeight={1400} + className="mx-auto" + size="stretch" + showCover={false} + mobileScrollSupport + onFlip={(e: any) => { + if (isProgrammaticFlip.current) { + isProgrammaticFlip.current = false; + return; + } + const pageIndex = e?.data ?? 0; + const next = recipes[pageIndex]?.id; + if (next) onFlip(next); + }} + ref={bookRef} + > + {recipes.map((r) => ( +
+ +
+ ))} +
+
+ + + + + + +
+
+ ); +} + +function ScrollView({ recipes, currentId, copyFeedback, setCopyFeedback, bookmarkFeedback, triedFeedback, bookmarkedIds, onToggleBookmark, triedIds, onToggleTried, onEnlargeCode }: { recipes: Recipe[]; currentId: string; copyFeedback: boolean; setCopyFeedback: (value: boolean) => void; bookmarkFeedback: string | null; triedFeedback: string | null; bookmarkedIds: Set; onToggleBookmark: (recipeId: string) => void; triedIds: Set; onToggleTried: (recipeId: string) => void; onEnlargeCode: (code: string) => void }) { + const containerRef = useRef(null); + useEffect(() => { + const el = containerRef.current?.querySelector(`[data-id='${currentId}']`) as HTMLElement | null; + el?.scrollIntoView({ behavior: "smooth", block: "start" }); + }, [currentId]); + + if (recipes.length === 0) { + return ( +
+

No recipes found

+
+ ); + } + + return ( +
+ {recipes.map((r) => ( +
+ +
+ ))} +
+ ); +} + +export default function CookyApp() { + const [query, setQuery] = useState(""); + const [open, setOpen] = useState(false); + const [currentId, setCurrentId] = useState(SORTED_RECIPES[0].id); + const [copyFeedback, setCopyFeedback] = useState(false); + const [bookmarkFeedback, setBookmarkFeedback] = useState(null); + const [triedFeedback, setTriedFeedback] = useState(null); + const [bookmarks, setBookmarks] = useState([]); + const [triedRecipes, setTriedRecipes] = useState([]); + const [sessionId] = useState(() => getSessionId()); + const [enlargedCode, setEnlargedCode] = useState(null); + const [showChefCelebration, setShowChefCelebration] = useState(false); + const reducedMotion = usePrefersReducedMotion(); + + const bookmarkedIds = useMemo(() => new Set(bookmarks.map(b => b.recipe_id)), [bookmarks]); + const triedIds = useMemo(() => new Set(triedRecipes.map(t => t.recipe_id)), [triedRecipes]); + + const actualRecipes = useMemo(() => SORTED_RECIPES.filter(r => r.kind !== "intro"), []); + const actualRecipesCount = actualRecipes.length; + + useEffect(() => { + getBookmarks(sessionId).then(setBookmarks); + getTriedRecipes(sessionId).then(setTriedRecipes); + }, [sessionId]); + + const handleToggleBookmark = async (recipeId: string) => { + const isCurrentlyBookmarked = bookmarkedIds.has(recipeId); + console.log('handleToggleBookmark called:', { recipeId, isCurrentlyBookmarked, sessionId, currentBookmarks: bookmarks.map(b => b.recipe_id) }); + + if (isCurrentlyBookmarked) { + console.log('Removing bookmark...'); + const success = await removeBookmark(recipeId, sessionId); + console.log('Remove bookmark result:', success); + if (success) { + const updatedBookmarks = await getBookmarks(sessionId); + console.log('Updated bookmarks after removal:', updatedBookmarks.map(b => b.recipe_id)); + setBookmarks(updatedBookmarks); + } + } else { + console.log('Adding bookmark...'); + const success = await addBookmark(recipeId, sessionId); + console.log('Add bookmark result:', success); + if (success) { + const updatedBookmarks = await getBookmarks(sessionId); + console.log('Updated bookmarks after addition:', updatedBookmarks.map(b => b.recipe_id)); + setBookmarks(updatedBookmarks); + setBookmarkFeedback(recipeId); + setTimeout(() => setBookmarkFeedback(null), 2000); + } + } + }; + + const handleToggleTried = async (recipeId: string) => { + const isCurrentlyTried = triedIds.has(recipeId); + console.log('handleToggleTried called:', { recipeId, isCurrentlyTried, sessionId, currentTried: triedRecipes.map(t => t.recipe_id) }); + + if (isCurrentlyTried) { + console.log('Removing tried status...'); + const success = await unmarkRecipeAsTried(recipeId, sessionId); + console.log('Remove tried result:', success); + if (success) { + const updatedTried = await getTriedRecipes(sessionId); + console.log('Updated tried recipes after removal:', updatedTried.map(t => t.recipe_id)); + setTriedRecipes(updatedTried); + } + } else { + console.log('Adding tried status...'); + const success = await markRecipeAsTried(recipeId, sessionId); + console.log('Add tried result:', success); + if (success) { + const updatedTried = await getTriedRecipes(sessionId); + console.log('Updated tried recipes after addition:', updatedTried.map(t => t.recipe_id)); + setTriedRecipes(updatedTried); + setTriedFeedback(recipeId); + setTimeout(() => setTriedFeedback(null), 2000); + + const triedActualRecipes = updatedTried.filter(t => actualRecipes.some(r => r.id === t.recipe_id)); + if (triedActualRecipes.length === actualRecipesCount) { + triggerChefCelebration(); + } + } + } + }; + + const triggerChefCelebration = () => { + setShowChefCelebration(true); + + const duration = 4000; + const end = Date.now() + duration; + + const colors = ['#ea580c', '#fb923c', '#fdba74', '#fed7aa']; + + (function frame() { + confetti({ + particleCount: 3, + angle: 60, + spread: 55, + origin: { x: 0 }, + colors: colors, + }); + confetti({ + particleCount: 3, + angle: 120, + spread: 55, + origin: { x: 1 }, + colors: colors, + }); + + if (Date.now() < end) { + requestAnimationFrame(frame); + } + }()); + + setTimeout(() => setShowChefCelebration(false), 5000); + }; + + const filtered = useMemo(() => { + const q = query.trim().toLowerCase(); + if (!q) return SORTED_RECIPES; + return SORTED_RECIPES.filter((r) => r.title.toLowerCase().includes(q) || r.code?.toLowerCase().includes(q) || r.body?.toLowerCase().includes(q)); + }, [query]); + + useEffect(() => { + if (filtered.length > 0 && !filtered.some((r) => r.id === currentId)) { + setCurrentId(filtered[0].id); + } + }, [filtered, currentId]); + + useEffect(() => { + console.assert(Array.isArray(SORTED_RECIPES) && SORTED_RECIPES.length > 0, "SORTED_RECIPES should be a non-empty array"); + console.assert(SORTED_RECIPES[0].id === "welcome" && SORTED_RECIPES[1].id === "welcome-2", "Intro should span two pages: welcome, welcome-2"); + const ids = new Set(SORTED_RECIPES.map((r) => r.id)); + console.assert(ids.size === SORTED_RECIPES.length, "Recipe IDs must be unique"); + }, []); + + useEffect(() => { + const onKey = (e: KeyboardEvent) => { + if (e.key === "ArrowLeft") { + document.querySelector("[aria-label='Previous page']")?.click(); + } else if (e.key === "ArrowRight") { + document.querySelector("[aria-label='Next page']")?.click(); + } + }; + window.addEventListener("keydown", onKey); + return () => window.removeEventListener("keydown", onKey); + }, []); + + return ( +
+
+
+ + +
+
+
actualRecipes.some(r => r.id === t.recipe_id)).length / actualRecipesCount) * 100}%` }} + /> + +
+
+ {triedRecipes.filter(t => actualRecipes.some(r => r.id === t.recipe_id)).length}/{actualRecipesCount} cooked +
+
+
+ setQuery(e.target.value)} placeholder="Search recipes, commands, or code" className="pl-8 text-orange-600" /> + +
+
+
+ +
+
+ +
+ + + {open && ( + +
+
+ +
Pubky SDK Cookbook
+
+ + +
+
+ )} +
+ +
+ {reducedMotion ? ( + + ) : ( + + )} +
+
+ + + + + {copyFeedback && ( + + Code copied! Let's cook! 👨‍🍳 + + )} + + + + {triedFeedback && ( + + + Cooked Recipe! 👨‍🍳 🍔 + + )} + + + + {bookmarkFeedback && ( + + + Bookmarked! 📖 + + )} + + + + {enlargedCode && ( + setEnlargedCode(null)} + > + e.stopPropagation()} + > +
+

Code View

+
+ + +
+
+
+ +
+
+
+ )} +
+ + + {showChefCelebration && ( + +
+ + 🎉 + +

Congratulations!

+

You're a Pubky Chef now!

+
+
+ )} +
+
+ ); +} diff --git a/cooky/src/components/Button.tsx b/cooky/src/components/Button.tsx new file mode 100644 index 0000000..f918b61 --- /dev/null +++ b/cooky/src/components/Button.tsx @@ -0,0 +1,36 @@ +import React from 'react'; + +interface ButtonProps extends React.ButtonHTMLAttributes { + variant?: 'default' | 'secondary'; + size?: 'default' | 'sm' | 'icon'; +} + +export function Button({ + variant = 'default', + size = 'default', + className = '', + children, + ...props +}: ButtonProps) { + const baseStyles = 'inline-flex items-center justify-center rounded-lg font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none'; + + const variants = { + default: 'bg-orange-600 text-white hover:bg-orange-700 focus:ring-orange-600', + secondary: 'bg-white text-orange-900 hover:bg-orange-50 border border-orange-200 focus:ring-orange-500' + }; + + const sizes = { + default: 'px-4 py-2 text-sm', + sm: 'px-3 py-1.5 text-xs', + icon: 'p-2' + }; + + return ( + + ); +} diff --git a/cooky/src/components/Card.tsx b/cooky/src/components/Card.tsx new file mode 100644 index 0000000..bd843cf --- /dev/null +++ b/cooky/src/components/Card.tsx @@ -0,0 +1,21 @@ +import React from 'react'; + +interface CardProps extends React.HTMLAttributes {} + +export function Card({ className = '', children, ...props }: CardProps) { + return ( +
+ {children} +
+ ); +} + +interface CardContentProps extends React.HTMLAttributes {} + +export function CardContent({ className = '', children, ...props }: CardContentProps) { + return ( +
+ {children} +
+ ); +} diff --git a/cooky/src/components/CodeHighlight.tsx b/cooky/src/components/CodeHighlight.tsx new file mode 100644 index 0000000..039cd70 --- /dev/null +++ b/cooky/src/components/CodeHighlight.tsx @@ -0,0 +1,138 @@ +import { useMemo } from 'react'; + +interface CodeHighlightProps { + code: string; + language?: string; +} + +export function CodeHighlight({ code, language = 'rust' }: CodeHighlightProps) { + const lines = useMemo(() => { + const codeLines = code.split('\n'); + return codeLines.map((line, index) => ({ + number: index + 1, + code: highlightRustCode(line) + })); + }, [code]); + + return ( +
+      
+        {lines.map((line) => (
+          
+ + {line.number} + + +
+ ))} +
+
+ ); +} + +function highlightRustCode(code: string): string { + // Keywords + const keywords = [ + 'use', 'async', 'await', 'fn', 'let', 'mut', 'return', 'if', 'else', + 'match', 'while', 'for', 'loop', 'break', 'continue', 'impl', 'trait', + 'struct', 'enum', 'pub', 'mod', 'const', 'static', 'type', 'where', + 'unsafe', 'extern', 'crate', 'move', 'as', 'ref', 'in', 'self', 'Self' + ]; + + // Types + const types = [ + 'i8', 'i16', 'i32', 'i64', 'i128', 'isize', + 'u8', 'u16', 'u32', 'u64', 'u128', 'usize', + 'f32', 'f64', 'bool', 'char', 'str', 'String', + 'Vec', 'Option', 'Result', 'Box', 'Rc', 'Arc', + 'HashMap', 'HashSet', 'BTreeMap', 'BTreeSet', + 'Ok', 'Err', 'Some', 'None', 'Client', 'PublicKey', + 'ListBuilder', 'anyhow' + ]; + + // Macros + const macros = ['println!', 'print!', 'vec!', 'format!', 'panic!', 'assert!', 'tokio::main']; + + let highlighted = code; + + // Escape HTML + highlighted = highlighted + .replace(/&/g, '&') + .replace(//g, '>'); + + // Highlight strings (double quotes) + highlighted = highlighted.replace( + /"([^"\\]*(\\.[^"\\]*)*)"/g, + '"$1"' + ); + + // Highlight comments + highlighted = highlighted.replace( + /\/\/.*/g, + '$&' + ); + + // Highlight block comments + highlighted = highlighted.replace( + /\/\*[\s\S]*?\*\//g, + '$&' + ); + + // Highlight numbers + highlighted = highlighted.replace( + /\b(\d+\.?\d*|\.\d+)\b/g, + '$1' + ); + + // Highlight keywords + keywords.forEach(keyword => { + const regex = new RegExp(`\\b${keyword}\\b`, 'g'); + highlighted = highlighted.replace( + regex, + `${keyword}` + ); + }); + + // Highlight types + types.forEach(type => { + const regex = new RegExp(`\\b${type}\\b`, 'g'); + highlighted = highlighted.replace( + regex, + `${type}` + ); + }); + + // Highlight macros + macros.forEach(macro => { + const escapedMacro = macro.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + const regex = new RegExp(escapedMacro, 'g'); + highlighted = highlighted.replace( + regex, + `${macro}` + ); + }); + + // Highlight attributes + highlighted = highlighted.replace( + /#\[([^\]]+)\]/g, + '#[$1]' + ); + + // Highlight function names (word followed by !) + highlighted = highlighted.replace( + /\b([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/g, + '$1(' + ); + + // Highlight special symbols + highlighted = highlighted.replace( + /(\?|&|\||->|=>|::)/g, + '$1' + ); + + return `${highlighted}`; +} diff --git a/cooky/src/components/Input.tsx b/cooky/src/components/Input.tsx new file mode 100644 index 0000000..7ca7492 --- /dev/null +++ b/cooky/src/components/Input.tsx @@ -0,0 +1,12 @@ +import React from 'react'; + +interface InputProps extends React.InputHTMLAttributes {} + +export function Input({ className = '', ...props }: InputProps) { + return ( + + ); +} diff --git a/cooky/src/index.css b/cooky/src/index.css new file mode 100644 index 0000000..fe5ab3a --- /dev/null +++ b/cooky/src/index.css @@ -0,0 +1,17 @@ +@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap'); + +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + * { + font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; + } + + pre, code, code span { + font-family: 'Fira Code', Fira Code, 'Courier New', monospace !important; + font-feature-settings: 'calt' 1; + } +} diff --git a/cooky/src/lib/supabase.ts b/cooky/src/lib/supabase.ts new file mode 100644 index 0000000..b8194a0 --- /dev/null +++ b/cooky/src/lib/supabase.ts @@ -0,0 +1,179 @@ +import { createClient } from '@supabase/supabase-js'; + +const supabaseUrl = import.meta.env.VITE_SUPABASE_URL; +const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY; + +if (!supabaseUrl || !supabaseAnonKey) { + throw new Error('Missing Supabase environment variables'); +} + +export const supabase = createClient(supabaseUrl, supabaseAnonKey); + +export function getSessionId(): string { + let sessionId = localStorage.getItem('cooky_session_id'); + if (!sessionId) { + sessionId = crypto.randomUUID(); + localStorage.setItem('cooky_session_id', sessionId); + } + return sessionId; +} + +export interface Bookmark { + id: string; + recipe_id: string; + session_id: string; + created_at: string; + notes: string | null; +} + +export async function getBookmarks(sessionId: string): Promise { + const { data, error } = await supabase + .from('recipe_bookmarks') + .select('*') + .eq('session_id', sessionId) + .order('created_at', { ascending: false }); + + if (error) { + console.error('Error fetching bookmarks:', error); + return []; + } + + return data || []; +} + +export async function addBookmark(recipeId: string, sessionId: string): Promise { + // Check if bookmark already exists + const { data: existing } = await supabase + .from('recipe_bookmarks') + .select('id') + .eq('recipe_id', recipeId) + .eq('session_id', sessionId) + .maybeSingle(); + + if (existing) { + console.log('Bookmark already exists, skipping insert'); + return true; // Already exists, consider it a success + } + + const { error } = await supabase + .from('recipe_bookmarks') + .insert({ + recipe_id: recipeId, + session_id: sessionId, + notes: null + }); + + if (error) { + console.error('Error adding bookmark:', error); + return false; + } + + return true; +} + +export async function removeBookmark(recipeId: string, sessionId: string): Promise { + console.log('removeBookmark called with:', { recipeId, sessionId }); + + const { data, error, count } = await supabase + .from('recipe_bookmarks') + .delete() + .eq('recipe_id', recipeId) + .eq('session_id', sessionId) + .select(); + + console.log('removeBookmark response:', { data, error, count }); + + if (error) { + console.error('Error removing bookmark:', error); + return false; + } + + return true; +} + +export async function isBookmarked(recipeId: string, sessionId: string): Promise { + const { data, error } = await supabase + .from('recipe_bookmarks') + .select('id') + .eq('recipe_id', recipeId) + .eq('session_id', sessionId) + .maybeSingle(); + + if (error) { + console.error('Error checking bookmark:', error); + return false; + } + + return !!data; +} + +export interface TriedRecipe { + id: string; + recipe_id: string; + session_id: string; + created_at: string; +} + +export async function getTriedRecipes(sessionId: string): Promise { + const { data, error } = await supabase + .from('tried_recipes') + .select('*') + .eq('session_id', sessionId) + .order('created_at', { ascending: false }); + + if (error) { + console.error('Error fetching tried recipes:', error); + return []; + } + + return data || []; +} + +export async function markRecipeAsTried(recipeId: string, sessionId: string): Promise { + // Check if recipe is already marked as tried + const { data: existing } = await supabase + .from('tried_recipes') + .select('id') + .eq('recipe_id', recipeId) + .eq('session_id', sessionId) + .maybeSingle(); + + if (existing) { + console.log('Recipe already marked as tried, skipping insert'); + return true; // Already exists, consider it a success + } + + const { error } = await supabase + .from('tried_recipes') + .insert({ + recipe_id: recipeId, + session_id: sessionId + }); + + if (error) { + console.error('Error marking recipe as tried:', error); + return false; + } + + return true; +} + +export async function unmarkRecipeAsTried(recipeId: string, sessionId: string): Promise { + console.log('unmarkRecipeAsTried called with:', { recipeId, sessionId }); + + const { data, error, count } = await supabase + .from('tried_recipes') + .delete() + .eq('recipe_id', recipeId) + .eq('session_id', sessionId) + .select(); + + console.log('unmarkRecipeAsTried response:', { data, error, count }); + + if (error) { + console.error('Error unmarking recipe:', error); + return false; + } + + return true; +} diff --git a/cooky/src/main.tsx b/cooky/src/main.tsx new file mode 100644 index 0000000..ea9e363 --- /dev/null +++ b/cooky/src/main.tsx @@ -0,0 +1,10 @@ +import { StrictMode } from 'react'; +import { createRoot } from 'react-dom/client'; +import App from './App.tsx'; +import './index.css'; + +createRoot(document.getElementById('root')!).render( + + + +); diff --git a/cooky/src/vite-env.d.ts b/cooky/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/cooky/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/cooky/supabase/migrations/20251022094227_create_recipe_bookmarks.sql b/cooky/supabase/migrations/20251022094227_create_recipe_bookmarks.sql new file mode 100644 index 0000000..26461b2 --- /dev/null +++ b/cooky/supabase/migrations/20251022094227_create_recipe_bookmarks.sql @@ -0,0 +1,59 @@ +/* + # Create recipe bookmarks table + + 1. New Tables + - `recipe_bookmarks` + - `id` (uuid, primary key) - Unique identifier for the bookmark + - `recipe_id` (text) - ID of the bookmarked recipe + - `user_id` (uuid) - User identifier (for future auth integration) + - `session_id` (text) - Anonymous session identifier + - `created_at` (timestamptz) - Timestamp when bookmark was created + - `notes` (text, optional) - User notes about the recipe + + 2. Security + - Enable RLS on `recipe_bookmarks` table + - Add policy for users to read their own bookmarks (by session_id) + - Add policy for users to insert their own bookmarks + - Add policy for users to delete their own bookmarks + - Add policy for users to update their own bookmarks + + 3. Indexes + - Add index on recipe_id for faster lookups + - Add index on session_id for filtering by session +*/ + +CREATE TABLE IF NOT EXISTS recipe_bookmarks ( + id uuid PRIMARY KEY DEFAULT gen_random_uuid(), + recipe_id text NOT NULL, + user_id uuid, + session_id text NOT NULL, + created_at timestamptz DEFAULT now(), + notes text, + UNIQUE(recipe_id, session_id) +); + +ALTER TABLE recipe_bookmarks ENABLE ROW LEVEL SECURITY; + +CREATE POLICY "Users can read own bookmarks by session" + ON recipe_bookmarks + FOR SELECT + USING (true); + +CREATE POLICY "Users can insert own bookmarks" + ON recipe_bookmarks + FOR INSERT + WITH CHECK (true); + +CREATE POLICY "Users can update own bookmarks by session" + ON recipe_bookmarks + FOR UPDATE + USING (true) + WITH CHECK (true); + +CREATE POLICY "Users can delete own bookmarks by session" + ON recipe_bookmarks + FOR DELETE + USING (true); + +CREATE INDEX IF NOT EXISTS idx_recipe_bookmarks_recipe_id ON recipe_bookmarks(recipe_id); +CREATE INDEX IF NOT EXISTS idx_recipe_bookmarks_session_id ON recipe_bookmarks(session_id); \ No newline at end of file diff --git a/cooky/supabase/migrations/20251022100815_create_tried_recipes.sql b/cooky/supabase/migrations/20251022100815_create_tried_recipes.sql new file mode 100644 index 0000000..e2d0410 --- /dev/null +++ b/cooky/supabase/migrations/20251022100815_create_tried_recipes.sql @@ -0,0 +1,57 @@ +/* + # Create tried recipes table + + 1. New Tables + - `tried_recipes` + - `id` (uuid, primary key) - Unique identifier for the tried recipe record + - `recipe_id` (text) - ID of the recipe that was tried + - `user_id` (uuid) - User identifier (for future auth integration) + - `session_id` (text) - Anonymous session identifier + - `created_at` (timestamptz) - Timestamp when recipe was marked as tried + + 2. Security + - Enable RLS on `tried_recipes` table + - Add policy for users to read their own tried recipes (by session_id) + - Add policy for users to insert their own tried recipes + - Add policy for users to delete their own tried recipes + - Add policy for users to update their own tried recipes + + 3. Indexes + - Add index on recipe_id for faster lookups + - Add index on session_id for filtering by session +*/ + +CREATE TABLE IF NOT EXISTS tried_recipes ( + id uuid PRIMARY KEY DEFAULT gen_random_uuid(), + recipe_id text NOT NULL, + user_id uuid, + session_id text NOT NULL, + created_at timestamptz DEFAULT now(), + UNIQUE(recipe_id, session_id) +); + +ALTER TABLE tried_recipes ENABLE ROW LEVEL SECURITY; + +CREATE POLICY "Users can read own tried recipes by session" + ON tried_recipes + FOR SELECT + USING (true); + +CREATE POLICY "Users can insert own tried recipes" + ON tried_recipes + FOR INSERT + WITH CHECK (true); + +CREATE POLICY "Users can update own tried recipes by session" + ON tried_recipes + FOR UPDATE + USING (true) + WITH CHECK (true); + +CREATE POLICY "Users can delete own tried recipes by session" + ON tried_recipes + FOR DELETE + USING (true); + +CREATE INDEX IF NOT EXISTS idx_tried_recipes_recipe_id ON tried_recipes(recipe_id); +CREATE INDEX IF NOT EXISTS idx_tried_recipes_session_id ON tried_recipes(session_id); \ No newline at end of file diff --git a/cooky/tailwind.config.js b/cooky/tailwind.config.js new file mode 100644 index 0000000..427136c --- /dev/null +++ b/cooky/tailwind.config.js @@ -0,0 +1,12 @@ +/** @type {import('tailwindcss').Config} */ +export default { + content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], + theme: { + extend: { + fontFamily: { + sans: ['Inter Tight', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'sans-serif'], + }, + }, + }, + plugins: [], +}; diff --git a/cooky/tsconfig.app.json b/cooky/tsconfig.app.json new file mode 100644 index 0000000..f0a2350 --- /dev/null +++ b/cooky/tsconfig.app.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/cooky/tsconfig.json b/cooky/tsconfig.json new file mode 100644 index 0000000..1ffef60 --- /dev/null +++ b/cooky/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] +} diff --git a/cooky/tsconfig.node.json b/cooky/tsconfig.node.json new file mode 100644 index 0000000..0d3d714 --- /dev/null +++ b/cooky/tsconfig.node.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "target": "ES2022", + "lib": ["ES2023"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["vite.config.ts"] +} diff --git a/cooky/vite.config.ts b/cooky/vite.config.ts new file mode 100644 index 0000000..147380a --- /dev/null +++ b/cooky/vite.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], + optimizeDeps: { + exclude: ['lucide-react'], + }, +});