i(xe,Q))D[W]=xe,D[Se]=Q,W=Se;else break e}}return F}function i(D,F){var Q=D.sortIndex-F.sortIndex;return Q!==0?Q:D.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var a=[],u=[],h=1,f=null,d=3,m=!1,$=!1,k=!1,w=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(D){for(var F=n(u);F!==null;){if(F.callback===null)r(u);else if(F.startTime<=D)r(u),F.sortIndex=F.expirationTime,t(a,F);else break;F=n(u)}}function g(D){if(k=!1,v(D),!$)if(n(a)!==null)$=!0,Be(_);else{var F=n(u);F!==null&&Me(g,F.startTime-D)}}function _(D,F){$=!1,k&&(k=!1,p(C),C=-1),m=!0;var Q=d;try{for(v(F),f=n(a);f!==null&&(!(f.expirationTime>F)||D&&!H());){var W=f.callback;if(typeof W=="function"){f.callback=null,d=f.priorityLevel;var A=W(f.expirationTime<=F);F=e.unstable_now(),typeof A=="function"?f.callback=A:f===n(a)&&r(a),v(F)}else r(a);f=n(a)}if(f!==null)var ie=!0;else{var re=n(u);re!==null&&Me(g,re.startTime-F),ie=!1}return ie}finally{f=null,d=Q,m=!1}}var I=!1,E=null,C=-1,P=5,T=-1;function H(){return!(e.unstable_now()-TD||125W?(D.sortIndex=Q,t(u,D),n(a)===null&&D===n(u)&&(k?(p(C),C=-1):k=!0,Me(g,Q-W))):(D.sortIndex=A,t(a,D),$||m||($=!0,Be(_))),D},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(D){var F=d;return function(){var Q=d;d=F;try{return D.apply(this,arguments)}finally{d=Q}}}})(bd);zd.exports=bd;var jh=zd.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 Qh=N,dt=jh;function x(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"),_l=Object.prototype.hasOwnProperty,Ah=/^[: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]*$/,Uu={},Bu={};function Uh(e){return _l.call(Bu,e)?!0:_l.call(Uu,e)?!1:Ah.test(e)?Bu[e]=!0:(Uu[e]=!0,!1)}function Bh(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 Kh(e,t,n,r){if(t===null||typeof t>"u"||Bh(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 Ge(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 Oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oe[e]=new Ge(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oe[t]=new Ge(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oe[e]=new Ge(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oe[e]=new Ge(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){Oe[e]=new Ge(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oe[e]=new Ge(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oe[e]=new Ge(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oe[e]=new Ge(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oe[e]=new Ge(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ma=/[\-:]([a-z])/g;function Fa(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(Ma,Fa);Oe[t]=new Ge(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(Ma,Fa);Oe[t]=new Ge(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(Ma,Fa);Oe[t]=new Ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oe[e]=new Ge(e,1,!1,e.toLowerCase(),null,!1,!1)});Oe.xlinkHref=new Ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oe[e]=new Ge(e,1,!1,e.toLowerCase(),null,!0,!0)});function za(e,t,n,r){var i=Oe.hasOwnProperty(t)?Oe[t]:null;(i!==null?i.type!==0:r||!(2l||i[o]!==s[l]){var a=`
+`+i[o].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=o&&0<=l);break}}}finally{Jo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?wi(e):""}function Hh(e){switch(e.tag){case 5:return wi(e.type);case 16:return wi("Lazy");case 13:return wi("Suspense");case 19:return wi("SuspenseList");case 0:case 2:case 15:return e=Xo(e.type,!1),e;case 11:return e=Xo(e.type.render,!1),e;case 1:return e=Xo(e.type,!0),e;default:return""}}function Il(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 $r:return"Fragment";case kr:return"Portal";case Nl:return"Profiler";case ba:return"StrictMode";case Cl:return"Suspense";case El:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ad:return(e.displayName||"Context")+".Consumer";case Qd:return(e._context.displayName||"Context")+".Provider";case ja:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Qa:return t=e.displayName||null,t!==null?t:Il(e.type)||"Memo";case ln:t=e._payload,e=e._init;try{return Il(e(t))}catch{}}return null}function Vh(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 Il(t);case 8:return t===ba?"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 Rn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qh(e){var t=Bd(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 ks(e){e._valueTracker||(e._valueTracker=qh(e))}function Kd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Bd(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ys(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 Pl(e,t){var n=t.checked;return he({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Hu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Rn(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 Hd(e,t){t=t.checked,t!=null&&za(e,"checked",t,!1)}function Tl(e,t){Hd(e,t);var n=Rn(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")?xl(e,t.type,n):t.hasOwnProperty("defaultValue")&&xl(e,t.type,Rn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Vu(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 xl(e,t,n){(t!=="number"||Ys(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var _i=Array.isArray;function Rr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=$s.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function bi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ii={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},Wh=["Webkit","ms","Moz","O"];Object.keys(Ii).forEach(function(e){Wh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ii[t]=Ii[e]})});function Gd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ii.hasOwnProperty(e)&&Ii[e]?(""+t).trim():t+"px"}function Yd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Gd(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Gh=he({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 Ol(e,t){if(t){if(Gh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(x(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(x(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(x(61))}if(t.style!=null&&typeof t.style!="object")throw Error(x(62))}}function Ll(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 Ml=null;function Aa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fl=null,Dr=null,Or=null;function Gu(e){if(e=ds(e)){if(typeof Fl!="function")throw Error(x(280));var t=e.stateNode;t&&(t=Po(t),Fl(e.stateNode,e.type,t))}}function Jd(e){Dr?Or?Or.push(e):Or=[e]:Dr=e}function Xd(){if(Dr){var e=Dr,t=Or;if(Or=Dr=null,Gu(e),t)for(e=0;e>>=0,e===0?32:31-(om(e)/lm|0)|0}var Ss=64,ws=4194304;function Ni(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 eo(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 l=o&~i;l!==0?r=Ni(l):(s&=o,s!==0&&(r=Ni(s)))}else o=n&~i,o!==0?r=Ni(o):s!==0&&(r=Ni(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 us(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-It(t),e[t]=n}function dm(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=Ti),ic=" ",sc=!1;function kf(e,t){switch(e){case"keyup":return jm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $f(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sr=!1;function Am(e,t){switch(e){case"compositionend":return $f(t);case"keypress":return t.which!==32?null:(sc=!0,ic);case"textInput":return e=t.data,e===ic&&sc?null:e;default:return null}}function Um(e,t){if(Sr)return e==="compositionend"||!Ga&&kf(e,t)?(e=yf(),js=Va=$n=null,Sr=!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=uc(n)}}function Nf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cf(){for(var e=window,t=Ys();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ys(e.document)}return t}function Ya(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 Jm(e){var t=Cf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Nf(n.ownerDocument.documentElement,n)){if(r!==null&&Ya(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=cc(n,s);var o=cc(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,wr=null,Ul=null,Ri=null,Bl=!1;function dc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Bl||wr==null||wr!==Ys(r)||(r=wr,"selectionStart"in r&&Ya(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}),Ri&&Ki(Ri,r)||(Ri=r,r=ro(Ul,"onSelect"),0Cr||(e.current=Gl[Cr],Gl[Cr]=null,Cr--)}function oe(e,t){Cr++,Gl[Cr]=e.current,e.current=t}var Dn={},Ue=Ln(Dn),tt=Ln(!1),rr=Dn;function Xr(e,t){var n=e.type.contextTypes;if(!n)return Dn;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 nt(e){return e=e.childContextTypes,e!=null}function so(){ue(tt),ue(Ue)}function gc(e,t,n){if(Ue.current!==Dn)throw Error(x(168));oe(Ue,t),oe(tt,n)}function Lf(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(x(108,Vh(e)||"Unknown",i));return he({},n,r)}function oo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dn,rr=Ue.current,oe(Ue,e),oe(tt,tt.current),!0}function kc(e,t,n){var r=e.stateNode;if(!r)throw Error(x(169));n?(e=Lf(e,t,rr),r.__reactInternalMemoizedMergedChildContext=e,ue(tt),ue(Ue),oe(Ue,e)):ue(tt),oe(tt,n)}var Ut=null,To=!1,fl=!1;function Mf(e){Ut===null?Ut=[e]:Ut.push(e)}function uv(e){To=!0,Mf(e)}function Mn(){if(!fl&&Ut!==null){fl=!0;var e=0,t=ee;try{var n=Ut;for(ee=1;e>=o,i-=o,qt=1<<32-It(t)+i|n<C?(P=E,E=null):P=E.sibling;var T=d(p,E,v[C],g);if(T===null){E===null&&(E=P);break}e&&E&&T.alternate===null&&t(p,E),c=s(T,c,C),I===null?_=T:I.sibling=T,I=T,E=P}if(C===v.length)return n(p,E),de&&Qn(p,C),_;if(E===null){for(;CC?(P=E,E=null):P=E.sibling;var H=d(p,E,T.value,g);if(H===null){E===null&&(E=P);break}e&&E&&H.alternate===null&&t(p,E),c=s(H,c,C),I===null?_=H:I.sibling=H,I=H,E=P}if(T.done)return n(p,E),de&&Qn(p,C),_;if(E===null){for(;!T.done;C++,T=v.next())T=f(p,T.value,g),T!==null&&(c=s(T,c,C),I===null?_=T:I.sibling=T,I=T);return de&&Qn(p,C),_}for(E=r(p,E);!T.done;C++,T=v.next())T=m(E,p,C,T.value,g),T!==null&&(e&&T.alternate!==null&&E.delete(T.key===null?C:T.key),c=s(T,c,C),I===null?_=T:I.sibling=T,I=T);return e&&E.forEach(function(J){return t(p,J)}),de&&Qn(p,C),_}function w(p,c,v,g){if(typeof v=="object"&&v!==null&&v.type===$r&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case gs:e:{for(var _=v.key,I=c;I!==null;){if(I.key===_){if(_=v.type,_===$r){if(I.tag===7){n(p,I.sibling),c=i(I,v.props.children),c.return=p,p=c;break e}}else if(I.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===ln&&wc(_)===I.type){n(p,I.sibling),c=i(I,v.props),c.ref=ki(p,I,v),c.return=p,p=c;break e}n(p,I);break}else t(p,I);I=I.sibling}v.type===$r?(c=nr(v.props.children,p.mode,g,v.key),c.return=p,p=c):(g=qs(v.type,v.key,v.props,null,p.mode,g),g.ref=ki(p,c,v),g.return=p,p=g)}return o(p);case kr:e:{for(I=v.key;c!==null;){if(c.key===I)if(c.tag===4&&c.stateNode.containerInfo===v.containerInfo&&c.stateNode.implementation===v.implementation){n(p,c.sibling),c=i(c,v.children||[]),c.return=p,p=c;break e}else{n(p,c);break}else t(p,c);c=c.sibling}c=$l(v,p.mode,g),c.return=p,p=c}return o(p);case ln:return I=v._init,w(p,c,I(v._payload),g)}if(_i(v))return $(p,c,v,g);if(hi(v))return k(p,c,v,g);Ts(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,c!==null&&c.tag===6?(n(p,c.sibling),c=i(c,v),c.return=p,p=c):(n(p,c),c=kl(v,p.mode,g),c.return=p,p=c),o(p)):n(p,c)}return w}var ei=jf(!0),Qf=jf(!1),uo=Ln(null),co=null,Pr=null,eu=null;function tu(){eu=Pr=co=null}function nu(e){var t=uo.current;ue(uo),e._currentValue=t}function Xl(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 Mr(e,t){co=e,eu=Pr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(et=!0),e.firstContext=null)}function $t(e){var t=e._currentValue;if(eu!==e)if(e={context:e,memoizedValue:t,next:null},Pr===null){if(co===null)throw Error(x(308));Pr=e,co.dependencies={lanes:0,firstContext:e}}else Pr=Pr.next=e;return t}var Bn=null;function ru(e){Bn===null?Bn=[e]:Bn.push(e)}function Af(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ru(t)):(n.next=i.next,i.next=n),t.interleaved=n,Zt(e,r)}function Zt(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 an=!1;function iu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Uf(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 Gt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function En(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Y&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Zt(e,n)}return i=r.interleaved,i===null?(t.next=t,ru(r)):(t.next=i.next,i.next=t),r.interleaved=t,Zt(e,n)}function As(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,Ba(e,n)}}function _c(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 fo(e,t,n,r){var i=e.updateQueue;an=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,o===null?s=u:o.next=u,o=a;var h=e.alternate;h!==null&&(h=h.updateQueue,l=h.lastBaseUpdate,l!==o&&(l===null?h.firstBaseUpdate=u:l.next=u,h.lastBaseUpdate=a))}if(s!==null){var f=i.baseState;o=0,h=u=a=null,l=s;do{var d=l.lane,m=l.eventTime;if((r&d)===d){h!==null&&(h=h.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var $=e,k=l;switch(d=t,m=n,k.tag){case 1:if($=k.payload,typeof $=="function"){f=$.call(m,f,d);break e}f=$;break e;case 3:$.flags=$.flags&-65537|128;case 0:if($=k.payload,d=typeof $=="function"?$.call(m,f,d):$,d==null)break e;f=he({},f,d);break e;case 2:an=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else m={eventTime:m,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},h===null?(u=h=m,a=f):h=h.next=m,o|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(h===null&&(a=f),i.baseState=a,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);or|=o,e.lanes=o,e.memoizedState=f}}function Nc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=hl.transition;hl.transition={};try{e(!1),t()}finally{ee=n,hl.transition=r}}function sp(){return St().memoizedState}function pv(e,t,n){var r=Pn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},op(e))lp(t,n);else if(n=Af(e,t,n,r),n!==null){var i=qe();Pt(n,e,r,i),ap(n,t,r)}}function hv(e,t,n){var r=Pn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(op(e))lp(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,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,Tt(l,o)){var a=t.interleaved;a===null?(i.next=i,ru(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Af(e,t,i,r),n!==null&&(i=qe(),Pt(n,e,r,i),ap(n,t,r))}}function op(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function lp(e,t){Di=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ap(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ba(e,n)}}var mo={readContext:$t,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useInsertionEffect:ze,useLayoutEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useMutableSource:ze,useSyncExternalStore:ze,useId:ze,unstable_isNewReconciler:!1},mv={readContext:$t,useCallback:function(e,t){return Rt().memoizedState=[e,t===void 0?null:t],e},useContext:$t,useEffect:Ec,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Bs(4194308,4,ep.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Bs(4,2,e,t)},useMemo:function(e,t){var n=Rt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Rt();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=pv.bind(null,pe,e),[r.memoizedState,e]},useRef:function(e){var t=Rt();return e={current:e},t.memoizedState=e},useState:Cc,useDebugValue:fu,useDeferredValue:function(e){return Rt().memoizedState=e},useTransition:function(){var e=Cc(!1),t=e[0];return e=fv.bind(null,e[1]),Rt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pe,i=Rt();if(de){if(n===void 0)throw Error(x(407));n=n()}else{if(n=t(),Te===null)throw Error(x(349));sr&30||Vf(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Ec(Wf.bind(null,r,s,e),[e]),r.flags|=2048,Xi(9,qf.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Rt(),t=Te.identifierPrefix;if(de){var n=Wt,r=qt;n=(r&~(1<<32-It(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yi++,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[Mt]=t,e[qi]=r,gp(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ll(n,r),n){case"dialog":ae("cancel",e),ae("close",e),i=r;break;case"iframe":case"object":case"embed":ae("load",e),i=r;break;case"video":case"audio":for(i=0;iri&&(t.flags|=128,r=!0,$i(s,!1),t.lanes=4194304)}else{if(!r)if(e=po(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),$i(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!de)return be(t),null}else 2*$e()-s.renderingStartTime>ri&&n!==1073741824&&(t.flags|=128,r=!0,$i(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=$e(),t.sibling=null,n=fe.current,oe(fe,r?n&1|2:n&1),t):(be(t),null);case 22:case 23:return gu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?st&1073741824&&(be(t),t.subtreeFlags&6&&(t.flags|=8192)):be(t),null;case 24:return null;case 25:return null}throw Error(x(156,t.tag))}function _v(e,t){switch(Xa(t),t.tag){case 1:return nt(t.type)&&so(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ti(),ue(tt),ue(Ue),lu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ou(t),null;case 13:if(ue(fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(x(340));Zr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ue(fe),null;case 4:return ti(),null;case 10:return nu(t.type._context),null;case 22:case 23:return gu(),null;case 24:return null;default:return null}}var Rs=!1,Ae=!1,Nv=typeof WeakSet=="function"?WeakSet:Set,M=null;function Tr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ge(e,t,r)}else n.current=null}function la(e,t,n){try{n()}catch(r){ge(e,t,r)}}var zc=!1;function Cv(e,t){if(Kl=to,e=Cf(),Ya(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,l=-1,a=-1,u=0,h=0,f=e,d=null;t:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(l=o+i),f!==s||r!==0&&f.nodeType!==3||(a=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)d=f,f=m;for(;;){if(f===e)break t;if(d===n&&++u===i&&(l=o),d===s&&++h===r&&(a=o),(m=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=m}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Hl={focusedElem:e,selectionRange:n},to=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var $=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if($!==null){var k=$.memoizedProps,w=$.memoizedState,p=t.stateNode,c=p.getSnapshotBeforeUpdate(t.elementType===t.type?k:_t(t.type,k),w);p.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(x(163))}}catch(g){ge(t,t.return,g)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return $=zc,zc=!1,$}function Oi(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&&la(t,n,s)}i=i.next}while(i!==r)}}function Do(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 aa(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 Sp(e){var t=e.alternate;t!==null&&(e.alternate=null,Sp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mt],delete t[qi],delete t[Wl],delete t[lv],delete t[av])),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 wp(e){return e.tag===5||e.tag===3||e.tag===4}function bc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wp(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 ua(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=io));else if(r!==4&&(e=e.child,e!==null))for(ua(e,t,n),e=e.sibling;e!==null;)ua(e,t,n),e=e.sibling}function ca(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(ca(e,t,n),e=e.sibling;e!==null;)ca(e,t,n),e=e.sibling}var Re=null,Ct=!1;function sn(e,t,n){for(n=n.child;n!==null;)_p(e,t,n),n=n.sibling}function _p(e,t,n){if(Ft&&typeof Ft.onCommitFiberUnmount=="function")try{Ft.onCommitFiberUnmount(No,n)}catch{}switch(n.tag){case 5:Ae||Tr(n,t);case 6:var r=Re,i=Ct;Re=null,sn(e,t,n),Re=r,Ct=i,Re!==null&&(Ct?(e=Re,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Re.removeChild(n.stateNode));break;case 18:Re!==null&&(Ct?(e=Re,n=n.stateNode,e.nodeType===8?dl(e.parentNode,n):e.nodeType===1&&dl(e,n),Ui(e)):dl(Re,n.stateNode));break;case 4:r=Re,i=Ct,Re=n.stateNode.containerInfo,Ct=!0,sn(e,t,n),Re=r,Ct=i;break;case 0:case 11:case 14:case 15:if(!Ae&&(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)&&la(n,t,o),i=i.next}while(i!==r)}sn(e,t,n);break;case 1:if(!Ae&&(Tr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ge(n,t,l)}sn(e,t,n);break;case 21:sn(e,t,n);break;case 22:n.mode&1?(Ae=(r=Ae)||n.memoizedState!==null,sn(e,t,n),Ae=r):sn(e,t,n);break;default:sn(e,t,n)}}function jc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Nv),t.forEach(function(r){var i=Lv.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function wt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Iv(r/1960))-r,10e?16:e,Sn===null)var r=!1;else{if(e=Sn,Sn=null,go=0,Y&6)throw Error(x(331));var i=Y;for(Y|=4,M=e.current;M!==null;){var s=M,o=s.child;if(M.flags&16){var l=s.deletions;if(l!==null){for(var a=0;a$e()-vu?tr(e,0):mu|=n),rt(e,t)}function Rp(e,t){t===0&&(e.mode&1?(t=ws,ws<<=1,!(ws&130023424)&&(ws=4194304)):t=1);var n=qe();e=Zt(e,t),e!==null&&(us(e,t,n),rt(e,n))}function Ov(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Rp(e,n)}function Lv(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(x(314))}r!==null&&r.delete(t),Rp(e,n)}var Dp;Dp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||tt.current)et=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return et=!1,Sv(e,t,n);et=!!(e.flags&131072)}else et=!1,de&&t.flags&1048576&&Ff(t,ao,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ks(e,t),e=t.pendingProps;var i=Xr(t,Ue.current);Mr(t,n),i=uu(null,t,r,e,i,n);var s=cu();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,nt(r)?(s=!0,oo(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,iu(t),i.updater=Ro,t.stateNode=i,i._reactInternals=t,ea(t,r,e,n),t=ra(null,t,r,!0,s,n)):(t.tag=0,de&&s&&Ja(t),He(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ks(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Fv(r),e=_t(r,e),i){case 0:t=na(null,t,r,e,n);break e;case 1:t=Lc(null,t,r,e,n);break e;case 11:t=Dc(null,t,r,e,n);break e;case 14:t=Oc(null,t,r,_t(r.type,e),n);break e}throw Error(x(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_t(r,i),na(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_t(r,i),Lc(e,t,r,i,n);case 3:e:{if(mp(t),e===null)throw Error(x(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Uf(e,t),fo(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=ni(Error(x(423)),t),t=Mc(e,t,r,n,i);break e}else if(r!==i){i=ni(Error(x(424)),t),t=Mc(e,t,r,n,i);break e}else for(at=Cn(t.stateNode.containerInfo.firstChild),ut=t,de=!0,Et=null,n=Qf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zr(),r===i){t=en(e,t,n);break e}He(e,t,r,n)}t=t.child}return t;case 5:return Bf(t),e===null&&Jl(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Vl(r,i)?o=null:s!==null&&Vl(r,s)&&(t.flags|=32),hp(e,t),He(e,t,o,n),t.child;case 6:return e===null&&Jl(t),null;case 13:return vp(e,t,n);case 4:return su(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ei(t,null,r,n):He(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_t(r,i),Dc(e,t,r,i,n);case 7:return He(e,t,t.pendingProps,n),t.child;case 8:return He(e,t,t.pendingProps.children,n),t.child;case 12:return He(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,oe(uo,r._currentValue),r._currentValue=o,s!==null)if(Tt(s.value,o)){if(s.children===i.children&&!tt.current){t=en(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=Gt(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?a.next=a:(a.next=h.next,h.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Xl(s.return,n,t),l.lanes|=n;break}a=a.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(x(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Xl(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}He(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Mr(t,n),i=$t(i),r=r(i),t.flags|=1,He(e,t,r,n),t.child;case 14:return r=t.type,i=_t(r,t.pendingProps),i=_t(r.type,i),Oc(e,t,r,i,n);case 15:return fp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_t(r,i),Ks(e,t),t.tag=1,nt(r)?(e=!0,oo(t)):e=!1,Mr(t,n),up(t,r,i),ea(t,r,i,n),ra(null,t,r,!0,e,n);case 19:return yp(e,t,n);case 22:return pp(e,t,n)}throw Error(x(156,t.tag))};function Op(e,t){return of(e,t)}function Mv(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 gt(e,t,n,r){return new Mv(e,t,n,r)}function $u(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fv(e){if(typeof e=="function")return $u(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ja)return 11;if(e===Qa)return 14}return 2}function Tn(e,t){var n=e.alternate;return n===null?(n=gt(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 qs(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")$u(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case $r:return nr(n.children,i,s,t);case ba:o=8,i|=8;break;case Nl:return e=gt(12,n,t,i|2),e.elementType=Nl,e.lanes=s,e;case Cl:return e=gt(13,n,t,i),e.elementType=Cl,e.lanes=s,e;case El:return e=gt(19,n,t,i),e.elementType=El,e.lanes=s,e;case Ud:return Lo(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qd:o=10;break e;case Ad:o=9;break e;case ja:o=11;break e;case Qa:o=14;break e;case ln:o=16,r=null;break e}throw Error(x(130,e==null?e:typeof e,""))}return t=gt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function nr(e,t,n,r){return e=gt(7,e,r,t),e.lanes=n,e}function Lo(e,t,n,r){return e=gt(22,e,r,t),e.elementType=Ud,e.lanes=n,e.stateNode={isHidden:!1},e}function kl(e,t,n){return e=gt(6,e,null,t),e.lanes=n,e}function $l(e,t,n){return t=gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zv(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=el(0),this.expirationTimes=el(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=el(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Su(e,t,n,r,i,s,o,l,a){return e=new zv(e,t,n,l,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=gt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},iu(s),e}function bv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(zp)}catch(e){console.error(e)}}zp(),Fd.exports=ft;var Bv=Fd.exports,bp,qc=Bv;bp=qc.createRoot,qc.hydrateRoot;var li=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Vn,dn,br,vd,Kv=(vd=class extends li{constructor(){super();b(this,Vn);b(this,dn);b(this,br);O(this,br,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){y(this,dn)||this.setEventListener(y(this,br))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,dn))==null||t.call(this),O(this,dn,void 0))}setEventListener(t){var n;O(this,br,t),(n=y(this,dn))==null||n.call(this),O(this,dn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){y(this,Vn)!==t&&(O(this,Vn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof y(this,Vn)=="boolean"?y(this,Vn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Vn=new WeakMap,dn=new WeakMap,br=new WeakMap,vd),Cu=new Kv,Hv={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},fn,xa,yd,Vv=(yd=class{constructor(){b(this,fn,Hv);b(this,xa,!1)}setTimeoutProvider(e){O(this,fn,e)}setTimeout(e,t){return y(this,fn).setTimeout(e,t)}clearTimeout(e){y(this,fn).clearTimeout(e)}setInterval(e,t){return y(this,fn).setInterval(e,t)}clearInterval(e){y(this,fn).clearInterval(e)}},fn=new WeakMap,xa=new WeakMap,yd),Hn=new Vv;function qv(e){setTimeout(e,0)}var Wv=typeof window>"u"||"Deno"in globalThis;function Ve(){}function Gv(e,t){return typeof e=="function"?e(t):e}function ma(e){return typeof e=="number"&&e>=0&&e!==1/0}function jp(e,t){return Math.max(e+(t||0)-Date.now(),0)}function xn(e,t){return typeof e=="function"?e(t):e}function lt(e,t){return typeof e=="function"?e(t):e}function Wc(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==Eu(o,t.options))return!1}else if(!es(t.queryKey,o))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||s&&!s(t))}function Gc(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(ar(t.options.mutationKey)!==ar(s))return!1}else if(!es(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Eu(e,t){return((t==null?void 0:t.queryKeyHashFn)||ar)(e)}function ar(e){return JSON.stringify(e,(t,n)=>va(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function es(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>es(e[n],t[n])):!1}var Yv=Object.prototype.hasOwnProperty;function Qp(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Yc(e)&&Yc(t);if(!r&&!(va(e)&&va(t)))return t;const s=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),l=o.length,a=r?new Array(l):{};let u=0;for(let h=0;h{Hn.setTimeout(t,e)})}function ya(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Qp(e,t):t}function Xv(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Zv(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Iu=Symbol();function Ap(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Iu?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Pu(e,t){return typeof e=="function"?e(...t):!!e}function ey(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var ts=(()=>{let e=()=>Wv;return{isServer(){return e()},setIsServer(t){e=t}}})();function ga(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var ty=qv;function ny(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=ty;const s=l=>{t?e.push(l):i(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(a=>{n(a)})})})};return{batch:l=>{let a;t++;try{a=l()}finally{t--,t||o()}return a},batchCalls:l=>(...a)=>{s(()=>{l(...a)})},schedule:s,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var Ce=ny(),jr,pn,Qr,gd,ry=(gd=class extends li{constructor(){super();b(this,jr,!0);b(this,pn);b(this,Qr);O(this,Qr,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){y(this,pn)||this.setEventListener(y(this,Qr))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,pn))==null||t.call(this),O(this,pn,void 0))}setEventListener(t){var n;O(this,Qr,t),(n=y(this,pn))==null||n.call(this),O(this,pn,t(this.setOnline.bind(this)))}setOnline(t){y(this,jr)!==t&&(O(this,jr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return y(this,jr)}},jr=new WeakMap,pn=new WeakMap,Qr=new WeakMap,gd),wo=new ry;function iy(e){return Math.min(1e3*2**e,3e4)}function Up(e){return(e??"online")==="online"?wo.isOnline():!0}var ka=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Bp(e){let t=!1,n=0,r;const i=ga(),s=()=>i.status!=="pending",o=k=>{var w;if(!s()){const p=new ka(k);d(p),(w=e.onCancel)==null||w.call(e,p)}},l=()=>{t=!0},a=()=>{t=!1},u=()=>Cu.isFocused()&&(e.networkMode==="always"||wo.isOnline())&&e.canRun(),h=()=>Up(e.networkMode)&&e.canRun(),f=k=>{s()||(r==null||r(),i.resolve(k))},d=k=>{s()||(r==null||r(),i.reject(k))},m=()=>new Promise(k=>{var w;r=p=>{(s()||u())&&k(p)},(w=e.onPause)==null||w.call(e)}).then(()=>{var k;r=void 0,s()||(k=e.onContinue)==null||k.call(e)}),$=()=>{if(s())return;let k;const w=n===0?e.initialPromise:void 0;try{k=w??e.fn()}catch(p){k=Promise.reject(p)}Promise.resolve(k).then(f).catch(p=>{var I;if(s())return;const c=e.retry??(ts.isServer()?0:3),v=e.retryDelay??iy,g=typeof v=="function"?v(n,p):v,_=c===!0||typeof c=="number"&&nu()?void 0:m()).then(()=>{t?d(p):$()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:a,canStart:h,start:()=>(h()?$():m().then($),i)}}var qn,kd,Kp=(kd=class{constructor(){b(this,qn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ma(this.gcTime)&&O(this,qn,Hn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ts.isServer()?1/0:5*60*1e3))}clearGcTimeout(){y(this,qn)!==void 0&&(Hn.clearTimeout(y(this,qn)),O(this,qn,void 0))}},qn=new WeakMap,kd);function sy(e){return{onFetch:(t,n)=>{var h,f,d,m,$;const r=t.options,i=(d=(f=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,s=((m=t.state.data)==null?void 0:m.pages)||[],o=(($=t.state.data)==null?void 0:$.pageParams)||[];let l={pages:[],pageParams:[]},a=0;const u=async()=>{let k=!1;const w=v=>{ey(v,()=>t.signal,()=>k=!0)},p=Ap(t.options,t.fetchOptions),c=async(v,g,_)=>{if(k)return Promise.reject(t.signal.reason);if(g==null&&v.pages.length)return Promise.resolve(v);const E=(()=>{const H={client:t.client,queryKey:t.queryKey,pageParam:g,direction:_?"backward":"forward",meta:t.options.meta};return w(H),H})(),C=await p(E),{maxPages:P}=t.options,T=_?Zv:Xv;return{pages:T(v.pages,C,P),pageParams:T(v.pageParams,g,P)}};if(i&&s.length){const v=i==="backward",g=v?oy:Xc,_={pages:s,pageParams:o},I=g(r,_);l=await c(_,I,v)}else{const v=e??s.length;do{const g=a===0?o[0]??r.initialPageParam:Xc(r,l);if(a>0&&g==null)break;l=await c(l,g),a++}while(a{var k,w;return(w=(k=t.options).persister)==null?void 0:w.call(k,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Xc(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function oy(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ar,Wn,Ur,mt,Gn,Ie,rs,Yn,ot,Hp,Qt,$d,ly=($d=class extends Kp{constructor(t){super();b(this,ot);b(this,Ar);b(this,Wn);b(this,Ur);b(this,mt);b(this,Gn);b(this,Ie);b(this,rs);b(this,Yn);O(this,Yn,!1),O(this,rs,t.defaultOptions),this.setOptions(t.options),this.observers=[],O(this,Gn,t.client),O(this,mt,y(this,Gn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,O(this,Wn,ed(this.options)),this.state=t.state??y(this,Wn),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return y(this,Ar)}get promise(){var t;return(t=y(this,Ie))==null?void 0:t.promise}setOptions(t){if(this.options={...y(this,rs),...t},t!=null&&t._type&&O(this,Ar,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=ed(this.options);n.data!==void 0&&(this.setState(Zc(n.data,n.dataUpdatedAt)),O(this,Wn,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&y(this,mt).remove(this)}setData(t,n){const r=ya(this.state.data,t,this.options);return K(this,ot,Qt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){K(this,ot,Qt).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=y(this,Ie))==null?void 0:r.promise;return(i=y(this,Ie))==null||i.cancel(t),n?n.then(Ve).catch(Ve):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return y(this,Wn)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>lt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Iu||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>xn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!jp(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=y(this,Ie))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=y(this,Ie))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),y(this,mt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(y(this,Ie)&&(y(this,Yn)||K(this,ot,Hp).call(this)?y(this,Ie).cancel({revert:!0}):y(this,Ie).cancelRetry()),this.scheduleGc()),y(this,mt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||K(this,ot,Qt).call(this,{type:"invalidate"})}async fetch(t,n){var u,h,f,d,m,$,k,w,p,c,v;if(this.state.fetchStatus!=="idle"&&((u=y(this,Ie))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(y(this,Ie))return y(this,Ie).continueRetry(),y(this,Ie).promise}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(_=>_.options.queryFn);g&&this.setOptions(g.options)}const r=new AbortController,i=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(O(this,Yn,!0),r.signal)})},s=()=>{const g=Ap(this.options,n),I=(()=>{const E={client:y(this,Gn),queryKey:this.queryKey,meta:this.meta};return i(E),E})();return O(this,Yn,!1),this.options.persister?this.options.persister(g,I,this):g(I)},l=(()=>{const g={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:y(this,Gn),state:this.state,fetchFn:s};return i(g),g})(),a=y(this,Ar)==="infinite"?sy(this.options.pages):this.options.behavior;a==null||a.onFetch(l,this),O(this,Ur,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&K(this,ot,Qt).call(this,{type:"fetch",meta:(f=l.fetchOptions)==null?void 0:f.meta}),O(this,Ie,Bp({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:g=>{g instanceof ka&&g.revert&&this.setState({...y(this,Ur),fetchStatus:"idle"}),r.abort()},onFail:(g,_)=>{K(this,ot,Qt).call(this,{type:"failed",failureCount:g,error:_})},onPause:()=>{K(this,ot,Qt).call(this,{type:"pause"})},onContinue:()=>{K(this,ot,Qt).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const g=await y(this,Ie).start();if(g===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(g),(m=(d=y(this,mt).config).onSuccess)==null||m.call(d,g,this),(k=($=y(this,mt).config).onSettled)==null||k.call($,g,this.state.error,this),g}catch(g){if(g instanceof ka){if(g.silent)return y(this,Ie).promise;if(g.revert){if(this.state.data===void 0)throw g;return this.state.data}}throw K(this,ot,Qt).call(this,{type:"error",error:g}),(p=(w=y(this,mt).config).onError)==null||p.call(w,g,this),(v=(c=y(this,mt).config).onSettled)==null||v.call(c,this.state.data,g,this),g}finally{this.scheduleGc()}}},Ar=new WeakMap,Wn=new WeakMap,Ur=new WeakMap,mt=new WeakMap,Gn=new WeakMap,Ie=new WeakMap,rs=new WeakMap,Yn=new WeakMap,ot=new WeakSet,Hp=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Qt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Vp(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...Zc(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return O(this,Ur,t.manual?i:void 0),i;case"error":const s=t.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ce.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),y(this,mt).notify({query:this,type:"updated",action:t})})},$d);function Vp(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Up(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Zc(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ed(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Je,G,is,Ke,Jn,Br,Bt,hn,ss,Kr,Hr,Xn,Zn,mn,Vr,X,Ei,$a,Sa,wa,_a,Na,Ca,Ea,qp,Sd,ay=(Sd=class extends li{constructor(t,n){super();b(this,X);b(this,Je);b(this,G);b(this,is);b(this,Ke);b(this,Jn);b(this,Br);b(this,Bt);b(this,hn);b(this,ss);b(this,Kr);b(this,Hr);b(this,Xn);b(this,Zn);b(this,mn);b(this,Vr,new Set);this.options=n,O(this,Je,t),O(this,hn,null),O(this,Bt,ga()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(y(this,G).addObserver(this),td(y(this,G),this.options)?K(this,X,Ei).call(this):this.updateResult(),K(this,X,_a).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ia(y(this,G),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ia(y(this,G),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,K(this,X,Na).call(this),K(this,X,Ca).call(this),y(this,G).removeObserver(this)}setOptions(t){const n=this.options,r=y(this,G);if(this.options=y(this,Je).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof lt(this.options.enabled,y(this,G))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");K(this,X,Ea).call(this),y(this,G).setOptions(this.options),n._defaulted&&!So(this.options,n)&&y(this,Je).getQueryCache().notify({type:"observerOptionsUpdated",query:y(this,G),observer:this});const i=this.hasListeners();i&&nd(y(this,G),r,this.options,n)&&K(this,X,Ei).call(this),this.updateResult(),i&&(y(this,G)!==r||lt(this.options.enabled,y(this,G))!==lt(n.enabled,y(this,G))||xn(this.options.staleTime,y(this,G))!==xn(n.staleTime,y(this,G)))&&K(this,X,$a).call(this);const s=K(this,X,Sa).call(this);i&&(y(this,G)!==r||lt(this.options.enabled,y(this,G))!==lt(n.enabled,y(this,G))||s!==y(this,mn))&&K(this,X,wa).call(this,s)}getOptimisticResult(t){const n=y(this,Je).getQueryCache().build(y(this,Je),t),r=this.createResult(n,t);return cy(this,r)&&(O(this,Ke,r),O(this,Br,this.options),O(this,Jn,y(this,G).state)),r}getCurrentResult(){return y(this,Ke)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&y(this,Bt).status==="pending"&&y(this,Bt).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){y(this,Vr).add(t)}getCurrentQuery(){return y(this,G)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=y(this,Je).defaultQueryOptions(t),r=y(this,Je).getQueryCache().build(y(this,Je),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return K(this,X,Ei).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),y(this,Ke)))}createResult(t,n){var P;const r=y(this,G),i=this.options,s=y(this,Ke),o=y(this,Jn),l=y(this,Br),u=t!==r?t.state:y(this,is),{state:h}=t;let f={...h},d=!1,m;if(n._optimisticResults){const T=this.hasListeners(),H=!T&&td(t,n),J=T&&nd(t,r,n,i);(H||J)&&(f={...f,...Vp(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:$,errorUpdatedAt:k,status:w}=f;m=f.data;let p=!1;if(n.placeholderData!==void 0&&m===void 0&&w==="pending"){let T;s!=null&&s.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(T=s.data,p=!0):T=typeof n.placeholderData=="function"?n.placeholderData((P=y(this,Hr))==null?void 0:P.state.data,y(this,Hr)):n.placeholderData,T!==void 0&&(w="success",m=ya(s==null?void 0:s.data,T,n),d=!0)}if(n.select&&m!==void 0&&!p)if(s&&m===(o==null?void 0:o.data)&&n.select===y(this,ss))m=y(this,Kr);else try{O(this,ss,n.select),m=n.select(m),m=ya(s==null?void 0:s.data,m,n),O(this,Kr,m),O(this,hn,null)}catch(T){O(this,hn,T)}y(this,hn)&&($=y(this,hn),m=y(this,Kr),k=Date.now(),w="error");const c=f.fetchStatus==="fetching",v=w==="pending",g=w==="error",_=v&&c,I=m!==void 0,C={status:w,fetchStatus:f.fetchStatus,isPending:v,isSuccess:w==="success",isError:g,isInitialLoading:_,isLoading:_,data:m,dataUpdatedAt:f.dataUpdatedAt,error:$,errorUpdatedAt:k,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:c,isRefetching:c&&!v,isLoadingError:g&&!I,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:g&&I,isStale:Tu(t,n),refetch:this.refetch,promise:y(this,Bt),isEnabled:lt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const T=C.data!==void 0,H=C.status==="error"&&!T,J=Le=>{H?Le.reject(C.error):T&&Le.resolve(C.data)},le=()=>{const Le=O(this,Bt,C.promise=ga());J(Le)},ce=y(this,Bt);switch(ce.status){case"pending":t.queryHash===r.queryHash&&J(ce);break;case"fulfilled":(H||C.data!==ce.value)&&le();break;case"rejected":(!H||C.error!==ce.reason)&&le();break}}return C}updateResult(){const t=y(this,Ke),n=this.createResult(y(this,G),this.options);if(O(this,Jn,y(this,G).state),O(this,Br,this.options),y(this,Jn).data!==void 0&&O(this,Hr,y(this,G)),So(n,t))return;O(this,Ke,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!y(this,Vr).size)return!0;const o=new Set(s??y(this,Vr));return this.options.throwOnError&&o.add("error"),Object.keys(y(this,Ke)).some(l=>{const a=l;return y(this,Ke)[a]!==t[a]&&o.has(a)})};K(this,X,qp).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&K(this,X,_a).call(this)}},Je=new WeakMap,G=new WeakMap,is=new WeakMap,Ke=new WeakMap,Jn=new WeakMap,Br=new WeakMap,Bt=new WeakMap,hn=new WeakMap,ss=new WeakMap,Kr=new WeakMap,Hr=new WeakMap,Xn=new WeakMap,Zn=new WeakMap,mn=new WeakMap,Vr=new WeakMap,X=new WeakSet,Ei=function(t){K(this,X,Ea).call(this);let n=y(this,G).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ve)),n},$a=function(){K(this,X,Na).call(this);const t=xn(this.options.staleTime,y(this,G));if(ts.isServer()||y(this,Ke).isStale||!ma(t))return;const r=jp(y(this,Ke).dataUpdatedAt,t)+1;O(this,Xn,Hn.setTimeout(()=>{y(this,Ke).isStale||this.updateResult()},r))},Sa=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(y(this,G)):this.options.refetchInterval)??!1},wa=function(t){K(this,X,Ca).call(this),O(this,mn,t),!(ts.isServer()||lt(this.options.enabled,y(this,G))===!1||!ma(y(this,mn))||y(this,mn)===0)&&O(this,Zn,Hn.setInterval(()=>{(this.options.refetchIntervalInBackground||Cu.isFocused())&&K(this,X,Ei).call(this)},y(this,mn)))},_a=function(){K(this,X,$a).call(this),K(this,X,wa).call(this,K(this,X,Sa).call(this))},Na=function(){y(this,Xn)!==void 0&&(Hn.clearTimeout(y(this,Xn)),O(this,Xn,void 0))},Ca=function(){y(this,Zn)!==void 0&&(Hn.clearInterval(y(this,Zn)),O(this,Zn,void 0))},Ea=function(){const t=y(this,Je).getQueryCache().build(y(this,Je),this.options);if(t===y(this,G))return;const n=y(this,G);O(this,G,t),O(this,is,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},qp=function(t){Ce.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(y(this,Ke))}),y(this,Je).getQueryCache().notify({query:y(this,G),type:"observerResultsUpdated"})})},Sd);function uy(e,t){return lt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&<(t.retryOnMount,e)===!1)}function td(e,t){return uy(e,t)||e.state.data!==void 0&&Ia(e,t,t.refetchOnMount)}function Ia(e,t,n){if(lt(t.enabled,e)!==!1&&xn(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Tu(e,t)}return!1}function nd(e,t,n,r){return(e!==t||lt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Tu(e,n)}function Tu(e,t){return lt(t.enabled,e)!==!1&&e.isStaleByTime(xn(t.staleTime,e))}function cy(e,t){return!So(e.getCurrentResult(),t)}var os,Dt,Qe,er,Ot,on,wd,dy=(wd=class extends Kp{constructor(t){super();b(this,Ot);b(this,os);b(this,Dt);b(this,Qe);b(this,er);O(this,os,t.client),this.mutationId=t.mutationId,O(this,Qe,t.mutationCache),O(this,Dt,[]),this.state=t.state||Wp(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){y(this,Dt).includes(t)||(y(this,Dt).push(t),this.clearGcTimeout(),y(this,Qe).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){O(this,Dt,y(this,Dt).filter(n=>n!==t)),this.scheduleGc(),y(this,Qe).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){y(this,Dt).length||(this.state.status==="pending"?this.scheduleGc():y(this,Qe).remove(this))}continue(){var t;return((t=y(this,er))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,a,u,h,f,d,m,$,k,w,p,c,v,g,_,I,E;const n=()=>{K(this,Ot,on).call(this,{type:"continue"})},r={client:y(this,os),meta:this.options.meta,mutationKey:this.options.mutationKey};O(this,er,Bp({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(C,P)=>{K(this,Ot,on).call(this,{type:"failed",failureCount:C,error:P})},onPause:()=>{K(this,Ot,on).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>y(this,Qe).canRun(this)}));const i=this.state.status==="pending",s=!y(this,er).canStart();try{if(i)n();else{K(this,Ot,on).call(this,{type:"pending",variables:t,isPaused:s}),y(this,Qe).config.onMutate&&await y(this,Qe).config.onMutate(t,this,r);const P=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t,r));P!==this.state.context&&K(this,Ot,on).call(this,{type:"pending",context:P,variables:t,isPaused:s})}const C=await y(this,er).start();return await((u=(a=y(this,Qe).config).onSuccess)==null?void 0:u.call(a,C,t,this.state.context,this,r)),await((f=(h=this.options).onSuccess)==null?void 0:f.call(h,C,t,this.state.context,r)),await((m=(d=y(this,Qe).config).onSettled)==null?void 0:m.call(d,C,null,this.state.variables,this.state.context,this,r)),await((k=($=this.options).onSettled)==null?void 0:k.call($,C,null,t,this.state.context,r)),K(this,Ot,on).call(this,{type:"success",data:C}),C}catch(C){try{await((p=(w=y(this,Qe).config).onError)==null?void 0:p.call(w,C,t,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((v=(c=this.options).onError)==null?void 0:v.call(c,C,t,this.state.context,r))}catch(P){Promise.reject(P)}try{await((_=(g=y(this,Qe).config).onSettled)==null?void 0:_.call(g,void 0,C,this.state.variables,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((E=(I=this.options).onSettled)==null?void 0:E.call(I,void 0,C,t,this.state.context,r))}catch(P){Promise.reject(P)}throw K(this,Ot,on).call(this,{type:"error",error:C}),C}finally{y(this,Qe).runNext(this)}}},os=new WeakMap,Dt=new WeakMap,Qe=new WeakMap,er=new WeakMap,Ot=new WeakSet,on=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ce.batch(()=>{y(this,Dt).forEach(r=>{r.onMutationUpdate(t)}),y(this,Qe).notify({mutation:this,type:"updated",action:t})})},wd);function Wp(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Kt,Nt,ls,_d,fy=(_d=class extends li{constructor(t={}){super();b(this,Kt);b(this,Nt);b(this,ls);this.config=t,O(this,Kt,new Set),O(this,Nt,new Map),O(this,ls,0)}build(t,n,r){const i=new dy({client:t,mutationCache:this,mutationId:++vs(this,ls)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){y(this,Kt).add(t);const n=Ls(t);if(typeof n=="string"){const r=y(this,Nt).get(n);r?r.push(t):y(this,Nt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(y(this,Kt).delete(t)){const n=Ls(t);if(typeof n=="string"){const r=y(this,Nt).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&y(this,Nt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ls(t);if(typeof n=="string"){const r=y(this,Nt).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Ls(t);if(typeof n=="string"){const i=(r=y(this,Nt).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ce.batch(()=>{y(this,Kt).forEach(t=>{this.notify({type:"removed",mutation:t})}),y(this,Kt).clear(),y(this,Nt).clear()})}getAll(){return Array.from(y(this,Kt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Gc(n,r))}findAll(t={}){return this.getAll().filter(n=>Gc(t,n))}notify(t){Ce.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ce.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ve))))}},Kt=new WeakMap,Nt=new WeakMap,ls=new WeakMap,_d);function Ls(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ht,vn,Xe,Vt,Yt,Ws,Pa,Nd,py=(Nd=class extends li{constructor(n,r){super();b(this,Yt);b(this,Ht);b(this,vn);b(this,Xe);b(this,Vt);O(this,Ht,n),this.setOptions(r),this.bindMethods(),K(this,Yt,Ws).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=y(this,Ht).defaultMutationOptions(n),So(this.options,r)||y(this,Ht).getMutationCache().notify({type:"observerOptionsUpdated",mutation:y(this,Xe),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ar(r.mutationKey)!==ar(this.options.mutationKey)?this.reset():((i=y(this,Xe))==null?void 0:i.state.status)==="pending"&&y(this,Xe).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=y(this,Xe))==null||n.removeObserver(this)}onMutationUpdate(n){K(this,Yt,Ws).call(this),K(this,Yt,Pa).call(this,n)}getCurrentResult(){return y(this,vn)}reset(){var n;(n=y(this,Xe))==null||n.removeObserver(this),O(this,Xe,void 0),K(this,Yt,Ws).call(this),K(this,Yt,Pa).call(this)}mutate(n,r){var i;return O(this,Vt,r),(i=y(this,Xe))==null||i.removeObserver(this),O(this,Xe,y(this,Ht).getMutationCache().build(y(this,Ht),this.options)),y(this,Xe).addObserver(this),y(this,Xe).execute(n)}},Ht=new WeakMap,vn=new WeakMap,Xe=new WeakMap,Vt=new WeakMap,Yt=new WeakSet,Ws=function(){var r;const n=((r=y(this,Xe))==null?void 0:r.state)??Wp();O(this,vn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Pa=function(n){Ce.batch(()=>{var r,i,s,o,l,a,u,h;if(y(this,Vt)&&this.hasListeners()){const f=y(this,vn).variables,d=y(this,vn).context,m={client:y(this,Ht),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=y(this,Vt)).onSuccess)==null||i.call(r,n.data,f,d,m)}catch($){Promise.reject($)}try{(o=(s=y(this,Vt)).onSettled)==null||o.call(s,n.data,null,f,d,m)}catch($){Promise.reject($)}}else if((n==null?void 0:n.type)==="error"){try{(a=(l=y(this,Vt)).onError)==null||a.call(l,n.error,f,d,m)}catch($){Promise.reject($)}try{(h=(u=y(this,Vt)).onSettled)==null||h.call(u,void 0,n.error,f,d,m)}catch($){Promise.reject($)}}}this.listeners.forEach(f=>{f(y(this,vn))})})},Nd),Lt,Cd,hy=(Cd=class extends li{constructor(t={}){super();b(this,Lt);this.config=t,O(this,Lt,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Eu(i,n);let o=this.get(s);return o||(o=new ly({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){y(this,Lt).has(t.queryHash)||(y(this,Lt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=y(this,Lt).get(t.queryHash);n&&(t.destroy(),n===t&&y(this,Lt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ce.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return y(this,Lt).get(t)}getAll(){return[...y(this,Lt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Wc(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Wc(t,r)):n}notify(t){Ce.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ce.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ce.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Lt=new WeakMap,Cd),ye,yn,gn,qr,Wr,kn,Gr,Yr,Ed,my=(Ed=class{constructor(e={}){b(this,ye);b(this,yn);b(this,gn);b(this,qr);b(this,Wr);b(this,kn);b(this,Gr);b(this,Yr);O(this,ye,e.queryCache||new hy),O(this,yn,e.mutationCache||new fy),O(this,gn,e.defaultOptions||{}),O(this,qr,new Map),O(this,Wr,new Map),O(this,kn,0)}mount(){vs(this,kn)._++,y(this,kn)===1&&(O(this,Gr,Cu.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,ye).onFocus())})),O(this,Yr,wo.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,ye).onOnline())})))}unmount(){var e,t;vs(this,kn)._--,y(this,kn)===0&&((e=y(this,Gr))==null||e.call(this),O(this,Gr,void 0),(t=y(this,Yr))==null||t.call(this),O(this,Yr,void 0))}isFetching(e){return y(this,ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return y(this,yn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=y(this,ye).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=y(this,ye).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(xn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return y(this,ye).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=y(this,ye).get(r.queryHash),s=i==null?void 0:i.state.data,o=Gv(t,s);if(o!==void 0)return y(this,ye).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Ce.batch(()=>y(this,ye).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=y(this,ye).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=y(this,ye);Ce.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=y(this,ye);return Ce.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ce.batch(()=>y(this,ye).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Ve).catch(Ve)}invalidateQueries(e,t={}){return Ce.batch(()=>(y(this,ye).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ce.batch(()=>y(this,ye).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ve)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ve)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=y(this,ye).build(this,t);return n.isStaleByTime(xn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ve).catch(Ve)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ve).catch(Ve)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return wo.isOnline()?y(this,yn).resumePausedMutations():Promise.resolve()}getQueryCache(){return y(this,ye)}getMutationCache(){return y(this,yn)}getDefaultOptions(){return y(this,gn)}setDefaultOptions(e){O(this,gn,e)}setQueryDefaults(e,t){y(this,qr).set(ar(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...y(this,qr).values()],n={};return t.forEach(r=>{es(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){y(this,Wr).set(ar(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...y(this,Wr).values()],n={};return t.forEach(r=>{es(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...y(this,gn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Eu(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Iu&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...y(this,gn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){y(this,ye).clear(),y(this,yn).clear()}},ye=new WeakMap,yn=new WeakMap,gn=new WeakMap,qr=new WeakMap,Wr=new WeakMap,kn=new WeakMap,Gr=new WeakMap,Yr=new WeakMap,Ed),Gp={exports:{}},jo={};/**
+ * @license React
+ * react-jsx-runtime.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 vy=N,yy=Symbol.for("react.element"),gy=Symbol.for("react.fragment"),ky=Object.prototype.hasOwnProperty,$y=vy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Sy={key:!0,ref:!0,__self:!0,__source:!0};function Yp(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)ky.call(t,r)&&!Sy.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:yy,type:e,key:s,ref:o,props:i,_owner:$y.current}}jo.Fragment=gy;jo.jsx=Yp;jo.jsxs=Yp;Gp.exports=jo;var wy=Gp.exports,Jp=N.createContext(void 0),it=e=>{const t=N.useContext(Jp);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},rd=({client:e,children:t})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),wy.jsx(Jp.Provider,{value:e,children:t})),Xp=N.createContext(!1),_y=()=>N.useContext(Xp);Xp.Provider;function Ny(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Cy=N.createContext(Ny()),Ey=()=>N.useContext(Cy),Iy=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Pu(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Py=e=>{N.useEffect(()=>{e.clearReset()},[e])},Ty=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Pu(n,[e.error,r])),xy=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Ry=(e,t)=>e.isLoading&&e.isFetching&&!t,Dy=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,id=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Oy(e,t,n){var d,m,$,k;const r=_y(),i=Ey(),s=it(),o=s.defaultQueryOptions(e);(m=(d=s.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||m.call(d,o);const l=s.getQueryCache().get(o.queryHash);o._optimisticResults=r?"isRestoring":"optimistic",xy(o),Iy(o,i,l),Py(i);const a=!s.getQueryCache().get(o.queryHash),[u]=N.useState(()=>new t(s,o)),h=u.getOptimisticResult(o),f=!r&&e.subscribed!==!1;if(N.useSyncExternalStore(N.useCallback(w=>{const p=f?u.subscribe(Ce.batchCalls(w)):Ve;return u.updateResult(),p},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),N.useEffect(()=>{u.setOptions(o)},[o,u]),Dy(o,h))throw id(o,u,i);if(Ty({result:h,errorResetBoundary:i,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw h.error;if((k=($=s.getDefaultOptions().queries)==null?void 0:$._experimental_afterQuery)==null||k.call($,o,h),o.experimental_prefetchInRender&&!ts.isServer()&&Ry(h,r)){const w=a?id(o,u,i):l==null?void 0:l.promise;w==null||w.catch(Ve).finally(()=>{u.updateResult()})}return o.notifyOnChangeProps?h:u.trackResult(h)}function ht(e,t){return Oy(e,ay)}function ct(e,t){const n=it(),[r]=N.useState(()=>new py(n,e));N.useEffect(()=>{r.setOptions(e)},[r,e]);const i=N.useSyncExternalStore(N.useCallback(o=>r.subscribe(Ce.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=N.useCallback((o,l)=>{r.mutate(o,l).catch(Ve)},[r]);if(i.error&&Pu(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}var Zp=function(e,t,n,r){var i;t[0]=0;for(var s=1;s=5&&((o||!d&&s===5)&&(a.push(s,0,o,i),s=6),d&&(a.push(s,d,0,i),s=6)),o=""},h=0;h"?(s=1,o=""):o=r+o[0]:l?r===l?l="":o+=r:r==='"'||r==="'"?l=r:r===">"?(u(),s=1):s&&(r==="="?(s=5,i=o,o=""):r==="/"&&(s<5||n[h][f+1]===">")?(u(),s===3&&(a=a[0]),s=a,(a=a[0]).push(2,0,s),s=0):r===" "||r===" "||r===`
+`||r==="\r"?(u(),s=2):o+=r),s===3&&o==="!--"&&(s=4,a=a[0])}return u(),a}(e)),t),arguments,[])).length>1?t:t[0]}const S=Ly.bind(bh.createElement),bt=[{ui:"love",api:"love",icon:"❤️",label:"Love"},{ui:"like",api:"like",icon:"👍",label:"Like"},{ui:"maybe",api:"curious",icon:"🤔",label:"Maybe"},{ui:"not_interested",api:"not_interested",icon:"🙈",label:"Hide"},{ui:"no_go",api:"hard_no",icon:"🚫",label:"No-go"}],Qo=[{key:"to_me",label:"To Me",icon:"⬅️"},{key:"by_me",label:"By Me",icon:"➡️"},{key:"together",label:"Together",icon:"🤝"}],je={DISCOVER:"discover",SCENARIOS:"scenarios",PLAYS:"plays",TOGETHER:"together",SETTINGS:"settings"};function xu(e,t){const n=((e==null?void 0:e.name)||"").trim()||"Shared list";if(!t)return n;const r=((e==null?void 0:e.participant_ids)||[]).filter(s=>s&&s!==t);if(!r.length)return n;const i=s=>s.length>12?`${s.slice(0,10)}…`:s;return`${n} — ${r.map(i).join(" · ")}`}function eh(e,t){if(!t)return"";const n=((e==null?void 0:e.participant_ids)||[]).filter(r=>r&&r!==t);return n.length?`Partners: ${n.join(", ")}`:""}const th=["to_me","by_me","together"],nh=new Set(th),My=th;function rh(e,t){const n=[...new Set((e||[]).filter(r=>nh.has(r)))].sort();return t==="together"?["together"]:!n.length||n.length===1&&n[0]==="together"?[t]:n.includes(t)?n:[...new Set([...n.filter(r=>r!=="together"),t])].sort()}function Fy(e,t){var r;const n=(((r=t[e])==null?void 0:r.directions)||[]).filter(i=>nh.has(i));return n.length?n:["together"]}const od=280;function zy(e){const t=String(e||"").trimStart();return t?t.startsWith("=5&&/^<\s*html[\s>]/i.test(t.slice(0,32))?!0:t.startsWith("od?`${t.slice(0,od)}…`:t:""}function ld(e,t,n){const r=String(t||"").trim();if(zy(r))return`Server error (${e}) — the response was a web page, not JSON. Try again in a moment.`;if(n&&typeof n.detail=="string"&&n.detail.trim())return Sl(n.detail);if(n&&n.detail!=null)try{return Sl(JSON.stringify(n.detail))}catch{return`Request failed (${e})`}return Sl(r)||`Request failed (${e})`}async function Z(e,t={}){const n=await fetch(e,t),r=await n.text();let i;try{i=r?JSON.parse(r):{}}catch{if(!n.ok){const s=ld(n.status,r,null),o=new Error(s);throw o.status=n.status,o.payload=null,o}return{}}if(!n.ok){const s=ld(n.status,r,i),o=new Error(s);throw o.status=n.status,o.payload=i,o}return i}function ke(e){return e?{"x-private-token":e}:{}}function tn(e){return e==="love"?"love":e==="like"?"like":e==="curious"?"maybe":e==="not_interested"?"not_interested":e==="hard_no"||e==="no"?"no_go":""}function by(e,t){var n;return((n=e==null?void 0:e[t])==null?void 0:n.directions)||[]}const ad={play:"Play",role:"Role",dynamic:"Dynamic",meta:null};function jy(e){if(!e||typeof e!="object")return null;const t=e.content_kind;return t!=null&&Object.prototype.hasOwnProperty.call(ad,t)?ad[t]:null}function Qy({assets:e,imageRevealed:t,kinkName:n,onReveal:r,resetKey:i}){const[s,o]=N.useState(0),l=(Array.isArray(e)?e:[]).filter(d=>d&&typeof d.asset_url=="string"&&d.asset_url),a=l.length;N.useEffect(()=>{o(0)},[i]),N.useEffect(()=>{o(d=>a?Math.min(Math.max(0,d),a-1):0)},[a]);const u=N.useCallback((d,m)=>{var $,k;($=m==null?void 0:m.preventDefault)==null||$.call(m),(k=m==null?void 0:m.stopPropagation)==null||k.call(m),!(a<2)&&o(w=>(w+d+a)%a)},[a]);if(!a)return null;const h=Math.min(Math.max(0,s),a-1),f=l[h];return f!=null&&f.asset_url?S`
+
+
+ ${a>1?S`
+
+
+ `:null}function zr({text:e}){return S`${e||""}
`}function ns({current:e,onRate:t,size:n="normal",disabled:r=!1}){const i=n==="compact"?bt.filter(s=>s.ui!=="not_interested"):bt;return S`
+
+ ${i.map(s=>S`
+ {o.stopPropagation(),t(s.api)}}>
+ ${s.icon}
+
+ `)}
+
+ `}function Ay({onRate:e}){return S`
+
+ ${[{api:"love",icon:"❤️",label:"Love",cls:"love"},{api:"like",icon:"👍",label:"Like",cls:"like"},{api:"curious",icon:"🤔",label:"Maybe",cls:"maybe"},{api:"not_interested",icon:"➡️",label:"Skip",cls:"skip"},{api:"hard_no",icon:"🚫",label:"No-go",cls:"nogo"}].map(n=>S`
+ e(n.api)}>
+ ${n.icon}
+ ${n.label}
+
+ `)}
+
+ `}function Uy(e){return(e.detail_summary||e.definition||e.summary||"").trim()}function By(e){return(e.detail_summary||e.definition||e.summary||"").trim()}function Ky(e){const t=(e.definition||"").trim();return t||(e.detail_summary||e.summary||"").trim()}function Hy({kink:e,onRevealImage:t,imageRevealed:n,photosEnabled:r=!0,layout:i="default",infoExpanded:s=!1,onToggleInfo:o}){const l=(e.assets||[]).filter(m=>m&&typeof m.asset_url=="string"&&m.asset_url),a=r&&l.length>0,u=jy(e),h=Uy(e),f=S`
+ ${e.is_extreme?S`Significant risk
`:e.risk_level==="advanced"?S`Advanced
`:null}
+ `,d=S`
+ ${u?S`${u}
`:null}
+ ${e.name}
+ ${h?S`${h}
`:null}
+ ${f}
+ `;if(i==="tinder"){const m=!!s,$=(e.notes||"").trim(),k=By(e),w=Ky(e),c=typeof o=="function"&&(!!$||!!w&&(!k||w!==k)),v=S`
+ ${u?S`${u}
`:null}
+ ${e.name}
+ ${m?S`
+ ${w?S`${w}
`:null}
+ ${$?S`${$}
`:null}
+ `:k?S`${k}
`:null}
+ ${f}
+ ${c?S`${m?"Tap to collapse":"Tap for full info"}
`:null}
+ `,g=a?S`
+
+ <${Qy}
+ resetKey=${e.id}
+ assets=${l}
+ imageRevealed=${n}
+ kinkName=${e.name}
+ onReveal=${t}
+ />
+
+ `:S`
+
+
${(e.name||"?").slice(0,2).toUpperCase()}
+
+
+ `,_=`tinder-card__body${c?" tinder-card__body--tappable":""}${m?" tinder-card__body--expanded":""}`,I=c?m?S`
+ o()}
+ onKeyDown=${E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),o())}}
+ >
+ ${v}
+
+ `:S`
+ o()}
+ >
+ ${v}
+
+ `:S`${v}
`;return S`
+
+ ${g}
+ ${I}
+
+ `}return S`
+
+ ${d}
+ ${a?n?S`
+
+ ${l.map((m,$)=>S`
+
+

+
+ `)}
+
+ `:S`
+
+

+
Show
+
+ `:null}
+
+ `}function ih({name:e,emoji:t,expanded:n,onClick:r,children:i,nearDupHint:s}){return S`
+
+
+ ${t}
+ ${e}
+ ${s?S`≈`:null}
+
+ ${n&&i?S`
o.stopPropagation()}>${i}
`:null}
+
+ `}function Vy({directions:e,locked:t,onToggle:n}){return S`
+
+ ${Qo.map(r=>S`
+ {i.stopPropagation(),n(r.key)}}>
+ ${e.includes(r.key)?r.icon:"🤔"} ${r.label}
+
+ `)}
+
+ `}function sh({query:e,onQueryChange:t,results:n,onSelect:r,onClose:i,hint:s}){return S`
+
+
o.stopPropagation()}>
+
t(o.target.value)}
+ />
+ ${s?S`
${s}
`:null}
+
+ ${n.map(o=>{var l;return S`
+
r(o.kink)}>
+ ${o.kink.name}
+ ${(l=o.kink.summary)!=null&&l.trim()?S`${o.kink.summary.trim()}`:null}
+
+ `})}
+ ${e&&!n.length?S`
No results
`:null}
+
+
+
+ `}function _o({kink:e,selected:t,onToggle:n}){return S`
+
+ ${e.name}
+ {r.stopPropagation(),n(e.id,!t)}}>
+ ${t?"Selected":"Add"}
+
+
+ `}const Fn={retry:!1,refetchOnWindowFocus:!1},ud=12e3,qy=1500;function Wy(e){var n,r;return e&&(((n=e.incoming_partner_requests)==null?void 0:n.length)||0)+(((r=e.outgoing_partner_requests)==null?void 0:r.length)||0)>0?qy:ud}function Gy(e,t={}){const n=!!t.pauseUserRefetch;return ht({queryKey:["user",e.userId],queryFn:()=>Z(`/users/${e.userId}`,{headers:ke(e.token)}),enabled:!!(e.userId&&e.token),...Fn,refetchOnWindowFocus:!0,refetchInterval:r=>n?!1:Wy(r.state.data),refetchIntervalInBackground:!1})}function Yy(e){return ht({queryKey:["board",e.userId],queryFn:()=>Z(`/users/${e.userId}/play-board`,{headers:ke(e.token)}),enabled:!!(e.userId&&e.token),...Fn})}function Jy(e){return ht({queryKey:["scenario-parents",e.userId],queryFn:()=>Z(`/users/${e.userId}/scenario-parents`,{headers:ke(e.token)}),enabled:!!(e.userId&&e.token),...Fn})}function oh(e){return ht({queryKey:["partner-groups",e.userId],queryFn:()=>Z(`/users/${e.userId}/partner-groups`,{headers:ke(e.token)}),enabled:!!(e.userId&&e.token),...Fn})}function Xy(e,t,n){return ht({queryKey:["recs",e.userId,t],queryFn:()=>Z(`/users/${e.userId}/recommendations?limit=24${t?`&group_id=${encodeURIComponent(t)}`:""}`,{headers:ke(e.token)}),enabled:n,staleTime:45e3,...Fn})}function lh(e){return ht({queryKey:["search",e],queryFn:()=>Z(`/search?q=${encodeURIComponent(e)}&limit=20`),enabled:!!e.trim()})}function Zy(e){return ht({queryKey:["role-search",e],queryFn:()=>Z(`/roles/search?q=${encodeURIComponent(e)}&limit=12`),enabled:!!e.trim()})}function eg(e){return ht({queryKey:["roles",e.userId],queryFn:()=>Z(`/users/${e.userId}/roles`,{headers:ke(e.token)}),enabled:!!(e.userId&&e.token),...Fn})}function ah(e){return ht({queryKey:["kink",e],queryFn:()=>Z(`/kinks/${e}`),enabled:!!e})}function tg(e){return ht({queryKey:["similar",e],queryFn:()=>Z(`/kinks/${e}/similar?limit=10`),enabled:!!e})}function ng(e){return ht({queryKey:["scenarios",e],queryFn:()=>Z(`/kinks/${e}/scenarios?limit=48`),enabled:!!e})}function rg(e,t){return ht({queryKey:["group-overlap",e.userId,t],queryFn:()=>Z(`/users/${e.userId}/partner-groups/${encodeURIComponent(t)}/overlap`,{headers:ke(e.token)}),enabled:!!(e.userId&&e.token&&t),...Fn})}function ig(e,t,n){return ht({queryKey:["partner-board",e.userId,t,n],queryFn:()=>Z(`/users/${e.userId}/partner-groups/${encodeURIComponent(t)}/partner-board/${encodeURIComponent(n)}`,{headers:ke(e.token)}),enabled:!!(e.userId&&e.token&&t&&n),...Fn})}const uh={to_me:[],by_me:[],together:[],hidden:[],no_go:[]};function sg(e){return[...e].sort((t,n)=>(n.popularity||0)-(t.popularity||0)||t.name.localeCompare(n.name))}function ch(e,t,n,r,i,s){const o=String(t),l=Object.fromEntries(Object.entries(e||uh).map(([f,d])=>[f,(d||[]).filter(m=>String(m.id)!==o)])),h={...og(e,o)||(i?lg(i,s,o):null)||{id:o,name:o,summary:"",popularity:0},interest_state:n,directions:r};if(n==="hard_no")l.no_go.push(h);else if(n==="not_interested")l.hidden.push(h);else{const f=r.length?r:["together"];for(const d of f)l[d]&&l[d].push({...h})}for(const f of Object.keys(l))l[f]=sg(l[f]);return l}function og(e,t){const n=String(t);for(const r of Object.values(e||uh)){const i=(r||[]).find(s=>String(s.id)===n);if(i)return i}return null}function Gs(e){return!(e!=null&&e.id)||!(e!=null&&e.name)?null:{id:e.id,name:e.name,summary:e.summary||e.definition||e.detail_summary||"",popularity:e.popularity||0}}function cd(e,t){var i;const n=String(t),r=(i=e==null?void 0:e.items)==null?void 0:i.find(s=>{var o;return String((o=s==null?void 0:s.kink)==null?void 0:o.id)===n});return Gs((r==null?void 0:r.kink)||null)}function lg(e,t,n){var u,h,f;const r=e.getQueryData(["kink",n]),i=Gs(r);if(i)return i;const s=[["recs",t==null?void 0:t.userId,""],["prompts",t==null?void 0:t.userId,""]];for(const d of s){const m=cd(e.getQueryData(d),n);if(m)return m}const o=e.getQueryCache(),l=o.findAll({predicate:d=>{const m=d.queryKey||[];return m[0]==="recs"||m[0]==="prompts"||m[0]==="search"}});for(const d of l){const m=cd((u=d.state)==null?void 0:u.data,n);if(m)return m}const a=o.findAll({predicate:d=>(d.queryKey||[])[0]==="group-overlap"});for(const d of a){const m=((h=d.state)==null?void 0:h.data)||{},$=(m.direct_matches||[]).find(p=>(p==null?void 0:p.id)===n);if($)return Gs($);const k=(f=(m.similar_matches||[]).find(p=>{var c;return((c=p==null?void 0:p.kink)==null?void 0:c.id)===n}))==null?void 0:f.kink,w=Gs(k);if(w)return w}return null}function dh(e,t){if(!(e!=null&&e.items))return e;const n=String(t);return{...e,items:e.items.filter(r=>{var i;return String((i=r==null?void 0:r.kink)==null?void 0:i.id)!==n})}}function dd(e,t,n=[]){return`${e}::${t}::${[...n||[]].sort().join("|")}`}const ag={to_me:[],by_me:[],together:[],hidden:[],no_go:[]};function ug({setAuth:e,setCreateResult:t,setAuthOpen:n,setStatus:r}){const i=it();return ct({mutationFn:({user_id:s,private_token:o})=>Z("/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({user_id:s,private_token:o})}),onSuccess:(s,o)=>{e({userId:o.user_id,token:o.private_token}),t(null),i.setQueryData(["user",o.user_id],s.user),r("Profile open.")},onError:s=>r(s.message)})}function cg({setAuth:e,setCreateResult:t,setLoginForm:n,setStatus:r}){return ct({mutationFn:()=>Z("/users",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}),onMutate:()=>{r("Creating profile… If this sits here a while, the Space is still loading the catalog (first boot can take several minutes).")},onSuccess:i=>{e({userId:i.id,token:i.private_token}),t(i),n({user_id:i.id,private_token:i.private_token}),r("Profile created. Choose roles, then open your Play List.")},onError:i=>r(i.message)})}function dg({auth:e,activeGroupId:t,selectedKinkId:n,setSelectedKinkId:r,setStatus:i,pendingPlayCommitRef:s,playCommitKey:o,syncPostSaveCaches:l,onSaveStart:a=()=>{},onSaveSettled:u=()=>{}}){const h=it();return ct({mutationKey:["savePlay"],mutationFn:({kinkId:f,interestState:d,directions:m})=>Z(`/users/${e.userId}/plays`,{method:"POST",headers:{"Content-Type":"application/json",...ke(e.token)},body:JSON.stringify({kink_id:f,interest_state:d,directions:m})}),onMutate:async f=>{a();const d=f.directions||[],m=["recs",e.userId,t],$=h.getQueryData(["user",e.userId]),k=h.getQueryData(["board",e.userId]),w=h.getQueryData(m),p=String(f.kinkId);return h.setQueryData(["user",e.userId],c=>{const v=c&&typeof c=="object"?c:{id:e.userId,plays:{}};return{...v,plays:{...v.plays||{},[p]:{interest_state:f.interestState,directions:d}}}}),w!=null&&w.items&&h.setQueryData(m,c=>dh(c,p)),h.setQueryData(["board",e.userId],c=>ch(c||k||ag,p,f.interestState,d,h,e)),i("Saving..."),{previousUser:$,previousBoard:k,previousRecs:w,recsKey:m,commitKey:o(p,f.interestState,d)}},onSuccess:(f,d,m)=>{l(f,String(d.kinkId),d.interestState,d.directions||[]),h.invalidateQueries({queryKey:["board",e.userId]}),i("Saved.")},onError:(f,d,m)=>{m!=null&&m.previousUser&&h.setQueryData(["user",e.userId],m.previousUser),m!=null&&m.previousBoard&&h.setQueryData(["board",e.userId],m.previousBoard),m!=null&&m.recsKey&&h.setQueryData(m.recsKey,m.previousRecs),i(f.message)},onSettled:(f,d,m,$)=>{u(),$!=null&&$.commitKey&&s.current===$.commitKey&&(s.current="")}})}function fg({auth:e,setStatus:t}){const n=it();return ct({mutationFn:({kinkId:r,selected:i})=>Z(`/users/${e.userId}/roles`,{method:"POST",headers:{"Content-Type":"application/json",...ke(e.token)},body:JSON.stringify({kink_id:r,selected:i})}),onSuccess:()=>{n.invalidateQueries({queryKey:["user",e.userId]}),n.invalidateQueries({queryKey:["roles",e.userId]}),t("Role saved.")},onError:r=>t(r.message)})}function pg({auth:e,setStatus:t}){const n=it();return ct({mutationFn:r=>Z(`/users/${e.userId}/preferences`,{method:"POST",headers:{"Content-Type":"application/json",...ke(e.token)},body:JSON.stringify({show_images:r})}),onSuccess:r=>n.setQueryData(["user",e.userId],r),onError:r=>t(r.message)})}function hg({auth:e,activeGroupId:t,setStatus:n}){const r=it();return ct({mutationFn:({parentKinkId:i,scenarioKinkId:s,interestState:o,directions:l=[],remove:a=!1})=>a?Z(`/users/${e.userId}/scenario-preferences/${encodeURIComponent(s)}`,{method:"DELETE",headers:ke(e.token)}):Z(`/users/${e.userId}/scenario-preferences`,{method:"POST",headers:{"Content-Type":"application/json",...ke(e.token)},body:JSON.stringify({parent_kink_id:i,scenario_kink_id:s,interest_state:o,directions:l})}),onSuccess:i=>{r.setQueryData(["user",e.userId],i),r.invalidateQueries({queryKey:["scenario-parents",e.userId]}),t&&r.invalidateQueries({queryKey:["group-overlap",e.userId,t]}),n("Scenario saved.")},onError:i=>n(i.message)})}function fh(e,t,n){(n==null?void 0:n.partner_groups)!=null&&e.setQueryData(["partner-groups",t],{items:n.partner_groups})}function mg({auth:e,setGroupDraftMembers:t,setGroupNameInput:n,setStatus:r}){const i=it();return ct({mutationFn:s=>Z(`/users/${e.userId}/partners`,{method:"POST",headers:{"Content-Type":"application/json",...ke(e.token)},body:JSON.stringify({partner_id:s})}),onSuccess:(s,o)=>{var l;i.setQueryData(["user",e.userId],s),fh(i,e.userId,s),i.invalidateQueries({queryKey:["partner-groups",e.userId]}),(l=s.partners)!=null&&l.includes(o)?r(`You're linked. A shared list "Together" was created for both of you.`):r('Link request sent. When they accept, you will both get a shared "Together" list.')},onError:s=>r(s.message)})}function vg({auth:e,setStatus:t}){const n=it(),r=l=>{n.setQueryData(["user",e.userId],l),fh(n,e.userId,l),n.invalidateQueries({queryKey:["partner-groups",e.userId]})},i=ct({mutationFn:l=>Z(`/users/${e.userId}/partner-requests/accept`,{method:"POST",headers:{"Content-Type":"application/json",...ke(e.token)},body:JSON.stringify({from_user_id:l})}),onSuccess:l=>{r(l),t('Linked. A shared "Together" list is ready — you can add more lists anytime.')},onError:l=>t(l.message)}),s=ct({mutationFn:l=>Z(`/users/${e.userId}/partner-requests/decline`,{method:"POST",headers:{"Content-Type":"application/json",...ke(e.token)},body:JSON.stringify({from_user_id:l})}),onSuccess:l=>{r(l),t("Request declined.")},onError:l=>t(l.message)}),o=ct({mutationFn:l=>Z(`/users/${e.userId}/partner-requests/cancel`,{method:"POST",headers:{"Content-Type":"application/json",...ke(e.token)},body:JSON.stringify({to_user_id:l})}),onSuccess:l=>{r(l),t("Request withdrawn.")},onError:l=>t(l.message)});return{accept:i,decline:s,cancel:o}}function yg({auth:e,setActiveGroupId:t,setGroupNameInput:n,setGroupDraftMembers:r,setStatus:i}){const s=it();return ct({mutationFn:({name:o,memberIds:l})=>Z(`/users/${e.userId}/partner-groups`,{method:"POST",headers:{"Content-Type":"application/json",...ke(e.token)},body:JSON.stringify({name:o,member_ids:l})}),onSuccess:o=>{s.invalidateQueries({queryKey:["user",e.userId]}),s.invalidateQueries({queryKey:["partner-groups",e.userId]}),t(o.id),i("Group created.")},onError:o=>i(o.message)})}function gg({auth:e,removeMemberFromGroupCache:t,setStatus:n}){const r=it();return ct({mutationFn:({groupId:i,memberId:s})=>Z(`/users/${e.userId}/partner-groups/${encodeURIComponent(i)}/members/${encodeURIComponent(s)}`,{method:"DELETE",headers:ke(e.token)}),onSuccess:(i,s)=>{t(s.groupId,s.memberId),r.invalidateQueries({queryKey:["group-overlap",e.userId,s.groupId]}),r.invalidateQueries({queryKey:["recs",e.userId,s.groupId]}),n("Group updated.")},onError:i=>n(i.message)})}function kg({auth:e,replacePartnerGroup:t,setStatus:n}){const r=it();return ct({mutationFn:({groupId:i,share:s})=>Z(`/users/${e.userId}/partner-groups/${encodeURIComponent(i)}/share-toggle`,{method:"POST",headers:{"Content-Type":"application/json",...ke(e.token)},body:JSON.stringify({share:s})}),onSuccess:(i,s)=>{t({id:s.groupId,my_share_full_list:s.share}),n("Sharing preference updated."),r.invalidateQueries({queryKey:["group-overlap",e.userId,s.groupId]})},onError:i=>n(i.message)})}const ph=new Set(["to_me","by_me","together"]);function Fi(e=[]){const t=[...new Set((e||[]).filter(n=>ph.has(n)))];return t.length===0?["together"]:t.length===1?t:["together"]}function $g(e,t){return ph.has(t)?Fi(e)[0]===t?["together"]:[t]:["together"]}function Sg(e,t){var s;const n=t||{},r=new Set,i=[];for(const o of e||[]){const l=(s=o==null?void 0:o.kink)==null?void 0:s.id;if(l==null||l==="")continue;const a=String(l);n[a]||r.has(a)||(r.add(a),i.push(o))}return i}function wg({groupSelectionReady:e,isSuccess:t,isFetching:n,visibleCount:r,attempts:i,maxAttempts:s}){return!!(e&&t&&!n&&r===0&&i0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(a=>{if(a=Ng(a),a in fd)return;fd[a]=!0;const u=a.endsWith(".css"),h=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${h}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":_g,u||(f.as="script"),f.crossOrigin="",f.href=a,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((d,m)=>{f.addEventListener("load",d),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${a}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})},Eg="/telemetry";function gr(e){try{navigator.sendBeacon(Eg,JSON.stringify(e))}catch{}}function Ig(e){gr(e)}function Pg(){Cg(async()=>{const{onCLS:n,onLCP:r,onINP:i}=await import("./web-vitals.attribution-C_HyTrBb.js");return{onCLS:n,onLCP:r,onINP:i}},[]).then(({onCLS:n,onLCP:r,onINP:i})=>{n(s=>{var o,l;s.value>.05&&gr({type:"cls",value:s.value,target:((o=s.attribution)==null?void 0:o.largestShiftTarget)||null,sources:((l=s.attribution)==null?void 0:l.largestShiftSource)||null})}),r(s=>{var o,l;gr({type:"lcp",value:s.value,element:((o=s.attribution)==null?void 0:o.element)||null,url:((l=s.attribution)==null?void 0:l.url)||null})}),i(s=>{var o;s.value>200&&gr({type:"inp",value:s.value,target:((o=s.attribution)==null?void 0:o.interactionTarget)||null})})}).catch(()=>{});const e=["tab-bar","action-bar"],t=new ResizeObserver(n=>{var r;for(const i of n){const s=((r=i.target.dataset)==null?void 0:r.watchId)||i.target.className,o=i.target.getBoundingClientRect();gr({type:"resize",id:s,width:Math.round(o.width),height:Math.round(o.height)})}});requestAnimationFrame(()=>{for(const n of e){const r=document.querySelector(`[data-watch-id="${n}"]`)||document.querySelector(`.${n}`);r&&t.observe(r)}});try{new PerformanceObserver(r=>{for(const i of r.getEntries())i.duration>200&&gr({type:"slow_interaction",name:i.name,duration:Math.round(i.duration)})}).observe({type:"event",buffered:!0,durationThreshold:100})}catch{}}function pd({auth:e,activeGroupId:t,groupSelectionReady:n,partnerGroups:r,onActiveGroupChange:i,photosOnCards:s,onPhotoPreference:o,onRate:l,onNavigate:a,onOpenScenarios:u,savedCount:h,currentPlays:f,discoverSheetDirections:d=["together"],onDiscoverSheetDirectionsChange:m=()=>{},starterMode:$=!1,starterFinalizing:k=!1,starterTarget:w=12,showSearch:p=!0,headerTitle:c="Discover",headerSubtitle:v=""}){var ps,ui,ci,pr,di;const[g,_]=N.useState(0),[I,E]=N.useState(!1),[C,P]=N.useState(!1),[T,H]=N.useState(""),[J,le]=N.useState(""),[ce,Le]=N.useState(!1),[Be,Me]=N.useState(!1),D=N.useRef(!1),[F,Q]=N.useState(null),W=N.useRef(null),A=it(),ie=$?"":t,re=$?!!(e.userId&&e.token):n,q=Xy(e,ie,re),Se=((ps=q.data)==null?void 0:ps.items)||[],xe=N.useRef(0),L=N.useMemo(()=>Sg(Se,f),[Se,f]),te=N.useMemo(()=>L.map(j=>{var _e;return(_e=j==null?void 0:j.kink)==null?void 0:_e.id}).filter(Boolean).join("\0"),[L]);N.useEffect(()=>{if(!q.isSuccess||!te)return;const j=[...new Set(te.split("\0").filter(Boolean))].slice(0,32);if(!j.length)return;let _e=!1;const jt=performance.now();return(async()=>{var hs;try{const{items:hr}=await Z("/kinks/batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:j})});if(_e)return;const fi=Math.round(performance.now()-jt);for(const Ye of hr||[])Ye!=null&&Ye.id&&A.setQueryData(["kink",Ye.id],Ye);Ig({type:"discover_kinks_batch_ms",ms:fi,requested:j.length,returned:(hr||[]).length});try{((hs=globalThis.localStorage)==null?void 0:hs.getItem("kink_debug_timing"))==="1"&&console.info(`[kink] discover kinks/batch ${fi}ms (${(hr||[]).length}/${j.length} rows)`)}catch{}}catch{}})(),()=>{_e=!0}},[q.isSuccess,te,A]),N.useEffect(()=>{if(L.length>0){xe.current=0;return}wg({groupSelectionReady:re,isSuccess:q.isSuccess,isFetching:q.isFetching,visibleCount:L.length,attempts:xe.current,maxAttempts:8})&&(xe.current+=1,q.refetch())},[re,q.isSuccess,q.isFetching,L.length,q.refetch]);const me=L.length?Math.min(g,L.length-1):0,se=L[me]||null,zn=(ui=se==null?void 0:se.kink)==null?void 0:ui.id,Fe=zn==null||zn===""?"":String(zn),dr=ah(Fe),ve=N.useMemo(()=>{const j=se==null?void 0:se.kink,_e=dr.data,jt=_e&&String(_e.id)===Fe?_e:null;return!j&&!jt?null:jt&&j&&j.id===jt.id?{...j,...jt}:j||jt},[Fe,se,dr.data]),bn=N.useMemo(()=>Fi(d),[d])[0],Uo=N.useCallback(j=>{m(_e=>$g(_e,j))},[m]),Bo=lh(J),fr=Math.min(h,w),jn=$?k?"Finishing your starter picks…":`${fr} / ${w} starter picks`:h{E(!1),Le(!1),D.current=!1,Me(!1)},[Fe]),N.useEffect(()=>{_(0)},[ie,$]),N.useEffect(()=>{me!==g&&_(me)},[me,g]);const Ko=N.useCallback(async j=>{var _e;if(Fe&&!D.current){D.current=!0,Me(!0);try{await Promise.resolve(l(Fe,j)),m(["together"]),E(!1),Le(!1),["love","like","curious"].includes(j)&&Number((ve==null?void 0:ve.scenario_child_count)||0)>0?Q({parentKinkId:Fe,parentName:(ve==null?void 0:ve.name)||((_e=se==null?void 0:se.kink)==null?void 0:_e.name)||"this kink",scenarioCount:Number((ve==null?void 0:ve.scenario_child_count)||0)}):(F==null?void 0:F.parentKinkId)===Fe&&Q(null)}finally{D.current=!1,Me(!1)}}},[Fe,l,m,ve==null?void 0:ve.scenario_child_count,ve==null?void 0:ve.name,(pr=se==null?void 0:se.kink)==null?void 0:pr.name,F==null?void 0:F.parentKinkId]),Ho=N.useCallback(j=>{H(j),W.current&&clearTimeout(W.current),W.current=setTimeout(()=>le(j.trim()),300)},[]),Vo=N.useCallback(j=>{P(!1),H(""),le(""),a("plays",j.id)},[a]),qo=ve?S`<${Hy}
+ kink=${ve}
+ photosEnabled=${s}
+ imageRevealed=${I}
+ onRevealImage=${()=>E(!0)}
+ layout="tinder"
+ infoExpanded=${ce}
+ onToggleInfo=${()=>Le(j=>!j)}
+ />`:null;return S`
+
+
+
+
+
${h} saved
+ ${p?S`
P(!0)}>Search`:null}
+
+
+
+ ${r!=null&&r.length&&!$?S`
+
+
Partner context for discovery
+
+ ${r.map(j=>S`
+ i==null?void 0:i(j.id)}
+ >
+ ${xu(j,e.userId)}
+
+ `)}
+
+
+ `:null}
+
+ ${F&&!$?S`
+
+
+
${F.parentName}
+
+ ${F.scenarioCount} optional scenario${F.scenarioCount===1?"":"s"} available.
+
+
+
u==null?void 0:u(F.parentKinkId)}
+ >Explore scenarios
+
+ `:null}
+
+ ${k?S`
Finishing your starter picks…
`:null}
+ ${!k&&!ve&&re&&q.isSuccess&&L.length===0&&!q.isFetching?S`
Nothing new to show right now.
`:null}
+ ${!k&&!ve&&!(re&&q.isSuccess&&L.length===0&&!q.isFetching)?S`
${q.isError?(()=>{var _e;const j=String(((_e=q.error)==null?void 0:_e.message)||"").trim();return j?j.startsWith("<")||j.length>400?"Could not load recommendations (server error).":j:"Could not load recommendations."})():re&&q.isSuccess&&L.length===0&&q.isFetching?"Loading recommendations…":!re&&e.userId&&e.token?"Loading your profile…":"Loading…"}
`:null}
+
+ ${!k&&ve?S`
+
+
${qo}
+ ${ai?S`
+
+
+ ${ai}
+
+
+ `:null}
+
+ Tap the bottom of the card for the full description. Multiple photos: tap the
+ left or right edge of the image to browse.
+
+
+
Love / Like / Maybe → My Plays column
+
+ ${Qo.map(j=>S`
+ Uo(j.key)}
+ >
+ ${j.icon} ${j.label}
+
+ `)}
+
+
+ <${Ay} onRate=${Ko} />
+ `:null}
+
+ ${C&&p?S`
+ <${sh}
+ query=${T}
+ onQueryChange=${Ho}
+ results=${((di=Bo.data)==null?void 0:di.items)||[]}
+ hint="Tap a result to open it on My Plays."
+ onSelect=${Vo}
+ onClose=${()=>{P(!1),H(""),le("")}}
+ />
+ `:null}
+
+ `}const hd={love:0,like:1,curious:2,"":3,not_interested:4,hard_no:5};function Tg(e=[],t={},n=""){const r=[...e||[]];return r.sort((i,s)=>{const o=i.scenario||i.kink||i,l=s.scenario||s.kink||s,a=t==null?void 0:t[o.id],u=t==null?void 0:t[l.id],h=(a==null?void 0:a.parent_kink_id)===n&&a.interest_state||"",f=(u==null?void 0:u.parent_kink_id)===n&&u.interest_state||"",d=hd[h]??9,m=hd[f]??9;return d!==m?d-m:String(o.name||"").localeCompare(String(l.name||""))}),r}function xg({auth:e,currentPlays:t,scenarioPreferences:n={},onScenarioRate:r,onNavigateToPlays:i,focusParentKinkId:s="",focusScenarioKinkId:o="",onScenarioFocusConsumed:l}){var g,_,I,E;const[a,u]=N.useState(""),[h,f]=N.useState(""),d=Jy(e),m=((g=d.data)==null?void 0:g.items)||[],$=N.useMemo(()=>{const C=a.trim().toLowerCase();return C?m.filter(P=>{var T;return String(((T=P.parent_kink)==null?void 0:T.name)||"").toLowerCase().includes(C)}):m},[m,a]);N.useEffect(()=>{s&&(f(s),l==null||l())},[s,l]),N.useEffect(()=>{if(!$.length){h&&f("");return}$.some(C=>{var P;return((P=C.parent_kink)==null?void 0:P.id)===h})||f($[0].parent_kink.id)},[$,h]);const k=$.find(C=>{var P;return((P=C.parent_kink)==null?void 0:P.id)===h})||m.find(C=>{var P;return((P=C.parent_kink)==null?void 0:P.id)===h})||$[0]||null,w=(k==null?void 0:k.parent_kink)||null,p=ng((w==null?void 0:w.id)||""),c=((_=t[(w==null?void 0:w.id)||""])==null?void 0:_.directions)||(k==null?void 0:k.directions)||["together"],v=N.useMemo(()=>{var C;return Tg(((C=p.data)==null?void 0:C.items)||[],n,(w==null?void 0:w.id)||"")},[p.data,n,w==null?void 0:w.id]);return d.isError?S`
+
+
+
+
Scenarios
+
Optional scene variations under the base kinks you already like.
+
+
+
Could not load scenarios (${((I=d.error)==null?void 0:I.message)||"error"}).
+
+ `:S`
+
+
+
+
Scenarios
+
Optional scene variations under the base kinks you already like.
+
+
+
+ ${!m.length&&!d.isFetching?S`
+
+
No scenario bases yet
+
+ Love or Like a base kink first. Then its optional scenarios will show up here.
+
+
+ `:null}
+
+ ${m.length?S`
+
+
+
+
Base kinks
+
Only kinks you Love or Like appear here.
+
+
u(C.target.value)}
+ />
+
+
+ ${$.length?$.map(C=>{const P=C.parent_kink,T=P.id===(w==null?void 0:w.id);return S`
+
f(P.id)}
+ >
+ ${P.name}
+
+ ${C.selected_count?`${C.selected_count} saved`:"Optional"}
+ ·
+ ${C.scenario_count} scenarios
+
+
+ `}):S`
No matching base kinks.
`}
+
+
+ `:null}
+
+ ${w?S`
+
+
+
+
Base kink
+
${w.name}
+
+ Saved under ${((E=t[w.id])==null?void 0:E.interest_state)==="love"?"Love":"Like"}.
+
+
+
i==null?void 0:i(w.id)}
+ >Open in My Plays
+
+ ${p.isFetching?S`
Loading scenarios…
`:null}
+ ${!p.isFetching&&!v.length?S`
No scenarios available under this base kink.
`:null}
+
+ ${v.map(C=>{const P=C.scenario||C.kink||C,T=n==null?void 0:n[P.id],H=(T==null?void 0:T.parent_kink_id)===w.id,J=tn(H?T==null?void 0:T.interest_state:"");return S`
+
+
+
${P.name}
+ ${P.summary?S`
${P.summary}
`:null}
+
+
+ <${ns}
+ current=${J}
+ onRate=${le=>{var ce;return r(w.id,P.id,le,H&&((ce=T==null?void 0:T.directions)!=null&&ce.length)?T.directions:c)}}
+ />
+
+
+ `})}
+
+
+ `:null}
+
+ `}const Rg=new Set(["to_me","by_me","together"]);function Dg(e=[]){const t=[];for(const n of e||[])!Rg.has(n)||t.includes(n)||t.push(n);return t.length?t:["together"]}function Og(e,t,n=[]){return{shouldTentativeAdd:!(e!=null&&e[t]),directions:Dg(n)}}function Lg(e){let t=String(e||"").trim().toLowerCase();if(!t)return"";try{t=t.normalize("NFKD").replace(/[\u0300-\u036f]/g,"")}catch{}return t=t.replace(/[\u2018\u2019\u201c\u201d`´]/g,"'"),t=t.replace(/\s+/g," "),t=t.replace(/\bgood\s+morning\s+/g,"goodmorning "),t=t.replace(/\bdeep\s*throating\b/g,"deepthroat"),t=t.replace(/\bdeepthroating\b/g,"deepthroat"),t=t.replace(/\bdeep\s*throat\b/g,"deepthroat"),t=t.replace(/\bblow\s+jobs\b/gi,"blowjob"),t=t.replace(/\bblow\s+job\b/gi,"blowjob"),t=t.replace(/\bblowjobs\b/g,"blowjob"),t=t.replace(/\bstrap\s+ons\b/gi,"strapon"),t=t.replace(/\bstrap\s+on\b/gi,"strapon"),t=t.replace(/\bstrapons\b/g,"strapon"),t=t.replace(/[^a-z0-9\s]/g," "),t=t.replace(/\s+/g," ").trim(),t=t.replace(/\s+/g,""),t}function Mg(e){const t=new Map;for(const r of e){const i=Lg(r.name);i.length<4||(t.has(i)||t.set(i,[]),t.get(i).push(r))}const n=new Map;for(const r of t.values()){if(r.length<2)continue;const i=[...new Set(r.map(s=>s.name))];for(const s of r){const o=i.filter(l=>l!==s.name);o.length&&n.set(s.id,`Near-duplicate title in your list: ${o.join(" · ")}`)}}return n}const Ru=[...My];function hh({kinkId:e,onDirectionColumnChange:t}){return S`
+
+ ${Qo.map(n=>S`
+ t(e,n.key)}
+ >
+ ${n.icon}
+ ${n.label}
+
+ `)}
+
+ `}function mh(e){const t=new Set,n=[];for(const r of Ru)for(const i of e[r]||[])t.has(i.id)||(t.add(i.id),n.push(i));return n}function Fg(e){const t=new Map;for(const n of[...Ru,"hidden","no_go"])for(const r of(e==null?void 0:e[n])||[])!(r!=null&&r.id)||t.has(r.id)||t.set(r.id,r);return t}function zg(e){return((e==null?void 0:e.items)||[]).filter(t=>(t==null?void 0:t.kink)&&!t.kink.is_scenario).slice(0,6)}function bg({similarKinkId:e,parentDirections:t,currentPlays:n,onRate:r,onInspect:i}){const s=Og(n,e,t);s.shouldTentativeAdd&&r(e,"curious",s.directions),i(e)}function jg({board:e,currentPlays:t,inspectedId:n,onInspect:r,onDirectionColumnChange:i,nearDupHints:s,dragOver:o,setDragOver:l,onDragStart:a,onDragEnd:u}){const h=N.useMemo(()=>mh(e),[e]),f=N.useMemo(()=>{const w={to_me:[],by_me:[],together:[]};for(const p of h)for(const c of Fy(p.id,t))w[c]&&w[c].push(p);for(const p of Ru)w[p].sort((c,v)=>(v.popularity||0)-(c.popularity||0)||c.name.localeCompare(v.name));return w},[h,t]),d=N.useCallback((w,p)=>{w.preventDefault(),w.dataTransfer.dropEffect="move",l(p)},[l]),m=N.useCallback(w=>{w.currentTarget.contains(w.relatedTarget)||l(null)},[]),$=N.useCallback((w,p)=>{var E,C,P;w.preventDefault();const c=w.dataTransfer.getData("text/plain");if(l(null),!c)return;const v=[...new Set((((E=t[c])==null?void 0:E.directions)||[]).filter(Boolean))].sort(),g=[...rh((C=t[c])==null?void 0:C.directions,p)].sort(),_=JSON.stringify(v)!==JSON.stringify(g),I=((P=t[c])==null?void 0:P.interest_state)==="not_interested";(_||I)&&i(c,p)},[t,i,l]),k=(w,p)=>{const c=tn(w.interest_state),v=bt.find(_=>_.ui===c),g=n===w.id;return S`
+
+
a(_,w.id)}
+ onDragEnd=${u}
+ >
+ ⠿
+
+ <${hh} kinkId=${w.id} onDirectionColumnChange=${i} />
+
+ <${ih}
+ name=${w.name}
+ emoji=${(v==null?void 0:v.icon)||""}
+ expanded=${g}
+ nearDupHint=${s.get(w.id)||""}
+ onClick=${()=>r(g?"":w.id)}
+ />
+
+
+ `};return S`
+
+
+
By direction
+ ${h.length}
+
+
+ Drag the ⠿ handle into a column for To me / By me / Together (works best with a mouse). On a phone, use the
+ buttons under each play instead.
+
+
+ ${Qo.map(w=>S`
+
d(p,w.key)}
+ onDragLeave=${m}
+ onDrop=${p=>$(p,w.key)}
+ >
+
+ ${w.icon}
+ ${w.label}
+
+
+ ${f[w.key].length?f[w.key].map(p=>k(p,w.key)):S`
Drop here
`}
+
+
+ `)}
+
+
+ `}function Qg({title:e,emoji:t,items:n,inspectedId:r,onInspect:i,nearDupHints:s,columnDragHandles:o=!1,onDragStart:l,onDragEnd:a,onDirectionColumnChange:u}){return n.length?S`
+
+
+
${t} ${e}
+ ${n.length}
+
+ ${o?S`
+ Use the direction buttons under each play on your phone, or drag ⠿ into a column above, to move it back onto your board.
+
`:null}
+
+ ${n.map(h=>{const f=tn(h.interest_state),d=bt.find(k=>k.ui===f),m=r===h.id,$=S`
+ <${ih}
+ name=${h.name}
+ emoji=${(d==null?void 0:d.icon)||""}
+ expanded=${m}
+ nearDupHint=${s.get(h.id)||""}
+ onClick=${()=>i(m?"":h.id)}
+ />
+ `;return o?S`
+
+
l(k,h.id)}
+ onDragEnd=${a}
+ >
+ ⠿
+
+ <${hh} kinkId=${h.id} onDirectionColumnChange=${u} />
+
${$}
+
+ `:S`
${$}
`})}
+
+
+ `:null}function md(e){const{title:t,emoji:n,items:r}=e,[i,s]=N.useState(!1);return r.length?S`
+
+ s(!i)}>
+ ▶ ${n} ${t} (${r.length})
+
+ ${i?S`<${Qg} ...${e} />`:null}
+
+ `:null}function Ag({assets:e}){var a;const[t,n]=N.useState(!1),[r,i]=N.useState(0),s=e.length,o=e[r];N.useEffect(()=>{i(0)},[e==null?void 0:e.length,(a=e==null?void 0:e[0])==null?void 0:a.asset_url]);const l=N.useCallback((u,h)=>{var f;(f=h==null?void 0:h.stopPropagation)==null||f.call(h),!(s<2)&&i(d=>(d+u+s)%s)},[s]);return S`
+
+ ${t?S`
+
+ ${s>1?S`
+
l(-1,u)} />
+ l(1,u)} />
+ `:null}
+
+

+
+ ${s>1?S`
+
+ ${e.map((u,h)=>S``)}
+
+ ${r+1} / ${s}
+ `:null}
+
+ `:S`
+
{u.stopPropagation(),n(!0)}}
+ >Show ${s} photo${s>1?"s":""}
+ `}
+
+ `}function Ug({item:e,play:t,detailData:n,detailLoading:r,similarData:i,onRate:s,onDirectionToggle:o,onOpenSimilar:l,onOpenScenarios:a,onClose:u,showImages:h,inspectorRef:f}){var v;if(!(e!=null&&e.id))return null;const d=tn(t==null?void 0:t.interest_state),m=bt.find(g=>g.ui===d),$=(t==null?void 0:t.directions)||[],k=(n==null?void 0:n.id)===e.id?n:null,w=((k==null?void 0:k.definition)||(k==null?void 0:k.detail_summary)||e.summary||"").trim(),p=zg(i),c=Number((k==null?void 0:k.scenario_child_count)||e.scenario_child_count||0);return S`
+
+
+
+
Selected play
+
+ ${(m==null?void 0:m.icon)||""}
+
${e.name}
+
+
+
Close
+
+ ${w?S`${w}
`:r?S`Loading details…
`:null}
+
+ <${ns} current=${d} onRate=${g=>s(e.id,g)} />
+ <${Vy}
+ directions=${$}
+ locked=${!d}
+ onToggle=${g=>o(e.id,g)}
+ />
+
+
+ a==null?void 0:a(e.id)}
+ >${c>0?`Explore scenarios (${c})`:"No scenarios yet"}
+ s(e.id,"not_interested")}>Remove from list
+
+ ${p.length?S`
+
+
Similar
+
+ ${p.map(g=>S`
+ {_.stopPropagation(),l(g.kink.id,$)}}
+ >
+ ${g.kink.name}
+
+ `)}
+
+
+ `:null}
+ ${k!=null&&k.is_extreme?S`Significant risk
`:null}
+ ${h&&((v=k==null?void 0:k.assets)!=null&&v.length)?S`<${Ag} assets=${k.assets} />`:null}
+
+ `}function Bg({auth:e,currentPlays:t,showImages:n,onRate:r,onDirectionToggle:i,onDirectionColumnChange:s,onNavigate:o,onOpenScenarios:l,focusKinkId:a,onFocusKinkConsumed:u}){var Q,W;const[h,f]=N.useState(""),[d,m]=N.useState(null),[$,k]=N.useState(!1),[w,p]=N.useState(""),[c,v]=N.useState(""),g=N.useRef(null),_=N.useRef(null),I=Yy(e),E=I.data||{},P=N.useMemo(()=>Fg(E),[E]).get(h)||null,T=ah(h),H=tg(h),J=lh(c),le=Object.keys(t||{}).length,ce=N.useMemo(()=>{const ie=[...mh(E),...E.hidden||[],...E.no_go||[]];return Mg(ie)},[E]);N.useEffect(()=>{var A,ie;h&&((ie=(A=_.current)==null?void 0:A.scrollIntoView)==null||ie.call(A,{behavior:"smooth",block:"start"}))},[h]),N.useEffect(()=>{a&&(t[a]||r(a,"curious",["together"]),f(a),u==null||u())},[a,t,r,u]);const Le=N.useCallback((A,ie)=>{A.dataTransfer.setData("text/plain",ie),A.dataTransfer.effectAllowed="move"},[]),Be=N.useCallback(()=>m(null),[]),Me=N.useCallback(A=>{p(A),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>v(A.trim()),300)},[]),D=N.useCallback((A,ie)=>{bg({similarKinkId:A,parentDirections:ie,currentPlays:t,onRate:r,onInspect:f})},[t,r]),F=le===0;return S`
+
+
+
My Plays
+
+ ${le} plays
+ k(!0)}>Add new
+
+
+
+
+ ${P?S`
+ <${Ug}
+ item=${P}
+ play=${t[P.id]||{}}
+ detailData=${T.data}
+ detailLoading=${T.isFetching}
+ similarData=${H.data}
+ onRate=${r}
+ onDirectionToggle=${i}
+ onOpenSimilar=${D}
+ onOpenScenarios=${l}
+ onClose=${()=>f("")}
+ showImages=${n}
+ inspectorRef=${_}
+ />
+ `:null}
+
+ ${I.isError?S`
Could not load play layout (${((Q=I.error)==null?void 0:Q.message)||"error"}). Try refreshing.
`:null}
+
+ ${F?S`
No plays yet. Go to Discover to find things you like.
`:S`
+ <${jg}
+ board=${E}
+ currentPlays=${t}
+ inspectedId=${h}
+ onInspect=${f}
+ onDirectionColumnChange=${s}
+ nearDupHints=${ce}
+ dragOver=${d}
+ setDragOver=${m}
+ onDragStart=${Le}
+ onDragEnd=${Be}
+ />
+ `}
+
+ <${md}
+ title="Hidden"
+ emoji="\uD83D\uDE48"
+ items=${E.hidden||[]}
+ inspectedId=${h}
+ onInspect=${f}
+ nearDupHints=${ce}
+ columnDragHandles=${!0}
+ onDragStart=${Le}
+ onDragEnd=${Be}
+ onDirectionColumnChange=${s}
+ />
+ <${md}
+ title="No-go"
+ emoji="\uD83D\uDEAB"
+ items=${E.no_go||[]}
+ inspectedId=${h}
+ onInspect=${f}
+ nearDupHints=${ce}
+ />
+
+
+ ${$?S`
+ <${sh}
+ query=${w}
+ onQueryChange=${Me}
+ results=${((W=J.data)==null?void 0:W.items)||[]}
+ hint="Tap a result to add it to your list (saved as Maybe) and open it."
+ onSelect=${A=>{k(!1),p(""),v(""),o==null||o("plays",A.id)}}
+ onClose=${()=>{k(!1),p(""),v("")}}
+ />
+ `:null}
+
+ `}function vh(e,t){const n=Array.isArray(e==null?void 0:e.partner_groups)?e.partner_groups:null,r=Array.isArray(t==null?void 0:t.items)?t.items:null;return n!=null&&n.length?n:r!=null&&r.length?r:n||r||[]}function yh(e,t=""){var i;const n=Array.isArray(e)?e:[];return n.length?t&&n.some(s=>(s==null?void 0:s.id)===t)?t:((i=n.find(s=>((s==null?void 0:s.member_ids)||[]).filter(Boolean).length>0)||n[0])==null?void 0:i.id)||"":""}function Kg({auth:e,user:t,currentPlays:n,onRate:r,onNavigate:i,onOpenScenarios:s,setStatus:o,graphDebugUi:l=!1,linkMutation:a,partnerRequestMutations:u,createGroupMutation:h,shareToggleMutation:f}){var xe;const[d,m]=N.useState(""),[$,k]=N.useState(""),[w,p]=N.useState([]),[c,v]=N.useState(""),[g,_]=N.useState("shared"),[I,E]=N.useState(null),C=oh(e),P=vh(t,C.data),T=P.find(L=>L.id===c)||null,H=(T==null?void 0:T.sharing_member_ids)||[],J=N.useMemo(()=>[...H].sort(),[T==null?void 0:T.id,H.join("|")]),le=N.useMemo(()=>{if(!(t!=null&&t.id)||typeof window>"u")return"";const L=new URL(window.location.href);return L.search="",L.hash="",L.searchParams.set("link",t.id),L.toString()},[t==null?void 0:t.id]);N.useEffect(()=>{if(!J.length){E(null);return}E(L=>L&&J.includes(L)?L:J[0])},[c,J.join("|")]),N.useEffect(()=>{if(!P.length){c&&v("");return}const L=yh(P,c);L!==c&&v(L)},[c,P]),N.useEffect(()=>{g==="theirs"&&!J.length&&_("shared")},[J.length,g]);const ce=I||J[0]||null,Be=rg(e,c).data||null,Me=ig(e,c,ce),D=(t==null?void 0:t.partners)||[],F=(t==null?void 0:t.incoming_partner_requests)||[],Q=(t==null?void 0:t.outgoing_partner_requests)||[],W=D.length>0,A=((T==null?void 0:T.participant_ids)||[]).length||1+(((xe=T==null?void 0:T.member_ids)==null?void 0:xe.length)||0),{accept:ie,decline:re,cancel:q}=u||{},Se=[{key:"shared",label:"Shared"},{key:"explore",label:"Worth Exploring"},...J.length?[{key:"theirs",label:"Their List"}]:[]];return S`
+
+
+
+
Together
+
Connect easily. See what overlaps. Explore nearby things.
+
+
+
+
+ ${t?S`
+
+
+
+
{navigator.clipboard.writeText(le),o("Invite link copied.")}}>Copy link
+
+
+
+
Manual invite code
+
${t.id}
+
+
{navigator.clipboard.writeText(t.id),o("Invite code copied.")}}>Copy code
+
+
+ `:null}
+
+ ${F.length?S`
+
+
Wants to connect
+ ${F.map(L=>S`
+
+
${L}
+
+ ie.mutate(L)} disabled=${ie.isPending}>Accept
+ re.mutate(L)} disabled=${re.isPending}>Decline
+
+
+ `)}
+
+ `:null}
+
+ ${Q.length?S`
+
+
Pending connection requests
+ ${Q.map(L=>S`
+
+ ${L}
+ q.mutate(L)} disabled=${q.isPending}>Cancel
+
+ `)}
+
+ `:null}
+
+
+
+
Connect with a partner
+
Share link first. Manual code entry is here as a fallback.
+
+
m(L.target.value)}
+ />
+
{const L=d.trim();L&&(a.mutate(L),m(""))}}>Send connection request
+
+
+ ${W&&!P.length?S`
+
+
Make a shared list for linked partners
+
k(L.target.value)} />
+
+ ${D.map(L=>S`
+ p(te=>te.includes(L)?te.filter(me=>me!==L):[...te,L])}
+ >${L}
+ `)}
+
+
h.mutate({name:$||"Together",memberIds:w})}>
+ Create shared list
+
+
+ `:null}
+
+ ${P.length?S`
+
+
Connection
+
+ ${P.map(L=>S`
+ v(L.id)}
+ >${xu(L,e.userId)}
+ `)}
+
+
+ `:null}
+
+ ${T?S`
+
+
Privacy
+
${T.my_share_full_list?"They can view my full list in this connection.":"My full list stays private in this connection."}
+
${J.length?`I can view: ${J.join(", ")}`:"No one in this connection is sharing their full list yet."}
+
+
+
+
+ ${Se.map(L=>S`
+ _(L.key)}>
+ ${L.label}
+
+ `)}
+
+
+
+ ${A>2?`This connection includes you and ${A-1} others.`:"This view compares you with the connected partner(s) in this list."}
+
+
+ ${g==="shared"?S`<${Hg}
+ overlap=${Be}
+ currentPlays=${n}
+ auth=${e}
+ participantCount=${A}
+ onNavigate=${i}
+ onOpenScenarios=${s}
+ />`:null}
+ ${g==="explore"?S`<${Vg}
+ overlap=${Be}
+ currentPlays=${n}
+ auth=${e}
+ onRate=${r}
+ onOpenScenarios=${s}
+ graphDebugUi=${l}
+ />`:null}
+ ${g==="theirs"?S`
+ <${qg}
+ partnerBoardQuery=${Me}
+ boardPartnerId=${ce}
+ sharingPartnerIds=${J}
+ selectedPartnerId=${I}
+ onSelectPartner=${E}
+ currentPlays=${n}
+ onRate=${r}
+ />
+ `:null}
+ `:W?null:S`
Link a partner to get started.
`}
+
+
+ `}function Hg({overlap:e,currentPlays:t,auth:n,participantCount:r=2,onNavigate:i,onOpenScenarios:s}){const o=(e==null?void 0:e.direct_matches)||[],l=(e==null?void 0:e.scenario_matches)||[],a=r>2?"No play is shared across everyone in this connection yet.":"No shared plays yet. Both of you need a few overlapping likes first.";return!o.length&&!l.length?S`${a}
`:S`
+
+ ${o.length?S`
+
Same plays
+ ${o.map(u=>{var k;const h=u.partner_reactions||{},f=tn((k=t[u.id])==null?void 0:k.interest_state),d=Object.entries(h).filter(([w])=>w!==n.userId),m=d.some(([,w])=>{const p=tn(w);return(f==="love"||f==="like")&&(p==="love"||p==="like")}),$=()=>i==null?void 0:i(je.PLAYS,u.id);return S`
+
{w.key!=="Enter"&&w.key!==" "||(w.preventDefault(),$())}}
+ >
+ ${u.name}
+ ${m?S`Match`:null}
+
+ ${d.map(([w,p])=>{var c;return S`
+
+ ${w.slice(0,8)}…
+ ${((c=bt.find(v=>v.api===p))==null?void 0:c.icon)||""}
+
+ `})}
+
+
+ `})}
+ `:null}
+
+ ${l.length?S`
+
+ Same scenarios
+
+ ${l.map(u=>{const h=u.scenario_kink,f=u.parent_kink,d=Object.entries(u.partner_reactions||{}).filter(([$])=>$!==n.userId),m=()=>{f!=null&&f.id?s==null||s(f.id,h.id):i==null||i(je.PLAYS,h.id)};return S`
+
{$.key!=="Enter"&&$.key!==" "||($.preventDefault(),m())}}
+ >
+
+
Base kink
+
${(f==null?void 0:f.name)||"Open in My Plays"}
+
Scenario
+
${h.name}
+
+
+
+ ${d.map(([$,k])=>{var w;return S`
+
+ ${$.slice(0,8)}…
+ ${((w=bt.find(p=>p.api===k.interest_state))==null?void 0:w.icon)||""}
+
+ `})}
+
+
Open this in Scenarios to review the details.
+
+
+ `})}
+ `:null}
+
+ `}function Vg({overlap:e,currentPlays:t,auth:n,onRate:r,onOpenScenarios:i,graphDebugUi:s=!1}){const o=(e==null?void 0:e.related_matches)||[],l=(e==null?void 0:e.scenario_related_matches)||[],a=(e==null?void 0:e.similar_matches)||[];return!o.length&&!l.length&&!a.length?S`Add more overlap to unlock nearby ideas worth exploring together.
`:S`
+
+ ${o.length?S`
+
Connected likes
+ ${o.map(u=>{var k,w,p,c,v;const h=u.left_user_id===n.userId?u.left_kink:u.right_kink,f=u.left_user_id===n.userId?u.right_kink:u.left_kink,d=u.left_user_id===n.userId?u.right_user_id:u.left_user_id,m=((w=(k=u.partner_reactions)==null?void 0:k[d])==null?void 0:w.interest_state)||"",$=((p=u.reasons)==null?void 0:p[0])||`${h.name} is related to ${f.name}`;return S`
+
+
+ ${h.name} → ${f.name}
+
+ ${s?S`
+ ${u.hops===1?"1 hop":`${u.hops} hops`}
+ ${u.bridge_kink?` via ${u.bridge_kink.name}`:""}
+ · ${$}
+ `:null}
+
+
+ ${d.slice(0,8)}…
+ ${((c=bt.find(g=>g.api===m))==null?void 0:c.icon)||""}
+
+
+ <${ns}
+ current=${tn((v=t[f.id])==null?void 0:v.interest_state)}
+ onRate=${g=>r(f.id,g,["together"])}
+ size="compact"
+ />
+
+ `})}
+ `:null}
+
+ ${l.length?S`
+
+ Connected scenarios
+
+ ${l.map(u=>{var p,c,v,g,_,I;const h=u.parent_kink,f=u.left_user_id===n.userId?u.left_scenario:u.right_scenario,d=u.left_user_id===n.userId?u.right_scenario:u.left_scenario,m=u.left_user_id===n.userId?u.right_user_id:u.left_user_id,$=((c=(p=u.partner_reactions)==null?void 0:p[m])==null?void 0:c.interest_state)||"",k=((v=u.reasons)==null?void 0:v[0])||`Both are scenarios under ${(h==null?void 0:h.name)||"the same base kink"}`,w=()=>{h!=null&&h.id&&(d!=null&&d.id)&&(i==null||i(h.id,d.id))};return S`
+
{E.key!=="Enter"&&E.key!==" "||(E.preventDefault(),w())}}
+ >
+
+
Base kink
+
${(h==null?void 0:h.name)||"Shared base kink"}
+
You
+
${(f==null?void 0:f.name)||"Scenario"}
+
Them
+
${(d==null?void 0:d.name)||"Scenario"}
+
+
+
+
+ ${m.slice(0,8)}…
+ ${((I=bt.find(E=>E.api===$))==null?void 0:I.icon)||""}
+
+
+ ${s?S`
${k}
`:S`
Open their scenario under the same base kink.
`}
+
+
+ `})}
+ `:null}
+
+ ${a.length?S`
+
Suggested next
+ ${a.map(u=>{var h,f;return S`
+
+ ${u.kink.name}
+ ${s&&((h=u.reasons)!=null&&h[0])?S`${u.reasons[0]}`:null}
+ <${ns}
+ current=${tn((f=t[u.kink.id])==null?void 0:f.interest_state)}
+ onRate=${d=>r(u.kink.id,d,["together"])}
+ size="compact"
+ />
+
+ `})}
+ `:null}
+
+ `}function qg({partnerBoardQuery:e,boardPartnerId:t,sharingPartnerIds:n,selectedPartnerId:r,onSelectPartner:i,currentPlays:s,onRate:o}){const{data:l,isPending:a,isError:u,error:h}=e,f=n.length>1?S`
+
+
Whose shared list?
+
+ ${n.map(k=>S`
+ i(k)}
+ >${k.slice(0,10)}…
+ `)}
+
+
+ `:null;if(!t)return S`${f}
No partner has turned on full-list sharing for this connection.
`;if(a)return S``;if(u){const k=(h==null?void 0:h.status)===403;return S`${f}
${k?"This partner has not shared their list here.":(h==null?void 0:h.message)||"Could not load this list."}
`}if(!l)return S`${f}
Could not load this list.
`;const d=[...l.to_me||[],...l.by_me||[],...l.together||[]],m=new Set,$=d.filter(k=>m.has(k.id)?!1:(m.add(k.id),!0));return $.length?S`
+
+ ${f}
+
+ Showing shared list from ${t.slice(0,12)}…
+
+
+ ${$.map(k=>{var p,c;const w=((p=bt.find(v=>v.api===k.interest_state))==null?void 0:p.icon)||"";return S`
+
+ ${k.name}
+ Them: ${w}
+ <${ns}
+ current=${tn((c=s[k.id])==null?void 0:c.interest_state)}
+ onRate=${v=>o(k.id,v,["together"])}
+ size="compact"
+ />
+
+ `})}
+
+
+ `:S`${f}
This shared list is empty.
`}function Wg({auth:e,user:t,status:n,selectedRoles:r,roleSearchInput:i,onRoleSearch:s,roleSearchItems:o,saveRoleMutation:l,onPhotoPreference:a,logout:u,onDeleted:h,setStatus:f}){var v;const[d,m]=N.useState(""),[$,k]=N.useState(!1),w=N.useMemo(()=>((t==null?void 0:t.partner_groups)||[]).map(_=>{const I=(_.participant_ids||[]).filter(P=>P&&P!==e.userId),E=_.my_share_full_list?I:[],C=(_.sharing_member_ids||[]).filter(P=>P&&P!==e.userId);return{group:_,visibleTo:E,visibleFrom:C}}),[t==null?void 0:t.partner_groups,e.userId]);async function p(){try{m("export");const g=await Z(`/users/${e.userId}/export`,{headers:ke(e.token)}),_=new Blob([JSON.stringify(g,null,2)],{type:"application/json"}),I=URL.createObjectURL(_),E=document.createElement("a");E.href=I,E.download=`${e.userId}-export.json`,document.body.appendChild(E),E.click(),E.remove(),URL.revokeObjectURL(I),f("Export downloaded.")}catch(g){f(g.message)}finally{m("")}}async function c(){try{m("delete"),await Z(`/users/${e.userId}`,{method:"DELETE",headers:ke(e.token)}),f("Account deleted."),h==null||h()}catch(g){f(g.message)}finally{m(""),k(!1)}}return S`
+
+
+
+
Settings
+
Privacy, roles, and account controls
+
+
+
+
+
+
+
Profile ID
+
${e.userId}
+
+
+
Log out
+
+
+
+
+
Roles
+
Optional. These help with framing, not matching.
+
+
s(g.target.value)}
+ />
+ ${r.length?S`
+
+ ${r.map(g=>S`
+ <${_o}
+ key=${g.id}
+ kink=${g}
+ selected=${!0}
+ onToggle=${(_,I)=>l.mutate({kinkId:_,selected:I})}
+ />
+ `)}
+
+ `:S`
No roles selected.
`}
+ ${o.length?S`
+
+ ${o.map(g=>S`
+ <${_o}
+ key=${g.kink.id}
+ kink=${g.kink}
+ selected=${!1}
+ onToggle=${(_,I)=>l.mutate({kinkId:_,selected:I})}
+ />
+ `)}
+
+ `:null}
+
+
+
+
+
Sharing
+
Private by default. Full-list sharing is group-specific.
+
+ ${w.length?S`
+
+ ${w.map(({group:g,visibleTo:_,visibleFrom:I})=>S`
+
+
+
${xu(g,e.userId)}
+
+ ${_.length?`They can view my list: ${_.join(", ")}`:"They cannot view my full list"}
+
+
+ ${I.length?`I can view: ${I.join(", ")}`:"I cannot view anyone else's full list"}
+
+
+
+ `)}
+
+ `:S`
No partner groups yet.
`}
+
+
+
+
+
Data
+
Export your data or remove the account entirely.
+
+
+ Export data
+ ${$?S`
+ Confirm delete
+ k(!1)}>Cancel
+ `:S`k(!0)}>Delete account`}
+
+
+
+ <${zr} text=${n} />
+
+
+ `}function Gg({starterCompleted:e,savedCount:t,starterTarget:n,pendingSaveCount:r}){return e?!0:t>=n&&r===0}function Yg({hasAuth:e,hasCreateResult:t,userLoaded:n,savedCount:r,starterTarget:i,pendingSaveCount:s,starterCompleted:o}){return!e||t||!n?"inactive":o?"main":r0?"finalizing":"main"}const Jg=new my,Xg={to_me:[],by_me:[],together:[],hidden:[],no_go:[]},Ms=12,Ta="kink_pending_partner";function Zg(){try{const e=localStorage.getItem("kink_auth");if(e){const t=JSON.parse(e);if(t.userId&&t.token)return t}}catch{}return{userId:"",token:""}}function e0(){try{const t=(new URL(window.location.href).searchParams.get("link")||"").trim();return t||(localStorage.getItem(Ta)||"").trim()}catch{return""}}function t0(e){try{e?localStorage.setItem(Ta,e):localStorage.removeItem(Ta)}catch{}try{const t=new URL(window.location.href);e?t.searchParams.set("link",e):t.searchParams.delete("link");const n=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState({},"",n||"/")}catch{}}const gh="kink_graph_debug_ui";function n0(){try{return localStorage.getItem(gh)==="1"}catch{return!1}}function r0(e){try{localStorage.setItem(gh,e?"1":"0")}catch{}}function wl({enabled:e,onToggle:t}){return S`
+
+ t(!e)}
+ >${e?"Graph debug on":"Graph debug"}
+
+ `}function i0(){var Lu,Mu,Fu;const e=it(),[t,n]=N.useState(Zg),[r,i]=N.useState(t.userId?null:"welcome"),[s,o]=N.useState(e0),[l,a]=N.useState(""),[u,h]=N.useState(je.DISCOVER),[f,d]=N.useState({user_id:"",private_token:""}),[m,$]=N.useState(null),[k,w]=N.useState(""),[p,c]=N.useState(""),[v,g]=N.useState(null),[_,I]=N.useState(""),[E,C]=N.useState(""),[P,T]=N.useState({parentKinkId:"",scenarioKinkId:""}),[H,J]=N.useState(["together"]),[le,ce]=N.useState(0),[Le,Be]=N.useState(!1),[Me,D]=N.useState(n0),F=N.useRef(""),Q=N.useRef(""),W=N.useCallback(R=>{D(R),r0(R)},[]),A=N.useCallback(R=>{n(R),R.userId&&R.token?localStorage.setItem("kink_auth",JSON.stringify(R)):localStorage.removeItem("kink_auth")},[]),ie=N.useCallback(R=>{const z=String(R||"").trim();o(z),t0(z)},[]),re=N.useCallback(()=>{A({userId:"",token:""}),e.clear(),h(je.DISCOVER),i("welcome"),I(""),C(""),T({parentKinkId:"",scenarioKinkId:""}),J(["together"]),$(null),ce(0),Be(!1),a("")},[e,A]),q=Gy(t,{pauseUserRefetch:le>0}),Se=oh(t),xe=eg(t),L=Zy(p),te=q.data||null,me=(te==null?void 0:te.plays)||{},se=(te==null?void 0:te.scenario_preferences)||{},zn=((Lu=te==null?void 0:te.preferences)==null?void 0:Lu.show_images)??!0,Fe=Object.keys(me).length,dr=((Mu=xe.data)==null?void 0:Mu.items)||[],ve=new Set(dr.map(R=>R.id)),Ao=(((Fu=L.data)==null?void 0:Fu.items)||[]).filter(R=>!ve.has(R.kink.id)),bn=vh(te,Se.data),Uo=!t.userId||!t.token||Se.isSuccess||Se.isError,Bo=!!(t.userId&&t.token)&&Uo&&(!bn.length||!!_),fr=Yg({hasAuth:!!(t.userId&&t.token),hasCreateResult:!!m,userLoaded:q.isSuccess,savedCount:Fe,starterTarget:Ms,pendingSaveCount:le,starterCompleted:Le}),jn=fr==="starter"||fr==="finalizing",ai=jn?"":_;N.useEffect(()=>{var z;if(m||!t.userId||!t.token||!q.isError||q.isFetching)return;const R=(z=q.error)==null?void 0:z.status;(R===401||R===404)&&(a("That profile is gone. Create a new one or log in again."),re())},[m,t.userId,t.token,q.isError,q.isFetching,q.error,re]),N.useEffect(()=>{if(m||!t.userId||!t.token)return;const R=z=>{var B,U;return z.isError&&!z.isFetching&&(((B=z.error)==null?void 0:B.status)===401||((U=z.error)==null?void 0:U.status)===404)};(R(Se)||R(xe))&&(a("That profile is gone. Create a new one or log in again."),re())},[m,t.userId,t.token,Se.isError,Se.isFetching,Se.error,xe.isError,xe.isFetching,xe.error,re]),N.useEffect(()=>{if(!t.userId||!t.token){ce(0),Be(!1);return}m||!q.isSuccess||Be(R=>Gg({starterCompleted:R,savedCount:Fe,starterTarget:Ms,pendingSaveCount:le}))},[t.userId,t.token,m,q.isSuccess,Fe,le]),N.useEffect(()=>{if(!bn.length){_&&I("");return}const R=yh(bn,_);R!==_&&I(R)},[_,bn]);function Ko(R){e.setQueryData(["partner-groups",t.userId],z=>z!=null&&z.items?{...z,items:z.items.map(B=>B.id===R.id?{...B,...R}:B)}:z),e.setQueryData(["user",t.userId],z=>z!=null&&z.partner_groups?{...z,partner_groups:z.partner_groups.map(B=>B.id===R.id?{...B,...R}:B)}:z)}function Ho(R,z){const B=U=>U.id!==R?U:{...U,member_ids:(U.member_ids||[]).filter(ne=>ne!==z),participant_ids:(U.participant_ids||[]).filter(ne=>ne!==z),sharing_member_ids:(U.sharing_member_ids||[]).filter(ne=>ne!==z)};e.setQueryData(["partner-groups",t.userId],U=>U!=null&&U.items?{...U,items:U.items.map(B)}:U),e.setQueryData(["user",t.userId],U=>U!=null&&U.partner_groups?{...U,partner_groups:U.partner_groups.map(B)}:U)}function Vo(R,z,B,U){e.setQueryData(["user",t.userId],R),e.setQueryData(["board",t.userId],ne=>ch(ne||Xg,z,B,U,e,t)),e.setQueryData(["recs",t.userId,ai],ne=>dh(ne,z)),e.invalidateQueries({queryKey:["scenario-parents",t.userId]}),_&&e.invalidateQueries({queryKey:["group-overlap",t.userId,_]})}const qo=ug({setAuth:A,setCreateResult:$,setAuthOpen:()=>{},setStatus:a}),ps=cg({setAuth:A,setCreateResult:$,setLoginForm:d,setStatus:a}),ui=dg({auth:t,activeGroupId:ai,selectedKinkId:"",setSelectedKinkId:()=>{},setStatus:a,pendingPlayCommitRef:F,playCommitKey:dd,syncPostSaveCaches:Vo,onSaveStart:()=>ce(R=>R+1),onSaveSettled:()=>ce(R=>Math.max(0,R-1))}),ci=fg({auth:t,setStatus:a}),pr=pg({auth:t,setStatus:a}),di=hg({auth:t,activeGroupId:_,setStatus:a}),j=mg({auth:t,setGroupDraftMembers:()=>{},setGroupNameInput:()=>{},setStatus:a}),_e=vg({auth:t,setStatus:a}),jt=yg({auth:t,setActiveGroupId:I,setGroupNameInput:()=>{},setGroupDraftMembers:()=>{},setStatus:a});gg({auth:t,removeMemberFromGroupCache:Ho,setStatus:a});const hs=kg({auth:t,replacePartnerGroup:Ko,setStatus:a});N.useEffect(()=>{if(!(!s||!t.userId||!t.token||!te)){if(s===t.userId){ie(""),a("You cannot connect a profile to itself.");return}if((te.partners||[]).includes(s)){ie(""),a("That partner is already connected.");return}if((te.outgoing_partner_requests||[]).includes(s)){ie(""),a("Connection request already sent.");return}if((te.incoming_partner_requests||[]).includes(s)){ie(""),a("They already requested a connection. Open Together to accept.");return}Q.current===s||j.isPending||(Q.current=s,j.mutate(s,{onSettled:()=>{Q.current="",ie("")}}))}},[s,t.userId,t.token,te,ie,j]);function hr(R,z=[]){const B=[...new Set((z||[]).filter(Boolean))].sort();return B.length?B:["love","like","curious"].includes(R)?[...new Set(Fi(H).filter(Boolean))].sort():[]}const fi=N.useCallback(R=>{J(z=>{const B=Fi(z),U=typeof R=="function"?R(B):R;return Fi(U)})},[]),Ye=N.useCallback((R,z,B=null)=>{const U=String(R),ne=me[U]||null,rn=[...hr(z,B??by(me,U))].sort(),vr=[...(ne==null?void 0:ne.directions)||[]].sort();if(!jn&&(ne==null?void 0:ne.interest_state)===z&&JSON.stringify(vr)===JSON.stringify(rn))return Promise.resolve(null);const zu=dd(U,z,rn);return!jn&&F.current===zu?Promise.resolve(null):(F.current=zu,ui.mutateAsync({kinkId:U,interestState:z,directions:rn}))},[me,H,jn,ui]),kh=N.useCallback((R,z)=>{const B=me[R];if(!(B!=null&&B.interest_state)){a("Rate this play first.");return}const U=B.directions||[];let ne;if(U.includes(z)?ne=U.filter(rn=>rn!==z):U.length===1&&U[0]==="together"&&(z==="to_me"||z==="by_me")?ne=[z]:ne=[...U,z],!ne.length){a("Choose at least one direction.");return}const mr=B.interest_state==="not_interested"?"curious":B.interest_state;Ye(R,mr,ne)},[me,Ye]),$h=N.useCallback((R,z)=>{const B=me[R];if(!(B!=null&&B.interest_state)){a("Rate this play first.");return}if(!["to_me","by_me","together"].includes(z))return;const U=rh(B.directions,z),ne=[...new Set((B.directions||[]).filter(Boolean))].sort(),mr=[...U].sort();if(JSON.stringify(ne)===JSON.stringify(mr)&&B.interest_state!=="not_interested")return;const vr=B.interest_state==="not_interested"?"curious":B.interest_state;Ye(R,vr,U)},[me,Ye]),Sh=N.useCallback((R,z,B,U=null)=>{var vr;const ne=se[z]||null,mr=((vr=me[R])==null?void 0:vr.directions)||[],rn=hr(B,U??(ne==null?void 0:ne.directions)??mr);return di.mutateAsync({parentKinkId:R,scenarioKinkId:z,interestState:B,directions:rn})},[se,me,di]),ms=N.useCallback((R,z="")=>{T({parentKinkId:R||"",scenarioKinkId:z||""}),h(je.SCENARIOS)},[]),pi=N.useCallback((R,z)=>{h(R),z&&C(z)},[]),Du=N.useCallback(R=>{w(R),v&&clearTimeout(v),g(setTimeout(()=>c(R.trim()),300))},[v]);if(!t.userId||!t.token||m)return S`
+ <${s0}
+ step=${r||"welcome"}
+ setStep=${i}
+ loginForm=${f}
+ setLoginForm=${d}
+ createResult=${m}
+ status=${l}
+ loginMutation=${qo}
+ createMutation=${ps}
+ saveRoleMutation=${ci}
+ roleSearchInput=${k}
+ onRoleSearch=${Du}
+ roleSearchItems=${Ao}
+ selectedRoles=${dr}
+ pendingPartnerId=${s}
+ onFinish=${()=>{const R=t.userId;$(null),i(null),R&&(e.invalidateQueries({queryKey:["user",R]}),e.invalidateQueries({queryKey:["partner-groups",R]}),e.invalidateQueries({queryKey:["roles",R]}))}}
+ />
+ `;if(t.userId&&t.token&&q.isLoading)return S`
+
+ <${wl} enabled=${Me} onToggle=${W} />
+
+
Loading your profile…
+ <${zr} text=${l} />
+
+
+ `;if(jn)return S`
+
+ <${wl} enabled=${Me} onToggle=${W} />
+
+
+
Start broad
+
${fr==="finalizing"?"Finishing your starter picks. Full discovery unlocks as soon as those saves land.":`Rate ${Ms} common starter cards first. After that, discovery opens up and partner influence can join in.`}
+ ${s?S`
Connection invite saved for ${s}. It will be sent automatically once your profile is ready.
`:null}
+
+
Log out
+
+ <${pd}
+ auth=${t}
+ activeGroupId=""
+ groupSelectionReady=${!0}
+ partnerGroups=${[]}
+ onActiveGroupChange=${()=>{}}
+ photosOnCards=${zn}
+ onPhotoPreference=${R=>pr.mutate(R)}
+ onRate=${Ye}
+ onNavigate=${pi}
+ onOpenScenarios=${ms}
+ savedCount=${Fe}
+ currentPlays=${me}
+ discoverSheetDirections=${H}
+ onDiscoverSheetDirectionsChange=${fi}
+ starterMode=${!0}
+ starterFinalizing=${fr==="finalizing"}
+ starterTarget=${Ms}
+ showSearch=${!1}
+ headerTitle="Starter deck"
+ headerSubtitle="Rate a dozen broad starters before full discovery unlocks."
+ />
+ <${zr} text=${l} />
+
+ `;const Ou=[{key:je.DISCOVER,label:"Discover",icon:"🔥"},{key:je.SCENARIOS,label:"Scenarios",icon:"🎬"},{key:je.PLAYS,label:"My Plays",icon:"🎵",badge:Fe||null},{key:je.TOGETHER,label:"Together",icon:"🤝"},{key:je.SETTINGS,label:"Settings",icon:"⚙️"}];return S`
+
+ <${wl} enabled=${Me} onToggle=${W} />
+
+
+ ${u===je.DISCOVER?S`
+ <${pd}
+ auth=${t}
+ activeGroupId=${_}
+ groupSelectionReady=${Bo}
+ partnerGroups=${bn}
+ onActiveGroupChange=${I}
+ photosOnCards=${zn}
+ onPhotoPreference=${R=>pr.mutate(R)}
+ onRate=${Ye}
+ onNavigate=${pi}
+ onOpenScenarios=${ms}
+ savedCount=${Fe}
+ currentPlays=${me}
+ discoverSheetDirections=${H}
+ onDiscoverSheetDirectionsChange=${fi}
+ />
+ `:null}
+
+ ${u===je.SCENARIOS?S`
+ <${xg}
+ auth=${t}
+ currentPlays=${me}
+ scenarioPreferences=${se}
+ onScenarioRate=${Sh}
+ onNavigateToPlays=${R=>pi(je.PLAYS,R)}
+ focusParentKinkId=${P.parentKinkId}
+ focusScenarioKinkId=${P.scenarioKinkId}
+ onScenarioFocusConsumed=${()=>T({parentKinkId:"",scenarioKinkId:""})}
+ />
+ `:null}
+
+ ${u===je.PLAYS?S`
+ <${Bg}
+ auth=${t}
+ currentPlays=${me}
+ showImages=${zn}
+ onRate=${Ye}
+ onDirectionToggle=${kh}
+ onDirectionColumnChange=${$h}
+ onNavigate=${pi}
+ onOpenScenarios=${ms}
+ focusKinkId=${E}
+ onFocusKinkConsumed=${()=>C("")}
+ />
+ `:null}
+
+ ${u===je.TOGETHER?S`
+ <${Kg}
+ auth=${t}
+ user=${te}
+ currentPlays=${me}
+ onRate=${Ye}
+ onNavigate=${pi}
+ onOpenScenarios=${ms}
+ setStatus=${a}
+ graphDebugUi=${Me}
+ linkMutation=${j}
+ partnerRequestMutations=${_e}
+ createGroupMutation=${jt}
+ shareToggleMutation=${hs}
+ />
+ `:null}
+
+ ${u===je.SETTINGS?S`
+ <${Wg}
+ auth=${t}
+ user=${te}
+ status=${l}
+ selectedRoles=${dr}
+ roleSearchInput=${k}
+ onRoleSearch=${Du}
+ roleSearchItems=${Ao}
+ saveRoleMutation=${ci}
+ onPhotoPreference=${R=>pr.mutate(R)}
+ logout=${re}
+ onDeleted=${re}
+ setStatus=${a}
+ />
+ `:null}
+
+
+
+ `}function s0({step:e,setStep:t,loginForm:n,setLoginForm:r,createResult:i,status:s,loginMutation:o,createMutation:l,saveRoleMutation:a,roleSearchInput:u,onRoleSearch:h,roleSearchItems:f,selectedRoles:d,pendingPartnerId:m,onFinish:$}){return i?S`
+
+
Set up your profile
+
Keep these credentials. You need them to reopen the profile later.
+
+
+
Profile ID
+
${i.id}
+
Private pass
+
${i.private_token}
+
+
+ ${m?S`
Invite saved for ${m}. The connection request will go out after this setup.
`:null}
+
+
+
Pick your roles
+
Optional. You can edit these later in Settings.
+
+
h(k.target.value)} />
+ ${d.length?S`
+
+ ${d.map(k=>S`
+ <${_o}
+ key=${k.id}
+ kink=${k}
+ selected=${!0}
+ onToggle=${(w,p)=>a.mutate({kinkId:w,selected:p})}
+ />
+ `)}
+
+ `:S`
No roles selected yet.
`}
+ ${f.length?S`
+
+ ${f.map(k=>S`
+ <${_o}
+ key=${k.kink.id}
+ kink=${k.kink}
+ selected=${!1}
+ onToggle=${(w,p)=>a.mutate({kinkId:w,selected:p})}
+ />
+ `)}
+
+ `:null}
+
+
Start starter deck
+
+ <${zr} text=${s} />
+
+ `:e==="login"?S`
+
+
Welcome back
+
Open your profile to continue discovery.
+
+ ${m?S`
You were invited by ${m}.
`:null}
+
r(w=>({...w,user_id:k.target.value}))}
+ />
+
r(w=>({...w,private_token:k.target.value}))}
+ />
+
{o.mutate({user_id:n.user_id,private_token:n.private_token},{onSuccess:()=>t(null)})}}>Open profile
+
t("welcome")}>Back
+
+ <${zr} text=${s} />
+
+ `:S`
+
+
Play List
+
Discover what you like. See what you share. Keep private things private by default.
+
+ ${m?S`
You were invited by ${m}. Create or open a profile and we’ll stage the connection for you.
`:null}
+
{l.isPending||l.mutate()}}
+ >
+ ${l.isPending?"Creating profile…":"Create profile"}
+
+
t("login")}>I have a profile
+
+ <${zr} text=${s} />
+
+ `}function o0(){return S`<${rd} client=${Jg}><${i0} />${rd}>`}bp(document.getElementById("root")).render(S`<${o0} />`);Pg();
diff --git a/frontend/dist/assets/web-vitals.attribution-C_HyTrBb.js b/frontend/dist/assets/web-vitals.attribution-C_HyTrBb.js
new file mode 100644
index 0000000000000000000000000000000000000000..1331be3546067aea65c80950ad861180d4bbaa9a
--- /dev/null
+++ b/frontend/dist/assets/web-vitals.attribution-C_HyTrBb.js
@@ -0,0 +1 @@
+var D,z,k=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart(n||100)-1)return i||t;if(i=i?t+">"+i:t,r.id)break;e=r.parentNode}}catch{}return i},X=-1,ue=function(){return X},L=function(e){addEventListener("pageshow",function(n){n.persisted&&(X=n.timeStamp,e(n))},!0)},O=function(){var e=k();return e&&e.activationStart||0},v=function(e,n){var i=k(),r="navigate";return ue()>=0?r="back-forward-cache":i&&(document.prerendering||O()>0?r="prerender":document.wasDiscarded?r="restore":i.type&&(r=i.type.replace(/_/g,"-"))),{name:e,value:n===void 0?-1:n,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},S=function(e,n,i){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver(function(t){Promise.resolve().then(function(){n(t.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},i||{})),r}}catch{}},h=function(e,n,i,r){var t,u;return function(a){n.value>=0&&(a||r)&&((u=n.value-(t||0))||t===void 0)&&(t=n.value,n.delta=u,n.rating=function(o,s){return o>s[1]?"poor":o>s[0]?"needs-improvement":"good"}(n.value,i),e(n))}},B=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},w=function(e){document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&e()})},j=function(e){var n=!1;return function(){n||(e(),n=!0)}},T=-1,U=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},P=function(e){document.visibilityState==="hidden"&&T>-1&&(T=e.type==="visibilitychange"?e.timeStamp:0,se())},V=function(){addEventListener("visibilitychange",P,!0),addEventListener("prerenderingchange",P,!0)},se=function(){removeEventListener("visibilitychange",P,!0),removeEventListener("prerenderingchange",P,!0)},Y=function(){return T<0&&(T=U(),V(),L(function(){setTimeout(function(){T=U(),V()},0)})),{get firstHiddenTime(){return T}}},q=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},_=[1800,3e3],ce=function(e,n){n=n||{},q(function(){var i,r=Y(),t=v("FCP"),u=S("paint",function(a){a.forEach(function(o){o.name==="first-contentful-paint"&&(u.disconnect(),o.startTimeu.value&&(u.value=a,u.entries=o,t())},c=S("layout-shift",s);c&&(t=h(i,u,G,r.reportAllChanges),w(function(){s(c.takeRecords()),t(!0)}),L(function(){a=0,u=v("CLS",0),t=h(i,u,G,r.reportAllChanges),B(function(){return t()})}),setTimeout(t,0))}))})(function(i){var r=function(t){var u,a={};if(t.entries.length){var o=t.entries.reduce(function(c,f){return c&&c.value>f.value?c:f});if(o&&o.sources&&o.sources.length){var s=(u=o.sources).find(function(c){return c.node&&c.node.nodeType===1})||u[0];s&&(a={largestShiftTarget:N(s.node),largestShiftTime:o.startTime,largestShiftValue:o.value,largestShiftSource:s,largestShiftEntry:o,loadState:Q(o.startTime)})}}return Object.assign(t,{attribution:a})}(i);e(r)},n)},Z=0,x=1/0,I=0,fe=function(e){e.forEach(function(n){n.interactionId&&(x=Math.min(x,n.interactionId),I=Math.max(I,n.interactionId),Z=I?(I-x)/7+1:0)})},$=function(){return D?Z:performance.interactionCount||0},de=function(){"interactionCount"in performance||D||(D=S("event",fe,{type:"event",buffered:!0,durationThreshold:0}))},l=[],C=new Map,ee=0,le=function(){var e=Math.min(l.length-1,Math.floor(($()-ee)/50));return l[e]},ne=[],me=function(e){if(ne.forEach(function(t){return t(e)}),e.interactionId||e.entryType==="first-input"){var n=l[l.length-1],i=C.get(e.interactionId);if(i||l.length<10||e.duration>n.latency){if(i)e.duration>i.latency?(i.entries=[e],i.latency=e.duration):e.duration===i.latency&&e.startTime===i.entries[0].startTime&&i.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};C.set(r.id,r),l.push(r)}l.sort(function(t,u){return u.latency-t.latency}),l.length>10&&l.splice(10).forEach(function(t){return C.delete(t.id)})}}},H=function(e){var n=self.requestIdleCallback||self.setTimeout,i=-1;return e=j(e),document.visibilityState==="hidden"?e():(i=n(e),w(e)),i},J=[200,500],pe=function(e,n){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(n=n||{},q(function(){var i;de();var r,t=v("INP"),u=function(o){H(function(){o.forEach(me);var s=le();s&&s.latency!==t.value&&(t.value=s.latency,t.entries=s.entries,r())})},a=S("event",u,{durationThreshold:(i=n.durationThreshold)!==null&&i!==void 0?i:40});r=h(e,t,J,n.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),w(function(){u(a.takeRecords()),r(!0)}),L(function(){ee=$(),l.length=0,C.clear(),t=v("INP"),r=h(e,t,J,n.reportAllChanges)}))}))},y=[],p=[],F=0,W=new WeakMap,E=new Map,R=-1,ve=function(e){y=y.concat(e),te()},te=function(){R<0&&(R=H(he))},he=function(){E.size>10&&E.forEach(function(a,o){C.has(o)||E.delete(o)});var e=l.map(function(a){return W.get(a.entries[0])}),n=p.length-50;p=p.filter(function(a,o){return o>=n||e.includes(a)});for(var i=new Set,r=0;rF&&o>u||i.has(a)}),R=-1};ne.push(function(e){e.interactionId&&e.target&&!E.has(e.interactionId)&&E.set(e.interactionId,e.target)},function(e){var n,i=e.startTime+e.duration;F=Math.max(F,e.processingEnd);for(var r=p.length-1;r>=0;r--){var t=p[r];if(Math.abs(i-t.renderTime)<=8){(n=t).startTime=Math.min(e.startTime,n.startTime),n.processingStart=Math.min(e.processingStart,n.processingStart),n.processingEnd=Math.max(e.processingEnd,n.processingEnd),n.entries.push(e);break}}n||(n={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:i,entries:[e]},p.push(n)),(e.interactionId||e.entryType==="first-input")&&W.set(e,n),te()});var re=function(e,n){for(var i,r=[],t=0;i=y[t];t++)if(!(i.startTime+i.durationn)break;r.push(i)}return r},Te=function(e,n){z||(z=S("long-animation-frame",ve)),pe(function(i){var r=function(t){var u=t.entries[0],a=W.get(u),o=u.processingStart,s=a.processingEnd,c=a.entries.sort(function(g,ae){return g.processingStart-ae.processingStart}),f=re(u.startTime,s),d=t.entries.find(function(g){return g.target}),m=d&&d.target||E.get(u.interactionId),b=[u.startTime+u.duration,s].concat(f.map(function(g){return g.startTime+g.duration})),M=Math.max.apply(Math,b),ie={interactionTarget:N(m),interactionTargetElement:m,interactionType:u.name.startsWith("key")?"keyboard":"pointer",interactionTime:u.startTime,nextPaintTime:M,processedEventEntries:c,longAnimationFrameEntries:f,inputDelay:o-u.startTime,processingDuration:s-o,presentationDelay:Math.max(M-s,0),loadState:Q(u.startTime)};return Object.assign(t,{attribution:ie})}(i);e(r)},n)},K=[2500,4e3],A={},ye=function(e,n){(function(i,r){r=r||{},q(function(){var t,u=Y(),a=v("LCP"),o=function(f){r.reportAllChanges||(f=f.slice(-1)),f.forEach(function(d){d.startTime
+
+
+
+
+ Play List
+
+
+
+
+
+
+
+
diff --git a/frontend/index.html b/frontend/index.html
index b482a9b8963c7e14070005a508a7410dce90b4df..8efe6e830a5f84404208f377af5e6604f40122d6 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -5,12 +5,10 @@
Play List
-
-
-
+
-
+