rivet-design 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/services/LocalGitService.d.ts.map +1 -1
- package/dist/services/LocalGitService.js +4 -26
- package/dist/services/LocalGitService.js.map +1 -1
- package/dist/services/__tests__/LocalGitService.test.js +3 -13
- package/dist/services/__tests__/LocalGitService.test.js.map +1 -1
- package/package.json +1 -1
- package/src/ui/dist/assets/main-Cj-e8nRg.js +145 -0
- package/src/ui/dist/index.html +1 -1
- package/src/ui/dist/assets/main-CdGS8Nf3.js +0 -145
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
function lS(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var uS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Xv={exports:{}},fl={},Qv={exports:{}},Y={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var so=Symbol.for("react.element"),cS=Symbol.for("react.portal"),dS=Symbol.for("react.fragment"),fS=Symbol.for("react.strict_mode"),hS=Symbol.for("react.profiler"),pS=Symbol.for("react.provider"),gS=Symbol.for("react.context"),mS=Symbol.for("react.forward_ref"),vS=Symbol.for("react.suspense"),yS=Symbol.for("react.memo"),_S=Symbol.for("react.lazy"),up=Symbol.iterator;function wS(t){return t===null||typeof t!="object"?null:(t=up&&t[up]||t["@@iterator"],typeof t=="function"?t:null)}var Zv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Jv=Object.assign,ey={};function Mi(t,e,n){this.props=t,this.context=e,this.refs=ey,this.updater=n||Zv}Mi.prototype.isReactComponent={};Mi.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Mi.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function ty(){}ty.prototype=Mi.prototype;function sf(t,e,n){this.props=t,this.context=e,this.refs=ey,this.updater=n||Zv}var of=sf.prototype=new ty;of.constructor=sf;Jv(of,Mi.prototype);of.isPureReactComponent=!0;var cp=Array.isArray,ny=Object.prototype.hasOwnProperty,af={current:null},ry={key:!0,ref:!0,__self:!0,__source:!0};function iy(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)ny.call(e,r)&&!ry.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:so,type:t,key:s,ref:o,props:i,_owner:af.current}}function xS(t,e){return{$$typeof:so,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function lf(t){return typeof t=="object"&&t!==null&&t.$$typeof===so}function SS(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var dp=/\/+/g;function Yl(t,e){return typeof t=="object"&&t!==null&&t.key!=null?SS(""+t.key):e.toString(36)}function Xo(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case so:case cS:o=!0}}if(o)return o=t,i=i(o),t=r===""?"."+Yl(o,0):r,cp(i)?(n="",t!=null&&(n=t.replace(dp,"$&/")+"/"),Xo(i,e,n,"",function(u){return u})):i!=null&&(lf(i)&&(i=xS(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(dp,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",cp(t))for(var a=0;a<t.length;a++){s=t[a];var l=r+Yl(s,a);o+=Xo(s,e,n,l,i)}else if(l=wS(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=r+Yl(s,a++),o+=Xo(s,e,n,l,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function mo(t,e,n){if(t==null)return t;var r=[],i=0;return Xo(t,r,"","",function(s){return e.call(n,s,i++)}),r}function ES(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var et={current:null},Qo={transition:null},kS={ReactCurrentDispatcher:et,ReactCurrentBatchConfig:Qo,ReactCurrentOwner:af};function sy(){throw Error("act(...) is not supported in production builds of React.")}Y.Children={map:mo,forEach:function(t,e,n){mo(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return mo(t,function(){e++}),e},toArray:function(t){return mo(t,function(e){return e})||[]},only:function(t){if(!lf(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Y.Component=Mi;Y.Fragment=dS;Y.Profiler=hS;Y.PureComponent=sf;Y.StrictMode=fS;Y.Suspense=vS;Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kS;Y.act=sy;Y.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=Jv({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=af.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)ny.call(e,l)&&!ry.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:so,type:t.type,key:i,ref:s,props:r,_owner:o}};Y.createContext=function(t){return t={$$typeof:gS,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:pS,_context:t},t.Consumer=t};Y.createElement=iy;Y.createFactory=function(t){var e=iy.bind(null,t);return e.type=t,e};Y.createRef=function(){return{current:null}};Y.forwardRef=function(t){return{$$typeof:mS,render:t}};Y.isValidElement=lf;Y.lazy=function(t){return{$$typeof:_S,_payload:{_status:-1,_result:t},_init:ES}};Y.memo=function(t,e){return{$$typeof:yS,type:t,compare:e===void 0?null:e}};Y.startTransition=function(t){var e=Qo.transition;Qo.transition={};try{t()}finally{Qo.transition=e}};Y.unstable_act=sy;Y.useCallback=function(t,e){return et.current.useCallback(t,e)};Y.useContext=function(t){return et.current.useContext(t)};Y.useDebugValue=function(){};Y.useDeferredValue=function(t){return et.current.useDeferredValue(t)};Y.useEffect=function(t,e){return et.current.useEffect(t,e)};Y.useId=function(){return et.current.useId()};Y.useImperativeHandle=function(t,e,n){return et.current.useImperativeHandle(t,e,n)};Y.useInsertionEffect=function(t,e){return et.current.useInsertionEffect(t,e)};Y.useLayoutEffect=function(t,e){return et.current.useLayoutEffect(t,e)};Y.useMemo=function(t,e){return et.current.useMemo(t,e)};Y.useReducer=function(t,e,n){return et.current.useReducer(t,e,n)};Y.useRef=function(t){return et.current.useRef(t)};Y.useState=function(t){return et.current.useState(t)};Y.useSyncExternalStore=function(t,e,n){return et.current.useSyncExternalStore(t,e,n)};Y.useTransition=function(){return et.current.useTransition()};Y.version="18.3.1";Qv.exports=Y;var x=Qv.exports;const ee=rf(x),oy=lS({__proto__:null,default:ee},[x]);/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var CS=x,bS=Symbol.for("react.element"),PS=Symbol.for("react.fragment"),TS=Object.prototype.hasOwnProperty,AS=CS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,RS={key:!0,ref:!0,__self:!0,__source:!0};function ay(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)TS.call(e,r)&&!RS.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:bS,type:t,key:s,ref:o,props:i,_owner:AS.current}}fl.Fragment=PS;fl.jsx=ay;fl.jsxs=ay;Xv.exports=fl;var C=Xv.exports,tc={},ly={exports:{}},_t={},uy={exports:{}},cy={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/(function(t){function e(M,O){var z=M.length;M.push(O);e:for(;0<z;){var Z=z-1>>>1,G=M[Z];if(0<i(G,O))M[Z]=O,M[z]=G,z=Z;else break e}}function n(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var O=M[0],z=M.pop();if(z!==O){M[0]=z;e:for(var Z=0,G=M.length,ve=G>>>1;Z<ve;){var ue=2*(Z+1)-1,Kt=M[ue],je=ue+1,Dr=M[je];if(0>i(Kt,z))je<G&&0>i(Dr,Kt)?(M[Z]=Dr,M[je]=z,Z=je):(M[Z]=Kt,M[ue]=z,Z=ue);else if(je<G&&0>i(Dr,z))M[Z]=Dr,M[je]=z,Z=je;else break e}}return O}function i(M,O){var z=M.sortIndex-O.sortIndex;return z!==0?z:M.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,y=!1,m=!1,_=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=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(M){for(var O=n(u);O!==null;){if(O.callback===null)r(u);else if(O.startTime<=M)r(u),O.sortIndex=O.expirationTime,e(l,O);else break;O=n(u)}}function w(M){if(m=!1,v(M),!y)if(n(l)!==null)y=!0,X(S);else{var O=n(u);O!==null&&U(w,O.startTime-M)}}function S(M,O){y=!1,m&&(m=!1,p(E),E=-1),h=!0;var z=f;try{for(v(O),d=n(l);d!==null&&(!(d.expirationTime>O)||M&&!R());){var Z=d.callback;if(typeof Z=="function"){d.callback=null,f=d.priorityLevel;var G=Z(d.expirationTime<=O);O=t.unstable_now(),typeof G=="function"?d.callback=G:d===n(l)&&r(l),v(O)}else r(l);d=n(l)}if(d!==null)var ve=!0;else{var ue=n(u);ue!==null&&U(w,ue.startTime-O),ve=!1}return ve}finally{d=null,f=z,h=!1}}var A=!1,P=null,E=-1,k=5,b=-1;function R(){return!(t.unstable_now()-b<k)}function N(){if(P!==null){var M=t.unstable_now();b=M;var O=!0;try{O=P(!0,M)}finally{O?V():(A=!1,P=null)}}else A=!1}var V;if(typeof g=="function")V=function(){g(N)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,K=$.port2;$.port1.onmessage=N,V=function(){K.postMessage(null)}}else V=function(){_(N,0)};function X(M){P=M,A||(A=!0,V())}function U(M,O){E=_(function(){M(t.unstable_now())},O)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(M){M.callback=null},t.unstable_continueExecution=function(){y||h||(y=!0,X(S))},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(M){switch(f){case 1:case 2:case 3:var O=3;break;default:O=f}var z=f;f=O;try{return M()}finally{f=z}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(M,O){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var z=f;f=M;try{return O()}finally{f=z}},t.unstable_scheduleCallback=function(M,O,z){var Z=t.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?Z+z:Z):z=Z,M){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=z+G,M={id:c++,callback:O,priorityLevel:M,startTime:z,expirationTime:G,sortIndex:-1},z>Z?(M.sortIndex=z,e(u,M),n(l)===null&&M===n(u)&&(m?(p(E),E=-1):m=!0,U(w,z-Z))):(M.sortIndex=G,e(l,M),y||h||(y=!0,X(S))),M},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(M){var O=f;return function(){var z=f;f=O;try{return M.apply(this,arguments)}finally{f=z}}}})(cy);uy.exports=cy;var MS=uy.exports;/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var IS=x,yt=MS;function I(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var dy=new Set,Ms={};function Lr(t,e){gi(t,e),gi(t+"Capture",e)}function gi(t,e){for(Ms[t]=e,t=0;t<e.length;t++)dy.add(e[t])}var yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nc=Object.prototype.hasOwnProperty,NS=/^[: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]*$/,fp={},hp={};function LS(t){return nc.call(hp,t)?!0:nc.call(fp,t)?!1:NS.test(t)?hp[t]=!0:(fp[t]=!0,!1)}function OS(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function DS(t,e,n,r){if(e===null||typeof e>"u"||OS(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function tt(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Fe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Fe[t]=new tt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Fe[e]=new tt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Fe[t]=new tt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Fe[t]=new tt(t,2,!1,t,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(t){Fe[t]=new tt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Fe[t]=new tt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Fe[t]=new tt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Fe[t]=new tt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Fe[t]=new tt(t,5,!1,t.toLowerCase(),null,!1,!1)});var uf=/[\-:]([a-z])/g;function cf(t){return t[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(t){var e=t.replace(uf,cf);Fe[e]=new tt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(uf,cf);Fe[e]=new tt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(uf,cf);Fe[e]=new tt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Fe[t]=new tt(t,1,!1,t.toLowerCase(),null,!1,!1)});Fe.xlinkHref=new tt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Fe[t]=new tt(t,1,!1,t.toLowerCase(),null,!0,!0)});function df(t,e,n,r){var i=Fe.hasOwnProperty(e)?Fe[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(DS(e,n,i,r)&&(n=null),r||i===null?LS(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var Cn=IS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,vo=Symbol.for("react.element"),Br=Symbol.for("react.portal"),zr=Symbol.for("react.fragment"),ff=Symbol.for("react.strict_mode"),rc=Symbol.for("react.profiler"),fy=Symbol.for("react.provider"),hy=Symbol.for("react.context"),hf=Symbol.for("react.forward_ref"),ic=Symbol.for("react.suspense"),sc=Symbol.for("react.suspense_list"),pf=Symbol.for("react.memo"),Nn=Symbol.for("react.lazy"),py=Symbol.for("react.offscreen"),pp=Symbol.iterator;function $i(t){return t===null||typeof t!="object"?null:(t=pp&&t[pp]||t["@@iterator"],typeof t=="function"?t:null)}var me=Object.assign,Xl;function es(t){if(Xl===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Xl=e&&e[1]||""}return`
|
|
34
|
-
`+Xl+t}var Ql=!1;function Zl(t,e){if(!t||Ql)return"";Ql=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
35
|
-
`),s=r.stack.split(`
|
|
36
|
-
`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
|
|
37
|
-
`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Ql=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?es(t):""}function $S(t){switch(t.tag){case 5:return es(t.type);case 16:return es("Lazy");case 13:return es("Suspense");case 19:return es("SuspenseList");case 0:case 2:case 15:return t=Zl(t.type,!1),t;case 11:return t=Zl(t.type.render,!1),t;case 1:return t=Zl(t.type,!0),t;default:return""}}function oc(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case zr:return"Fragment";case Br:return"Portal";case rc:return"Profiler";case ff:return"StrictMode";case ic:return"Suspense";case sc:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case hy:return(t.displayName||"Context")+".Consumer";case fy:return(t._context.displayName||"Context")+".Provider";case hf:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case pf:return e=t.displayName||null,e!==null?e:oc(t.type)||"Memo";case Nn:e=t._payload,t=t._init;try{return oc(t(e))}catch{}}return null}function FS(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oc(e);case 8:return e===ff?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Xn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function gy(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function jS(t){var e=gy(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function yo(t){t._valueTracker||(t._valueTracker=jS(t))}function my(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=gy(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function ga(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function ac(t,e){var n=e.checked;return me({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function gp(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Xn(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function vy(t,e){e=e.checked,e!=null&&df(t,"checked",e,!1)}function lc(t,e){vy(t,e);var n=Xn(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?uc(t,e.type,n):e.hasOwnProperty("defaultValue")&&uc(t,e.type,Xn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function mp(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function uc(t,e,n){(e!=="number"||ga(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var ts=Array.isArray;function oi(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Xn(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function cc(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(I(91));return me({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function vp(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(I(92));if(ts(n)){if(1<n.length)throw Error(I(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Xn(n)}}function yy(t,e){var n=Xn(e.value),r=Xn(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function yp(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function _y(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function dc(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?_y(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var _o,wy=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(_o=_o||document.createElement("div"),_o.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=_o.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Is(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var gs={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},VS=["Webkit","ms","Moz","O"];Object.keys(gs).forEach(function(t){VS.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),gs[e]=gs[t]})});function xy(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||gs.hasOwnProperty(t)&&gs[t]?(""+e).trim():e+"px"}function Sy(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=xy(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var BS=me({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 fc(t,e){if(e){if(BS[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(I(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(I(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(I(61))}if(e.style!=null&&typeof e.style!="object")throw Error(I(62))}}function hc(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 pc=null;function gf(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var gc=null,ai=null,li=null;function _p(t){if(t=lo(t)){if(typeof gc!="function")throw Error(I(280));var e=t.stateNode;e&&(e=vl(e),gc(t.stateNode,t.type,e))}}function Ey(t){ai?li?li.push(t):li=[t]:ai=t}function ky(){if(ai){var t=ai,e=li;if(li=ai=null,_p(t),e)for(t=0;t<e.length;t++)_p(e[t])}}function Cy(t,e){return t(e)}function by(){}var Jl=!1;function Py(t,e,n){if(Jl)return t(e,n);Jl=!0;try{return Cy(t,e,n)}finally{Jl=!1,(ai!==null||li!==null)&&(by(),ky())}}function Ns(t,e){var n=t.stateNode;if(n===null)return null;var r=vl(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(I(231,e,typeof n));return n}var mc=!1;if(yn)try{var Fi={};Object.defineProperty(Fi,"passive",{get:function(){mc=!0}}),window.addEventListener("test",Fi,Fi),window.removeEventListener("test",Fi,Fi)}catch{mc=!1}function zS(t,e,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var ms=!1,ma=null,va=!1,vc=null,US={onError:function(t){ms=!0,ma=t}};function HS(t,e,n,r,i,s,o,a,l){ms=!1,ma=null,zS.apply(US,arguments)}function WS(t,e,n,r,i,s,o,a,l){if(HS.apply(this,arguments),ms){if(ms){var u=ma;ms=!1,ma=null}else throw Error(I(198));va||(va=!0,vc=u)}}function Or(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Ty(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function wp(t){if(Or(t)!==t)throw Error(I(188))}function KS(t){var e=t.alternate;if(!e){if(e=Or(t),e===null)throw Error(I(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return wp(i),t;if(s===r)return wp(i),e;s=s.sibling}throw Error(I(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(I(189))}}if(n.alternate!==r)throw Error(I(190))}if(n.tag!==3)throw Error(I(188));return n.stateNode.current===n?t:e}function Ay(t){return t=KS(t),t!==null?Ry(t):null}function Ry(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Ry(t);if(e!==null)return e;t=t.sibling}return null}var My=yt.unstable_scheduleCallback,xp=yt.unstable_cancelCallback,GS=yt.unstable_shouldYield,qS=yt.unstable_requestPaint,ke=yt.unstable_now,YS=yt.unstable_getCurrentPriorityLevel,mf=yt.unstable_ImmediatePriority,Iy=yt.unstable_UserBlockingPriority,ya=yt.unstable_NormalPriority,XS=yt.unstable_LowPriority,Ny=yt.unstable_IdlePriority,hl=null,Zt=null;function QS(t){if(Zt&&typeof Zt.onCommitFiberRoot=="function")try{Zt.onCommitFiberRoot(hl,t,void 0,(t.current.flags&128)===128)}catch{}}var Bt=Math.clz32?Math.clz32:eE,ZS=Math.log,JS=Math.LN2;function eE(t){return t>>>=0,t===0?32:31-(ZS(t)/JS|0)|0}var wo=64,xo=4194304;function ns(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function _a(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=ns(a):(s&=o,s!==0&&(r=ns(s)))}else o=n&~i,o!==0?r=ns(o):s!==0&&(r=ns(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Bt(e),i=1<<n,r|=t[n],e&=~i;return r}function tE(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 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+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nE(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Bt(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=tE(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function yc(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Ly(){var t=wo;return wo<<=1,!(wo&4194240)&&(wo=64),t}function eu(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function oo(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Bt(e),t[e]=n}function rE(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-Bt(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function vf(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Bt(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var te=0;function Oy(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Dy,yf,$y,Fy,jy,_c=!1,So=[],Vn=null,Bn=null,zn=null,Ls=new Map,Os=new Map,On=[],iE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Sp(t,e){switch(t){case"focusin":case"focusout":Vn=null;break;case"dragenter":case"dragleave":Bn=null;break;case"mouseover":case"mouseout":zn=null;break;case"pointerover":case"pointerout":Ls.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Os.delete(e.pointerId)}}function ji(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=lo(e),e!==null&&yf(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function sE(t,e,n,r,i){switch(e){case"focusin":return Vn=ji(Vn,t,e,n,r,i),!0;case"dragenter":return Bn=ji(Bn,t,e,n,r,i),!0;case"mouseover":return zn=ji(zn,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return Ls.set(s,ji(Ls.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Os.set(s,ji(Os.get(s)||null,t,e,n,r,i)),!0}return!1}function Vy(t){var e=gr(t.target);if(e!==null){var n=Or(e);if(n!==null){if(e=n.tag,e===13){if(e=Ty(n),e!==null){t.blockedOn=e,jy(t.priority,function(){$y(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Zo(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=wc(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);pc=r,n.target.dispatchEvent(r),pc=null}else return e=lo(n),e!==null&&yf(e),t.blockedOn=n,!1;e.shift()}return!0}function Ep(t,e,n){Zo(t)&&n.delete(e)}function oE(){_c=!1,Vn!==null&&Zo(Vn)&&(Vn=null),Bn!==null&&Zo(Bn)&&(Bn=null),zn!==null&&Zo(zn)&&(zn=null),Ls.forEach(Ep),Os.forEach(Ep)}function Vi(t,e){t.blockedOn===e&&(t.blockedOn=null,_c||(_c=!0,yt.unstable_scheduleCallback(yt.unstable_NormalPriority,oE)))}function Ds(t){function e(i){return Vi(i,t)}if(0<So.length){Vi(So[0],t);for(var n=1;n<So.length;n++){var r=So[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Vn!==null&&Vi(Vn,t),Bn!==null&&Vi(Bn,t),zn!==null&&Vi(zn,t),Ls.forEach(e),Os.forEach(e),n=0;n<On.length;n++)r=On[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<On.length&&(n=On[0],n.blockedOn===null);)Vy(n),n.blockedOn===null&&On.shift()}var ui=Cn.ReactCurrentBatchConfig,wa=!0;function aE(t,e,n,r){var i=te,s=ui.transition;ui.transition=null;try{te=1,_f(t,e,n,r)}finally{te=i,ui.transition=s}}function lE(t,e,n,r){var i=te,s=ui.transition;ui.transition=null;try{te=4,_f(t,e,n,r)}finally{te=i,ui.transition=s}}function _f(t,e,n,r){if(wa){var i=wc(t,e,n,r);if(i===null)cu(t,e,r,xa,n),Sp(t,r);else if(sE(i,t,e,n,r))r.stopPropagation();else if(Sp(t,r),e&4&&-1<iE.indexOf(t)){for(;i!==null;){var s=lo(i);if(s!==null&&Dy(s),s=wc(t,e,n,r),s===null&&cu(t,e,r,xa,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else cu(t,e,r,null,n)}}var xa=null;function wc(t,e,n,r){if(xa=null,t=gf(r),t=gr(t),t!==null)if(e=Or(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Ty(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return xa=t,null}function By(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(YS()){case mf:return 1;case Iy:return 4;case ya:case XS:return 16;case Ny:return 536870912;default:return 16}default:return 16}}var $n=null,wf=null,Jo=null;function zy(){if(Jo)return Jo;var t,e=wf,n=e.length,r,i="value"in $n?$n.value:$n.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return Jo=i.slice(t,1<r?1-r:void 0)}function ea(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Eo(){return!0}function kp(){return!1}function wt(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Eo:kp,this.isPropagationStopped=kp,this}return me(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Eo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Eo)},persist:function(){},isPersistent:Eo}),e}var Ii={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xf=wt(Ii),ao=me({},Ii,{view:0,detail:0}),uE=wt(ao),tu,nu,Bi,pl=me({},ao,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sf,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Bi&&(Bi&&t.type==="mousemove"?(tu=t.screenX-Bi.screenX,nu=t.screenY-Bi.screenY):nu=tu=0,Bi=t),tu)},movementY:function(t){return"movementY"in t?t.movementY:nu}}),Cp=wt(pl),cE=me({},pl,{dataTransfer:0}),dE=wt(cE),fE=me({},ao,{relatedTarget:0}),ru=wt(fE),hE=me({},Ii,{animationName:0,elapsedTime:0,pseudoElement:0}),pE=wt(hE),gE=me({},Ii,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),mE=wt(gE),vE=me({},Ii,{data:0}),bp=wt(vE),yE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_E={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xE(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=wE[t])?!!e[t]:!1}function Sf(){return xE}var SE=me({},ao,{key:function(t){if(t.key){var e=yE[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=ea(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?_E[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sf,charCode:function(t){return t.type==="keypress"?ea(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ea(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),EE=wt(SE),kE=me({},pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pp=wt(kE),CE=me({},ao,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sf}),bE=wt(CE),PE=me({},Ii,{propertyName:0,elapsedTime:0,pseudoElement:0}),TE=wt(PE),AE=me({},pl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),RE=wt(AE),ME=[9,13,27,32],Ef=yn&&"CompositionEvent"in window,vs=null;yn&&"documentMode"in document&&(vs=document.documentMode);var IE=yn&&"TextEvent"in window&&!vs,Uy=yn&&(!Ef||vs&&8<vs&&11>=vs),Tp=" ",Ap=!1;function Hy(t,e){switch(t){case"keyup":return ME.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wy(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ur=!1;function NE(t,e){switch(t){case"compositionend":return Wy(e);case"keypress":return e.which!==32?null:(Ap=!0,Tp);case"textInput":return t=e.data,t===Tp&&Ap?null:t;default:return null}}function LE(t,e){if(Ur)return t==="compositionend"||!Ef&&Hy(t,e)?(t=zy(),Jo=wf=$n=null,Ur=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Uy&&e.locale!=="ko"?null:e.data;default:return null}}var OE={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Rp(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!OE[t.type]:e==="textarea"}function Ky(t,e,n,r){Ey(r),e=Sa(e,"onChange"),0<e.length&&(n=new xf("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var ys=null,$s=null;function DE(t){r0(t,0)}function gl(t){var e=Kr(t);if(my(e))return t}function $E(t,e){if(t==="change")return e}var Gy=!1;if(yn){var iu;if(yn){var su="oninput"in document;if(!su){var Mp=document.createElement("div");Mp.setAttribute("oninput","return;"),su=typeof Mp.oninput=="function"}iu=su}else iu=!1;Gy=iu&&(!document.documentMode||9<document.documentMode)}function Ip(){ys&&(ys.detachEvent("onpropertychange",qy),$s=ys=null)}function qy(t){if(t.propertyName==="value"&&gl($s)){var e=[];Ky(e,$s,t,gf(t)),Py(DE,e)}}function FE(t,e,n){t==="focusin"?(Ip(),ys=e,$s=n,ys.attachEvent("onpropertychange",qy)):t==="focusout"&&Ip()}function jE(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return gl($s)}function VE(t,e){if(t==="click")return gl(e)}function BE(t,e){if(t==="input"||t==="change")return gl(e)}function zE(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ut=typeof Object.is=="function"?Object.is:zE;function Fs(t,e){if(Ut(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!nc.call(e,i)||!Ut(t[i],e[i]))return!1}return!0}function Np(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Lp(t,e){var n=Np(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Np(n)}}function Yy(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Yy(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Xy(){for(var t=window,e=ga();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=ga(t.document)}return e}function kf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function UE(t){var e=Xy(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&Yy(n.ownerDocument.documentElement,n)){if(r!==null&&kf(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=Lp(n,s);var o=Lp(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var HE=yn&&"documentMode"in document&&11>=document.documentMode,Hr=null,xc=null,_s=null,Sc=!1;function Op(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Sc||Hr==null||Hr!==ga(r)||(r=Hr,"selectionStart"in r&&kf(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}),_s&&Fs(_s,r)||(_s=r,r=Sa(xc,"onSelect"),0<r.length&&(e=new xf("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Hr)))}function ko(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Wr={animationend:ko("Animation","AnimationEnd"),animationiteration:ko("Animation","AnimationIteration"),animationstart:ko("Animation","AnimationStart"),transitionend:ko("Transition","TransitionEnd")},ou={},Qy={};yn&&(Qy=document.createElement("div").style,"AnimationEvent"in window||(delete Wr.animationend.animation,delete Wr.animationiteration.animation,delete Wr.animationstart.animation),"TransitionEvent"in window||delete Wr.transitionend.transition);function ml(t){if(ou[t])return ou[t];if(!Wr[t])return t;var e=Wr[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Qy)return ou[t]=e[n];return t}var Zy=ml("animationend"),Jy=ml("animationiteration"),e0=ml("animationstart"),t0=ml("transitionend"),n0=new Map,Dp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function tr(t,e){n0.set(t,e),Lr(e,[t])}for(var au=0;au<Dp.length;au++){var lu=Dp[au],WE=lu.toLowerCase(),KE=lu[0].toUpperCase()+lu.slice(1);tr(WE,"on"+KE)}tr(Zy,"onAnimationEnd");tr(Jy,"onAnimationIteration");tr(e0,"onAnimationStart");tr("dblclick","onDoubleClick");tr("focusin","onFocus");tr("focusout","onBlur");tr(t0,"onTransitionEnd");gi("onMouseEnter",["mouseout","mouseover"]);gi("onMouseLeave",["mouseout","mouseover"]);gi("onPointerEnter",["pointerout","pointerover"]);gi("onPointerLeave",["pointerout","pointerover"]);Lr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Lr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Lr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Lr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Lr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Lr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),GE=new Set("cancel close invalid load scroll toggle".split(" ").concat(rs));function $p(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,WS(r,e,void 0,t),t.currentTarget=null}function r0(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;$p(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;$p(i,a,u),s=l}}}if(va)throw t=vc,va=!1,vc=null,t}function se(t,e){var n=e[Pc];n===void 0&&(n=e[Pc]=new Set);var r=t+"__bubble";n.has(r)||(i0(e,t,2,!1),n.add(r))}function uu(t,e,n){var r=0;e&&(r|=4),i0(n,t,r,e)}var Co="_reactListening"+Math.random().toString(36).slice(2);function js(t){if(!t[Co]){t[Co]=!0,dy.forEach(function(n){n!=="selectionchange"&&(GE.has(n)||uu(n,!1,t),uu(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Co]||(e[Co]=!0,uu("selectionchange",!1,e))}}function i0(t,e,n,r){switch(By(e)){case 1:var i=aE;break;case 4:i=lE;break;default:i=_f}n=i.bind(null,e,n,t),i=void 0,!mc||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function cu(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=gr(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}Py(function(){var u=s,c=gf(n),d=[];e:{var f=n0.get(t);if(f!==void 0){var h=xf,y=t;switch(t){case"keypress":if(ea(n)===0)break e;case"keydown":case"keyup":h=EE;break;case"focusin":y="focus",h=ru;break;case"focusout":y="blur",h=ru;break;case"beforeblur":case"afterblur":h=ru;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Cp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=dE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=bE;break;case Zy:case Jy:case e0:h=pE;break;case t0:h=TE;break;case"scroll":h=uE;break;case"wheel":h=RE;break;case"copy":case"cut":case"paste":h=mE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Pp}var m=(e&4)!==0,_=!m&&t==="scroll",p=m?f!==null?f+"Capture":null:f;m=[];for(var g=u,v;g!==null;){v=g;var w=v.stateNode;if(v.tag===5&&w!==null&&(v=w,p!==null&&(w=Ns(g,p),w!=null&&m.push(Vs(g,w,v)))),_)break;g=g.return}0<m.length&&(f=new h(f,y,null,n,c),d.push({event:f,listeners:m}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&n!==pc&&(y=n.relatedTarget||n.fromElement)&&(gr(y)||y[_n]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=u,y=y?gr(y):null,y!==null&&(_=Or(y),y!==_||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=u),h!==y)){if(m=Cp,w="onMouseLeave",p="onMouseEnter",g="mouse",(t==="pointerout"||t==="pointerover")&&(m=Pp,w="onPointerLeave",p="onPointerEnter",g="pointer"),_=h==null?f:Kr(h),v=y==null?f:Kr(y),f=new m(w,g+"leave",h,n,c),f.target=_,f.relatedTarget=v,w=null,gr(c)===u&&(m=new m(p,g+"enter",y,n,c),m.target=v,m.relatedTarget=_,w=m),_=w,h&&y)t:{for(m=h,p=y,g=0,v=m;v;v=$r(v))g++;for(v=0,w=p;w;w=$r(w))v++;for(;0<g-v;)m=$r(m),g--;for(;0<v-g;)p=$r(p),v--;for(;g--;){if(m===p||p!==null&&m===p.alternate)break t;m=$r(m),p=$r(p)}m=null}else m=null;h!==null&&Fp(d,f,h,m,!1),y!==null&&_!==null&&Fp(d,_,y,m,!0)}}e:{if(f=u?Kr(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var S=$E;else if(Rp(f))if(Gy)S=BE;else{S=jE;var A=FE}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=VE);if(S&&(S=S(t,u))){Ky(d,S,n,c);break e}A&&A(t,f,u),t==="focusout"&&(A=f._wrapperState)&&A.controlled&&f.type==="number"&&uc(f,"number",f.value)}switch(A=u?Kr(u):window,t){case"focusin":(Rp(A)||A.contentEditable==="true")&&(Hr=A,xc=u,_s=null);break;case"focusout":_s=xc=Hr=null;break;case"mousedown":Sc=!0;break;case"contextmenu":case"mouseup":case"dragend":Sc=!1,Op(d,n,c);break;case"selectionchange":if(HE)break;case"keydown":case"keyup":Op(d,n,c)}var P;if(Ef)e:{switch(t){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Ur?Hy(t,n)&&(E="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(Uy&&n.locale!=="ko"&&(Ur||E!=="onCompositionStart"?E==="onCompositionEnd"&&Ur&&(P=zy()):($n=c,wf="value"in $n?$n.value:$n.textContent,Ur=!0)),A=Sa(u,E),0<A.length&&(E=new bp(E,t,null,n,c),d.push({event:E,listeners:A}),P?E.data=P:(P=Wy(n),P!==null&&(E.data=P)))),(P=IE?NE(t,n):LE(t,n))&&(u=Sa(u,"onBeforeInput"),0<u.length&&(c=new bp("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=P))}r0(d,e)})}function Vs(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Sa(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ns(t,n),s!=null&&r.unshift(Vs(t,s,i)),s=Ns(t,e),s!=null&&r.push(Vs(t,s,i))),t=t.return}return r}function $r(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Fp(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Ns(n,s),l!=null&&o.unshift(Vs(n,l,a))):i||(l=Ns(n,s),l!=null&&o.push(Vs(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var qE=/\r\n?/g,YE=/\u0000|\uFFFD/g;function jp(t){return(typeof t=="string"?t:""+t).replace(qE,`
|
|
38
|
-
`).replace(YE,"")}function bo(t,e,n){if(e=jp(e),jp(t)!==e&&n)throw Error(I(425))}function Ea(){}var Ec=null,kc=null;function Cc(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var bc=typeof setTimeout=="function"?setTimeout:void 0,XE=typeof clearTimeout=="function"?clearTimeout:void 0,Vp=typeof Promise=="function"?Promise:void 0,QE=typeof queueMicrotask=="function"?queueMicrotask:typeof Vp<"u"?function(t){return Vp.resolve(null).then(t).catch(ZE)}:bc;function ZE(t){setTimeout(function(){throw t})}function du(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),Ds(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ds(e)}function Un(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Bp(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Ni=Math.random().toString(36).slice(2),Xt="__reactFiber$"+Ni,Bs="__reactProps$"+Ni,_n="__reactContainer$"+Ni,Pc="__reactEvents$"+Ni,JE="__reactListeners$"+Ni,ek="__reactHandles$"+Ni;function gr(t){var e=t[Xt];if(e)return e;for(var n=t.parentNode;n;){if(e=n[_n]||n[Xt]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Bp(t);t!==null;){if(n=t[Xt])return n;t=Bp(t)}return e}t=n,n=t.parentNode}return null}function lo(t){return t=t[Xt]||t[_n],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Kr(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(I(33))}function vl(t){return t[Bs]||null}var Tc=[],Gr=-1;function nr(t){return{current:t}}function le(t){0>Gr||(t.current=Tc[Gr],Tc[Gr]=null,Gr--)}function ie(t,e){Gr++,Tc[Gr]=t.current,t.current=e}var Qn={},qe=nr(Qn),ct=nr(!1),kr=Qn;function mi(t,e){var n=t.type.contextTypes;if(!n)return Qn;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function dt(t){return t=t.childContextTypes,t!=null}function ka(){le(ct),le(qe)}function zp(t,e,n){if(qe.current!==Qn)throw Error(I(168));ie(qe,e),ie(ct,n)}function s0(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(I(108,FS(t)||"Unknown",i));return me({},n,r)}function Ca(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Qn,kr=qe.current,ie(qe,t),ie(ct,ct.current),!0}function Up(t,e,n){var r=t.stateNode;if(!r)throw Error(I(169));n?(t=s0(t,e,kr),r.__reactInternalMemoizedMergedChildContext=t,le(ct),le(qe),ie(qe,t)):le(ct),ie(ct,n)}var fn=null,yl=!1,fu=!1;function o0(t){fn===null?fn=[t]:fn.push(t)}function tk(t){yl=!0,o0(t)}function rr(){if(!fu&&fn!==null){fu=!0;var t=0,e=te;try{var n=fn;for(te=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}fn=null,yl=!1}catch(i){throw fn!==null&&(fn=fn.slice(t+1)),My(mf,rr),i}finally{te=e,fu=!1}}return null}var qr=[],Yr=0,ba=null,Pa=0,Et=[],kt=0,Cr=null,gn=1,mn="";function cr(t,e){qr[Yr++]=Pa,qr[Yr++]=ba,ba=t,Pa=e}function a0(t,e,n){Et[kt++]=gn,Et[kt++]=mn,Et[kt++]=Cr,Cr=t;var r=gn;t=mn;var i=32-Bt(r)-1;r&=~(1<<i),n+=1;var s=32-Bt(e)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,gn=1<<32-Bt(e)+i|n<<i|r,mn=s+t}else gn=1<<s|n<<i|r,mn=t}function Cf(t){t.return!==null&&(cr(t,1),a0(t,1,0))}function bf(t){for(;t===ba;)ba=qr[--Yr],qr[Yr]=null,Pa=qr[--Yr],qr[Yr]=null;for(;t===Cr;)Cr=Et[--kt],Et[kt]=null,mn=Et[--kt],Et[kt]=null,gn=Et[--kt],Et[kt]=null}var vt=null,pt=null,ce=!1,jt=null;function l0(t,e){var n=Ct(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function Hp(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,vt=t,pt=Un(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,vt=t,pt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Cr!==null?{id:gn,overflow:mn}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Ct(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,vt=t,pt=null,!0):!1;default:return!1}}function Ac(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Rc(t){if(ce){var e=pt;if(e){var n=e;if(!Hp(t,e)){if(Ac(t))throw Error(I(418));e=Un(n.nextSibling);var r=vt;e&&Hp(t,e)?l0(r,n):(t.flags=t.flags&-4097|2,ce=!1,vt=t)}}else{if(Ac(t))throw Error(I(418));t.flags=t.flags&-4097|2,ce=!1,vt=t}}}function Wp(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;vt=t}function Po(t){if(t!==vt)return!1;if(!ce)return Wp(t),ce=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Cc(t.type,t.memoizedProps)),e&&(e=pt)){if(Ac(t))throw u0(),Error(I(418));for(;e;)l0(t,e),e=Un(e.nextSibling)}if(Wp(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(I(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){pt=Un(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}pt=null}}else pt=vt?Un(t.stateNode.nextSibling):null;return!0}function u0(){for(var t=pt;t;)t=Un(t.nextSibling)}function vi(){pt=vt=null,ce=!1}function Pf(t){jt===null?jt=[t]:jt.push(t)}var nk=Cn.ReactCurrentBatchConfig;function zi(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(I(309));var r=n.stateNode}if(!r)throw Error(I(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(I(284));if(!n._owner)throw Error(I(290,t))}return t}function To(t,e){throw t=Object.prototype.toString.call(e),Error(I(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Kp(t){var e=t._init;return e(t._payload)}function c0(t){function e(p,g){if(t){var v=p.deletions;v===null?(p.deletions=[g],p.flags|=16):v.push(g)}}function n(p,g){if(!t)return null;for(;g!==null;)e(p,g),g=g.sibling;return null}function r(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function i(p,g){return p=Gn(p,g),p.index=0,p.sibling=null,p}function s(p,g,v){return p.index=v,t?(v=p.alternate,v!==null?(v=v.index,v<g?(p.flags|=2,g):v):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return t&&p.alternate===null&&(p.flags|=2),p}function a(p,g,v,w){return g===null||g.tag!==6?(g=_u(v,p.mode,w),g.return=p,g):(g=i(g,v),g.return=p,g)}function l(p,g,v,w){var S=v.type;return S===zr?c(p,g,v.props.children,w,v.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Nn&&Kp(S)===g.type)?(w=i(g,v.props),w.ref=zi(p,g,v),w.return=p,w):(w=aa(v.type,v.key,v.props,null,p.mode,w),w.ref=zi(p,g,v),w.return=p,w)}function u(p,g,v,w){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=wu(v,p.mode,w),g.return=p,g):(g=i(g,v.children||[]),g.return=p,g)}function c(p,g,v,w,S){return g===null||g.tag!==7?(g=xr(v,p.mode,w,S),g.return=p,g):(g=i(g,v),g.return=p,g)}function d(p,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=_u(""+g,p.mode,v),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case vo:return v=aa(g.type,g.key,g.props,null,p.mode,v),v.ref=zi(p,null,g),v.return=p,v;case Br:return g=wu(g,p.mode,v),g.return=p,g;case Nn:var w=g._init;return d(p,w(g._payload),v)}if(ts(g)||$i(g))return g=xr(g,p.mode,v,null),g.return=p,g;To(p,g)}return null}function f(p,g,v,w){var S=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:a(p,g,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case vo:return v.key===S?l(p,g,v,w):null;case Br:return v.key===S?u(p,g,v,w):null;case Nn:return S=v._init,f(p,g,S(v._payload),w)}if(ts(v)||$i(v))return S!==null?null:c(p,g,v,w,null);To(p,v)}return null}function h(p,g,v,w,S){if(typeof w=="string"&&w!==""||typeof w=="number")return p=p.get(v)||null,a(g,p,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case vo:return p=p.get(w.key===null?v:w.key)||null,l(g,p,w,S);case Br:return p=p.get(w.key===null?v:w.key)||null,u(g,p,w,S);case Nn:var A=w._init;return h(p,g,v,A(w._payload),S)}if(ts(w)||$i(w))return p=p.get(v)||null,c(g,p,w,S,null);To(g,w)}return null}function y(p,g,v,w){for(var S=null,A=null,P=g,E=g=0,k=null;P!==null&&E<v.length;E++){P.index>E?(k=P,P=null):k=P.sibling;var b=f(p,P,v[E],w);if(b===null){P===null&&(P=k);break}t&&P&&b.alternate===null&&e(p,P),g=s(b,g,E),A===null?S=b:A.sibling=b,A=b,P=k}if(E===v.length)return n(p,P),ce&&cr(p,E),S;if(P===null){for(;E<v.length;E++)P=d(p,v[E],w),P!==null&&(g=s(P,g,E),A===null?S=P:A.sibling=P,A=P);return ce&&cr(p,E),S}for(P=r(p,P);E<v.length;E++)k=h(P,p,E,v[E],w),k!==null&&(t&&k.alternate!==null&&P.delete(k.key===null?E:k.key),g=s(k,g,E),A===null?S=k:A.sibling=k,A=k);return t&&P.forEach(function(R){return e(p,R)}),ce&&cr(p,E),S}function m(p,g,v,w){var S=$i(v);if(typeof S!="function")throw Error(I(150));if(v=S.call(v),v==null)throw Error(I(151));for(var A=S=null,P=g,E=g=0,k=null,b=v.next();P!==null&&!b.done;E++,b=v.next()){P.index>E?(k=P,P=null):k=P.sibling;var R=f(p,P,b.value,w);if(R===null){P===null&&(P=k);break}t&&P&&R.alternate===null&&e(p,P),g=s(R,g,E),A===null?S=R:A.sibling=R,A=R,P=k}if(b.done)return n(p,P),ce&&cr(p,E),S;if(P===null){for(;!b.done;E++,b=v.next())b=d(p,b.value,w),b!==null&&(g=s(b,g,E),A===null?S=b:A.sibling=b,A=b);return ce&&cr(p,E),S}for(P=r(p,P);!b.done;E++,b=v.next())b=h(P,p,E,b.value,w),b!==null&&(t&&b.alternate!==null&&P.delete(b.key===null?E:b.key),g=s(b,g,E),A===null?S=b:A.sibling=b,A=b);return t&&P.forEach(function(N){return e(p,N)}),ce&&cr(p,E),S}function _(p,g,v,w){if(typeof v=="object"&&v!==null&&v.type===zr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case vo:e:{for(var S=v.key,A=g;A!==null;){if(A.key===S){if(S=v.type,S===zr){if(A.tag===7){n(p,A.sibling),g=i(A,v.props.children),g.return=p,p=g;break e}}else if(A.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Nn&&Kp(S)===A.type){n(p,A.sibling),g=i(A,v.props),g.ref=zi(p,A,v),g.return=p,p=g;break e}n(p,A);break}else e(p,A);A=A.sibling}v.type===zr?(g=xr(v.props.children,p.mode,w,v.key),g.return=p,p=g):(w=aa(v.type,v.key,v.props,null,p.mode,w),w.ref=zi(p,g,v),w.return=p,p=w)}return o(p);case Br:e:{for(A=v.key;g!==null;){if(g.key===A)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(p,g.sibling),g=i(g,v.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else e(p,g);g=g.sibling}g=wu(v,p.mode,w),g.return=p,p=g}return o(p);case Nn:return A=v._init,_(p,g,A(v._payload),w)}if(ts(v))return y(p,g,v,w);if($i(v))return m(p,g,v,w);To(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,v),g.return=p,p=g):(n(p,g),g=_u(v,p.mode,w),g.return=p,p=g),o(p)):n(p,g)}return _}var yi=c0(!0),d0=c0(!1),Ta=nr(null),Aa=null,Xr=null,Tf=null;function Af(){Tf=Xr=Aa=null}function Rf(t){var e=Ta.current;le(Ta),t._currentValue=e}function Mc(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function ci(t,e){Aa=t,Tf=Xr=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(ot=!0),t.firstContext=null)}function Mt(t){var e=t._currentValue;if(Tf!==t)if(t={context:t,memoizedValue:e,next:null},Xr===null){if(Aa===null)throw Error(I(308));Xr=t,Aa.dependencies={lanes:0,firstContext:t}}else Xr=Xr.next=t;return e}var mr=null;function Mf(t){mr===null?mr=[t]:mr.push(t)}function f0(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,Mf(e)):(n.next=i.next,i.next=n),e.interleaved=n,wn(t,r)}function wn(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Ln=!1;function If(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function h0(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function vn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Hn(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Q&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,wn(t,n)}return i=r.interleaved,i===null?(e.next=e,Mf(r)):(e.next=i.next,i.next=e),r.interleaved=e,wn(t,n)}function ta(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,vf(t,n)}}function Gp(t,e){var n=t.updateQueue,r=t.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=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Ra(t,e,n,r){var i=t.updateQueue;Ln=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;o=0,c=u=l=null,a=s;do{var f=a.lane,h=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=t,m=a;switch(f=e,h=n,m.tag){case 1:if(y=m.payload,typeof y=="function"){d=y.call(h,d,f);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=m.payload,f=typeof y=="function"?y.call(h,d,f):y,f==null)break e;d=me({},d,f);break e;case 2:Ln=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Pr|=o,t.lanes=o,t.memoizedState=d}}function qp(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(I(191,i));i.call(r)}}}var uo={},Jt=nr(uo),zs=nr(uo),Us=nr(uo);function vr(t){if(t===uo)throw Error(I(174));return t}function Nf(t,e){switch(ie(Us,e),ie(zs,t),ie(Jt,uo),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:dc(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=dc(e,t)}le(Jt),ie(Jt,e)}function _i(){le(Jt),le(zs),le(Us)}function p0(t){vr(Us.current);var e=vr(Jt.current),n=dc(e,t.type);e!==n&&(ie(zs,t),ie(Jt,n))}function Lf(t){zs.current===t&&(le(Jt),le(zs))}var fe=nr(0);function Ma(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var hu=[];function Of(){for(var t=0;t<hu.length;t++)hu[t]._workInProgressVersionPrimary=null;hu.length=0}var na=Cn.ReactCurrentDispatcher,pu=Cn.ReactCurrentBatchConfig,br=0,ge=null,Pe=null,Ie=null,Ia=!1,ws=!1,Hs=0,rk=0;function Ve(){throw Error(I(321))}function Df(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Ut(t[n],e[n]))return!1;return!0}function $f(t,e,n,r,i,s){if(br=s,ge=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,na.current=t===null||t.memoizedState===null?ak:lk,t=n(r,i),ws){s=0;do{if(ws=!1,Hs=0,25<=s)throw Error(I(301));s+=1,Ie=Pe=null,e.updateQueue=null,na.current=uk,t=n(r,i)}while(ws)}if(na.current=Na,e=Pe!==null&&Pe.next!==null,br=0,Ie=Pe=ge=null,Ia=!1,e)throw Error(I(300));return t}function Ff(){var t=Hs!==0;return Hs=0,t}function Yt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?ge.memoizedState=Ie=t:Ie=Ie.next=t,Ie}function It(){if(Pe===null){var t=ge.alternate;t=t!==null?t.memoizedState:null}else t=Pe.next;var e=Ie===null?ge.memoizedState:Ie.next;if(e!==null)Ie=e,Pe=t;else{if(t===null)throw Error(I(310));Pe=t,t={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},Ie===null?ge.memoizedState=Ie=t:Ie=Ie.next=t}return Ie}function Ws(t,e){return typeof e=="function"?e(t):e}function gu(t){var e=It(),n=e.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=t;var r=Pe,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var c=u.lane;if((br&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,ge.lanes|=c,Pr|=c}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,Ut(r,e.memoizedState)||(ot=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,ge.lanes|=s,Pr|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function mu(t){var e=It(),n=e.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);Ut(s,e.memoizedState)||(ot=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function g0(){}function m0(t,e){var n=ge,r=It(),i=e(),s=!Ut(r.memoizedState,i);if(s&&(r.memoizedState=i,ot=!0),r=r.queue,jf(_0.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||Ie!==null&&Ie.memoizedState.tag&1){if(n.flags|=2048,Ks(9,y0.bind(null,n,r,i,e),void 0,null),Ne===null)throw Error(I(349));br&30||v0(n,e,i)}return i}function v0(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=ge.updateQueue,e===null?(e={lastEffect:null,stores:null},ge.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function y0(t,e,n,r){e.value=n,e.getSnapshot=r,w0(e)&&x0(t)}function _0(t,e,n){return n(function(){w0(e)&&x0(t)})}function w0(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Ut(t,n)}catch{return!0}}function x0(t){var e=wn(t,1);e!==null&&zt(e,t,1,-1)}function Yp(t){var e=Yt();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ws,lastRenderedState:t},e.queue=t,t=t.dispatch=ok.bind(null,ge,t),[e.memoizedState,t]}function Ks(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=ge.updateQueue,e===null?(e={lastEffect:null,stores:null},ge.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function S0(){return It().memoizedState}function ra(t,e,n,r){var i=Yt();ge.flags|=t,i.memoizedState=Ks(1|e,n,void 0,r===void 0?null:r)}function _l(t,e,n,r){var i=It();r=r===void 0?null:r;var s=void 0;if(Pe!==null){var o=Pe.memoizedState;if(s=o.destroy,r!==null&&Df(r,o.deps)){i.memoizedState=Ks(e,n,s,r);return}}ge.flags|=t,i.memoizedState=Ks(1|e,n,s,r)}function Xp(t,e){return ra(8390656,8,t,e)}function jf(t,e){return _l(2048,8,t,e)}function E0(t,e){return _l(4,2,t,e)}function k0(t,e){return _l(4,4,t,e)}function C0(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function b0(t,e,n){return n=n!=null?n.concat([t]):null,_l(4,4,C0.bind(null,e,t),n)}function Vf(){}function P0(t,e){var n=It();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Df(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function T0(t,e){var n=It();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Df(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function A0(t,e,n){return br&21?(Ut(n,e)||(n=Ly(),ge.lanes|=n,Pr|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,ot=!0),t.memoizedState=n)}function ik(t,e){var n=te;te=n!==0&&4>n?n:4,t(!0);var r=pu.transition;pu.transition={};try{t(!1),e()}finally{te=n,pu.transition=r}}function R0(){return It().memoizedState}function sk(t,e,n){var r=Kn(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},M0(t))I0(e,n);else if(n=f0(t,e,n,r),n!==null){var i=Je();zt(n,t,r,i),N0(n,e,r)}}function ok(t,e,n){var r=Kn(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(M0(t))I0(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Ut(a,o)){var l=e.interleaved;l===null?(i.next=i,Mf(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=f0(t,e,i,r),n!==null&&(i=Je(),zt(n,t,r,i),N0(n,e,r))}}function M0(t){var e=t.alternate;return t===ge||e!==null&&e===ge}function I0(t,e){ws=Ia=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function N0(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,vf(t,n)}}var Na={readContext:Mt,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useInsertionEffect:Ve,useLayoutEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useMutableSource:Ve,useSyncExternalStore:Ve,useId:Ve,unstable_isNewReconciler:!1},ak={readContext:Mt,useCallback:function(t,e){return Yt().memoizedState=[t,e===void 0?null:e],t},useContext:Mt,useEffect:Xp,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,ra(4194308,4,C0.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ra(4194308,4,t,e)},useInsertionEffect:function(t,e){return ra(4,2,t,e)},useMemo:function(t,e){var n=Yt();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Yt();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=sk.bind(null,ge,t),[r.memoizedState,t]},useRef:function(t){var e=Yt();return t={current:t},e.memoizedState=t},useState:Yp,useDebugValue:Vf,useDeferredValue:function(t){return Yt().memoizedState=t},useTransition:function(){var t=Yp(!1),e=t[0];return t=ik.bind(null,t[1]),Yt().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=ge,i=Yt();if(ce){if(n===void 0)throw Error(I(407));n=n()}else{if(n=e(),Ne===null)throw Error(I(349));br&30||v0(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,Xp(_0.bind(null,r,s,t),[t]),r.flags|=2048,Ks(9,y0.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=Yt(),e=Ne.identifierPrefix;if(ce){var n=mn,r=gn;n=(r&~(1<<32-Bt(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Hs++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=rk++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},lk={readContext:Mt,useCallback:P0,useContext:Mt,useEffect:jf,useImperativeHandle:b0,useInsertionEffect:E0,useLayoutEffect:k0,useMemo:T0,useReducer:gu,useRef:S0,useState:function(){return gu(Ws)},useDebugValue:Vf,useDeferredValue:function(t){var e=It();return A0(e,Pe.memoizedState,t)},useTransition:function(){var t=gu(Ws)[0],e=It().memoizedState;return[t,e]},useMutableSource:g0,useSyncExternalStore:m0,useId:R0,unstable_isNewReconciler:!1},uk={readContext:Mt,useCallback:P0,useContext:Mt,useEffect:jf,useImperativeHandle:b0,useInsertionEffect:E0,useLayoutEffect:k0,useMemo:T0,useReducer:mu,useRef:S0,useState:function(){return mu(Ws)},useDebugValue:Vf,useDeferredValue:function(t){var e=It();return Pe===null?e.memoizedState=t:A0(e,Pe.memoizedState,t)},useTransition:function(){var t=mu(Ws)[0],e=It().memoizedState;return[t,e]},useMutableSource:g0,useSyncExternalStore:m0,useId:R0,unstable_isNewReconciler:!1};function Ot(t,e){if(t&&t.defaultProps){e=me({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function Ic(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:me({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var wl={isMounted:function(t){return(t=t._reactInternals)?Or(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Je(),i=Kn(t),s=vn(r,i);s.payload=e,n!=null&&(s.callback=n),e=Hn(t,s,i),e!==null&&(zt(e,t,i,r),ta(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Je(),i=Kn(t),s=vn(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=Hn(t,s,i),e!==null&&(zt(e,t,i,r),ta(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Je(),r=Kn(t),i=vn(n,r);i.tag=2,e!=null&&(i.callback=e),e=Hn(t,i,r),e!==null&&(zt(e,t,r,n),ta(e,t,r))}};function Qp(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!Fs(n,r)||!Fs(i,s):!0}function L0(t,e,n){var r=!1,i=Qn,s=e.contextType;return typeof s=="object"&&s!==null?s=Mt(s):(i=dt(e)?kr:qe.current,r=e.contextTypes,s=(r=r!=null)?mi(t,i):Qn),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=wl,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function Zp(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&wl.enqueueReplaceState(e,e.state,null)}function Nc(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},If(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=Mt(s):(s=dt(e)?kr:qe.current,i.context=mi(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(Ic(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&wl.enqueueReplaceState(i,i.state,null),Ra(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function wi(t,e){try{var n="",r=e;do n+=$S(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
39
|
-
Error generating stack: `+s.message+`
|
|
40
|
-
`+s.stack}return{value:t,source:e,stack:i,digest:null}}function vu(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Lc(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var ck=typeof WeakMap=="function"?WeakMap:Map;function O0(t,e,n){n=vn(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Oa||(Oa=!0,Hc=r),Lc(t,e)},n}function D0(t,e,n){n=vn(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Lc(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Lc(t,e),typeof r!="function"&&(Wn===null?Wn=new Set([this]):Wn.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Jp(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new ck;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=kk.bind(null,t,e,n),e.then(t,t))}function eg(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function tg(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=vn(-1,1),e.tag=2,Hn(n,e,1))),n.lanes|=1),t)}var dk=Cn.ReactCurrentOwner,ot=!1;function Xe(t,e,n,r){e.child=t===null?d0(e,null,n,r):yi(e,t.child,n,r)}function ng(t,e,n,r,i){n=n.render;var s=e.ref;return ci(e,i),r=$f(t,e,n,r,s,i),n=Ff(),t!==null&&!ot?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,xn(t,e,i)):(ce&&n&&Cf(e),e.flags|=1,Xe(t,e,r,i),e.child)}function rg(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!qf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,$0(t,e,s,r,i)):(t=aa(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Fs,n(o,r)&&t.ref===e.ref)return xn(t,e,i)}return e.flags|=1,t=Gn(s,r),t.ref=e.ref,t.return=e,e.child=t}function $0(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(Fs(s,r)&&t.ref===e.ref)if(ot=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(ot=!0);else return e.lanes=t.lanes,xn(t,e,i)}return Oc(t,e,n,r,i)}function F0(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ie(Zr,ht),ht|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ie(Zr,ht),ht|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ie(Zr,ht),ht|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,ie(Zr,ht),ht|=r;return Xe(t,e,i,n),e.child}function j0(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Oc(t,e,n,r,i){var s=dt(n)?kr:qe.current;return s=mi(e,s),ci(e,i),n=$f(t,e,n,r,s,i),r=Ff(),t!==null&&!ot?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,xn(t,e,i)):(ce&&r&&Cf(e),e.flags|=1,Xe(t,e,n,i),e.child)}function ig(t,e,n,r,i){if(dt(n)){var s=!0;Ca(e)}else s=!1;if(ci(e,i),e.stateNode===null)ia(t,e),L0(e,n,r),Nc(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Mt(u):(u=dt(n)?kr:qe.current,u=mi(e,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Zp(e,o,r,u),Ln=!1;var f=e.memoizedState;o.state=f,Ra(e,r,o,i),l=e.memoizedState,a!==r||f!==l||ct.current||Ln?(typeof c=="function"&&(Ic(e,n,c,r),l=e.memoizedState),(a=Ln||Qp(e,n,a,r,f,l,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,h0(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:Ot(e.type,a),o.props=u,d=e.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Mt(l):(l=dt(n)?kr:qe.current,l=mi(e,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&Zp(e,o,r,l),Ln=!1,f=e.memoizedState,o.state=f,Ra(e,r,o,i);var y=e.memoizedState;a!==d||f!==y||ct.current||Ln?(typeof h=="function"&&(Ic(e,n,h,r),y=e.memoizedState),(u=Ln||Qp(e,n,u,r,f,y,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=y),o.props=r,o.state=y,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return Dc(t,e,n,r,s,i)}function Dc(t,e,n,r,i,s){j0(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&Up(e,n,!1),xn(t,e,s);r=e.stateNode,dk.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=yi(e,t.child,null,s),e.child=yi(e,null,a,s)):Xe(t,e,a,s),e.memoizedState=r.state,i&&Up(e,n,!0),e.child}function V0(t){var e=t.stateNode;e.pendingContext?zp(t,e.pendingContext,e.pendingContext!==e.context):e.context&&zp(t,e.context,!1),Nf(t,e.containerInfo)}function sg(t,e,n,r,i){return vi(),Pf(i),e.flags|=256,Xe(t,e,n,r),e.child}var $c={dehydrated:null,treeContext:null,retryLane:0};function Fc(t){return{baseLanes:t,cachePool:null,transitions:null}}function B0(t,e,n){var r=e.pendingProps,i=fe.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),ie(fe,i&1),t===null)return Rc(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=El(o,r,0,null),t=xr(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Fc(n),e.memoizedState=$c,t):Bf(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return fk(t,e,o,r,a,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=Gn(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Gn(a,s):(s=xr(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?Fc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=$c,r}return s=t.child,t=s.sibling,r=Gn(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Bf(t,e){return e=El({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Ao(t,e,n,r){return r!==null&&Pf(r),yi(e,t.child,null,n),t=Bf(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function fk(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=vu(Error(I(422))),Ao(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=El({mode:"visible",children:r.children},i,0,null),s=xr(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&yi(e,t.child,null,o),e.child.memoizedState=Fc(o),e.memoizedState=$c,s);if(!(e.mode&1))return Ao(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(I(419)),r=vu(s,r,void 0),Ao(t,e,o,r)}if(a=(o&t.childLanes)!==0,ot||a){if(r=Ne,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,wn(t,i),zt(r,t,i,-1))}return Gf(),r=vu(Error(I(421))),Ao(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=Ck.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,pt=Un(i.nextSibling),vt=e,ce=!0,jt=null,t!==null&&(Et[kt++]=gn,Et[kt++]=mn,Et[kt++]=Cr,gn=t.id,mn=t.overflow,Cr=e),e=Bf(e,r.children),e.flags|=4096,e)}function og(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Mc(t.return,e,n)}function yu(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function z0(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(Xe(t,e,r.children,n),r=fe.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&og(t,n,e);else if(t.tag===19)og(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(ie(fe,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&Ma(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),yu(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Ma(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}yu(e,!0,n,null,s);break;case"together":yu(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function ia(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function xn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Pr|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(I(153));if(e.child!==null){for(t=e.child,n=Gn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Gn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function hk(t,e,n){switch(e.tag){case 3:V0(e),vi();break;case 5:p0(e);break;case 1:dt(e.type)&&Ca(e);break;case 4:Nf(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;ie(Ta,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(ie(fe,fe.current&1),e.flags|=128,null):n&e.child.childLanes?B0(t,e,n):(ie(fe,fe.current&1),t=xn(t,e,n),t!==null?t.sibling:null);ie(fe,fe.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return z0(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ie(fe,fe.current),r)break;return null;case 22:case 23:return e.lanes=0,F0(t,e,n)}return xn(t,e,n)}var U0,jc,H0,W0;U0=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};jc=function(){};H0=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,vr(Jt.current);var s=null;switch(n){case"input":i=ac(t,i),r=ac(t,r),s=[];break;case"select":i=me({},i,{value:void 0}),r=me({},r,{value:void 0}),s=[];break;case"textarea":i=cc(t,i),r=cc(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Ea)}fc(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ms.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ms.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&se("scroll",t),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};W0=function(t,e,n,r){n!==r&&(e.flags|=4)};function Ui(t,e){if(!ce)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Be(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function pk(t,e,n){var r=e.pendingProps;switch(bf(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(e),null;case 1:return dt(e.type)&&ka(),Be(e),null;case 3:return r=e.stateNode,_i(),le(ct),le(qe),Of(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Po(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,jt!==null&&(Gc(jt),jt=null))),jc(t,e),Be(e),null;case 5:Lf(e);var i=vr(Us.current);if(n=e.type,t!==null&&e.stateNode!=null)H0(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(I(166));return Be(e),null}if(t=vr(Jt.current),Po(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Xt]=e,r[Bs]=s,t=(e.mode&1)!==0,n){case"dialog":se("cancel",r),se("close",r);break;case"iframe":case"object":case"embed":se("load",r);break;case"video":case"audio":for(i=0;i<rs.length;i++)se(rs[i],r);break;case"source":se("error",r);break;case"img":case"image":case"link":se("error",r),se("load",r);break;case"details":se("toggle",r);break;case"input":gp(r,s),se("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},se("invalid",r);break;case"textarea":vp(r,s),se("invalid",r)}fc(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&bo(r.textContent,a,t),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&bo(r.textContent,a,t),i=["children",""+a]):Ms.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&se("scroll",r)}switch(n){case"input":yo(r),mp(r,s,!0);break;case"textarea":yo(r),yp(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ea)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=_y(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Xt]=e,t[Bs]=r,U0(t,e,!1,!1),e.stateNode=t;e:{switch(o=hc(n,r),n){case"dialog":se("cancel",t),se("close",t),i=r;break;case"iframe":case"object":case"embed":se("load",t),i=r;break;case"video":case"audio":for(i=0;i<rs.length;i++)se(rs[i],t);i=r;break;case"source":se("error",t),i=r;break;case"img":case"image":case"link":se("error",t),se("load",t),i=r;break;case"details":se("toggle",t),i=r;break;case"input":gp(t,r),i=ac(t,r),se("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=me({},r,{value:void 0}),se("invalid",t);break;case"textarea":vp(t,r),i=cc(t,r),se("invalid",t);break;default:i=r}fc(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Sy(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&wy(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Is(t,l):typeof l=="number"&&Is(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Ms.hasOwnProperty(s)?l!=null&&s==="onScroll"&&se("scroll",t):l!=null&&df(t,s,l,o))}switch(n){case"input":yo(t),mp(t,r,!1);break;case"textarea":yo(t),yp(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Xn(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?oi(t,!!r.multiple,s,!1):r.defaultValue!=null&&oi(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=Ea)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Be(e),null;case 6:if(t&&e.stateNode!=null)W0(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(I(166));if(n=vr(Us.current),vr(Jt.current),Po(e)){if(r=e.stateNode,n=e.memoizedProps,r[Xt]=e,(s=r.nodeValue!==n)&&(t=vt,t!==null))switch(t.tag){case 3:bo(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&bo(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Xt]=e,e.stateNode=r}return Be(e),null;case 13:if(le(fe),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(ce&&pt!==null&&e.mode&1&&!(e.flags&128))u0(),vi(),e.flags|=98560,s=!1;else if(s=Po(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(I(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(I(317));s[Xt]=e}else vi(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Be(e),s=!1}else jt!==null&&(Gc(jt),jt=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||fe.current&1?Ae===0&&(Ae=3):Gf())),e.updateQueue!==null&&(e.flags|=4),Be(e),null);case 4:return _i(),jc(t,e),t===null&&js(e.stateNode.containerInfo),Be(e),null;case 10:return Rf(e.type._context),Be(e),null;case 17:return dt(e.type)&&ka(),Be(e),null;case 19:if(le(fe),s=e.memoizedState,s===null)return Be(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)Ui(s,!1);else{if(Ae!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Ma(t),o!==null){for(e.flags|=128,Ui(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return ie(fe,fe.current&1|2),e.child}t=t.sibling}s.tail!==null&&ke()>xi&&(e.flags|=128,r=!0,Ui(s,!1),e.lanes=4194304)}else{if(!r)if(t=Ma(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Ui(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ce)return Be(e),null}else 2*ke()-s.renderingStartTime>xi&&n!==1073741824&&(e.flags|=128,r=!0,Ui(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ke(),e.sibling=null,n=fe.current,ie(fe,r?n&1|2:n&1),e):(Be(e),null);case 22:case 23:return Kf(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?ht&1073741824&&(Be(e),e.subtreeFlags&6&&(e.flags|=8192)):Be(e),null;case 24:return null;case 25:return null}throw Error(I(156,e.tag))}function gk(t,e){switch(bf(e),e.tag){case 1:return dt(e.type)&&ka(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return _i(),le(ct),le(qe),Of(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Lf(e),null;case 13:if(le(fe),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(I(340));vi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return le(fe),null;case 4:return _i(),null;case 10:return Rf(e.type._context),null;case 22:case 23:return Kf(),null;case 24:return null;default:return null}}var Ro=!1,Ue=!1,mk=typeof WeakSet=="function"?WeakSet:Set,B=null;function Qr(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){_e(t,e,r)}else n.current=null}function Vc(t,e,n){try{n()}catch(r){_e(t,e,r)}}var ag=!1;function vk(t,e){if(Ec=wa,t=Xy(),kf(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=t,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(a=o+i),d!==s||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===n&&++u===i&&(a=o),f===s&&++c===r&&(l=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(kc={focusedElem:t,selectionRange:n},wa=!1,B=e;B!==null;)if(e=B,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,B=t;else for(;B!==null;){e=B;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var m=y.memoizedProps,_=y.memoizedState,p=e.stateNode,g=p.getSnapshotBeforeUpdate(e.elementType===e.type?m:Ot(e.type,m),_);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=e.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(I(163))}}catch(w){_e(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,B=t;break}B=e.return}return y=ag,ag=!1,y}function xs(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Vc(e,n,s)}i=i.next}while(i!==r)}}function xl(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Bc(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function K0(t){var e=t.alternate;e!==null&&(t.alternate=null,K0(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Xt],delete e[Bs],delete e[Pc],delete e[JE],delete e[ek])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function G0(t){return t.tag===5||t.tag===3||t.tag===4}function lg(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||G0(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function zc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Ea));else if(r!==4&&(t=t.child,t!==null))for(zc(t,e,n),t=t.sibling;t!==null;)zc(t,e,n),t=t.sibling}function Uc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Uc(t,e,n),t=t.sibling;t!==null;)Uc(t,e,n),t=t.sibling}var Le=null,Ft=!1;function Tn(t,e,n){for(n=n.child;n!==null;)q0(t,e,n),n=n.sibling}function q0(t,e,n){if(Zt&&typeof Zt.onCommitFiberUnmount=="function")try{Zt.onCommitFiberUnmount(hl,n)}catch{}switch(n.tag){case 5:Ue||Qr(n,e);case 6:var r=Le,i=Ft;Le=null,Tn(t,e,n),Le=r,Ft=i,Le!==null&&(Ft?(t=Le,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Le.removeChild(n.stateNode));break;case 18:Le!==null&&(Ft?(t=Le,n=n.stateNode,t.nodeType===8?du(t.parentNode,n):t.nodeType===1&&du(t,n),Ds(t)):du(Le,n.stateNode));break;case 4:r=Le,i=Ft,Le=n.stateNode.containerInfo,Ft=!0,Tn(t,e,n),Le=r,Ft=i;break;case 0:case 11:case 14:case 15:if(!Ue&&(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)&&Vc(n,e,o),i=i.next}while(i!==r)}Tn(t,e,n);break;case 1:if(!Ue&&(Qr(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){_e(n,e,a)}Tn(t,e,n);break;case 21:Tn(t,e,n);break;case 22:n.mode&1?(Ue=(r=Ue)||n.memoizedState!==null,Tn(t,e,n),Ue=r):Tn(t,e,n);break;default:Tn(t,e,n)}}function ug(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new mk),e.forEach(function(r){var i=bk.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Nt(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Le=a.stateNode,Ft=!1;break e;case 3:Le=a.stateNode.containerInfo,Ft=!0;break e;case 4:Le=a.stateNode.containerInfo,Ft=!0;break e}a=a.return}if(Le===null)throw Error(I(160));q0(s,o,i),Le=null,Ft=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){_e(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)Y0(e,t),e=e.sibling}function Y0(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Nt(e,t),Gt(t),r&4){try{xs(3,t,t.return),xl(3,t)}catch(m){_e(t,t.return,m)}try{xs(5,t,t.return)}catch(m){_e(t,t.return,m)}}break;case 1:Nt(e,t),Gt(t),r&512&&n!==null&&Qr(n,n.return);break;case 5:if(Nt(e,t),Gt(t),r&512&&n!==null&&Qr(n,n.return),t.flags&32){var i=t.stateNode;try{Is(i,"")}catch(m){_e(t,t.return,m)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&vy(i,s),hc(a,o);var u=hc(a,s);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?Sy(i,d):c==="dangerouslySetInnerHTML"?wy(i,d):c==="children"?Is(i,d):df(i,c,d,u)}switch(a){case"input":lc(i,s);break;case"textarea":yy(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?oi(i,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?oi(i,!!s.multiple,s.defaultValue,!0):oi(i,!!s.multiple,s.multiple?[]:"",!1))}i[Bs]=s}catch(m){_e(t,t.return,m)}}break;case 6:if(Nt(e,t),Gt(t),r&4){if(t.stateNode===null)throw Error(I(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(m){_e(t,t.return,m)}}break;case 3:if(Nt(e,t),Gt(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ds(e.containerInfo)}catch(m){_e(t,t.return,m)}break;case 4:Nt(e,t),Gt(t);break;case 13:Nt(e,t),Gt(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Hf=ke())),r&4&&ug(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(Ue=(u=Ue)||c,Nt(e,t),Ue=u):Nt(e,t),Gt(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(B=t,c=t.child;c!==null;){for(d=B=c;B!==null;){switch(f=B,h=f.child,f.tag){case 0:case 11:case 14:case 15:xs(4,f,f.return);break;case 1:Qr(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){r=f,n=f.return;try{e=r,y.props=e.memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(m){_e(r,n,m)}}break;case 5:Qr(f,f.return);break;case 22:if(f.memoizedState!==null){dg(d);continue}}h!==null?(h.return=f,B=h):dg(d)}c=c.sibling}e:for(c=null,d=t;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=xy("display",o))}catch(m){_e(t,t.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){_e(t,t.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Nt(e,t),Gt(t),r&4&&ug(t);break;case 21:break;default:Nt(e,t),Gt(t)}}function Gt(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(G0(n)){var r=n;break e}n=n.return}throw Error(I(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Is(i,""),r.flags&=-33);var s=lg(t);Uc(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=lg(t);zc(t,a,o);break;default:throw Error(I(161))}}catch(l){_e(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function yk(t,e,n){B=t,X0(t)}function X0(t,e,n){for(var r=(t.mode&1)!==0;B!==null;){var i=B,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Ro;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||Ue;a=Ro;var u=Ue;if(Ro=o,(Ue=l)&&!u)for(B=i;B!==null;)o=B,l=o.child,o.tag===22&&o.memoizedState!==null?fg(i):l!==null?(l.return=o,B=l):fg(i);for(;s!==null;)B=s,X0(s),s=s.sibling;B=i,Ro=a,Ue=u}cg(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,B=s):cg(t)}}function cg(t){for(;B!==null;){var e=B;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ue||xl(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Ue)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Ot(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&qp(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}qp(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Ds(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}Ue||e.flags&512&&Bc(e)}catch(f){_e(e,e.return,f)}}if(e===t){B=null;break}if(n=e.sibling,n!==null){n.return=e.return,B=n;break}B=e.return}}function dg(t){for(;B!==null;){var e=B;if(e===t){B=null;break}var n=e.sibling;if(n!==null){n.return=e.return,B=n;break}B=e.return}}function fg(t){for(;B!==null;){var e=B;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{xl(4,e)}catch(l){_e(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(l){_e(e,i,l)}}var s=e.return;try{Bc(e)}catch(l){_e(e,s,l)}break;case 5:var o=e.return;try{Bc(e)}catch(l){_e(e,o,l)}}}catch(l){_e(e,e.return,l)}if(e===t){B=null;break}var a=e.sibling;if(a!==null){a.return=e.return,B=a;break}B=e.return}}var _k=Math.ceil,La=Cn.ReactCurrentDispatcher,zf=Cn.ReactCurrentOwner,bt=Cn.ReactCurrentBatchConfig,Q=0,Ne=null,be=null,$e=0,ht=0,Zr=nr(0),Ae=0,Gs=null,Pr=0,Sl=0,Uf=0,Ss=null,it=null,Hf=0,xi=1/0,ln=null,Oa=!1,Hc=null,Wn=null,Mo=!1,Fn=null,Da=0,Es=0,Wc=null,sa=-1,oa=0;function Je(){return Q&6?ke():sa!==-1?sa:sa=ke()}function Kn(t){return t.mode&1?Q&2&&$e!==0?$e&-$e:nk.transition!==null?(oa===0&&(oa=Ly()),oa):(t=te,t!==0||(t=window.event,t=t===void 0?16:By(t.type)),t):1}function zt(t,e,n,r){if(50<Es)throw Es=0,Wc=null,Error(I(185));oo(t,n,r),(!(Q&2)||t!==Ne)&&(t===Ne&&(!(Q&2)&&(Sl|=n),Ae===4&&Dn(t,$e)),ft(t,r),n===1&&Q===0&&!(e.mode&1)&&(xi=ke()+500,yl&&rr()))}function ft(t,e){var n=t.callbackNode;nE(t,e);var r=_a(t,t===Ne?$e:0);if(r===0)n!==null&&xp(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&xp(n),e===1)t.tag===0?tk(hg.bind(null,t)):o0(hg.bind(null,t)),QE(function(){!(Q&6)&&rr()}),n=null;else{switch(Oy(r)){case 1:n=mf;break;case 4:n=Iy;break;case 16:n=ya;break;case 536870912:n=Ny;break;default:n=ya}n=i_(n,Q0.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function Q0(t,e){if(sa=-1,oa=0,Q&6)throw Error(I(327));var n=t.callbackNode;if(di()&&t.callbackNode!==n)return null;var r=_a(t,t===Ne?$e:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=$a(t,r);else{e=r;var i=Q;Q|=2;var s=J0();(Ne!==t||$e!==e)&&(ln=null,xi=ke()+500,wr(t,e));do try{Sk();break}catch(a){Z0(t,a)}while(!0);Af(),La.current=s,Q=i,be!==null?e=0:(Ne=null,$e=0,e=Ae)}if(e!==0){if(e===2&&(i=yc(t),i!==0&&(r=i,e=Kc(t,i))),e===1)throw n=Gs,wr(t,0),Dn(t,r),ft(t,ke()),n;if(e===6)Dn(t,r);else{if(i=t.current.alternate,!(r&30)&&!wk(i)&&(e=$a(t,r),e===2&&(s=yc(t),s!==0&&(r=s,e=Kc(t,s))),e===1))throw n=Gs,wr(t,0),Dn(t,r),ft(t,ke()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(I(345));case 2:dr(t,it,ln);break;case 3:if(Dn(t,r),(r&130023424)===r&&(e=Hf+500-ke(),10<e)){if(_a(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){Je(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=bc(dr.bind(null,t,it,ln),e);break}dr(t,it,ln);break;case 4:if(Dn(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-Bt(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=ke()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_k(r/1960))-r,10<r){t.timeoutHandle=bc(dr.bind(null,t,it,ln),r);break}dr(t,it,ln);break;case 5:dr(t,it,ln);break;default:throw Error(I(329))}}}return ft(t,ke()),t.callbackNode===n?Q0.bind(null,t):null}function Kc(t,e){var n=Ss;return t.current.memoizedState.isDehydrated&&(wr(t,e).flags|=256),t=$a(t,e),t!==2&&(e=it,it=n,e!==null&&Gc(e)),t}function Gc(t){it===null?it=t:it.push.apply(it,t)}function wk(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Ut(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Dn(t,e){for(e&=~Uf,e&=~Sl,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Bt(e),r=1<<n;t[n]=-1,e&=~r}}function hg(t){if(Q&6)throw Error(I(327));di();var e=_a(t,0);if(!(e&1))return ft(t,ke()),null;var n=$a(t,e);if(t.tag!==0&&n===2){var r=yc(t);r!==0&&(e=r,n=Kc(t,r))}if(n===1)throw n=Gs,wr(t,0),Dn(t,e),ft(t,ke()),n;if(n===6)throw Error(I(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,dr(t,it,ln),ft(t,ke()),null}function Wf(t,e){var n=Q;Q|=1;try{return t(e)}finally{Q=n,Q===0&&(xi=ke()+500,yl&&rr())}}function Tr(t){Fn!==null&&Fn.tag===0&&!(Q&6)&&di();var e=Q;Q|=1;var n=bt.transition,r=te;try{if(bt.transition=null,te=1,t)return t()}finally{te=r,bt.transition=n,Q=e,!(Q&6)&&rr()}}function Kf(){ht=Zr.current,le(Zr)}function wr(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,XE(n)),be!==null)for(n=be.return;n!==null;){var r=n;switch(bf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ka();break;case 3:_i(),le(ct),le(qe),Of();break;case 5:Lf(r);break;case 4:_i();break;case 13:le(fe);break;case 19:le(fe);break;case 10:Rf(r.type._context);break;case 22:case 23:Kf()}n=n.return}if(Ne=t,be=t=Gn(t.current,null),$e=ht=e,Ae=0,Gs=null,Uf=Sl=Pr=0,it=Ss=null,mr!==null){for(e=0;e<mr.length;e++)if(n=mr[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}mr=null}return t}function Z0(t,e){do{var n=be;try{if(Af(),na.current=Na,Ia){for(var r=ge.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Ia=!1}if(br=0,Ie=Pe=ge=null,ws=!1,Hs=0,zf.current=null,n===null||n.return===null){Ae=1,Gs=e,be=null;break}e:{var s=t,o=n.return,a=n,l=e;if(e=$e,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=eg(o);if(h!==null){h.flags&=-257,tg(h,o,a,s,e),h.mode&1&&Jp(s,u,e),e=h,l=u;var y=e.updateQueue;if(y===null){var m=new Set;m.add(l),e.updateQueue=m}else y.add(l);break e}else{if(!(e&1)){Jp(s,u,e),Gf();break e}l=Error(I(426))}}else if(ce&&a.mode&1){var _=eg(o);if(_!==null){!(_.flags&65536)&&(_.flags|=256),tg(_,o,a,s,e),Pf(wi(l,a));break e}}s=l=wi(l,a),Ae!==4&&(Ae=2),Ss===null?Ss=[s]:Ss.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var p=O0(s,l,e);Gp(s,p);break e;case 1:a=l;var g=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Wn===null||!Wn.has(v)))){s.flags|=65536,e&=-e,s.lanes|=e;var w=D0(s,a,e);Gp(s,w);break e}}s=s.return}while(s!==null)}t_(n)}catch(S){e=S,be===n&&n!==null&&(be=n=n.return);continue}break}while(!0)}function J0(){var t=La.current;return La.current=Na,t===null?Na:t}function Gf(){(Ae===0||Ae===3||Ae===2)&&(Ae=4),Ne===null||!(Pr&268435455)&&!(Sl&268435455)||Dn(Ne,$e)}function $a(t,e){var n=Q;Q|=2;var r=J0();(Ne!==t||$e!==e)&&(ln=null,wr(t,e));do try{xk();break}catch(i){Z0(t,i)}while(!0);if(Af(),Q=n,La.current=r,be!==null)throw Error(I(261));return Ne=null,$e=0,Ae}function xk(){for(;be!==null;)e_(be)}function Sk(){for(;be!==null&&!GS();)e_(be)}function e_(t){var e=r_(t.alternate,t,ht);t.memoizedProps=t.pendingProps,e===null?t_(t):be=e,zf.current=null}function t_(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=gk(n,e),n!==null){n.flags&=32767,be=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ae=6,be=null;return}}else if(n=pk(n,e,ht),n!==null){be=n;return}if(e=e.sibling,e!==null){be=e;return}be=e=t}while(e!==null);Ae===0&&(Ae=5)}function dr(t,e,n){var r=te,i=bt.transition;try{bt.transition=null,te=1,Ek(t,e,n,r)}finally{bt.transition=i,te=r}return null}function Ek(t,e,n,r){do di();while(Fn!==null);if(Q&6)throw Error(I(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(I(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(rE(t,s),t===Ne&&(be=Ne=null,$e=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Mo||(Mo=!0,i_(ya,function(){return di(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=bt.transition,bt.transition=null;var o=te;te=1;var a=Q;Q|=4,zf.current=null,vk(t,n),Y0(n,t),UE(kc),wa=!!Ec,kc=Ec=null,t.current=n,yk(n),qS(),Q=a,te=o,bt.transition=s}else t.current=n;if(Mo&&(Mo=!1,Fn=t,Da=i),s=t.pendingLanes,s===0&&(Wn=null),QS(n.stateNode),ft(t,ke()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Oa)throw Oa=!1,t=Hc,Hc=null,t;return Da&1&&t.tag!==0&&di(),s=t.pendingLanes,s&1?t===Wc?Es++:(Es=0,Wc=t):Es=0,rr(),null}function di(){if(Fn!==null){var t=Oy(Da),e=bt.transition,n=te;try{if(bt.transition=null,te=16>t?16:t,Fn===null)var r=!1;else{if(t=Fn,Fn=null,Da=0,Q&6)throw Error(I(331));var i=Q;for(Q|=4,B=t.current;B!==null;){var s=B,o=s.child;if(B.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(B=u;B!==null;){var c=B;switch(c.tag){case 0:case 11:case 15:xs(8,c,s)}var d=c.child;if(d!==null)d.return=c,B=d;else for(;B!==null;){c=B;var f=c.sibling,h=c.return;if(K0(c),c===u){B=null;break}if(f!==null){f.return=h,B=f;break}B=h}}}var y=s.alternate;if(y!==null){var m=y.child;if(m!==null){y.child=null;do{var _=m.sibling;m.sibling=null,m=_}while(m!==null)}}B=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,B=o;else e:for(;B!==null;){if(s=B,s.flags&2048)switch(s.tag){case 0:case 11:case 15:xs(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,B=p;break e}B=s.return}}var g=t.current;for(B=g;B!==null;){o=B;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,B=v;else e:for(o=g;B!==null;){if(a=B,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:xl(9,a)}}catch(S){_e(a,a.return,S)}if(a===o){B=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,B=w;break e}B=a.return}}if(Q=i,rr(),Zt&&typeof Zt.onPostCommitFiberRoot=="function")try{Zt.onPostCommitFiberRoot(hl,t)}catch{}r=!0}return r}finally{te=n,bt.transition=e}}return!1}function pg(t,e,n){e=wi(n,e),e=O0(t,e,1),t=Hn(t,e,1),e=Je(),t!==null&&(oo(t,1,e),ft(t,e))}function _e(t,e,n){if(t.tag===3)pg(t,t,n);else for(;e!==null;){if(e.tag===3){pg(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Wn===null||!Wn.has(r))){t=wi(n,t),t=D0(e,t,1),e=Hn(e,t,1),t=Je(),e!==null&&(oo(e,1,t),ft(e,t));break}}e=e.return}}function kk(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Je(),t.pingedLanes|=t.suspendedLanes&n,Ne===t&&($e&n)===n&&(Ae===4||Ae===3&&($e&130023424)===$e&&500>ke()-Hf?wr(t,0):Uf|=n),ft(t,e)}function n_(t,e){e===0&&(t.mode&1?(e=xo,xo<<=1,!(xo&130023424)&&(xo=4194304)):e=1);var n=Je();t=wn(t,e),t!==null&&(oo(t,e,n),ft(t,n))}function Ck(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),n_(t,n)}function bk(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(e),n_(t,n)}var r_;r_=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||ct.current)ot=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return ot=!1,hk(t,e,n);ot=!!(t.flags&131072)}else ot=!1,ce&&e.flags&1048576&&a0(e,Pa,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;ia(t,e),t=e.pendingProps;var i=mi(e,qe.current);ci(e,n),i=$f(null,e,r,t,i,n);var s=Ff();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,dt(r)?(s=!0,Ca(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,If(e),i.updater=wl,e.stateNode=i,i._reactInternals=e,Nc(e,r,t,n),e=Dc(null,e,r,!0,s,n)):(e.tag=0,ce&&s&&Cf(e),Xe(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(ia(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=Tk(r),t=Ot(r,t),i){case 0:e=Oc(null,e,r,t,n);break e;case 1:e=ig(null,e,r,t,n);break e;case 11:e=ng(null,e,r,t,n);break e;case 14:e=rg(null,e,r,Ot(r.type,t),n);break e}throw Error(I(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ot(r,i),Oc(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ot(r,i),ig(t,e,r,i,n);case 3:e:{if(V0(e),t===null)throw Error(I(387));r=e.pendingProps,s=e.memoizedState,i=s.element,h0(t,e),Ra(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=wi(Error(I(423)),e),e=sg(t,e,r,n,i);break e}else if(r!==i){i=wi(Error(I(424)),e),e=sg(t,e,r,n,i);break e}else for(pt=Un(e.stateNode.containerInfo.firstChild),vt=e,ce=!0,jt=null,n=d0(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vi(),r===i){e=xn(t,e,n);break e}Xe(t,e,r,n)}e=e.child}return e;case 5:return p0(e),t===null&&Rc(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,Cc(r,i)?o=null:s!==null&&Cc(r,s)&&(e.flags|=32),j0(t,e),Xe(t,e,o,n),e.child;case 6:return t===null&&Rc(e),null;case 13:return B0(t,e,n);case 4:return Nf(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=yi(e,null,r,n):Xe(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ot(r,i),ng(t,e,r,i,n);case 7:return Xe(t,e,e.pendingProps,n),e.child;case 8:return Xe(t,e,e.pendingProps.children,n),e.child;case 12:return Xe(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,ie(Ta,r._currentValue),r._currentValue=o,s!==null)if(Ut(s.value,o)){if(s.children===i.children&&!ct.current){e=xn(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=vn(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Mc(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(I(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Mc(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Xe(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,ci(e,n),i=Mt(i),r=r(i),e.flags|=1,Xe(t,e,r,n),e.child;case 14:return r=e.type,i=Ot(r,e.pendingProps),i=Ot(r.type,i),rg(t,e,r,i,n);case 15:return $0(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ot(r,i),ia(t,e),e.tag=1,dt(r)?(t=!0,Ca(e)):t=!1,ci(e,n),L0(e,r,i),Nc(e,r,i,n),Dc(null,e,r,!0,t,n);case 19:return z0(t,e,n);case 22:return F0(t,e,n)}throw Error(I(156,e.tag))};function i_(t,e){return My(t,e)}function Pk(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ct(t,e,n,r){return new Pk(t,e,n,r)}function qf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Tk(t){if(typeof t=="function")return qf(t)?1:0;if(t!=null){if(t=t.$$typeof,t===hf)return 11;if(t===pf)return 14}return 2}function Gn(t,e){var n=t.alternate;return n===null?(n=Ct(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function aa(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")qf(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case zr:return xr(n.children,i,s,e);case ff:o=8,i|=8;break;case rc:return t=Ct(12,n,e,i|2),t.elementType=rc,t.lanes=s,t;case ic:return t=Ct(13,n,e,i),t.elementType=ic,t.lanes=s,t;case sc:return t=Ct(19,n,e,i),t.elementType=sc,t.lanes=s,t;case py:return El(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case fy:o=10;break e;case hy:o=9;break e;case hf:o=11;break e;case pf:o=14;break e;case Nn:o=16,r=null;break e}throw Error(I(130,t==null?t:typeof t,""))}return e=Ct(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function xr(t,e,n,r){return t=Ct(7,t,r,e),t.lanes=n,t}function El(t,e,n,r){return t=Ct(22,t,r,e),t.elementType=py,t.lanes=n,t.stateNode={isHidden:!1},t}function _u(t,e,n){return t=Ct(6,t,null,e),t.lanes=n,t}function wu(t,e,n){return e=Ct(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Ak(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=eu(0),this.expirationTimes=eu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eu(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Yf(t,e,n,r,i,s,o,a,l){return t=new Ak(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Ct(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},If(s),t}function Rk(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Br,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function s_(t){if(!t)return Qn;t=t._reactInternals;e:{if(Or(t)!==t||t.tag!==1)throw Error(I(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(dt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(I(171))}if(t.tag===1){var n=t.type;if(dt(n))return s0(t,n,e)}return e}function o_(t,e,n,r,i,s,o,a,l){return t=Yf(n,r,!0,t,i,s,o,a,l),t.context=s_(null),n=t.current,r=Je(),i=Kn(n),s=vn(r,i),s.callback=e??null,Hn(n,s,i),t.current.lanes=i,oo(t,i,r),ft(t,r),t}function kl(t,e,n,r){var i=e.current,s=Je(),o=Kn(i);return n=s_(n),e.context===null?e.context=n:e.pendingContext=n,e=vn(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Hn(i,e,o),t!==null&&(zt(t,i,o,s),ta(t,i,o)),o}function Fa(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function gg(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Xf(t,e){gg(t,e),(t=t.alternate)&&gg(t,e)}function Mk(){return null}var a_=typeof reportError=="function"?reportError:function(t){console.error(t)};function Qf(t){this._internalRoot=t}Cl.prototype.render=Qf.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(I(409));kl(t,e,null,null)};Cl.prototype.unmount=Qf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Tr(function(){kl(null,t,null,null)}),e[_n]=null}};function Cl(t){this._internalRoot=t}Cl.prototype.unstable_scheduleHydration=function(t){if(t){var e=Fy();t={blockedOn:null,target:t,priority:e};for(var n=0;n<On.length&&e!==0&&e<On[n].priority;n++);On.splice(n,0,t),n===0&&Vy(t)}};function Zf(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function bl(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function mg(){}function Ik(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Fa(o);s.call(u)}}var o=o_(e,r,t,0,null,!1,!1,"",mg);return t._reactRootContainer=o,t[_n]=o.current,js(t.nodeType===8?t.parentNode:t),Tr(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=Fa(l);a.call(u)}}var l=Yf(t,0,!1,null,null,!1,!1,"",mg);return t._reactRootContainer=l,t[_n]=l.current,js(t.nodeType===8?t.parentNode:t),Tr(function(){kl(e,l,n,r)}),l}function Pl(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=Fa(o);a.call(l)}}kl(e,o,t,i)}else o=Ik(n,e,t,i,r);return Fa(o)}Dy=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=ns(e.pendingLanes);n!==0&&(vf(e,n|1),ft(e,ke()),!(Q&6)&&(xi=ke()+500,rr()))}break;case 13:Tr(function(){var r=wn(t,1);if(r!==null){var i=Je();zt(r,t,1,i)}}),Xf(t,1)}};yf=function(t){if(t.tag===13){var e=wn(t,134217728);if(e!==null){var n=Je();zt(e,t,134217728,n)}Xf(t,134217728)}};$y=function(t){if(t.tag===13){var e=Kn(t),n=wn(t,e);if(n!==null){var r=Je();zt(n,t,e,r)}Xf(t,e)}};Fy=function(){return te};jy=function(t,e){var n=te;try{return te=t,e()}finally{te=n}};gc=function(t,e,n){switch(e){case"input":if(lc(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=vl(r);if(!i)throw Error(I(90));my(r),lc(r,i)}}}break;case"textarea":yy(t,n);break;case"select":e=n.value,e!=null&&oi(t,!!n.multiple,e,!1)}};Cy=Wf;by=Tr;var Nk={usingClientEntryPoint:!1,Events:[lo,Kr,vl,Ey,ky,Wf]},Hi={findFiberByHostInstance:gr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Lk={bundleType:Hi.bundleType,version:Hi.version,rendererPackageName:Hi.rendererPackageName,rendererConfig:Hi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Cn.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Ay(t),t===null?null:t.stateNode},findFiberByHostInstance:Hi.findFiberByHostInstance||Mk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Io=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Io.isDisabled&&Io.supportsFiber)try{hl=Io.inject(Lk),Zt=Io}catch{}}_t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Nk;_t.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Zf(e))throw Error(I(200));return Rk(t,e,null,n)};_t.createRoot=function(t,e){if(!Zf(t))throw Error(I(299));var n=!1,r="",i=a_;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=Yf(t,1,!1,null,null,n,!1,r,i),t[_n]=e.current,js(t.nodeType===8?t.parentNode:t),new Qf(e)};_t.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(I(188)):(t=Object.keys(t).join(","),Error(I(268,t)));return t=Ay(e),t=t===null?null:t.stateNode,t};_t.flushSync=function(t){return Tr(t)};_t.hydrate=function(t,e,n){if(!bl(e))throw Error(I(200));return Pl(null,t,e,!0,n)};_t.hydrateRoot=function(t,e,n){if(!Zf(t))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=a_;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=o_(e,null,t,1,n??null,i,!1,s,o),t[_n]=e.current,js(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new Cl(e)};_t.render=function(t,e,n){if(!bl(e))throw Error(I(200));return Pl(null,t,e,!1,n)};_t.unmountComponentAtNode=function(t){if(!bl(t))throw Error(I(40));return t._reactRootContainer?(Tr(function(){Pl(null,null,t,!1,function(){t._reactRootContainer=null,t[_n]=null})}),!0):!1};_t.unstable_batchedUpdates=Wf;_t.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!bl(n))throw Error(I(200));if(t==null||t._reactInternals===void 0)throw Error(I(38));return Pl(t,e,n,!1,r)};_t.version="18.3.1-next-f1338f8080-20240426";function l_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l_)}catch(t){console.error(t)}}l_(),ly.exports=_t;var Tl=ly.exports;const Ok=rf(Tl);var vg=Tl;tc.createRoot=vg.createRoot,tc.hydrateRoot=vg.hydrateRoot;const u_=x.createContext({});function Dk(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const Jf=typeof window<"u",$k=Jf?x.useLayoutEffect:x.useEffect,eh=x.createContext(null);function th(t,e){t.indexOf(e)===-1&&t.push(e)}function nh(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Sn=(t,e,n)=>n>e?e:n<t?t:n;let rh=()=>{};const En={},c_=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function d_(t){return typeof t=="object"&&t!==null}const f_=t=>/^0[^.\s]+$/u.test(t);function ih(t){let e;return()=>(e===void 0&&(e=t()),e)}const Pt=t=>t,Fk=(t,e)=>n=>e(t(n)),co=(...t)=>t.reduce(Fk),qs=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class sh{constructor(){this.subscriptions=[]}add(e){return th(this.subscriptions,e),()=>nh(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const en=t=>t*1e3,tn=t=>t/1e3;function h_(t,e){return e?t*(1e3/e):0}const p_=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,jk=1e-7,Vk=12;function Bk(t,e,n,r,i){let s,o,a=0;do o=e+(n-e)/2,s=p_(o,r,i)-t,s>0?n=o:e=o;while(Math.abs(s)>jk&&++a<Vk);return o}function fo(t,e,n,r){if(t===e&&n===r)return Pt;const i=s=>Bk(s,0,1,t,n);return s=>s===0||s===1?s:p_(i(s),e,r)}const g_=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,m_=t=>e=>1-t(1-e),v_=fo(.33,1.53,.69,.99),oh=m_(v_),y_=g_(oh),__=t=>(t*=2)<1?.5*oh(t):.5*(2-Math.pow(2,-10*(t-1))),ah=t=>1-Math.sin(Math.acos(t)),w_=m_(ah),x_=g_(ah),zk=fo(.42,0,1,1),Uk=fo(0,0,.58,1),S_=fo(.42,0,.58,1),Hk=t=>Array.isArray(t)&&typeof t[0]!="number",E_=t=>Array.isArray(t)&&typeof t[0]=="number",Wk={linear:Pt,easeIn:zk,easeInOut:S_,easeOut:Uk,circIn:ah,circInOut:x_,circOut:w_,backIn:oh,backInOut:y_,backOut:v_,anticipate:__},Kk=t=>typeof t=="string",yg=t=>{if(E_(t)){rh(t.length===4);const[e,n,r,i]=t;return fo(e,n,r,i)}else if(Kk(t))return Wk[t];return t},No=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Gk(t,e){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const y=f&&i?n:r;return d&&o.add(c),y.has(c)||y.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),n.clear(),i=!1,s&&(s=!1,u.process(c))}};return u}const qk=40;function k_(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=No.reduce((v,w)=>(v[w]=Gk(s),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:y}=o,m=()=>{const v=En.useManualTiming?i.timestamp:performance.now();n=!1,En.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(v-i.timestamp,qk),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),f.process(i),h.process(i),y.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(m))},_=()=>{n=!0,r=!0,i.isProcessing||t(m)};return{schedule:No.reduce((v,w)=>{const S=o[w];return v[w]=(A,P=!1,E=!1)=>(n||_(),S.schedule(A,P,E)),v},{}),cancel:v=>{for(let w=0;w<No.length;w++)o[No[w]].cancel(v)},state:i,steps:o}}const{schedule:de,cancel:Zn,state:Oe,steps:xu}=k_(typeof requestAnimationFrame<"u"?requestAnimationFrame:Pt,!0);let la;function Yk(){la=void 0}const at={now:()=>(la===void 0&&at.set(Oe.isProcessing||En.useManualTiming?Oe.timestamp:performance.now()),la),set:t=>{la=t,queueMicrotask(Yk)}},C_=t=>e=>typeof e=="string"&&e.startsWith(t),lh=C_("--"),Xk=C_("var(--"),uh=t=>Xk(t)?Qk.test(t.split("/*")[0].trim()):!1,Qk=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Li={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ys={...Li,transform:t=>Sn(0,1,t)},Lo={...Li,default:1},ks=t=>Math.round(t*1e5)/1e5,ch=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Zk(t){return t==null}const Jk=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,dh=(t,e)=>n=>!!(typeof n=="string"&&Jk.test(n)&&n.startsWith(t)||e&&!Zk(n)&&Object.prototype.hasOwnProperty.call(n,e)),b_=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(ch);return{[t]:parseFloat(i),[e]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},eC=t=>Sn(0,255,t),Su={...Li,transform:t=>Math.round(eC(t))},yr={test:dh("rgb","red"),parse:b_("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Su.transform(t)+", "+Su.transform(e)+", "+Su.transform(n)+", "+ks(Ys.transform(r))+")"};function tC(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const qc={test:dh("#"),parse:tC,transform:yr.transform},ho=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Mn=ho("deg"),nn=ho("%"),W=ho("px"),nC=ho("vh"),rC=ho("vw"),_g={...nn,parse:t=>nn.parse(t)/100,transform:t=>nn.transform(t*100)},Jr={test:dh("hsl","hue"),parse:b_("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+nn.transform(ks(e))+", "+nn.transform(ks(n))+", "+ks(Ys.transform(r))+")"},Ce={test:t=>yr.test(t)||qc.test(t)||Jr.test(t),parse:t=>yr.test(t)?yr.parse(t):Jr.test(t)?Jr.parse(t):qc.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?yr.transform(t):Jr.transform(t),getAnimatableNone:t=>{const e=Ce.parse(t);return e.alpha=0,Ce.transform(e)}},iC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function sC(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ch))==null?void 0:e.length)||0)+(((n=t.match(iC))==null?void 0:n.length)||0)>0}const P_="number",T_="color",oC="var",aC="var(",wg="${}",lC=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Xs(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=e.replace(lC,l=>(Ce.test(l)?(r.color.push(s),i.push(T_),n.push(Ce.parse(l))):l.startsWith(aC)?(r.var.push(s),i.push(oC),n.push(l)):(r.number.push(s),i.push(P_),n.push(parseFloat(l))),++s,wg)).split(wg);return{values:n,split:a,indexes:r,types:i}}function A_(t){return Xs(t).values}function R_(t){const{split:e,types:n}=Xs(t),r=e.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=e[o],i[o]!==void 0){const a=n[o];a===P_?s+=ks(i[o]):a===T_?s+=Ce.transform(i[o]):s+=i[o]}return s}}const uC=t=>typeof t=="number"?0:Ce.test(t)?Ce.getAnimatableNone(t):t;function cC(t){const e=A_(t);return R_(t)(e.map(uC))}const Jn={test:sC,parse:A_,createTransformer:R_,getAnimatableNone:cC};function Eu(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function dC({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,s=0,o=0;if(!e)i=s=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Eu(l,a,t+1/3),s=Eu(l,a,t),o=Eu(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function ja(t,e){return n=>n>0?e:t}const he=(t,e,n)=>t+(e-t)*n,ku=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},fC=[qc,yr,Jr],hC=t=>fC.find(e=>e.test(t));function xg(t){const e=hC(t);if(!e)return!1;let n=e.parse(t);return e===Jr&&(n=dC(n)),n}const Sg=(t,e)=>{const n=xg(t),r=xg(e);if(!n||!r)return ja(t,e);const i={...n};return s=>(i.red=ku(n.red,r.red,s),i.green=ku(n.green,r.green,s),i.blue=ku(n.blue,r.blue,s),i.alpha=he(n.alpha,r.alpha,s),yr.transform(i))},Yc=new Set(["none","hidden"]);function pC(t,e){return Yc.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function gC(t,e){return n=>he(t,e,n)}function fh(t){return typeof t=="number"?gC:typeof t=="string"?uh(t)?ja:Ce.test(t)?Sg:yC:Array.isArray(t)?M_:typeof t=="object"?Ce.test(t)?Sg:mC:ja}function M_(t,e){const n=[...t],r=n.length,i=t.map((s,o)=>fh(s)(s,e[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function mC(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=fh(t[i])(t[i],e[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function vC(t,e){const n=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],o=t.indexes[s][r[s]],a=t.values[o]??0;n[i]=a,r[s]++}return n}const yC=(t,e)=>{const n=Jn.createTransformer(e),r=Xs(t),i=Xs(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Yc.has(t)&&!i.values.length||Yc.has(e)&&!r.values.length?pC(t,e):co(M_(vC(r,i),i.values),n):ja(t,e)};function I_(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?he(t,e,n):fh(t)(t,e)}const _C=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>de.update(e,n),stop:()=>Zn(e),now:()=>Oe.isProcessing?Oe.timestamp:at.now()}},N_=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let s=0;s<i;s++)r+=Math.round(t(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Va=2e4;function hh(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Va;)e+=n,r=t.next(e);return e>=Va?1/0:e}function wC(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(hh(r),Va);return{type:"keyframes",ease:s=>r.next(i*s).value/e,duration:tn(i)}}const xC=5;function L_(t,e,n){const r=Math.max(e-xC,0);return h_(n-t(r),e-r)}const ye={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Cu=.001;function SC({duration:t=ye.duration,bounce:e=ye.bounce,velocity:n=ye.velocity,mass:r=ye.mass}){let i,s,o=1-e;o=Sn(ye.minDamping,ye.maxDamping,o),t=Sn(ye.minDuration,ye.maxDuration,tn(t)),o<1?(i=u=>{const c=u*o,d=c*t,f=c-n,h=Xc(u,o),y=Math.exp(-d);return Cu-f/h*y},s=u=>{const d=u*o*t,f=d*n+n,h=Math.pow(o,2)*Math.pow(u,2)*t,y=Math.exp(-d),m=Xc(Math.pow(u,2),o);return(-i(u)+Cu>0?-1:1)*((f-h)*y)/m}):(i=u=>{const c=Math.exp(-u*t),d=(u-n)*t+1;return-Cu+c*d},s=u=>{const c=Math.exp(-u*t),d=(n-u)*(t*t);return c*d});const a=5/t,l=kC(i,s,a);if(t=en(t),isNaN(l))return{stiffness:ye.stiffness,damping:ye.damping,duration:t};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:t}}}const EC=12;function kC(t,e,n){let r=n;for(let i=1;i<EC;i++)r=r-t(r)/e(r);return r}function Xc(t,e){return t*Math.sqrt(1-e*e)}const CC=["duration","bounce"],bC=["stiffness","damping","mass"];function Eg(t,e){return e.some(n=>t[n]!==void 0)}function PC(t){let e={velocity:ye.velocity,stiffness:ye.stiffness,damping:ye.damping,mass:ye.mass,isResolvedFromDuration:!1,...t};if(!Eg(t,bC)&&Eg(t,CC))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Sn(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:ye.mass,stiffness:i,damping:s}}else{const n=SC(t);e={...e,...n,mass:ye.mass},e.isResolvedFromDuration=!0}return e}function Ba(t=ye.visualDuration,e=ye.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=PC({...n,velocity:-tn(n.velocity||0)}),y=f||0,m=u/(2*Math.sqrt(l*c)),_=o-s,p=tn(Math.sqrt(l/c)),g=Math.abs(_)<5;r||(r=g?ye.restSpeed.granular:ye.restSpeed.default),i||(i=g?ye.restDelta.granular:ye.restDelta.default);let v;if(m<1){const S=Xc(p,m);v=A=>{const P=Math.exp(-m*p*A);return o-P*((y+m*p*_)/S*Math.sin(S*A)+_*Math.cos(S*A))}}else if(m===1)v=S=>o-Math.exp(-p*S)*(_+(y+p*_)*S);else{const S=p*Math.sqrt(m*m-1);v=A=>{const P=Math.exp(-m*p*A),E=Math.min(S*A,300);return o-P*((y+m*p*_)*Math.sinh(E)+S*_*Math.cosh(E))/S}}const w={calculatedDuration:h&&d||null,next:S=>{const A=v(S);if(h)a.done=S>=d;else{let P=S===0?y:0;m<1&&(P=S===0?en(y):L_(v,S,A));const E=Math.abs(P)<=r,k=Math.abs(o-A)<=i;a.done=E&&k}return a.value=a.done?o:A,a},toString:()=>{const S=Math.min(hh(w),Va),A=N_(P=>w.next(S*P).value,S,30);return S+"ms "+A},toTransition:()=>{}};return w}Ba.applyToOptions=t=>{const e=wC(t,100,Ba);return t.ease=e.ease,t.duration=en(e.duration),t.type="keyframes",t};function Qc({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=t[0],f={done:!1,value:d},h=E=>a!==void 0&&E<a||l!==void 0&&E>l,y=E=>a===void 0?l:l===void 0||Math.abs(a-E)<Math.abs(l-E)?a:l;let m=n*e;const _=d+m,p=o===void 0?_:o(_);p!==_&&(m=p-d);const g=E=>-m*Math.exp(-E/r),v=E=>p+g(E),w=E=>{const k=g(E),b=v(E);f.done=Math.abs(k)<=u,f.value=f.done?p:b};let S,A;const P=E=>{h(f.value)&&(S=E,A=Ba({keyframes:[f.value,y(f.value)],velocity:L_(v,E,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return P(0),{calculatedDuration:null,next:E=>{let k=!1;return!A&&S===void 0&&(k=!0,w(E),P(E)),S!==void 0&&E>=S?A.next(E-S):(!k&&w(E),f)}}}function TC(t,e,n){const r=[],i=n||En.mix||I_,s=t.length-1;for(let o=0;o<s;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||Pt:e;a=co(l,a)}r.push(a)}return r}function AC(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const s=t.length;if(rh(s===e.length),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=TC(e,r,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(c<t[d+1]);d++);const f=qs(t[d],t[d+1],c);return a[d](f)};return n?c=>u(Sn(t[0],t[s-1],c)):u}function RC(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=qs(0,e,r);t.push(he(n,1,i))}}function MC(t){const e=[0];return RC(e,t.length-1),e}function IC(t,e){return t.map(n=>n*e)}function NC(t,e){return t.map(()=>e||S_).splice(0,t.length-1)}function Cs({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=Hk(r)?r.map(yg):yg(r),s={done:!1,value:e[0]},o=IC(n&&n.length===e.length?n:MC(e),t),a=AC(o,e,{ease:Array.isArray(i)?i:NC(e,i)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}const LC=t=>t!==null;function ph(t,{repeat:e,repeatType:n="loop"},r,i=1){const s=t.filter(LC),a=i<0||e&&n!=="loop"&&e%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const OC={decay:Qc,inertia:Qc,tween:Cs,keyframes:Cs,spring:Ba};function O_(t){typeof t.type=="string"&&(t.type=OC[t.type])}class gh{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const DC=t=>t/100;class mh extends gh{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==at.now()&&this.tick(at.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;O_(e);const{type:n=Cs,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Cs;l!==Cs&&typeof a[0]!="number"&&(this.mixKeyframes=co(DC,I_(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=hh(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:y,onUpdate:m,finalKeyframe:_}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,w=r;if(d){const E=Math.min(this.currentTime,i)/a;let k=Math.floor(E),b=E%1;!b&&E>=1&&(b=1),b===1&&k--,k=Math.min(k,d+1),!!(k%2)&&(f==="reverse"?(b=1-b,h&&(b-=h/a)):f==="mirror"&&(w=o)),v=Sn(0,1,b)*a}const S=g?{done:!1,value:c[0]}:w.next(v);s&&(S.value=s(S.value));let{done:A}=S;!g&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return P&&y!==Qc&&(S.value=ph(c,this.options,_,this.speed)),m&&m(S.value),P&&this.finish(),S}then(e,n){return this.finished.then(e,n)}get duration(){return tn(this.calculatedDuration)}get time(){return tn(this.currentTime)}set time(e){var n;e=en(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(at.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=tn(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:e=_C,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(at.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function $C(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const _r=t=>t*180/Math.PI,Zc=t=>{const e=_r(Math.atan2(t[1],t[0]));return Jc(e)},FC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Zc,rotateZ:Zc,skewX:t=>_r(Math.atan(t[1])),skewY:t=>_r(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Jc=t=>(t=t%360,t<0&&(t+=360),t),kg=Zc,Cg=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),bg=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),jC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Cg,scaleY:bg,scale:t=>(Cg(t)+bg(t))/2,rotateX:t=>Jc(_r(Math.atan2(t[6],t[5]))),rotateY:t=>Jc(_r(Math.atan2(-t[2],t[0]))),rotateZ:kg,rotate:kg,skewX:t=>_r(Math.atan(t[4])),skewY:t=>_r(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ed(t){return t.includes("scale")?1:0}function td(t,e){if(!t||t==="none")return ed(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=jC,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=FC,i=a}if(!i)return ed(e);const s=r[e],o=i[1].split(",").map(BC);return typeof s=="function"?s(o):o[s]}const VC=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return td(n,e)};function BC(t){return parseFloat(t.trim())}const Oi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Di=new Set(Oi),Pg=t=>t===Li||t===W,zC=new Set(["x","y","z"]),UC=Oi.filter(t=>!zC.has(t));function HC(t){const e=[];return UC.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Sr={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>td(e,"x"),y:(t,{transform:e})=>td(e,"y")};Sr.translateX=Sr.x;Sr.translateY=Sr.y;const Er=new Set;let nd=!1,rd=!1,id=!1;function D_(){if(rd){const t=Array.from(Er).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=HC(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}rd=!1,nd=!1,Er.forEach(t=>t.complete(id)),Er.clear()}function $_(){Er.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(rd=!0)})}function WC(){id=!0,$_(),D_(),id=!1}class vh{constructor(e,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Er.add(this),nd||(nd=!0,de.read($_),de.resolveKeyframes(D_))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;if(e[0]===null){const s=i==null?void 0:i.get(),o=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&n){const a=r.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&s===void 0&&i.set(e[0])}$C(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Er.delete(this)}cancel(){this.state==="scheduled"&&(Er.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const KC=t=>t.startsWith("--");function GC(t,e,n){KC(e)?t.style.setProperty(e,n):t.style[e]=n}const qC=ih(()=>window.ScrollTimeline!==void 0),YC={};function XC(t,e){const n=ih(t);return()=>YC[e]??n()}const F_=XC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),is=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Tg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:is([0,.65,.55,1]),circOut:is([.55,0,1,.45]),backIn:is([.31,.01,.66,-.59]),backOut:is([.33,1.53,.69,.99])};function j_(t,e){if(t)return typeof t=="function"?F_()?N_(t,e):"ease-out":E_(t)?is(t):Array.isArray(t)?t.map(n=>j_(n,e)||Tg.easeOut):Tg[t]}function QC(t,e,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const d=j_(a,i);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function V_(t){return typeof t=="function"&&"applyToOptions"in t}function ZC({type:t,...e}){return V_(t)&&F_()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class JC extends gh{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=e,rh(typeof e.type!="string");const u=ZC(e);this.animation=QC(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=ph(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):GC(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return tn(Number(e))}get time(){return tn(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=en(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&qC()?(this.animation.timeline=e,Pt):n(this)}}const B_={anticipate:__,backInOut:y_,circInOut:x_};function eb(t){return t in B_}function tb(t){typeof t.ease=="string"&&eb(t.ease)&&(t.ease=B_[t.ease])}const Ag=10;class nb extends JC{constructor(e){tb(e),O_(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new mh({...o,autoplay:!1}),l=en(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Ag).value,a.sample(l).value,Ag),a.stop()}}const Rg=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Jn.test(t)||t==="0")&&!t.startsWith("url("));function rb(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function ib(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const s=t[t.length-1],o=Rg(i,e),a=Rg(s,e);return!o||!a?!1:rb(t)||(n==="spring"||V_(n))&&r}function sd(t){t.duration=0,t.type}const sb=new Set(["opacity","clipPath","filter","transform"]),ob=ih(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ab(t){var c;const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:s,type:o}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return ob()&&n&&sb.has(n)&&(n!=="transform"||!u)&&!l&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const lb=40;class ub extends gh{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var y;super(),this.stop=()=>{var m,_;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(_=this.keyframeResolver)==null||_.cancel()},this.createdAt=at.now();const f={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:u,element:c,...d},h=(c==null?void 0:c.KeyframeResolver)||vh;this.keyframeResolver=new h(a,(m,_,p)=>this.onKeyframesResolved(m,_,f,!p),l,u,c),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(e,n,r,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=at.now(),ib(e,s,o,a)||((En.instantAnimations||!l)&&(c==null||c(ph(e,r,n))),e[0]=e[e.length-1],sd(r),r.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>lb?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},h=!u&&ab(f)?new nb({...f,element:f.motionValue.owner.current}):new mh(f);h.finished.then(()=>this.notifyFinished()).catch(Pt),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),WC()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const cb=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function db(t){const e=cb.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function z_(t,e,n=1){const[r,i]=db(t);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);if(s){const o=s.trim();return c_(o)?parseFloat(o):o}return uh(i)?z_(i,e,n+1):i}function yh(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const U_=new Set(["width","height","top","left","right","bottom",...Oi]),fb={test:t=>t==="auto",parse:t=>t},H_=t=>e=>e.test(t),W_=[Li,W,nn,Mn,rC,nC,fb],Mg=t=>W_.find(H_(t));function hb(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||f_(t):!0}const pb=new Set(["brightness","contrast","saturate","opacity"]);function gb(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(ch)||[];if(!r)return t;const i=n.replace(r,"");let s=pb.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+i+")"}const mb=/\b([a-z-]*)\(.*?\)/gu,od={...Jn,getAnimatableNone:t=>{const e=t.match(mb);return e?e.map(gb).join(" "):t}},Ig={...Li,transform:Math.round},vb={rotate:Mn,rotateX:Mn,rotateY:Mn,rotateZ:Mn,scale:Lo,scaleX:Lo,scaleY:Lo,scaleZ:Lo,skew:Mn,skewX:Mn,skewY:Mn,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:Ys,originX:_g,originY:_g,originZ:W},_h={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,backgroundPositionX:W,backgroundPositionY:W,...vb,zIndex:Ig,fillOpacity:Ys,strokeOpacity:Ys,numOctaves:Ig},yb={..._h,color:Ce,backgroundColor:Ce,outlineColor:Ce,fill:Ce,stroke:Ce,borderColor:Ce,borderTopColor:Ce,borderRightColor:Ce,borderBottomColor:Ce,borderLeftColor:Ce,filter:od,WebkitFilter:od},K_=t=>yb[t];function G_(t,e){let n=K_(t);return n!==od&&(n=Jn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const _b=new Set(["auto","none","0"]);function wb(t,e,n){let r=0,i;for(;r<t.length&&!i;){const s=t[r];typeof s=="string"&&!_b.has(s)&&Xs(s).values.length&&(i=t[r]),r++}if(i&&n)for(const s of e)t[s]=G_(n,i)}class xb extends vh{constructor(e,n,r,i,s){super(e,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),uh(u))){const c=z_(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!U_.has(r)||e.length!==2)return;const[i,s]=e,o=Mg(i),a=Mg(s);if(o!==a)if(Pg(o)&&Pg(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else Sr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||hb(e[i]))&&r.push(i);r.length&&wb(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Sr[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=Sr[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Sb(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let r=document;const i=(n==null?void 0:n[t])??r.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const q_=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Eb(t){return d_(t)&&"offsetHeight"in t}const Ng=30,kb=t=>!isNaN(parseFloat(t));class Cb{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=at.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=at.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=kb(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new sh);const r=this.events[e].add(n);return e==="change"?()=>{r(),de.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=at.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ng)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ng);return h_(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Si(t,e){return new Cb(t,e)}const{schedule:wh}=k_(queueMicrotask,!1),Lt={x:!1,y:!1};function Y_(){return Lt.x||Lt.y}function bb(t){return t==="x"||t==="y"?Lt[t]?null:(Lt[t]=!0,()=>{Lt[t]=!1}):Lt.x||Lt.y?null:(Lt.x=Lt.y=!0,()=>{Lt.x=Lt.y=!1})}function X_(t,e){const n=Sb(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function Lg(t){return!(t.pointerType==="touch"||Y_())}function Pb(t,e,n={}){const[r,i,s]=X_(t,n),o=a=>{if(!Lg(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=d=>{Lg(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Q_=(t,e)=>e?t===e?!0:Q_(t,e.parentElement):!1,xh=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Tb=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ab(t){return Tb.has(t.tagName)||t.tabIndex!==-1}const ua=new WeakSet;function Og(t){return e=>{e.key==="Enter"&&t(e)}}function bu(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Rb=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=Og(()=>{if(ua.has(n))return;bu(n,"down");const i=Og(()=>{bu(n,"up")}),s=()=>bu(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",s,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function Dg(t){return xh(t)&&!Y_()}function Mb(t,e,n={}){const[r,i,s]=X_(t,n),o=a=>{const l=a.currentTarget;if(!Dg(a))return;ua.add(l);const u=e(l,a),c=(h,y)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ua.has(l)&&ua.delete(l),Dg(h)&&typeof u=="function"&&u(h,{success:y})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||Q_(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Eb(a)&&(a.addEventListener("focus",u=>Rb(u,i)),!Ab(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Z_(t){return d_(t)&&"ownerSVGElement"in t}function Ib(t){return Z_(t)&&t.tagName==="svg"}const We=t=>!!(t&&t.getVelocity),Nb=[...W_,Ce,Jn],Lb=t=>Nb.find(H_(t)),J_=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Ob(t=!0){const e=x.useContext(eh);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,s=x.useId();x.useEffect(()=>{if(t)return i(s)},[t]);const o=x.useCallback(()=>t&&r&&r(s),[s,r,t]);return!n&&r?[!1,o]:[!0]}const ew=x.createContext({strict:!1}),$g={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ei={};for(const t in $g)Ei[t]={isEnabled:e=>$g[t].some(n=>!!e[n])};function Db(t){for(const e in t)Ei[e]={...Ei[e],...t[e]}}const $b=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function za(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||$b.has(t)}let tw=t=>!za(t);function Fb(t){typeof t=="function"&&(tw=e=>e.startsWith("on")?!za(e):t(e))}try{Fb(require("@emotion/is-prop-valid").default)}catch{}function jb(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(tw(i)||n===!0&&za(i)||!e&&!za(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const Al=x.createContext({});function Rl(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Qs(t){return typeof t=="string"||Array.isArray(t)}const Sh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Eh=["initial",...Sh];function Ml(t){return Rl(t.animate)||Eh.some(e=>Qs(t[e]))}function nw(t){return!!(Ml(t)||t.variants)}function Vb(t,e){if(Ml(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Qs(n)?n:void 0,animate:Qs(r)?r:void 0}}return t.inherit!==!1?e:{}}function Bb(t){const{initial:e,animate:n}=Vb(t,x.useContext(Al));return x.useMemo(()=>({initial:e,animate:n}),[Fg(e),Fg(n)])}function Fg(t){return Array.isArray(t)?t.join(" "):t}const Zs={};function zb(t){for(const e in t)Zs[e]=t[e],lh(e)&&(Zs[e].isCSSVariable=!0)}function rw(t,{layout:e,layoutId:n}){return Di.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Zs[t]||t==="opacity")}const Ub={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Hb=Oi.length;function Wb(t,e,n){let r="",i=!0;for(let s=0;s<Hb;s++){const o=Oi[s],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=q_(a,_h[o]);if(!l){i=!1;const c=Ub[o]||o;r+=`${c}(${u}) `}n&&(e[o]=u)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function kh(t,e,n){const{style:r,vars:i,transformOrigin:s}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(Di.has(l)){o=!0;continue}else if(lh(l)){i[l]=u;continue}else{const c=q_(u,_h[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(e.transform||(o||n?r.transform=Wb(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;r.transformOrigin=`${l} ${u} ${c}`}}const Ch=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function iw(t,e,n){for(const r in e)!We(e[r])&&!rw(r,n)&&(t[r]=e[r])}function Kb({transformTemplate:t},e){return x.useMemo(()=>{const n=Ch();return kh(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Gb(t,e){const n=t.style||{},r={};return iw(r,n,t),Object.assign(r,Kb(t,e)),r}function qb(t,e){const n={},r=Gb(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const Yb={offset:"stroke-dashoffset",array:"stroke-dasharray"},Xb={offset:"strokeDashoffset",array:"strokeDasharray"};function Qb(t,e,n=1,r=0,i=!0){t.pathLength=1;const s=i?Yb:Xb;t[s.offset]=W.transform(-r);const o=W.transform(e),a=W.transform(n);t[s.array]=`${o} ${a}`}function sw(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,c){if(kh(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:f}=t;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Qb(d,i,s,o,!1)}const ow=()=>({...Ch(),attrs:{}}),aw=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Zb(t,e,n,r){const i=x.useMemo(()=>{const s=ow();return sw(s,e,aw(r),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};iw(s,t.style,t),i.style={...s,...i.style}}return i}const Jb=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function bh(t){return typeof t!="string"||t.includes("-")?!1:!!(Jb.indexOf(t)>-1||/[A-Z]/u.test(t))}function eP(t,e,n,{latestValues:r},i,s=!1){const a=(bh(t)?Zb:qb)(e,r,i,t),l=jb(e,typeof t=="string",s),u=t!==x.Fragment?{...l,...a,ref:n}:{},{children:c}=e,d=x.useMemo(()=>We(c)?c.get():c,[c]);return x.createElement(t,{...u,children:d})}function jg(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Ph(t,e,n,r){if(typeof e=="function"){const[i,s]=jg(r);e=e(n!==void 0?n:t.custom,i,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,s]=jg(r);e=e(n!==void 0?n:t.custom,i,s)}return e}function ca(t){return We(t)?t.get():t}function tP({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:nP(n,r,i,t),renderState:e()}}function nP(t,e,n,r){const i={},s=r(t,{});for(const f in s)i[f]=ca(s[f]);let{initial:o,animate:a}=t;const l=Ml(t),u=nw(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!Rl(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const y=Ph(t,f[h]);if(y){const{transitionEnd:m,transition:_,...p}=y;for(const g in p){let v=p[g];if(Array.isArray(v)){const w=c?v.length-1:0;v=v[w]}v!==null&&(i[g]=v)}for(const g in m)i[g]=m[g]}}}return i}const lw=t=>(e,n)=>{const r=x.useContext(Al),i=x.useContext(eh),s=()=>tP(t,e,r,i);return n?s():Dk(s)};function Th(t,e,n){var s;const{style:r}=t,i={};for(const o in r)(We(r[o])||e.style&&We(e.style[o])||rw(o,t)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const rP=lw({scrapeMotionValuesFromProps:Th,createRenderState:Ch});function uw(t,e,n){const r=Th(t,e,n);for(const i in t)if(We(t[i])||We(e[i])){const s=Oi.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=t[i]}return r}const iP=lw({scrapeMotionValuesFromProps:uw,createRenderState:ow}),sP=Symbol.for("motionComponentSymbol");function ei(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function oP(t,e,n){const r=x.useRef(null);return x.useCallback(i=>{const s=r.current;r.current=i,i!==s&&(i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount())),n&&(typeof n=="function"?n(i):ei(n)&&(n.current=i))},[e,n])}const Ah=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),aP="framerAppearId",cw="data-"+Ah(aP),dw=x.createContext({});function lP(t,e,n,r,i){var m,_;const{visualElement:s}=x.useContext(Al),o=x.useContext(ew),a=x.useContext(eh),l=x.useContext(J_).reducedMotion,u=x.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(t,{visualState:e,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=x.useContext(dw);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&uP(u.current,n,i,d);const f=x.useRef(!1);x.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const h=n[cw],y=x.useRef(!!h&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,h))&&((_=window.MotionHasOptimisedAnimation)==null?void 0:_.call(window,h)));return $k(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),y.current&&c.animationState&&c.animationState.animateChanges())}),x.useEffect(()=>{c&&(!y.current&&c.animationState&&c.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),y.current=!1),c.enteringChildren=void 0)}),c}function uP(t,e,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:fw(t.parent)),t.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&ei(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function fw(t){if(t)return t.options.allowProjection!==!1?t.projection:fw(t.parent)}function Pu(t,{forwardMotionProps:e=!1}={},n,r){n&&Db(n);const i=bh(t)?iP:rP;function s(a,l){let u;const c={...x.useContext(J_),...a,layoutId:cP(a)},{isStatic:d}=c,f=Bb(a),h=i(a,d);if(!d&&Jf){dP();const y=fP(c);u=y.MeasureLayout,f.visualElement=lP(t,h,c,r,y.ProjectionNode)}return C.jsxs(Al.Provider,{value:f,children:[u&&f.visualElement?C.jsx(u,{visualElement:f.visualElement,...c}):null,eP(t,a,oP(h,f.visualElement,l),h,d,e)]})}s.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const o=x.forwardRef(s);return o[sP]=t,o}function cP({layoutId:t}){const e=x.useContext(u_).id;return e&&t!==void 0?e+"-"+t:t}function dP(t,e){x.useContext(ew).strict}function fP(t){const{drag:e,layout:n}=Ei;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function hP(t,e){if(typeof Proxy>"u")return Pu;const n=new Map,r=(s,o)=>Pu(s,o,t,e),i=(s,o)=>r(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?r:(n.has(o)||n.set(o,Pu(o,void 0,t,e)),n.get(o))})}function hw({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function pP({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function gP(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Tu(t){return t===void 0||t===1}function ad({scale:t,scaleX:e,scaleY:n}){return!Tu(t)||!Tu(e)||!Tu(n)}function fr(t){return ad(t)||pw(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function pw(t){return Vg(t.x)||Vg(t.y)}function Vg(t){return t&&t!=="0%"}function Ua(t,e,n){const r=t-n,i=e*r;return n+i}function Bg(t,e,n,r,i){return i!==void 0&&(t=Ua(t,i,r)),Ua(t,n,r)+e}function ld(t,e=0,n=1,r,i){t.min=Bg(t.min,e,n,r,i),t.max=Bg(t.max,e,n,r,i)}function gw(t,{x:e,y:n}){ld(t.x,e.translate,e.scale,e.originPoint),ld(t.y,n.translate,n.scale,n.originPoint)}const zg=.999999999999,Ug=1.0000000000001;function mP(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ni(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,gw(t,o)),r&&fr(s.latestValues)&&ni(t,s.latestValues))}e.x<Ug&&e.x>zg&&(e.x=1),e.y<Ug&&e.y>zg&&(e.y=1)}function ti(t,e){t.min=t.min+e,t.max=t.max+e}function Hg(t,e,n,r,i=.5){const s=he(t.min,t.max,i);ld(t,e,n,s,r)}function ni(t,e){Hg(t.x,e.x,e.scaleX,e.scale,e.originX),Hg(t.y,e.y,e.scaleY,e.scale,e.originY)}function mw(t,e){return hw(gP(t.getBoundingClientRect(),e))}function vP(t,e,n){const r=mw(t,n),{scroll:i}=e;return i&&(ti(r.x,i.offset.x),ti(r.y,i.offset.y)),r}const Wg=()=>({translate:0,scale:1,origin:0,originPoint:0}),ri=()=>({x:Wg(),y:Wg()}),Kg=()=>({min:0,max:0}),Se=()=>({x:Kg(),y:Kg()}),ud={current:null},vw={current:!1};function yP(){if(vw.current=!0,!!Jf)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ud.current=t.matches;t.addEventListener("change",e),e()}else ud.current=!1}const _P=new WeakMap;function wP(t,e,n){for(const r in e){const i=e[r],s=n[r];if(We(i))t.addValue(r,i);else if(We(s))t.addValue(r,Si(i,{owner:t}));else if(s!==i)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(r);t.addValue(r,Si(o!==void 0?o:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const Gg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class xP{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=vh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=at.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,de.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Ml(n),this.isVariantNode=nw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&We(h)&&h.set(l[f])}}mount(e){var n;this.current=e,_P.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),vw.current||yP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ud.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Zn(this.notifyUpdate),Zn(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=Di.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&de.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ei){const n=Ei[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Se()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Gg.length;r++){const i=Gg[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=e[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=wP(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Si(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(c_(r)||f_(r))?r=parseFloat(r):!Lb(r)&&Jn.test(n)&&(r=G_(e,n)),this.setBaseTarget(e,We(r)?r.get():r)),We(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Ph(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[e])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!We(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new sh),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){wh.render(this.render)}}class yw extends xP{constructor(){super(...arguments),this.KeyframeResolver=xb}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;We(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function _w(t,{style:e,vars:n},r,i){const s=t.style;let o;for(o in e)s[o]=e[o];i==null||i.applyProjectionStyles(s,r);for(o in n)s.setProperty(o,n[o])}function SP(t){return window.getComputedStyle(t)}class EP extends yw{constructor(){super(...arguments),this.type="html",this.renderInstance=_w}readValueFromInstance(e,n){var r;if(Di.has(n))return(r=this.projection)!=null&&r.isProjecting?ed(n):VC(e,n);{const i=SP(e),s=(lh(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return mw(e,n)}build(e,n,r){kh(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return Th(e,n,r)}}const ww=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function kP(t,e,n,r){_w(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(ww.has(i)?i:Ah(i),e.attrs[i])}class CP extends yw{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Se}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Di.has(n)){const r=K_(n);return r&&r.default||0}return n=ww.has(n)?n:Ah(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return uw(e,n,r)}build(e,n,r){sw(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){kP(e,n,r,i)}mount(e){this.isSVGTag=aw(e.tagName),super.mount(e)}}const bP=(t,e)=>bh(t)?new CP(e):new EP(e,{allowProjection:t!==x.Fragment});function fi(t,e,n){const r=t.getProps();return Ph(r,e,n!==void 0?n:r.custom,t)}const cd=t=>Array.isArray(t);function PP(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Si(n))}function TP(t){return cd(t)?t[t.length-1]||0:t}function AP(t,e){const n=fi(t,e);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=TP(s[o]);PP(t,o,a)}}function RP(t){return!!(We(t)&&t.add)}function dd(t,e){const n=t.getValue("willChange");if(RP(n))return n.add(e);if(!n&&En.WillChange){const r=new En.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function xw(t){return t.props[cw]}const MP=t=>t!==null;function IP(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(MP),s=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[s]}const NP={type:"spring",stiffness:500,damping:25,restSpeed:10},LP=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),OP={type:"keyframes",duration:.8},DP={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$P=(t,{keyframes:e})=>e.length>2?OP:Di.has(t)?t.startsWith("scale")?LP(e[1]):NP:DP;function FP({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Rh=(t,e,n,r={},i,s)=>o=>{const a=yh(r,t)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-en(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:i};FP(a)||Object.assign(c,$P(t,c)),c.duration&&(c.duration=en(c.duration)),c.repeatDelay&&(c.repeatDelay=en(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(sd(c),c.delay===0&&(d=!0)),(En.instantAnimations||En.skipAnimations)&&(d=!0,sd(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!s&&e.get()!==void 0){const f=IP(c.keyframes,a);if(f!==void 0){de.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new mh(c):new ub(c)};function jP({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Sw(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=t.getDefaultTransition(),transitionEnd:o,...a}=e;r&&(s=r);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const d=t.getValue(c,t.latestValues[c]??null),f=a[c];if(f===void 0||u&&jP(u,c))continue;const h={delay:n,...yh(s||{},c)},y=d.get();if(y!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===y&&!h.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const p=xw(t);if(p){const g=window.MotionHandoffAnimation(p,c,de);g!==null&&(h.startTime=g,m=!0)}}dd(t,c),d.start(Rh(c,d,f,t.shouldReduceMotion&&U_.has(c)?{type:!1}:h,t,m));const _=d.animation;_&&l.push(_)}return o&&Promise.all(l).then(()=>{de.update(()=>{o&&AP(t,o)})}),l}function Ew(t,e,n,r=0,i=1){const s=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}function fd(t,e,n={}){var l;const r=fi(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Sw(t,r,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return VP(t,e,u,c,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>c())}else return Promise.all([s(),o(n.delay)])}function VP(t,e,n=0,r=0,i=0,s=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(fd(l,e,{...o,delay:n+(typeof r=="function"?0:r)+Ew(t.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function BP(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(s=>fd(t,s,n));r=Promise.all(i)}else if(typeof e=="string")r=fd(t,e,n);else{const i=typeof e=="function"?fi(t,e,n.custom):e;r=Promise.all(Sw(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}function kw(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const zP=Eh.length;function Cw(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Cw(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<zP;n++){const r=Eh[n],i=t.props[r];(Qs(i)||i===!1)&&(e[r]=i)}return e}const UP=[...Sh].reverse(),HP=Sh.length;function WP(t){return e=>Promise.all(e.map(({animation:n,options:r})=>BP(t,n,r)))}function KP(t){let e=WP(t),n=qg(),r=!0;const i=l=>(u,c)=>{var f;const d=fi(t,c,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:y,...m}=d;u={...u,...m,...y}}return u};function s(l){e=l(t)}function o(l){const{props:u}=t,c=Cw(t.parent)||{},d=[],f=new Set;let h={},y=1/0;for(let _=0;_<HP;_++){const p=UP[_],g=n[p],v=u[p]!==void 0?u[p]:c[p],w=Qs(v),S=p===l?g.isActive:null;S===!1&&(y=_);let A=v===c[p]&&v!==u[p]&&w;if(A&&r&&t.manuallyAnimateOnMount&&(A=!1),g.protectedKeys={...h},!g.isActive&&S===null||!v&&!g.prevProp||Rl(v)||typeof v=="boolean")continue;const P=GP(g.prevProp,v);let E=P||p===l&&g.isActive&&!A&&w||_>y&&w,k=!1;const b=Array.isArray(v)?v:[v];let R=b.reduce(i(p),{});S===!1&&(R={});const{prevResolvedValues:N={}}=g,V={...N,...R},$=U=>{E=!0,f.has(U)&&(k=!0,f.delete(U)),g.needsAnimating[U]=!0;const M=t.getValue(U);M&&(M.liveStyle=!1)};for(const U in V){const M=R[U],O=N[U];if(h.hasOwnProperty(U))continue;let z=!1;cd(M)&&cd(O)?z=!kw(M,O):z=M!==O,z?M!=null?$(U):f.add(U):M!==void 0&&f.has(U)?$(U):g.protectedKeys[U]=!0}g.prevProp=v,g.prevResolvedValues=R,g.isActive&&(h={...h,...R}),r&&t.blockInitialAnimation&&(E=!1);const K=A&&P;E&&(!K||k)&&d.push(...b.map(U=>{const M={type:p};if(typeof U=="string"&&r&&!K&&t.manuallyAnimateOnMount&&t.parent){const{parent:O}=t,z=fi(O,U);if(O.enteringChildren&&z){const{delayChildren:Z}=z.transition||{};M.delay=Ew(O.enteringChildren,t,Z)}}return{animation:U,options:M}}))}if(f.size){const _={};if(typeof u.initial!="boolean"){const p=fi(t,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(_.transition=p.transition)}f.forEach(p=>{const g=t.getBaseTarget(p),v=t.getValue(p);v&&(v.liveStyle=!0),_[p]=g??null}),d.push({animation:_})}let m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(d):Promise.resolve()}function a(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=t.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=qg(),r=!0}}}function GP(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!kw(e,t):!1}function sr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qg(){return{animate:sr(!0),whileInView:sr(),whileHover:sr(),whileTap:sr(),whileDrag:sr(),whileFocus:sr(),exit:sr()}}class ir{constructor(e){this.isMounted=!1,this.node=e}update(){}}class qP extends ir{constructor(e){super(e),e.animationState||(e.animationState=KP(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Rl(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let YP=0;class XP extends ir{constructor(){super(...arguments),this.id=YP++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const QP={animation:{Feature:qP},exit:{Feature:XP}};function Js(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function po(t){return{point:{x:t.pageX,y:t.pageY}}}const ZP=t=>e=>xh(e)&&t(e,po(e));function bs(t,e,n,r){return Js(t,e,ZP(n),r)}const bw=1e-4,JP=1-bw,eT=1+bw,Pw=.01,tT=0-Pw,nT=0+Pw;function Ze(t){return t.max-t.min}function rT(t,e,n){return Math.abs(t-e)<=n}function Yg(t,e,n,r=.5){t.origin=r,t.originPoint=he(e.min,e.max,t.origin),t.scale=Ze(n)/Ze(e),t.translate=he(n.min,n.max,t.origin)-t.originPoint,(t.scale>=JP&&t.scale<=eT||isNaN(t.scale))&&(t.scale=1),(t.translate>=tT&&t.translate<=nT||isNaN(t.translate))&&(t.translate=0)}function Ps(t,e,n,r){Yg(t.x,e.x,n.x,r?r.originX:void 0),Yg(t.y,e.y,n.y,r?r.originY:void 0)}function Xg(t,e,n){t.min=n.min+e.min,t.max=t.min+Ze(e)}function iT(t,e,n){Xg(t.x,e.x,n.x),Xg(t.y,e.y,n.y)}function Qg(t,e,n){t.min=e.min-n.min,t.max=t.min+Ze(e)}function Ts(t,e,n){Qg(t.x,e.x,n.x),Qg(t.y,e.y,n.y)}function St(t){return[t("x"),t("y")]}const Tw=({current:t})=>t?t.ownerDocument.defaultView:null,Zg=(t,e)=>Math.abs(t-e);function sT(t,e){const n=Zg(t.x,e.x),r=Zg(t.y,e.y);return Math.sqrt(n**2+r**2)}class Aw{constructor(e,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Ru(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,y=sT(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!y)return;const{point:m}=f,{timestamp:_}=Oe;this.history.push({...m,timestamp:_});const{onStart:p,onMove:g}=this.handlers;h||(p&&p(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Au(h,this.transformPagePoint),de.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:y,onSessionEnd:m,resumeAnimation:_}=this.handlers;if(this.dragSnapToOrigin&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Ru(f.type==="pointercancel"?this.lastMoveEventInfo:Au(h,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,p),m&&m(f,p)},!xh(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const a=po(e),l=Au(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=Oe;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(e,Ru(l,this.history)),this.removeListeners=co(bs(this.contextWindow,"pointermove",this.handlePointerMove),bs(this.contextWindow,"pointerup",this.handlePointerUp),bs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Zn(this.updatePoint)}}function Au(t,e){return e?{point:e(t.point)}:t}function Jg(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ru({point:t},e){return{point:t,delta:Jg(t,Rw(e)),offset:Jg(t,oT(e)),velocity:aT(e,.1)}}function oT(t){return t[0]}function Rw(t){return t[t.length-1]}function aT(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=Rw(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>en(e)));)n--;if(!r)return{x:0,y:0};const s=tn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function lT(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?he(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?he(n,t,r.max):Math.min(t,n)),t}function em(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function uT(t,{top:e,left:n,bottom:r,right:i}){return{x:em(t.x,n,i),y:em(t.y,e,r)}}function tm(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function cT(t,e){return{x:tm(t.x,e.x),y:tm(t.y,e.y)}}function dT(t,e){let n=.5;const r=Ze(t),i=Ze(e);return i>r?n=qs(e.min,e.max-r,t.min):r>i&&(n=qs(t.min,t.max-i,e.min)),Sn(0,1,n)}function fT(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const hd=.35;function hT(t=hd){return t===!1?t=0:t===!0&&(t=hd),{x:nm(t,"left","right"),y:nm(t,"top","bottom")}}function nm(t,e,n){return{min:rm(t,e),max:rm(t,n)}}function rm(t,e){return typeof t=="number"?t:t[e]||0}const pT=new WeakMap;class gT{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Se(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(po(d).point)},o=(d,f)=>{const{drag:h,dragPropagation:y,onDragStart:m}=this.getProps();if(h&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bb(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),St(p=>{let g=this.getAxisMotionValue(p).get()||0;if(nn.test(g)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[p];w&&(g=Ze(w)*(parseFloat(g)/100))}}this.originPoint[p]=g}),m&&de.postRender(()=>m(d,f)),dd(this.visualElement,"transform");const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:y,onDirectionLock:m,onDrag:_}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:p}=f;if(y&&this.currentDirection===null){this.currentDirection=mT(p),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,p),this.updateAxis("y",f.point,p),this.visualElement.render(),_&&_(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>St(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Aw(e,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Tw(this.visualElement)})}stop(e,n){const r=e||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&de.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!Oo(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=lT(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;e&&ei(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=uT(r.layoutBox,e):this.constraints=!1,this.elastic=hT(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&St(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=fT(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ei(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=vP(r,i.root,this.visualElement.getTransformPagePoint());let o=cT(i.layout.layoutBox,s);if(n){const a=n(pP(o));this.hasMutatedConstraints=!!a,a&&(o=hw(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=St(c=>{if(!Oo(c,n,this.currentDirection))return;let d=l&&l[c]||{};o&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,y={type:"inertia",velocity:r?e[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,y)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return dd(this.visualElement,e),r.start(Rh(e,r,0,n,this.visualElement,!1))}stopAnimation(){St(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){St(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){St(n=>{const{drag:r}=this.getProps();if(!Oo(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(e[n]-he(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ei(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};St(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=dT({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),St(o=>{if(!Oo(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(he(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;pT.set(this.visualElement,this);const e=this.visualElement.current,n=bs(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ei(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),de.read(r);const o=Js(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(St(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=hd,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Oo(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function mT(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class vT extends ir{constructor(e){super(e),this.removeGroupControls=Pt,this.removeListeners=Pt,this.controls=new gT(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pt}unmount(){this.removeGroupControls(),this.removeListeners()}}const im=t=>(e,n)=>{t&&de.postRender(()=>t(e,n))};class yT extends ir{constructor(){super(...arguments),this.removePointerDownListener=Pt}onPointerDown(e){this.session=new Aw(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Tw(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:im(e),onStart:im(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&de.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=bs(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const da={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function sm(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Wi={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(W.test(t))t=parseFloat(t);else return t;const n=sm(t,e.target.x),r=sm(t,e.target.y);return`${n}% ${r}%`}},_T={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=Jn.parse(t);if(i.length>5)return r;const s=Jn.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=he(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};let Mu=!1;class wT extends x.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=e;zb(xT),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),Mu&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),da.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,Mu=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==s?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||de.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),wh.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;Mu=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Mw(t){const[e,n]=Ob(),r=x.useContext(u_);return C.jsx(wT,{...t,layoutGroup:r,switchLayoutGroup:x.useContext(dw),isPresent:e,safeToRemove:n})}const xT={borderRadius:{...Wi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wi,borderTopRightRadius:Wi,borderBottomLeftRadius:Wi,borderBottomRightRadius:Wi,boxShadow:_T};function ST(t,e,n){const r=We(t)?t:Si(t);return r.start(Rh("",r,e,n)),r.animation}const ET=(t,e)=>t.depth-e.depth;class kT{constructor(){this.children=[],this.isDirty=!1}add(e){th(this.children,e),this.isDirty=!0}remove(e){nh(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ET),this.isDirty=!1,this.children.forEach(e)}}function CT(t,e){const n=at.now(),r=({timestamp:i})=>{const s=i-n;s>=e&&(Zn(r),t(s-e))};return de.setup(r,!0),()=>Zn(r)}const Iw=["TopLeft","TopRight","BottomLeft","BottomRight"],bT=Iw.length,om=t=>typeof t=="string"?parseFloat(t):t,am=t=>typeof t=="number"||W.test(t);function PT(t,e,n,r,i,s){i?(t.opacity=he(0,n.opacity??1,TT(r)),t.opacityExit=he(e.opacity??1,0,AT(r))):s&&(t.opacity=he(e.opacity??1,n.opacity??1,r));for(let o=0;o<bT;o++){const a=`border${Iw[o]}Radius`;let l=lm(e,a),u=lm(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||am(l)===am(u)?(t[a]=Math.max(he(om(l),om(u),r),0),(nn.test(u)||nn.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=he(e.rotate||0,n.rotate||0,r))}function lm(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const TT=Nw(0,.5,w_),AT=Nw(.5,.95,Pt);function Nw(t,e,n){return r=>r<t?0:r>e?1:n(qs(t,e,r))}function um(t,e){t.min=e.min,t.max=e.max}function xt(t,e){um(t.x,e.x),um(t.y,e.y)}function cm(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function dm(t,e,n,r,i){return t-=e,t=Ua(t,1/n,r),i!==void 0&&(t=Ua(t,1/i,r)),t}function RT(t,e=0,n=1,r=.5,i,s=t,o=t){if(nn.test(e)&&(e=parseFloat(e),e=he(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=he(s.min,s.max,r);t===s&&(a-=e),t.min=dm(t.min,e,n,a,i),t.max=dm(t.max,e,n,a,i)}function fm(t,e,[n,r,i],s,o){RT(t,e[n],e[r],e[i],e.scale,s,o)}const MT=["x","scaleX","originX"],IT=["y","scaleY","originY"];function hm(t,e,n,r){fm(t.x,e,MT,n?n.x:void 0,r?r.x:void 0),fm(t.y,e,IT,n?n.y:void 0,r?r.y:void 0)}function pm(t){return t.translate===0&&t.scale===1}function Lw(t){return pm(t.x)&&pm(t.y)}function gm(t,e){return t.min===e.min&&t.max===e.max}function NT(t,e){return gm(t.x,e.x)&&gm(t.y,e.y)}function mm(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ow(t,e){return mm(t.x,e.x)&&mm(t.y,e.y)}function vm(t){return Ze(t.x)/Ze(t.y)}function ym(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class LT{constructor(){this.members=[]}add(e){th(this.members,e),e.scheduleRender()}remove(e){if(nh(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function OT(t,e,n){let r="";const i=t.x.translate/e.x,s=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:h,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Iu=["","X","Y","Z"],DT=1e3;let $T=0;function Nu(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Dw(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=xw(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",de,!(i||s))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&Dw(r)}function $w({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=$T++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(VT),this.nodes.forEach(HT),this.nodes.forEach(WT),this.nodes.forEach(BT)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new kT)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new sh),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Z_(o)&&!Ib(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,d=0;const f=()=>this.root.updateBlockedByResize=!1;de.read(()=>{d=window.innerWidth}),t(o,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,c&&c(),c=CT(f,250),da.hasAnimatedSinceResize&&(da.hasAnimatedSinceResize=!1,this.nodes.forEach(xm)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||XT,{onLayoutAnimationStart:m,onLayoutAnimationComplete:_}=u.getProps(),p=!this.targetLayout||!Ow(this.targetLayout,h),g=!d&&f;if(this.options.layoutRoot||this.resumeFrom||g||d&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...yh(y,"layout"),onPlay:m,onComplete:_};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,g)}else d||xm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Zn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(KT),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Dw(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(_m);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(wm);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(UT),this.nodes.forEach(FT),this.nodes.forEach(jT)):this.nodes.forEach(wm),this.clearAllSnapshots();const a=at.now();Oe.delta=Sn(0,1e3/60,a-Oe.timestamp),Oe.timestamp=a,Oe.isProcessing=!0,xu.update.process(Oe),xu.preRender.process(Oe),xu.render.process(Oe),Oe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,wh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zT),this.sharedNodes.forEach(GT)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,de.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){de.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ze(this.snapshot.measuredBox.x)&&!Ze(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Se(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Lw(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||fr(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),QT(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Se();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(ZT))){const{scroll:c}=this.root;c&&(ti(a.x,c.offset.x),ti(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=Se();if(xt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&xt(a,o),ti(a.x,d.offset.x),ti(a.y,d.offset.y))}return a}applyTransform(o,a=!1){const l=Se();xt(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ni(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),fr(c.latestValues)&&ni(l,c.latestValues)}return fr(this.latestValues)&&ni(l,this.latestValues),l}removeTransform(o){const a=Se();xt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!fr(u.latestValues))continue;ad(u.latestValues)&&u.updateSnapshot();const c=Se(),d=u.measurePageBox();xt(c,d),hm(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return fr(this.latestValues)&&hm(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Oe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=Oe.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Se(),this.relativeTargetOrigin=Se(),Ts(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Se(),this.targetWithTransforms=Se()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),iT(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):xt(this.target,this.layout.layoutBox),gw(this.target,this.targetDelta)):xt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Se(),this.relativeTargetOrigin=Se(),Ts(this.relativeTargetOrigin,this.target,h.target),xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ad(this.parent.latestValues)||pw(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var y;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Oe.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;xt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;mP(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Se());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(cm(this.prevProjectionDelta.x,this.projectionDelta.x),cm(this.prevProjectionDelta.y,this.projectionDelta.y)),Ps(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!ym(this.projectionDelta.x,this.prevProjectionDelta.x)||!ym(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ri(),this.projectionDelta=ri(),this.projectionDeltaWithTransform=ri()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=ri();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Se(),h=l?l.source:void 0,y=this.layout?this.layout.source:void 0,m=h!==y,_=this.getStack(),p=!_||_.members.length<=1,g=!!(m&&!p&&this.options.crossfade===!0&&!this.path.some(YT));this.animationProgress=0;let v;this.mixTargetDelta=w=>{const S=w/1e3;Sm(d.x,o.x,S),Sm(d.y,o.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ts(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),qT(this.relativeTarget,this.relativeTargetOrigin,f,S),v&&NT(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Se()),xt(v,this.relativeTarget)),m&&(this.animationValues=c,PT(c,u,this.latestValues,S,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Zn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=de.update(()=>{da.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Si(0)),this.currentAnimation=ST(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(DT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Fw(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Se();const d=Ze(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=Ze(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}xt(a,l),ni(a,c),Ps(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new LT),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Nu("z",o,u,this.animationValues);for(let c=0;c<Iu.length;c++)Nu(`rotate${Iu[c]}`,o,u,this.animationValues),Nu(`skew${Iu[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=ca(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=ca(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!fr(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=OT(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:f,y:h}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const y in Zs){if(c[y]===void 0)continue;const{correct:m,applyTo:_,isCSSVariable:p}=Zs[y],g=d==="none"?c[y]:m(c[y],u);if(_){const v=_.length;for(let w=0;w<v;w++)o[_[w]]=g}else p?this.options.visualElement.renderState.vars[y]=g:o[y]=g}this.options.layoutId&&(o.pointerEvents=u===this?ca(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(_m),this.root.sharedNodes.clear()}}}function FT(t){t.updateLayout()}function jT(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;s==="size"?St(d=>{const f=o?e.measuredBox[d]:e.layoutBox[d],h=Ze(f);f.min=r[d].min,f.max=f.min+h}):Fw(s,e.layoutBox,r)&&St(d=>{const f=o?e.measuredBox[d]:e.layoutBox[d],h=Ze(r[d]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+h)});const a=ri();Ps(a,r,e.layoutBox);const l=ri();o?Ps(l,t.applyTransform(i,!0),e.measuredBox):Ps(l,r,e.layoutBox);const u=!Lw(a);let c=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const y=Se();Ts(y,e.layoutBox,f.layoutBox);const m=Se();Ts(m,r,h.layoutBox),Ow(y,m)||(c=!0),d.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=y,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function VT(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function BT(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function zT(t){t.clearSnapshot()}function _m(t){t.clearMeasurements()}function wm(t){t.isLayoutDirty=!1}function UT(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function xm(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function HT(t){t.resolveTargetDelta()}function WT(t){t.calcProjection()}function KT(t){t.resetSkewAndRotation()}function GT(t){t.removeLeadSnapshot()}function Sm(t,e,n){t.translate=he(e.translate,0,n),t.scale=he(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Em(t,e,n,r){t.min=he(e.min,n.min,r),t.max=he(e.max,n.max,r)}function qT(t,e,n,r){Em(t.x,e.x,n.x,r),Em(t.y,e.y,n.y,r)}function YT(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const XT={duration:.45,ease:[.4,0,.1,1]},km=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Cm=km("applewebkit/")&&!km("chrome/")?Math.round:Pt;function bm(t){t.min=Cm(t.min),t.max=Cm(t.max)}function QT(t){bm(t.x),bm(t.y)}function Fw(t,e,n){return t==="position"||t==="preserve-aspect"&&!rT(vm(e),vm(n),.2)}function ZT(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const JT=$w({attachResizeListener:(t,e)=>Js(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Lu={current:void 0},jw=$w({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Lu.current){const t=new JT({});t.mount(window),t.setOptions({layoutScroll:!0}),Lu.current=t}return Lu.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),eA={pan:{Feature:yT},drag:{Feature:vT,ProjectionNode:jw,MeasureLayout:Mw}};function Pm(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&de.postRender(()=>s(e,po(e)))}class tA extends ir{mount(){const{current:e}=this.node;e&&(this.unmount=Pb(e,(n,r)=>(Pm(this.node,r,"Start"),i=>Pm(this.node,i,"End"))))}unmount(){}}class nA extends ir{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=co(Js(this.node.current,"focus",()=>this.onFocus()),Js(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Tm(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&de.postRender(()=>s(e,po(e)))}class rA extends ir{mount(){const{current:e}=this.node;e&&(this.unmount=Mb(e,(n,r)=>(Tm(this.node,r,"Start"),(i,{success:s})=>Tm(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const pd=new WeakMap,Ou=new WeakMap,iA=t=>{const e=pd.get(t.target);e&&e(t)},sA=t=>{t.forEach(iA)};function oA({root:t,...e}){const n=t||document;Ou.has(n)||Ou.set(n,{});const r=Ou.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(sA,{root:t,...e})),r[i]}function aA(t,e,n){const r=oA(e);return pd.set(t,n),r.observe(t),()=>{pd.delete(t),r.unobserve(t)}}const lA={some:0,all:1};class uA extends ir{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:lA[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return aA(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(cA(e,n))&&this.startObserver()}unmount(){}}function cA({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const dA={inView:{Feature:uA},tap:{Feature:rA},focus:{Feature:nA},hover:{Feature:tA}},fA={layout:{ProjectionNode:jw,MeasureLayout:Mw}},hA={...QP,...dA,...eA,...fA},Vw=hP(hA,bP),ki={};function Bw(t,e){return t.unstable_is?t.unstable_is(e):e===t}function zw(t){return"init"in t}function gd(t){return!!t.write}function Am(t){return"v"in t||"e"in t}function Ha(t){if("e"in t)throw t.e;if((ki?"production":void 0)!=="production"&&!("v"in t))throw new Error("[Bug] atom state is not initialized");return t.v}const Wa=new WeakMap;function Uw(t){var e;return Ka(t)&&!!((e=Wa.get(t))!=null&&e[0])}function pA(t){const e=Wa.get(t);e!=null&&e[0]&&(e[0]=!1,e[1].forEach(n=>n()))}function md(t,e){let n=Wa.get(t);if(!n){n=[!0,new Set],Wa.set(t,n);const r=()=>{n[0]=!1};t.then(r,r)}n[1].add(e)}function Ka(t){return typeof(t==null?void 0:t.then)=="function"}function Hw(t,e,n){if(!n.p.has(t)){n.p.add(t);const r=()=>n.p.delete(t);e.then(r,r)}}function Ww(t,e,n){var r;const i=new Set;for(const s of((r=n.get(t))==null?void 0:r.t)||[])n.has(s)&&i.add(s);for(const s of e.p)i.add(s);return i}const gA=(t,e,...n)=>e.read(...n),mA=(t,e,...n)=>e.write(...n),vA=(t,e)=>{var n;return(n=e.unstable_onInit)==null?void 0:n.call(e,t)},yA=(t,e,n)=>{var r;return(r=e.onMount)==null?void 0:r.call(e,n)},_A=(t,e)=>{const n=Ke(t),r=n[0],i=n[9];if((ki?"production":void 0)!=="production"&&!e)throw new Error("Atom is undefined or null");let s=r.get(e);return s||(s={d:new Map,p:new Set,n:0},r.set(e,s),i==null||i(t,e)),s},wA=t=>{const e=Ke(t),n=e[1],r=e[3],i=e[4],s=e[5],o=e[6],a=e[13],l=[],u=c=>{try{c()}catch(d){l.push(d)}};do{o.f&&u(o.f);const c=new Set,d=c.add.bind(c);r.forEach(f=>{var h;return(h=n.get(f))==null?void 0:h.l.forEach(d)}),r.clear(),s.forEach(d),s.clear(),i.forEach(d),i.clear(),c.forEach(u),r.size&&a(t)}while(r.size||s.size||i.size);if(l.length)throw new AggregateError(l)},xA=t=>{const e=Ke(t),n=e[1],r=e[2],i=e[3],s=e[11],o=e[14],a=e[17],l=[],u=new WeakSet,c=new WeakSet,d=Array.from(i);for(;d.length;){const f=d[d.length-1],h=s(t,f);if(c.has(f)){d.pop();continue}if(u.has(f)){if(r.get(f)===h.n)l.push([f,h]);else if((ki?"production":void 0)!=="production"&&r.has(f))throw new Error("[Bug] invalidated atom exists");c.add(f),d.pop();continue}u.add(f);for(const y of Ww(f,h,n))u.has(y)||d.push(y)}for(let f=l.length-1;f>=0;--f){const[h,y]=l[f];let m=!1;for(const _ of y.d.keys())if(_!==h&&i.has(_)){m=!0;break}m&&(o(t,h),a(t,h)),r.delete(h)}},SA=(t,e)=>{var n;const r=Ke(t),i=r[1],s=r[2],o=r[3],a=r[6],l=r[7],u=r[11],c=r[12],d=r[13],f=r[14],h=r[16],y=r[17],m=u(t,e);if(Am(m)&&(i.has(e)&&s.get(e)!==m.n||Array.from(m.d).every(([P,E])=>f(t,P).n===E)))return m;m.d.clear();let _=!0;function p(){i.has(e)&&(y(t,e),d(t),c(t))}function g(P){var E;if(Bw(e,P)){const b=u(t,P);if(!Am(b))if(zw(P))Ga(t,P,P.init);else throw new Error("no atom init");return Ha(b)}const k=f(t,P);try{return Ha(k)}finally{m.d.set(P,k.n),Uw(m.v)&&Hw(e,m.v,k),(E=i.get(P))==null||E.t.add(e),_||p()}}let v,w;const S={get signal(){return v||(v=new AbortController),v.signal},get setSelf(){return(ki?"production":void 0)!=="production"&&!gd(e)&&console.warn("setSelf function cannot be used with read-only atom"),!w&&gd(e)&&(w=(...P)=>{if((ki?"production":void 0)!=="production"&&_&&console.warn("setSelf function cannot be called in sync"),!_)try{return h(t,e,...P)}finally{d(t),c(t)}}),w}},A=m.n;try{const P=l(t,e,g,S);return Ga(t,e,P),Ka(P)&&(md(P,()=>v==null?void 0:v.abort()),P.then(p,p)),m}catch(P){return delete m.v,m.e=P,++m.n,m}finally{_=!1,A!==m.n&&s.get(e)===A&&(s.set(e,m.n),o.add(e),(n=a.c)==null||n.call(a,e))}},EA=(t,e)=>{const n=Ke(t),r=n[1],i=n[2],s=n[11],o=[e];for(;o.length;){const a=o.pop(),l=s(t,a);for(const u of Ww(a,l,r)){const c=s(t,u);i.set(u,c.n),o.push(u)}}},Kw=(t,e,...n)=>{const r=Ke(t),i=r[3],s=r[6],o=r[8],a=r[11],l=r[12],u=r[13],c=r[14],d=r[15],f=r[17];let h=!0;const y=_=>Ha(c(t,_)),m=(_,...p)=>{var g;const v=a(t,_);try{if(Bw(e,_)){if(!zw(_))throw new Error("atom not writable");const w=v.n,S=p[0];Ga(t,_,S),f(t,_),w!==v.n&&(i.add(_),(g=s.c)==null||g.call(s,_),d(t,_));return}else return Kw(t,_,...p)}finally{h||(u(t),l(t))}};try{return o(t,e,y,m,...n)}finally{h=!1}},kA=(t,e)=>{var n;const r=Ke(t),i=r[1],s=r[3],o=r[6],a=r[11],l=r[15],u=r[18],c=r[19],d=a(t,e),f=i.get(e);if(f&&!Uw(d.v)){for(const[h,y]of d.d)if(!f.d.has(h)){const m=a(t,h);u(t,h).t.add(e),f.d.add(h),y!==m.n&&(s.add(h),(n=o.c)==null||n.call(o,h),l(t,h))}for(const h of f.d||[])if(!d.d.has(h)){f.d.delete(h);const y=c(t,h);y==null||y.t.delete(e)}}},Gw=(t,e)=>{var n;const r=Ke(t),i=r[1],s=r[4],o=r[6],a=r[10],l=r[11],u=r[12],c=r[13],d=r[14],f=r[16],h=l(t,e);let y=i.get(e);if(!y){d(t,e);for(const m of h.d.keys())Gw(t,m).t.add(e);if(y={l:new Set,d:new Set(h.d.keys()),t:new Set},i.set(e,y),(n=o.m)==null||n.call(o,e),gd(e)){const m=()=>{let _=!0;const p=(...g)=>{try{return f(t,e,...g)}finally{_||(c(t),u(t))}};try{const g=a(t,e,p);g&&(y.u=()=>{_=!0;try{g()}finally{_=!1}})}finally{_=!1}};s.add(m)}}return y},CA=(t,e)=>{var n;const r=Ke(t),i=r[1],s=r[5],o=r[6],a=r[11],l=r[19],u=a(t,e);let c=i.get(e);if(c&&!c.l.size&&!Array.from(c.t).some(d=>{var f;return(f=i.get(d))==null?void 0:f.d.has(e)})){c.u&&s.add(c.u),c=void 0,i.delete(e),(n=o.u)==null||n.call(o,e);for(const d of u.d.keys()){const f=l(t,d);f==null||f.t.delete(e)}return}return c},Ga=(t,e,n)=>{const r=Ke(t)[11],i=r(t,e),s="v"in i,o=i.v;if(Ka(n))for(const a of i.d.keys())Hw(e,n,r(t,a));i.v=n,delete i.e,(!s||!Object.is(o,i.v))&&(++i.n,Ka(o)&&pA(o))},bA=(t,e)=>{const n=Ke(t)[14];return Ha(n(t,e))},PA=(t,e,...n)=>{const r=Ke(t),i=r[12],s=r[13],o=r[16];try{return o(t,e,...n)}finally{s(t),i(t)}},TA=(t,e,n)=>{const r=Ke(t),i=r[12],s=r[18],o=r[19],l=s(t,e).l;return l.add(n),i(t),()=>{l.delete(n),o(t,e),i(t)}},qw=new WeakMap;function Ke(t){const e=qw.get(t);if((ki?"production":void 0)!=="production"&&!e)throw new Error("Store must be created by buildStore to read its building blocks");return e}function AA(...t){const e={get(r){const i=Ke(e)[21];return i(e,r)},set(r,...i){const s=Ke(e)[22];return s(e,r,...i)},sub(r,i){const s=Ke(e)[23];return s(e,r,i)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},gA,mA,vA,yA,_A,wA,xA,SA,EA,Kw,kA,Gw,CA,Ga,bA,PA,TA].map((r,i)=>t[i]||r);return qw.set(e,Object.freeze(n)),e}const Yw={};let RA=0;function MA(t,e){const n=`atom${++RA}`,r={toString(){return(Yw?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof t=="function"?r.read=t:(r.init=t,r.read=IA,r.write=NA),r}function IA(t){return t(this)}function NA(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}function LA(){return AA()}let Ki;function OA(){return Ki||(Ki=LA(),(Yw?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=Ki),globalThis.__JOTAI_DEFAULT_STORE__!==Ki&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),Ki}const DA={},$A=x.createContext(void 0);function Xw(t){return x.useContext($A)||OA()}const vd=t=>typeof(t==null?void 0:t.then)=="function",yd=t=>{t.status||(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}))},FA=ee.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(yd(t),t)}),Du=new WeakMap,Rm=(t,e)=>{let n=Du.get(t);return n||(n=new Promise((r,i)=>{let s=t;const o=u=>c=>{s===u&&r(c)},a=u=>c=>{s===u&&i(c)},l=()=>{try{const u=e();vd(u)?(Du.set(u,n),s=u,u.then(o(u),a(u)),md(u,l)):r(u)}catch(u){i(u)}};t.then(o(t),a(t)),md(t,l)}),Du.set(t,n)),n};function jA(t,e){const{delay:n,unstable_promiseStatus:r=!ee.use}={},i=Xw(),[[s,o,a],l]=x.useReducer(c=>{const d=i.get(t);return Object.is(c[0],d)&&c[1]===i&&c[2]===t?c:[d,i,t]},void 0,()=>[i.get(t),i,t]);let u=s;if((o!==i||a!==t)&&(l(),u=i.get(t)),x.useEffect(()=>{const c=i.sub(t,()=>{if(r)try{const d=i.get(t);vd(d)&&yd(Rm(d,()=>i.get(t)))}catch{}if(typeof n=="number"){setTimeout(l,n);return}l()});return l(),c},[i,t,n,r]),x.useDebugValue(u),vd(u)){const c=Rm(u,()=>i.get(t));return r&&yd(c),FA(c)}return u}function Mh(t,e){const n=Xw();return x.useCallback((...i)=>{if((DA?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...i)},[n,t])}function Qw(t,e){return[jA(t),Mh(t)]}/**
|
|
41
|
-
* @license lucide-react v0.539.0 - ISC
|
|
42
|
-
*
|
|
43
|
-
* This source code is licensed under the ISC license.
|
|
44
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/const VA=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),BA=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),Mm=t=>{const e=BA(t);return e.charAt(0).toUpperCase()+e.slice(1)},Zw=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim(),zA=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
|
|
46
|
-
* @license lucide-react v0.539.0 - ISC
|
|
47
|
-
*
|
|
48
|
-
* This source code is licensed under the ISC license.
|
|
49
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/var UA={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
51
|
-
* @license lucide-react v0.539.0 - ISC
|
|
52
|
-
*
|
|
53
|
-
* This source code is licensed under the ISC license.
|
|
54
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/const HA=x.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>x.createElement("svg",{ref:l,...UA,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:Zw("lucide",i),...!s&&!zA(a)&&{"aria-hidden":"true"},...a},[...o.map(([u,c])=>x.createElement(u,c)),...Array.isArray(s)?s:[s]]));/**
|
|
56
|
-
* @license lucide-react v0.539.0 - ISC
|
|
57
|
-
*
|
|
58
|
-
* This source code is licensed under the ISC license.
|
|
59
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/const Ht=(t,e)=>{const n=x.forwardRef(({className:r,...i},s)=>x.createElement(HA,{ref:s,iconNode:e,className:Zw(`lucide-${VA(Mm(t))}`,`lucide-${t}`,r),...i}));return n.displayName=Mm(t),n};/**
|
|
61
|
-
* @license lucide-react v0.539.0 - ISC
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the ISC license.
|
|
64
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const WA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],KA=Ht("chevron-down",WA);/**
|
|
66
|
-
* @license lucide-react v0.539.0 - ISC
|
|
67
|
-
*
|
|
68
|
-
* This source code is licensed under the ISC license.
|
|
69
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const GA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Im=Ht("circle-alert",GA);/**
|
|
71
|
-
* @license lucide-react v0.539.0 - ISC
|
|
72
|
-
*
|
|
73
|
-
* This source code is licensed under the ISC license.
|
|
74
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const qA=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],YA=Ht("circle-check-big",qA);/**
|
|
76
|
-
* @license lucide-react v0.539.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const XA=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],QA=Ht("eye",XA);/**
|
|
81
|
-
* @license lucide-react v0.539.0 - ISC
|
|
82
|
-
*
|
|
83
|
-
* This source code is licensed under the ISC license.
|
|
84
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const ZA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Jw=Ht("loader-circle",ZA);/**
|
|
86
|
-
* @license lucide-react v0.539.0 - ISC
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the ISC license.
|
|
89
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const JA=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],eR=Ht("palette",JA);/**
|
|
91
|
-
* @license lucide-react v0.539.0 - ISC
|
|
92
|
-
*
|
|
93
|
-
* This source code is licensed under the ISC license.
|
|
94
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const tR=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],nR=Ht("pencil",tR);/**
|
|
96
|
-
* @license lucide-react v0.539.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const rR=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],iR=Ht("send",rR);/**
|
|
101
|
-
* @license lucide-react v0.539.0 - ISC
|
|
102
|
-
*
|
|
103
|
-
* This source code is licensed under the ISC license.
|
|
104
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const sR=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],oR=Ht("sparkles",sR);/**
|
|
106
|
-
* @license lucide-react v0.539.0 - ISC
|
|
107
|
-
*
|
|
108
|
-
* This source code is licensed under the ISC license.
|
|
109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const aR=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],lR=Ht("upload",aR);/**
|
|
111
|
-
* @license lucide-react v0.539.0 - ISC
|
|
112
|
-
*
|
|
113
|
-
* This source code is licensed under the ISC license.
|
|
114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const uR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cR=Ht("x",uR);var e1={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(uS,function(){var e=function(){},n="undefined",r=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],s={},o=null;function a(m,_){var p=m[_];if(typeof p.bind=="function")return p.bind(m);try{return Function.prototype.bind.call(p,m)}catch{return function(){return Function.prototype.apply.apply(p,[m,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(m){return m==="debug"&&(m="log"),typeof console===n?!1:m==="trace"&&r?l:console[m]!==void 0?a(console,m):console.log!==void 0?a(console,"log"):e}function c(){for(var m=this.getLevel(),_=0;_<i.length;_++){var p=i[_];this[p]=_<m?e:this.methodFactory(p,m,this.name)}if(this.log=this.debug,typeof console===n&&m<this.levels.SILENT)return"No console available for logging"}function d(m){return function(){typeof console!==n&&(c.call(this),this[m].apply(this,arguments))}}function f(m,_,p){return u(m)||d.apply(this,arguments)}function h(m,_){var p=this,g,v,w,S="loglevel";typeof m=="string"?S+=":"+m:typeof m=="symbol"&&(S=void 0);function A(R){var N=(i[R]||"silent").toUpperCase();if(!(typeof window===n||!S)){try{window.localStorage[S]=N;return}catch{}try{window.document.cookie=encodeURIComponent(S)+"="+N+";"}catch{}}}function P(){var R;if(!(typeof window===n||!S)){try{R=window.localStorage[S]}catch{}if(typeof R===n)try{var N=window.document.cookie,V=encodeURIComponent(S),$=N.indexOf(V+"=");$!==-1&&(R=/^([^;]+)/.exec(N.slice($+V.length+1))[1])}catch{}return p.levels[R]===void 0&&(R=void 0),R}}function E(){if(!(typeof window===n||!S)){try{window.localStorage.removeItem(S)}catch{}try{window.document.cookie=encodeURIComponent(S)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function k(R){var N=R;if(typeof N=="string"&&p.levels[N.toUpperCase()]!==void 0&&(N=p.levels[N.toUpperCase()]),typeof N=="number"&&N>=0&&N<=p.levels.SILENT)return N;throw new TypeError("log.setLevel() called with invalid level: "+R)}p.name=m,p.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},p.methodFactory=_||f,p.getLevel=function(){return w??v??g},p.setLevel=function(R,N){return w=k(R),N!==!1&&A(w),c.call(p)},p.setDefaultLevel=function(R){v=k(R),P()||p.setLevel(R,!1)},p.resetLevel=function(){w=null,E(),c.call(p)},p.enableAll=function(R){p.setLevel(p.levels.TRACE,R)},p.disableAll=function(R){p.setLevel(p.levels.SILENT,R)},p.rebuild=function(){if(o!==p&&(g=k(o.getLevel())),c.call(p),o===p)for(var R in s)s[R].rebuild()},g=k(o?o.getLevel():"WARN");var b=P();b!=null&&(w=k(b)),c.call(p)}o=new h,o.getLogger=function(_){if(typeof _!="symbol"&&typeof _!="string"||_==="")throw new TypeError("You must supply a name when creating a logger.");var p=s[_];return p||(p=s[_]=new h(_,o.methodFactory)),p};var y=typeof window!==n?window.log:void 0;return o.noConflict=function(){return typeof window!==n&&window.log===o&&(window.log=y),o},o.getLoggers=function(){return s},o.default=o,o})})(e1);var dR=e1.exports;const Dt=rf(dR),fR="INFO",hR=fR.toUpperCase();Dt.setLevel(Dt.levels[hR]||Dt.levels.INFO);const Il=t=>{const e=t?`[${t}] `:"";return{trace:(n,...r)=>Dt.trace(`${e}${n}`,...r),debug:(n,...r)=>Dt.debug(`${e}${n}`,...r),info:(n,...r)=>Dt.info(`${e}${n}`,...r),warn:(n,...r)=>Dt.warn(`${e}${n}`,...r),error:(n,...r)=>Dt.error(`${e}${n}`,...r),api:(n,...r)=>Dt.info(`${e}API: ${n}`,...r),hook:(n,...r)=>Dt.debug(`${e}Hook: ${n}`,...r),mount:(n,...r)=>Dt.debug(`${e}Mount: ${n}`,...r)}},Gi=Il("useGitPublish"),pR=()=>{const[t,e]=x.useState(!1),[n,r]=x.useState(null),i=x.useCallback(async()=>{Gi.debug("publishChanges called"),e(!0),r(null);try{Gi.debug("Making fetch request to /api/git/publish");const o=await fetch("/api/git/publish",{method:"POST",headers:{"Content-Type":"application/json"}});if(Gi.debug("Response received",{status:o.status,ok:o.ok}),!o.ok){const l=await o.json();throw new Error(l.details||l.error||`HTTP ${o.status}`)}const a=await o.json();return Gi.info("Git publish completed successfully:",a.prUrl),a}catch(o){const a=o instanceof Error?o.message:"Failed to publish changes";return r(a),Gi.error("Git publish error:",o),null}finally{e(!1)}},[]);return{publishChanges:x.useCallback(async o=>{const a=await i();return a?o("success","🎉 Changes published successfully!","Your branch has been pushed and is ready for a pull request.",{label:"View PR",onClick:()=>window.open(a.prUrl,"_blank")}):n&&o("error","Failed to publish changes",n),a},[i,n]),isPublishing:t,error:n,clearError:()=>r(null)}};function Qe(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function Nm(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function t1(...t){return e=>{let n=!1;const r=t.map(i=>{const s=Nm(i,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Nm(t[i],null)}}}}function kn(...t){return x.useCallback(t1(...t),t)}function Nl(t,e=[]){let n=[];function r(s,o){const a=x.createContext(o),l=n.length;n=[...n,o];const u=d=>{var p;const{scope:f,children:h,...y}=d,m=((p=f==null?void 0:f[t])==null?void 0:p[l])||a,_=x.useMemo(()=>y,Object.values(y));return C.jsx(m.Provider,{value:_,children:h})};u.displayName=s+"Provider";function c(d,f){var m;const h=((m=f==null?void 0:f[t])==null?void 0:m[l])||a,y=x.useContext(h);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,c]}const i=()=>{const s=n.map(o=>x.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return x.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,gR(i,...e)]}function gR(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...a,...d}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function _d(t){const e=mR(t),n=x.forwardRef((r,i)=>{const{children:s,...o}=r,a=x.Children.toArray(s),l=a.find(yR);if(l){const u=l.props.children,c=a.map(d=>d===l?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:d);return C.jsx(e,{...o,ref:i,children:x.isValidElement(u)?x.cloneElement(u,void 0,c):null})}return C.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function mR(t){const e=x.forwardRef((n,r)=>{const{children:i,...s}=n;if(x.isValidElement(i)){const o=wR(i),a=_R(s,i.props);return i.type!==x.Fragment&&(a.ref=r?t1(r,o):o),x.cloneElement(i,a)}return x.Children.count(i)>1?x.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var vR=Symbol("radix.slottable");function yR(t){return x.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===vR}function _R(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function wR(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function n1(t){const e=t+"CollectionProvider",[n,r]=Nl(e),[i,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:_,children:p}=m,g=ee.useRef(null),v=ee.useRef(new Map).current;return C.jsx(i,{scope:_,itemMap:v,collectionRef:g,children:p})};o.displayName=e;const a=t+"CollectionSlot",l=_d(a),u=ee.forwardRef((m,_)=>{const{scope:p,children:g}=m,v=s(a,p),w=kn(_,v.collectionRef);return C.jsx(l,{ref:w,children:g})});u.displayName=a;const c=t+"CollectionItemSlot",d="data-radix-collection-item",f=_d(c),h=ee.forwardRef((m,_)=>{const{scope:p,children:g,...v}=m,w=ee.useRef(null),S=kn(_,w),A=s(c,p);return ee.useEffect(()=>(A.itemMap.set(w,{ref:w,...v}),()=>void A.itemMap.delete(w))),C.jsx(f,{[d]:"",ref:S,children:g})});h.displayName=c;function y(m){const _=s(t+"CollectionConsumer",m);return ee.useCallback(()=>{const g=_.collectionRef.current;if(!g)return[];const v=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(_.itemMap.values()).sort((A,P)=>v.indexOf(A.ref.current)-v.indexOf(P.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},y,r]}var xR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],nt=xR.reduce((t,e)=>{const n=_d(`Primitive.${e}`),r=x.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function r1(t,e){t&&Tl.flushSync(()=>t.dispatchEvent(e))}function Ar(t){const e=x.useRef(t);return x.useEffect(()=>{e.current=t}),x.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function SR(t,e=globalThis==null?void 0:globalThis.document){const n=Ar(t);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var ER="DismissableLayer",wd="dismissableLayer.update",kR="dismissableLayer.pointerDownOutside",CR="dismissableLayer.focusOutside",Lm,i1=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),s1=x.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=t,u=x.useContext(i1),[c,d]=x.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),y=kn(e,P=>d(P)),m=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=m.indexOf(_),g=c?m.indexOf(c):-1,v=u.layersWithOutsidePointerEventsDisabled.size>0,w=g>=p,S=PR(P=>{const E=P.target,k=[...u.branches].some(b=>b.contains(E));!w||k||(i==null||i(P),o==null||o(P),P.defaultPrevented||a==null||a())},f),A=TR(P=>{const E=P.target;[...u.branches].some(b=>b.contains(E))||(s==null||s(P),o==null||o(P),P.defaultPrevented||a==null||a())},f);return SR(P=>{g===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&a&&(P.preventDefault(),a()))},f),x.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Lm=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Om(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Lm)}},[c,f,n,u]),x.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Om())},[c,u]),x.useEffect(()=>{const P=()=>h({});return document.addEventListener(wd,P),()=>document.removeEventListener(wd,P)},[]),C.jsx(nt.div,{...l,ref:y,style:{pointerEvents:v?w?"auto":"none":void 0,...t.style},onFocusCapture:Qe(t.onFocusCapture,A.onFocusCapture),onBlurCapture:Qe(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Qe(t.onPointerDownCapture,S.onPointerDownCapture)})});s1.displayName=ER;var bR="DismissableLayerBranch",o1=x.forwardRef((t,e)=>{const n=x.useContext(i1),r=x.useRef(null),i=kn(e,r);return x.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),C.jsx(nt.div,{...t,ref:i})});o1.displayName=bR;function PR(t,e=globalThis==null?void 0:globalThis.document){const n=Ar(t),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){a1(kR,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function TR(t,e=globalThis==null?void 0:globalThis.document){const n=Ar(t),r=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!r.current&&a1(CR,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Om(){const t=new CustomEvent(wd);document.dispatchEvent(t)}function a1(t,e,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?r1(i,s):i.dispatchEvent(s)}var AR=s1,RR=o1,Rr=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},MR="Portal",l1=x.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[i,s]=x.useState(!1);Rr(()=>s(!0),[]);const o=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?Ok.createPortal(C.jsx(nt.div,{...r,ref:e}),o):null});l1.displayName=MR;function IR(t,e){return x.useReducer((n,r)=>e[n][r]??n,t)}var Ih=t=>{const{present:e,children:n}=t,r=NR(e),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),s=kn(r.ref,LR(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:s}):null};Ih.displayName="Presence";function NR(t){const[e,n]=x.useState(),r=x.useRef(null),i=x.useRef(t),s=x.useRef("none"),o=t?"mounted":"unmounted",[a,l]=IR(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=Do(r.current);s.current=a==="mounted"?u:"none"},[a]),Rr(()=>{const u=r.current,c=i.current;if(c!==t){const f=s.current,h=Do(u);t?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),Rr(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,d=h=>{const m=Do(r.current).includes(CSS.escape(h.animationName));if(h.target===e&&m&&(l("ANIMATION_END"),!i.current)){const _=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=_)})}},f=h=>{h.target===e&&(s.current=Do(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Do(t){return(t==null?void 0:t.animationName)||"none"}function LR(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var OR=oy[" useInsertionEffect ".trim().toString()]||Rr;function Ll({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[i,s,o]=DR({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:i;{const c=x.useRef(t!==void 0);x.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,r])}const u=x.useCallback(c=>{var d;if(a){const f=$R(c)?c(t):c;f!==t&&((d=o.current)==null||d.call(o,f))}else s(c)},[a,t,s,o]);return[l,u]}function DR({defaultProp:t,onChange:e}){const[n,r]=x.useState(t),i=x.useRef(n),s=x.useRef(e);return OR(()=>{s.current=e},[e]),x.useEffect(()=>{var o;i.current!==n&&((o=s.current)==null||o.call(s,n),i.current=n)},[n,i]),[n,r,s]}function $R(t){return typeof t=="function"}var FR=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),jR="VisuallyHidden",Nh=x.forwardRef((t,e)=>C.jsx(nt.span,{...t,ref:e,style:{...FR,...t.style}}));Nh.displayName=jR;var Lh="ToastProvider",[Oh,VR,BR]=n1("Toast"),[u1,zN]=Nl("Toast",[BR]),[zR,Ol]=u1(Lh),c1=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=t,[a,l]=x.useState(null),[u,c]=x.useState(0),d=x.useRef(!1),f=x.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Lh}\`. Expected non-empty \`string\`.`),C.jsx(Oh.Provider,{scope:e,children:C.jsx(zR,{scope:e,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:x.useCallback(()=>c(h=>h+1),[]),onToastRemove:x.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};c1.displayName=Lh;var d1="ToastViewport",UR=["F8"],xd="toast.viewportPause",Sd="toast.viewportResume",f1=x.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=UR,label:i="Notifications ({hotkey})",...s}=t,o=Ol(d1,n),a=VR(n),l=x.useRef(null),u=x.useRef(null),c=x.useRef(null),d=x.useRef(null),f=kn(e,d,o.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;x.useEffect(()=>{const _=p=>{var v;r.length!==0&&r.every(w=>p[w]||p.code===w)&&((v=d.current)==null||v.focus())};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[r]),x.useEffect(()=>{const _=l.current,p=d.current;if(y&&_&&p){const g=()=>{if(!o.isClosePausedRef.current){const A=new CustomEvent(xd);p.dispatchEvent(A),o.isClosePausedRef.current=!0}},v=()=>{if(o.isClosePausedRef.current){const A=new CustomEvent(Sd);p.dispatchEvent(A),o.isClosePausedRef.current=!1}},w=A=>{!_.contains(A.relatedTarget)&&v()},S=()=>{_.contains(document.activeElement)||v()};return _.addEventListener("focusin",g),_.addEventListener("focusout",w),_.addEventListener("pointermove",g),_.addEventListener("pointerleave",S),window.addEventListener("blur",g),window.addEventListener("focus",v),()=>{_.removeEventListener("focusin",g),_.removeEventListener("focusout",w),_.removeEventListener("pointermove",g),_.removeEventListener("pointerleave",S),window.removeEventListener("blur",g),window.removeEventListener("focus",v)}}},[y,o.isClosePausedRef]);const m=x.useCallback(({tabbingDirection:_})=>{const g=a().map(v=>{const w=v.ref.current,S=[w,...n2(w)];return _==="forwards"?S:S.reverse()});return(_==="forwards"?g.reverse():g).flat()},[a]);return x.useEffect(()=>{const _=d.current;if(_){const p=g=>{var S,A,P;const v=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!v){const E=document.activeElement,k=g.shiftKey;if(g.target===_&&k){(S=u.current)==null||S.focus();return}const N=m({tabbingDirection:k?"backwards":"forwards"}),V=N.findIndex($=>$===E);$u(N.slice(V+1))?g.preventDefault():k?(A=u.current)==null||A.focus():(P=c.current)==null||P.focus()}};return _.addEventListener("keydown",p),()=>_.removeEventListener("keydown",p)}},[a,m]),C.jsxs(RR,{ref:l,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&C.jsx(Ed,{ref:u,onFocusFromOutsideViewport:()=>{const _=m({tabbingDirection:"forwards"});$u(_)}}),C.jsx(Oh.Slot,{scope:n,children:C.jsx(nt.ol,{tabIndex:-1,...s,ref:f})}),y&&C.jsx(Ed,{ref:c,onFocusFromOutsideViewport:()=>{const _=m({tabbingDirection:"backwards"});$u(_)}})]})});f1.displayName=d1;var h1="ToastFocusProxy",Ed=x.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=t,s=Ol(h1,n);return C.jsx(Nh,{tabIndex:0,...i,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});Ed.displayName=h1;var go="Toast",HR="toast.swipeStart",WR="toast.swipeMove",KR="toast.swipeCancel",GR="toast.swipeEnd",p1=x.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...o}=t,[a,l]=Ll({prop:r,defaultProp:i??!0,onChange:s,caller:go});return C.jsx(Ih,{present:n||a,children:C.jsx(XR,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:Ar(t.onPause),onResume:Ar(t.onResume),onSwipeStart:Qe(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Qe(t.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Qe(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Qe(t.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});p1.displayName=go;var[qR,YR]=u1(go,{onClose(){}}),XR=x.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...y}=t,m=Ol(go,n),[_,p]=x.useState(null),g=kn(e,$=>p($)),v=x.useRef(null),w=x.useRef(null),S=i||m.duration,A=x.useRef(0),P=x.useRef(S),E=x.useRef(0),{onToastAdd:k,onToastRemove:b}=m,R=Ar(()=>{var K;(_==null?void 0:_.contains(document.activeElement))&&((K=m.viewport)==null||K.focus()),o()}),N=x.useCallback($=>{!$||$===1/0||(window.clearTimeout(E.current),A.current=new Date().getTime(),E.current=window.setTimeout(R,$))},[R]);x.useEffect(()=>{const $=m.viewport;if($){const K=()=>{N(P.current),u==null||u()},X=()=>{const U=new Date().getTime()-A.current;P.current=P.current-U,window.clearTimeout(E.current),l==null||l()};return $.addEventListener(xd,X),$.addEventListener(Sd,K),()=>{$.removeEventListener(xd,X),$.removeEventListener(Sd,K)}}},[m.viewport,S,l,u,N]),x.useEffect(()=>{s&&!m.isClosePausedRef.current&&N(S)},[s,S,m.isClosePausedRef,N]),x.useEffect(()=>(k(),()=>b()),[k,b]);const V=x.useMemo(()=>_?x1(_):null,[_]);return m.viewport?C.jsxs(C.Fragment,{children:[V&&C.jsx(QR,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:V}),C.jsx(qR,{scope:n,onClose:R,children:Tl.createPortal(C.jsx(Oh.ItemSlot,{scope:n,children:C.jsx(AR,{asChild:!0,onEscapeKeyDown:Qe(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||R(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:C.jsx(nt.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...y,ref:g,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Qe(t.onKeyDown,$=>{$.key==="Escape"&&(a==null||a($.nativeEvent),$.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:Qe(t.onPointerDown,$=>{$.button===0&&(v.current={x:$.clientX,y:$.clientY})}),onPointerMove:Qe(t.onPointerMove,$=>{if(!v.current)return;const K=$.clientX-v.current.x,X=$.clientY-v.current.y,U=!!w.current,M=["left","right"].includes(m.swipeDirection),O=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,z=M?O(0,K):0,Z=M?0:O(0,X),G=$.pointerType==="touch"?10:2,ve={x:z,y:Z},ue={originalEvent:$,delta:ve};U?(w.current=ve,$o(WR,d,ue,{discrete:!1})):Dm(ve,m.swipeDirection,G)?(w.current=ve,$o(HR,c,ue,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(K)>G||Math.abs(X)>G)&&(v.current=null)}),onPointerUp:Qe(t.onPointerUp,$=>{const K=w.current,X=$.target;if(X.hasPointerCapture($.pointerId)&&X.releasePointerCapture($.pointerId),w.current=null,v.current=null,K){const U=$.currentTarget,M={originalEvent:$,delta:K};Dm(K,m.swipeDirection,m.swipeThreshold)?$o(GR,h,M,{discrete:!0}):$o(KR,f,M,{discrete:!0}),U.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),QR=t=>{const{__scopeToast:e,children:n,...r}=t,i=Ol(go,e),[s,o]=x.useState(!1),[a,l]=x.useState(!1);return e2(()=>o(!0)),x.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:C.jsx(l1,{asChild:!0,children:C.jsx(Nh,{...r,children:s&&C.jsxs(C.Fragment,{children:[i.label," ",n]})})})},ZR="ToastTitle",g1=x.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return C.jsx(nt.div,{...r,ref:e})});g1.displayName=ZR;var JR="ToastDescription",m1=x.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return C.jsx(nt.div,{...r,ref:e})});m1.displayName=JR;var v1="ToastAction",y1=x.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?C.jsx(w1,{altText:n,asChild:!0,children:C.jsx(Dh,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${v1}\`. Expected non-empty \`string\`.`),null)});y1.displayName=v1;var _1="ToastClose",Dh=x.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,i=YR(_1,n);return C.jsx(w1,{asChild:!0,children:C.jsx(nt.button,{type:"button",...r,ref:e,onClick:Qe(t.onClick,i.onClose)})})});Dh.displayName=_1;var w1=x.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...i}=t;return C.jsx(nt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:e})});function x1(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),t2(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=r.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...x1(r))}}),e}function $o(t,e,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?r1(i,s):i.dispatchEvent(s)}var Dm=(t,e,n=0)=>{const r=Math.abs(t.x),i=Math.abs(t.y),s=r>i;return e==="left"||e==="right"?s&&r>n:!s&&i>n};function e2(t=()=>{}){const e=Ar(t);Rr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function t2(t){return t.nodeType===t.ELEMENT_NODE}function n2(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function $u(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var r2=c1,i2=f1,s2=p1,o2=g1,a2=m1,l2=y1,u2=Dh;const S1=({isOpen:t,onOpenChange:e,type:n,title:r,description:i,action:s})=>{const o=()=>{switch(n){case"success":return{Icon:YA,bgColor:"bg-accent-success/90",borderColor:"border-accent-success",textColor:"text-content",iconColor:"text-content",actionStyles:"border-white hover:bg-white/10 hover:border-white text-content"};case"error":return{Icon:Im,bgColor:"bg-accent-error/90",borderColor:"border-accent-error",textColor:"text-content",iconColor:"text-content",actionStyles:"border-white hover:bg-white/10 hover:border-white text-content"};default:return{Icon:Im,bgColor:"bg-content-muted/90",borderColor:"border-divider",textColor:"text-content",iconColor:"text-content-subtle",actionStyles:"border-divider hover:bg-content-muted/10 hover:border-divider"}}},{Icon:a,bgColor:l,borderColor:u,textColor:c,iconColor:d,actionStyles:f}=o();return C.jsxs(s2,{className:`${l} ${u} ${c} data-[state=open]:animate-slideIn data-[state=closed]:animate-hide data-[swipe=end]:animate-swipeOut grid grid-cols-[auto_1fr_auto] items-start gap-3 rounded-lg border p-4 shadow-lg data-[swipe=cancel]:translate-x-0 data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]`,open:t,onOpenChange:e,duration:9e3,children:[C.jsx(a,{className:`${d} mt-0.5 h-5 w-5`}),C.jsxs("div",{className:"flex flex-col gap-2",children:[C.jsxs("div",{className:"flex flex-col gap-1",children:[C.jsx(o2,{className:"text-sm font-semibold",children:r}),i&&C.jsx(a2,{className:"text-sm",children:i})]}),s&&C.jsx(l2,{className:`rounded border px-3 py-1.5 text-xs font-medium transition-colors ${f} self-start`,altText:s.label,onClick:s.onClick,children:s.label})]}),C.jsx(u2,{className:"rounded p-1 transition-colors hover:bg-black/10",children:C.jsx(cR,{className:"h-4 w-4"})})]})},E1=({children:t})=>C.jsxs(r2,{swipeDirection:"right",children:[t,C.jsx(i2,{className:"z-ui-primary fixed bottom-0 right-0 m-0 flex w-96 max-w-[100vw] list-none flex-col gap-3 p-6 outline-none"})]}),Fu=({onClick:t,isActive:e=!1,isDisabled:n=!1,title:r,children:i,className:s=""})=>{const o="p-2 rounded-md transition-colors",a=e?"bg-primary/20 text-primary":"text-content hover:bg-main-input",l=n?"opacity-50 cursor-not-allowed":"";return C.jsx("button",{onClick:t,disabled:n,className:`${o} ${a} ${l} ${s}`,title:r,children:i})},c2=({mode:t,onModeChange:e,isLoading:n=!1})=>{const{publishChanges:r,isPublishing:i}=pR(),[s,o]=x.useState({isOpen:!1,type:"success",title:"",onOpenChange:()=>{},description:void 0,action:void 0}),a=(l,u,c,d)=>{o({isOpen:!0,type:l,title:u,description:c,action:d,onOpenChange:f=>o(h=>({...h,isOpen:f}))})};return C.jsxs(E1,{children:[C.jsx(Vw.div,{className:"z-ui-primary absolute bottom-6 left-1/2 -translate-x-1/2 transform",initial:{y:100,opacity:0},animate:{y:n?100:0,opacity:n?0:1},transition:{duration:.6,ease:"easeOut",delay:n?0:.3},children:C.jsxs("div",{className:"bg-main border-primary/30 flex items-center space-x-1 rounded-lg border p-2 shadow-lg",children:[C.jsx(Fu,{onClick:()=>e(!1),isActive:t==="view",title:"View Mode",children:C.jsx(QA,{className:"h-5 w-5"})}),C.jsx(Fu,{onClick:()=>e(!0),isActive:t==="edit",title:"Edit Mode - Drag to select elements",children:C.jsx(nR,{className:"h-5 w-5"})}),C.jsx(Fu,{onClick:()=>r(a),isDisabled:i,title:i?"Publishing changes...":"Publish changes & create PR",children:i?C.jsx("div",{className:"h-5 w-5 animate-spin",children:C.jsxs("svg",{className:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[C.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),C.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):C.jsx(lR,{className:"h-5 w-5"})})]})}),C.jsx(S1,{isOpen:s.isOpen,onOpenChange:s.onOpenChange,type:s.type,title:s.title,description:s.description,action:s.action})]})},k1=t=>{var e;try{return t.contentDocument||((e=t.contentWindow)==null?void 0:e.document)}catch(n){return console.error("[IframeDom] Cannot access iframe document:",n),null}},$m=(t,e,n)=>{const r=k1(t);if(!r)return null;const i=t.getBoundingClientRect(),s=e-i.left,o=n-i.top;return r.elementFromPoint(s,o)},d2=t=>Object.fromEntries(Array.from(t).map(e=>[e,t.getPropertyValue(e)])),C1=t=>{var r,i;if(t.id)return`//*[@id="${t.id}"]`;if(t===((r=t.ownerDocument)==null?void 0:r.body))return"/html/body";let e=0;const n=((i=t.parentNode)==null?void 0:i.childNodes)||[];for(let s=0;s<n.length;s++){const o=n[s];if(o===t){const a=t.parentNode;if(a)return C1(a)+"/"+t.tagName.toLowerCase()+"["+(e+1)+"]"}o.nodeType===1&&o.tagName===t.tagName&&e++}return""},ju=t=>{var o,a,l;const e=t.getBoundingClientRect(),n=(o=t.ownerDocument)==null?void 0:o.defaultView,r=n==null?void 0:n.getComputedStyle(t);let i="";try{const u=t;"className"in u&&(typeof u.className=="string"?i=u.className:u.className&&typeof u.className=="object"&&"baseVal"in u.className&&(i=u.className.baseVal||""))}catch(u){i="",console.warn("[IframeDom] Error getting className:",u)}let s="";try{s=t.id||""}catch(u){s="",console.warn("[IframeDom] Error getting id:",u)}return{tagName:t.tagName.toLowerCase(),className:i,id:s,textContent:((a=t.textContent)==null?void 0:a.trim().substring(0,100))||"",innerHTML:((l=t.innerHTML)==null?void 0:l.substring(0,200))||"",attributes:Array.from(t.attributes).reduce((u,c)=>(u[c.name]=c.value,u),{}),computedStyles:r?d2(r):{},boundingRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,left:e.left,right:e.right,bottom:e.bottom},xpath:C1(t),filePath:null}},Dl=MA([]),b1={theme:{extend:{zIndex:{"capture-overlay":"35","selection-overlay":"30"},colors:{primary:{DEFAULT:"#f97316",hover:"#ea580c",border:"#ff6b35"}}}}},$h=b1.theme.extend.zIndex,qa=b1.theme.extend.colors,f2=t=>{const e=t.tagName.toLowerCase();return!!(["path","g","circle","rect","line","polygon"].includes(e)||e==="i"&&t.className&&/\b(fa|icon|material)\b/.test(t.className))},h2=(t,e)=>{const r=t.map(s=>{const o=s.getBoundingClientRect(),l=o.width*o.height/e,u=s.tagName.toLowerCase();let c=l>=.2&&l<=3?100:20;return["button","a","input","select","textarea"].includes(u)&&(c+=50),(l<.05||l>10)&&(c-=50),{element:s,score:c,ratio:l}}).filter(s=>s.score>30).filter(s=>!f2(s.element)).sort((s,o)=>o.score-s.score),i=[];for(const s of r)i.some(a=>a.element.contains(s.element))||i.push(s);return console.log(`[IframeSelection] Multi-selection: ${i.length} elements selected`),i.slice(0,6).map(s=>s.element)},p2=()=>{let t=document.getElementById("rivet-hover-overlay");return t||(t=document.createElement("div"),t.id="rivet-hover-overlay",t.style.cssText=`
|
|
116
|
-
position: fixed;
|
|
117
|
-
pointer-events: none;
|
|
118
|
-
z-index: ${$h["selection-overlay"]};
|
|
119
|
-
border: 3px solid ${qa.primary.border};
|
|
120
|
-
border-radius: 2px;
|
|
121
|
-
background-color: rgb(from ${qa.primary.hover} r g b / 0.2);
|
|
122
|
-
display: none;
|
|
123
|
-
`,document.body.appendChild(t)),t},g2=t=>{const e=`rivet-selection-${Math.random().toString(36).substr(2,9)}`,n=document.createElement("div");return n.id=e,n.style.cssText=`
|
|
124
|
-
position: fixed;
|
|
125
|
-
pointer-events: none;
|
|
126
|
-
z-index: ${$h["selection-overlay"]};
|
|
127
|
-
border: 3px solid ${qa.primary.border};
|
|
128
|
-
border-radius: 2px;
|
|
129
|
-
background-color: rgb(from ${qa.primary.DEFAULT} r g b / 0.2);
|
|
130
|
-
box-shadow: box-shadow: 0 0 10px rgba(255, 107, 53, 0.7);
|
|
131
|
-
`,n.__element=t,document.body.appendChild(n),n},Vu=(t,e,n,r)=>{const i=document.querySelector('[data-cy="element-inspector"]');if(!i)return!1;const s=i.getBoundingClientRect(),o=t+n,a=e+r;return!(o<=s.left||t>=s.right||a<=s.top||e>=s.bottom)},m2=t=>{let e=t.querySelector("#rivet-mouse-capture");return e||(e=document.createElement("div"),e.id="rivet-mouse-capture",e.style.cssText=`
|
|
132
|
-
position: absolute;
|
|
133
|
-
top: 0;
|
|
134
|
-
left: 0;
|
|
135
|
-
right: 0;
|
|
136
|
-
bottom: 0;
|
|
137
|
-
z-index: ${$h["capture-overlay"]};
|
|
138
|
-
background: transparent;
|
|
139
|
-
pointer-events: none;
|
|
140
|
-
display: none;
|
|
141
|
-
`,t.appendChild(e)),e},v2=({mode:t})=>{const e=x.useRef(null),n=Mh(Dl),[r,i]=x.useState(null),[s,o]=x.useState(new Set),[a,l]=x.useState(null),u=x.useCallback(async k=>{if(console.log(`[IframeSelection] searchComponents called for ${k.length} element(s)!`,k.map(b=>b==null?void 0:b.tagName)),!k||k.length===0)return[];try{const b=await fetch("/api/search-components",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)});return b.ok?(await b.json()).elements||[]:(console.error(`Component search failed: HTTP ${b.status}`),[])}catch(b){return console.error("Component search error:",b),[]}},[]),c=x.useCallback(async k=>{const b=await u(k);n(R=>[...R,...b])},[u,n]),d=x.useCallback(k=>{n(b=>b.filter(R=>!k.some(N=>R.xpath===N.xpath)))},[n]),f=a!==null,h=t==="edit",y=x.useCallback(k=>{const b=e.current,R=p2();if(!k||!b){R.style.display="none";return}const N=b.getBoundingClientRect(),V=k.getBoundingClientRect(),$=N.left+V.left,K=N.top+V.top,X=V.width,U=V.height;if(Vu($,K,X,U)){R.style.display="none";return}R.style.display="block",R.style.left=`${$}px`,R.style.top=`${K}px`,R.style.width=`${X}px`,R.style.height=`${U}px`},[]),m=x.useCallback(k=>{const b=e.current;if(b)if(s.has(k))o(N=>{const V=new Set(N);return V.delete(k),V}),document.querySelectorAll('[id^="rivet-selection-"]').forEach(N=>{N.__element===k&&N.remove()});else{o(U=>new Set(U).add(k));const R=b.getBoundingClientRect(),N=k.getBoundingClientRect(),V=R.left+N.left,$=R.top+N.top,K=N.width,X=N.height;if(!Vu(V,$,K,X)){const U=g2(k);U.style.left=`${V}px`,U.style.top=`${$}px`,U.style.width=`${K}px`,U.style.height=`${X}px`}}},[s]),_=x.useCallback(()=>{const k=document.getElementById("rivet-hover-overlay");k&&(k.style.display="none"),i(null)},[]),p=x.useCallback(()=>{document.querySelectorAll('[id^="rivet-selection-"]').forEach(b=>b.remove()),o(new Set)},[]),g=x.useCallback(k=>{if(console.log("[IframeSelection] Mouse move detected, editMode:",h,"boxSelection:",f),!h||!e.current||f)return;console.log("[IframeSelection] Mouse move in edit mode:",{x:k.clientX,y:k.clientY});const b=$m(e.current,k.clientX,k.clientY);if(!b){console.log("[IframeSelection] No element found at point");return}console.log("[IframeSelection] Element found:",b.tagName),b&&b!==r&&(i(b),y(b))},[h,r,y,f]),v=x.useCallback(k=>{if(!h||!e.current||f)return;k.preventDefault(),k.stopPropagation();const b=$m(e.current,k.clientX,k.clientY);if(b){console.log("[IframeSelection] Element clicked for selection toggle:",b.tagName);const R=ju(b);s.has(b)?(console.log("[IframeSelection] Removing element from selection"),d([R])):(console.log("[IframeSelection] Adding element to selection"),c([R])),m(b)}},[h,f,s,m,c,d]),w=x.useCallback(k=>{!h||!e.current||(k.preventDefault(),k.stopPropagation(),l({x:k.clientX,y:k.clientY}),_())},[h,_]),S=x.useCallback(k=>{if(!f||!a||!e.current)return;k.preventDefault(),k.stopPropagation();const b=e.current,R=b.getBoundingClientRect(),N={left:Math.min(a.x,k.clientX)-R.left,top:Math.min(a.y,k.clientY)-R.top,right:Math.max(a.x,k.clientX)-R.left,bottom:Math.max(a.y,k.clientY)-R.top},V=k1(b);if(V){const K=Array.from(V.querySelectorAll("*")).filter(M=>{const O=M.getBoundingClientRect();return O.left<N.right&&O.right>N.left&&O.top<N.bottom&&O.bottom>N.top&&O.width>0&&O.height>0}),X=(N.right-N.left)*(N.bottom-N.top),U=h2(K,X);if(console.log("[IframeSelection] Using multi-element selection logic"),U.length===1){const M=ju(U[0]);console.log("[IframeSelection] Single element via box selection:",U[0].tagName),c([M])}else if(U.length>1){const M=U.map(ju);console.log("[IframeSelection] Multiple elements selected:",M.length),c(M)}else console.log("[IframeSelection] No meaningful elements found in selection")}l(null)},[f,a,c]),A=x.useCallback(k=>{if(e.current=k,!k)return;const b=()=>{console.log("[IframeSelection] Iframe loaded")};return k.addEventListener("load",b),()=>{k.removeEventListener("load",b)}},[]);x.useEffect(()=>{var k,b;if(!h){if(_(),p(),l(null),(k=e.current)!=null&&k.parentElement){const R=e.current.parentElement.querySelector("#rivet-mouse-capture");R&&(R.style.display="none",R.style.pointerEvents="none")}document.body.style.cursor="auto";return}if((b=e.current)!=null&&b.parentElement){const R=e.current,N=m2(R.parentElement);N.style.display="block",N.style.pointerEvents="auto",N.style.cursor="crosshair",document.body.style.cursor="crosshair"}},[h,_,p]);const P=x.useCallback(()=>{const k=e.current;if(!k)return;const b=k.getBoundingClientRect();document.querySelectorAll('[id^="rivet-selection-"]').forEach(N=>{const V=N,$=V.__element;if($){const K=$.getBoundingClientRect(),X=b.left+K.left,U=b.top+K.top,M=K.width,O=K.height;Vu(X,U,M,O)?V.style.display="none":(V.style.display="block",V.style.left=`${X}px`,V.style.top=`${U}px`,V.style.width=`${M}px`,V.style.height=`${O}px`)}})},[]);x.useEffect(()=>{if(!h)return;const k=new ResizeObserver(()=>{P()}),b=new MutationObserver(()=>{P()});if(e.current){k.observe(e.current);const R=e.current.contentDocument;R&&b.observe(R.body,{childList:!0,subtree:!0,attributes:!0})}return window.addEventListener("resize",P),()=>{k.disconnect(),b.disconnect(),window.removeEventListener("resize",P)}},[h,P]),x.useEffect(()=>{var b;if(!h||!((b=e.current)!=null&&b.parentElement))return;const k=e.current.parentElement.querySelector("#rivet-mouse-capture");if(k)return console.log("[IframeSelection] Setting up mouse listeners on overlay"),k.addEventListener("mousemove",g),k.addEventListener("mouseleave",_),k.addEventListener("click",v),k.addEventListener("mousedown",w),k.addEventListener("mouseup",S),()=>{console.log("[IframeSelection] Cleaning up mouse listeners"),k.removeEventListener("mousemove",g),k.removeEventListener("mouseleave",_),k.removeEventListener("click",v),k.removeEventListener("mousedown",w),k.removeEventListener("mouseup",S)}},[h,g,v,w,S,_]),x.useEffect(()=>()=>{const k=document.getElementById("rivet-hover-overlay");k&&k.remove(),document.querySelectorAll('[id^="rivet-selection-"]').forEach(N=>N.remove()),document.querySelectorAll("#rivet-mouse-capture").forEach(N=>N.remove())},[]);const E=x.useCallback(()=>{i(null),o(new Set),l(null),_(),p()},[_,p]);return{setupIframe:A,clearSelectionState:E}},y2=({isLoading:t=!1})=>{const e=Mh(Dl),[n,r]=x.useState("view"),{setupIframe:i}=v2({mode:n});x.useEffect(()=>{n==="view"&&e([])},[n,e]);const s=o=>{r(o?"edit":"view")};return C.jsxs("div",{className:"relative h-full w-full",children:[C.jsx(c2,{mode:n,onModeChange:s,isLoading:t}),C.jsx("iframe",{ref:i,src:"/",className:"h-full w-full border-none",title:"Project Preview",sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-modals"})]})},_2=({type:t,value:e,onChange:n,disabled:r=!1})=>{const i=s=>{n(s.target.value)};switch(t){case"color":return C.jsxs("div",{className:"border-divider bg-main-input focus-within:ring-primary focus-within:border-primary flex w-28 items-center space-x-1 rounded border px-2 py-1 focus-within:ring-1",children:[C.jsx("input",{type:"color",value:e,onChange:i,disabled:r,className:"flex-shrink-0 cursor-pointer rounded border-0 outline-none",style:{width:"16px",height:"16px",padding:"0",margin:"0",border:"none",borderRadius:"2px",WebkitAppearance:"none",MozAppearance:"none",appearance:"none",aspectRatio:"1/1"},title:e}),C.jsx("span",{className:"text-content min-w-0 flex-1 text-center font-mono text-xs",children:e})]});case"range":return C.jsx("input",{type:"text",value:`${e}%`,onChange:s=>{const o=s.target.value.replace("%","");n(o)},disabled:r,className:"border-divider bg-main-input focus:ring-primary focus:border-primary text-content placeholder-content-subtle w-28 rounded border px-4 py-1 text-right text-xs focus:ring-1",placeholder:"100%"});case"text":case"spacing":default:return C.jsx("input",{type:"text",value:e,onChange:i,disabled:r,className:"border-divider bg-main-input focus:ring-primary focus:border-primary text-content placeholder-content-subtle w-28 rounded border px-4 py-1 text-right text-xs focus:ring-1"})}},Fm=Il("StreamingUtils"),w2=async(t,e)=>{var c;const{url:n,method:r="POST",headers:i={},body:s}=t,{onChunk:o,onProgress:a,onComplete:l,onError:u}=e;try{const d=await fetch(n,{method:r,headers:{"Content-Type":"application/json",...i},body:JSON.stringify(s)});if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);const f=(c=d.body)==null?void 0:c.getReader(),h=new TextDecoder;if(!f)throw new Error("No response body reader available");let y="",m="";for(;;){const{done:_,value:p}=await f.read();if(_)break;y+=h.decode(p,{stream:!0});const g=y.split(`
|
|
142
|
-
`);y=g.pop()||"";for(const v of g)if(v.trim()!==""){if(v.startsWith("event: ")){m=v.slice(7).trim();continue}if(v.startsWith("data: "))try{const w=JSON.parse(v.slice(6));if(m==="progress")a("current",w.content||"");else if(w.content&&!w.done)o("current",w.content);else if(w.done){l("current",w.usage,w);break}else if(w.error){u("current",w.error);break}}catch(w){Fm.error("Failed to parse SSE data:",w)}}}}catch(d){Fm.error("Streaming request failed:",d);const f=d instanceof Error?d.message:"An unexpected error occurred.";u("unknown",f)}},x2=t=>{const e=(l,u)=>{t(c=>c.map(d=>d.id===l?{...d,message:d.message+u}:d))},n=l=>{t(u=>u.map(c=>c.id===l?{...c,isLoading:!1}:c))},r=(l,u)=>{t(c=>c.map(d=>d.id===l?{...d,message:`Error: ${u}`,isLoading:!1}:d))},i=(l,u,c="",d=!1)=>{const f={id:l,message:c,isUser:u,isLoading:!u,isProgress:d};t(h=>[...h,f])};return{updateStreamingMessage:e,finalizeStreamingMessage:n,setErrorMessage:r,addStreamingMessage:i,addProgressMessage:(l,u="")=>{i(l,!1,u,!0)},updateOrAddProgressMessage:(l,u)=>{t(c=>{const d=c.filter(h=>!h.isProgress),f={id:l,message:u,isUser:!1,isLoading:!0,isProgress:!0};return[...d,f]})},removeProgressMessages:()=>{t(l=>l.filter(u=>!u.isProgress))}}},jm=Il("useGenerateCode"),S2=()=>{const[t,e]=x.useState(!1),[n,r]=x.useState(null),[i,s]=x.useState(""),o=x.useCallback(async c=>{e(!0),r(null),s("");try{const{instruction:d,elements:f,temperature:h=.7,shouldStream:y=!1,messages:m,onChunk:_,onProgress:p,onComplete:g,onError:v}=c;return f&&f.length>0?await a({instruction:d,elements:f,temperature:h},{onChunk:_,onProgress:p,onComplete:g,onError:v}):(y&&m&&jm.warn("Streaming LLM requests are not supported yet"),await l({instruction:d,messages:m,temperature:h}))}catch(d){const f=d instanceof Error?d.message:"Code generation failed";return r(f),jm.error("Code generation error:",f),null}finally{e(!1)}},[]),a=async(c,d)=>{var m;const f={url:"/api/code/modify",body:{instruction:c.instruction,elements:c.elements,temperature:c.temperature}};let h=null,y=null;try{if(await w2(f,{onChunk:(_,p)=>{var g;s(v=>v+p),(g=d.onChunk)==null||g.call(d,p)},onProgress:(_,p)=>{var g;(g=d.onProgress)==null||g.call(d,p)},onComplete:(_,p,g)=>{var w;h=g||{changes:"Code modification completed",filesModified:[],totalElements:c.elements.length},(w=d.onComplete)==null||w.call(d,p)},onError:(_,p)=>{var g;y=p,(g=d.onError)==null||g.call(d,p)}}),y)throw new Error(y);return h}catch(_){const p=_ instanceof Error?_.message:"Streaming failed";throw y||(m=d.onError)==null||m.call(d,p),_}},l=async c=>{var h;const d=await fetch("/api/code/modify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:c.messages||[{role:"user",content:c.instruction}],temperature:c.temperature,stream:!1})});if(!d.ok){const y=await d.json();throw new Error(y.error||`HTTP ${d.status}`)}const f=await d.json();return{content:((h=f.data)==null?void 0:h.text)||f.text}},u=x.useCallback(async(c,d,f)=>{const y=`Apply these CSS styles: ${Object.entries(d).map(([m,_])=>`${m}: ${_}`).join(", ")}`;return o({instruction:y,elements:[c],temperature:.3,...f})},[o]);return{generateCode:o,generateCodeWithCSS:u,isGenerating:t,error:n,streamingContent:i,clearError:()=>r(null),clearStreamingContent:()=>s("")}};var E2=oy[" useId ".trim().toString()]||(()=>{}),k2=0;function P1(t){const[e,n]=x.useState(E2());return Rr(()=>{n(r=>r??String(k2++))},[t]),t||(e?`radix-${e}`:"")}var $l="Collapsible",[C2,T1]=Nl($l),[b2,Fh]=C2($l),A1=x.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l,u]=Ll({prop:r,defaultProp:i??!1,onChange:o,caller:$l});return C.jsx(b2,{scope:n,disabled:s,contentId:P1(),open:l,onOpenToggle:x.useCallback(()=>u(c=>!c),[u]),children:C.jsx(nt.div,{"data-state":Vh(l),"data-disabled":s?"":void 0,...a,ref:e})})});A1.displayName=$l;var R1="CollapsibleTrigger",M1=x.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,i=Fh(R1,n);return C.jsx(nt.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Vh(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:e,onClick:Qe(t.onClick,i.onOpenToggle)})});M1.displayName=R1;var jh="CollapsibleContent",I1=x.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=Fh(jh,t.__scopeCollapsible);return C.jsx(Ih,{present:n||i.open,children:({present:s})=>C.jsx(P2,{...r,ref:e,present:s})})});I1.displayName=jh;var P2=x.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:i,...s}=t,o=Fh(jh,n),[a,l]=x.useState(r),u=x.useRef(null),c=kn(e,u),d=x.useRef(0),f=d.current,h=x.useRef(0),y=h.current,m=o.open||a,_=x.useRef(m),p=x.useRef(void 0);return x.useEffect(()=>{const g=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(g)},[]),Rr(()=>{const g=u.current;if(g){p.current=p.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const v=g.getBoundingClientRect();d.current=v.height,h.current=v.width,_.current||(g.style.transitionDuration=p.current.transitionDuration,g.style.animationName=p.current.animationName),l(r)}},[o.open,r]),C.jsx(nt.div,{"data-state":Vh(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...s,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...t.style},children:m&&i})});function Vh(t){return t?"open":"closed"}var T2=A1,A2=M1,R2=I1,M2=x.createContext(void 0);function I2(t){const e=x.useContext(M2);return t||e||"ltr"}var Wt="Accordion",N2=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Bh,L2,O2]=n1(Wt),[Fl,UN]=Nl(Wt,[O2,T1]),zh=T1(),N1=ee.forwardRef((t,e)=>{const{type:n,...r}=t,i=r,s=r;return C.jsx(Bh.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?C.jsx(j2,{...s,ref:e}):C.jsx(F2,{...i,ref:e})})});N1.displayName=Wt;var[L1,D2]=Fl(Wt),[O1,$2]=Fl(Wt,{collapsible:!1}),F2=ee.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:s=!1,...o}=t,[a,l]=Ll({prop:n,defaultProp:r??"",onChange:i,caller:Wt});return C.jsx(L1,{scope:t.__scopeAccordion,value:ee.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:ee.useCallback(()=>s&&l(""),[s,l]),children:C.jsx(O1,{scope:t.__scopeAccordion,collapsible:s,children:C.jsx(D1,{...o,ref:e})})})}),j2=ee.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...s}=t,[o,a]=Ll({prop:n,defaultProp:r??[],onChange:i,caller:Wt}),l=ee.useCallback(c=>a((d=[])=>[...d,c]),[a]),u=ee.useCallback(c=>a((d=[])=>d.filter(f=>f!==c)),[a]);return C.jsx(L1,{scope:t.__scopeAccordion,value:o,onItemOpen:l,onItemClose:u,children:C.jsx(O1,{scope:t.__scopeAccordion,collapsible:!0,children:C.jsx(D1,{...s,ref:e})})})}),[V2,jl]=Fl(Wt),D1=ee.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:s="vertical",...o}=t,a=ee.useRef(null),l=kn(a,e),u=L2(n),d=I2(i)==="ltr",f=Qe(t.onKeyDown,h=>{var E;if(!N2.includes(h.key))return;const y=h.target,m=u().filter(k=>{var b;return!((b=k.ref.current)!=null&&b.disabled)}),_=m.findIndex(k=>k.ref.current===y),p=m.length;if(_===-1)return;h.preventDefault();let g=_;const v=0,w=p-1,S=()=>{g=_+1,g>w&&(g=v)},A=()=>{g=_-1,g<v&&(g=w)};switch(h.key){case"Home":g=v;break;case"End":g=w;break;case"ArrowRight":s==="horizontal"&&(d?S():A());break;case"ArrowDown":s==="vertical"&&S();break;case"ArrowLeft":s==="horizontal"&&(d?A():S());break;case"ArrowUp":s==="vertical"&&A();break}const P=g%p;(E=m[P].ref.current)==null||E.focus()});return C.jsx(V2,{scope:n,disabled:r,direction:i,orientation:s,children:C.jsx(Bh.Slot,{scope:n,children:C.jsx(nt.div,{...o,"data-orientation":s,ref:l,onKeyDown:r?void 0:f})})})}),Ya="AccordionItem",[B2,Uh]=Fl(Ya),$1=ee.forwardRef((t,e)=>{const{__scopeAccordion:n,value:r,...i}=t,s=jl(Ya,n),o=D2(Ya,n),a=zh(n),l=P1(),u=r&&o.value.includes(r)||!1,c=s.disabled||t.disabled;return C.jsx(B2,{scope:n,open:u,disabled:c,triggerId:l,children:C.jsx(T2,{"data-orientation":s.orientation,"data-state":U1(u),...a,...i,ref:e,disabled:c,open:u,onOpenChange:d=>{d?o.onItemOpen(r):o.onItemClose(r)}})})});$1.displayName=Ya;var F1="AccordionHeader",j1=ee.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=jl(Wt,n),s=Uh(F1,n);return C.jsx(nt.h3,{"data-orientation":i.orientation,"data-state":U1(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:e})});j1.displayName=F1;var kd="AccordionTrigger",V1=ee.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=jl(Wt,n),s=Uh(kd,n),o=$2(kd,n),a=zh(n);return C.jsx(Bh.ItemSlot,{scope:n,children:C.jsx(A2,{"aria-disabled":s.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:s.triggerId,...a,...r,ref:e})})});V1.displayName=kd;var B1="AccordionContent",z1=ee.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=jl(Wt,n),s=Uh(B1,n),o=zh(n);return C.jsx(R2,{role:"region","aria-labelledby":s.triggerId,"data-orientation":i.orientation,...o,...r,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});z1.displayName=B1;function U1(t){return t?"open":"closed"}var z2=N1,U2=$1,H2=j1,W2=V1,K2=z1;const ss=({children:t,defaultValue:e=[],className:n=""})=>C.jsx(z2,{type:"multiple",defaultValue:e,className:`space-y-4 ${n}`,children:t}),G2=({value:t,title:e,icon:n,children:r,className:i=""})=>C.jsxs(U2,{value:t,className:`flex h-full flex-col overflow-hidden rounded-none ${i}`,children:[C.jsx(H2,{children:C.jsxs(W2,{className:"hover:bg-divider-muted focus:bg-divider-muted group flex w-full items-center justify-between px-2 text-left focus:outline-none",children:[C.jsxs("div",{className:"flex items-center space-x-2 py-3",children:[n,C.jsx("h5",{className:"text-content text-sm font-medium",children:e})]}),C.jsx(KA,{className:"text-content-subtle h-4 w-4 transition-transform group-data-[state=open]:rotate-180"})]})}),C.jsx(K2,{className:"data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up min-h-0 flex-1",children:C.jsx("div",{className:"h-full",children:r})})]});ss.Item=G2;const q2=({message:t,isUser:e})=>C.jsx("div",{className:`flex ${e?"justify-end":"justify-start"} mb-4`,children:C.jsx("div",{className:`max-w-[80%] ${e?"order-2":"order-1"}`,children:C.jsx("div",{className:`rounded-lg px-3 py-2 text-sm ${e?"bg-divider-muted border-divider text-content border":"text-content-muted bg-transparent"}`,children:C.jsx("div",{className:"whitespace-pre-wrap",children:t})})})}),Y2=({message:t,isLoading:e=!0})=>C.jsxs("div",{className:"text-content-muted flex items-center gap-2 text-sm",children:[e?C.jsx(Jw,{className:"text-content-subtle h-4 w-4 animate-spin"}):null,C.jsx("span",{className:"whitespace-pre-wrap font-sans",children:t})]}),X2=({message:t})=>C.jsx("pre",{className:"text-content-muted overflow-x-auto whitespace-pre-wrap font-sans text-sm",children:t}),Q2=({messages:t})=>{const e=x.useRef(null);x.useEffect(()=>{e.current&&(e.current.scrollTop=e.current.scrollHeight)},[t]);const n=r=>r.isUser?C.jsx(q2,{message:r.message,isUser:r.isUser},r.id):r.isProgress?C.jsx(Y2,{message:r.message,isLoading:r.isLoading},r.id):C.jsx(X2,{message:r.message},r.id);return t.length===0?C.jsx("div",{className:"text-content-subtle flex flex-1 items-center justify-center text-sm"}):C.jsx("div",{ref:e,className:"scrollbar-hide h-full space-y-3 overflow-y-auto p-2",children:t.map(n)})},Z2=({onSend:t,disabled:e=!1,placeholder:n="Type your message..."})=>{const[r,i]=x.useState(""),s=x.useRef(null),o=()=>{r.trim()&&!e&&(t(r.trim()),i(""))};x.useEffect(()=>{s.current&&(s.current.style.height="auto",s.current.style.height=`${s.current.scrollHeight}px`)},[r]);const a=l=>{l.key==="Enter"&&!l.shiftKey&&(l.preventDefault(),o())};return C.jsxs("div",{className:"relative px-2",children:[C.jsx("textarea",{ref:s,value:r,onChange:l=>i(l.target.value),onKeyDown:a,placeholder:n,disabled:e,className:"border-divider bg-main-input focus:ring-primary focus:border-primary text-content placeholder-content-subtle max-h-32 min-h-[2.5rem] w-full resize-none overflow-hidden rounded-lg border py-2 pl-3 pr-10 text-sm focus:ring-1 disabled:opacity-50",rows:3}),C.jsx("button",{onClick:o,disabled:!r.trim()||e,className:"bg-primary text-content hover:bg-primary-hover absolute bottom-4 right-4 flex items-center justify-center rounded p-1 transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:C.jsx(iR,{className:"h-5 w-5"})})]})},Fo=Il("ElementInspector"),J2=[{key:"backgroundColor",label:"Background Color",type:"color"},{key:"color",label:"Text Color",type:"color"},{key:"fontSize",label:"Text Size",type:"text"},{key:"opacity",label:"Opacity",type:"range"},{key:"borderColor",label:"Border Color",type:"color"},{key:"borderWidth",label:"Border Width",type:"text"},{key:"borderRadius",label:"Border Radius",type:"text"},{key:"paddingVertical",label:"Padding Vertical",type:"spacing"},{key:"paddingHorizontal",label:"Padding Horizontal",type:"spacing"},{key:"marginVertical",label:"Margin Vertical",type:"spacing",isHidden:!0},{key:"marginHorizontal",label:"Margin Horizontal",type:"spacing",isHidden:!0}],eM={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",blue:"#0000ff",yellow:"#ffff00",cyan:"#00ffff",magenta:"#ff00ff",silver:"#c0c0c0",gray:"#808080",grey:"#808080"},tM={paddingVertical:["paddingTop","paddingBottom"],paddingHorizontal:["paddingLeft","paddingRight"],marginVertical:["marginTop","marginBottom"],marginHorizontal:["marginLeft","marginRight"]},jo=(t,e,n)=>{const r=t[e],i=t[n];return r&&i&&r===i?r:r&&i&&r!==i?`${r}/${i}`:r||i||""},nM=t=>t.replace(/([A-Z])/g,"-$1").toLowerCase(),Vm=(t,e)=>t[e]||t[nM(e)]||"",rM=t=>{if(!t||t==="transparent"||t==="inherit"||t==="initial")return"#000000";if(t.startsWith("#"))return t;const e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(e){const n=parseInt(e[1]),r=parseInt(e[2]),i=parseInt(e[3]),s=o=>{const a=o.toString(16);return a.length===1?"0"+a:a};return`#${s(n)}${s(r)}${s(i)}`}return eM[t.toLowerCase()]||"#000000"},iM=({onClick:t,disabled:e=!1,isLoading:n=!1,children:r})=>C.jsxs("button",{onClick:t,disabled:e,className:"bg-primary text-content hover:bg-primary-hover flex w-full cursor-pointer items-center justify-center gap-2 rounded px-3 py-2 text-sm transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-50",children:[n?C.jsx(Jw,{className:"h-4 w-4 animate-spin"}):null,r]}),sM=({onClose:t,chatMessages:e,setChatMessages:n})=>{const[r,i]=Qw(Dl);if(r.length===0)return null;const s=r.length===1,o=r[0];return C.jsxs("div",{className:"bg-main border-divider scrollbar-hide w-96 cursor-auto overflow-y-auto border-l","data-cy":"element-inspector",children:[C.jsxs("div",{className:"border-divider border-b p-4",children:[C.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[C.jsx("h3",{className:"text-content text-lg font-semibold",children:"Element"}),C.jsx("button",{onClick:t,className:"text-content-subtle hover:text-content-muted",children:"✕"})]}),C.jsx("div",{className:"text-content-muted text-sm",children:s?C.jsxs(C.Fragment,{children:["Selected:"," ",C.jsxs("span",{className:"text-primary font-mono",children:[o.tagName,o.className&&`.${o.className.split(" ")[0]}`,o.id&&`#${o.id}`]})]}):C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"mb-2 font-medium",children:["Selected ",r.length," elements:"]}),C.jsx("div",{className:"max-h-32 space-y-1 overflow-y-auto",children:r.map((a,l)=>C.jsxs("div",{className:"text-xs",children:[C.jsxs("span",{className:"text-primary font-mono",children:[a.tagName,a.className&&`.${a.className.split(" ")[0]}`,a.id&&`#${a.id}`]}),a.filePath&&C.jsxs("span",{className:"text-content-subtle ml-1",children:["in ",a.filePath.split("/").pop()]})]},`${a.xpath}-${l}`))})]})})]}),C.jsx("div",{children:C.jsx(oM,{selectedElements:r,chatMessages:e,setChatMessages:n,onElementsChange:i})})]})},oM=({selectedElements:t,chatMessages:e,setChatMessages:n,onElementsChange:r})=>{const i=t[0],s=t.length>1,[o,a]=x.useState({}),[l,u]=x.useState({isOpen:!1,type:"success",title:"",description:"",onOpenChange:()=>{}}),c=x2(n),{generateCode:d,generateCodeWithCSS:f,isGenerating:h}=S2(),y=t.every(E=>!!E.filePath),m=()=>{document.querySelectorAll('[id^="rivet-selection-"]').forEach(b=>b.remove());const k=document.getElementById("rivet-hover-overlay");k&&(k.style.display="none"),r([])},_=E=>{const{computedStyles:k}=i,b=["color","backgroundColor","borderColor"];switch(E){case"paddingVertical":return jo(k,"padding-top","padding-bottom");case"paddingHorizontal":return jo(k,"padding-left","padding-right");case"marginVertical":return jo(k,"margin-top","margin-bottom");case"marginHorizontal":return jo(k,"margin-left","margin-right");case"opacity":return Vm(k,"opacity")||"1";case"borderColor":return k["border-color"]||k["border-top-color"]||k["border-right-color"]||k["border-bottom-color"]||k["border-left-color"]||"";case"borderWidth":return k["border-width"]||k["border-top-width"]||k["border-right-width"]||k["border-bottom-width"]||k["border-left-width"]||"";case"borderRadius":return k["border-radius"]||k["border-top-left-radius"]||"";default:const R=Vm(k,E);return b.includes(E)&&R?rM(R):R}},p=E=>o[E]??_(E),g=(E,k)=>{a(b=>({...b,[E]:k}))},v=(E,k)=>{const b=tM[E];b&&a(R=>{const N={...R};return b.forEach(V=>{N[V]=k}),N})},w=E=>{const k=p(E),b=parseFloat(k??"");return isNaN(b)?100:Math.round(b*100)},S=(E,k)=>{const b=k.replace("%","").trim(),R=parseFloat(b);if(!isNaN(R)){const V=(Math.max(0,Math.min(100,R))/100).toString();g(E,V)}},A=async()=>{if(Object.keys(o).length!==0){if(!i.filePath){Fo.error("Please find the component file first using the search functionality.");return}try{const E=await f(i,o);E?(Fo.info("CSS changes applied successfully:",E.changes),a({}),m()):u({isOpen:!0,type:"error",title:"Failed to apply CSS changes",description:"An error occurred while applying the style changes.",onOpenChange:k=>u(b=>({...b,isOpen:k}))})}catch(E){Fo.error("Error applying CSS changes:",E),u({isOpen:!0,type:"error",title:"Failed to apply CSS changes",description:E instanceof Error?E.message:"An unexpected error occurred.",onOpenChange:k=>u(b=>({...b,isOpen:k}))})}}},P=async E=>{const k=Date.now().toString(),b=(Date.now()+1).toString();if(c.addStreamingMessage(k,!0,E),c.addStreamingMessage(b,!1,""),t.filter(V=>!V.filePath).length>0){c.setErrorMessage(b,"Cannot modify - component files not found for some elements.");return}const N="progress-"+Date.now();try{await d({instruction:E,elements:t,shouldStream:!0,onProgress:V=>{c.updateOrAddProgressMessage(N,V)},onChunk:V=>{c.removeProgressMessages(),c.updateStreamingMessage(b,V)},onComplete:()=>{c.removeProgressMessages(),c.finalizeStreamingMessage(b),m(),u({isOpen:!0,type:"success",title:"Code modification completed!",description:"Changes applied successfully.",onOpenChange:V=>u($=>({...$,isOpen:V}))})},onError:V=>{c.removeProgressMessages(),c.setErrorMessage(b,V),u({isOpen:!0,type:"error",title:"Code Modification Error",description:V,onOpenChange:$=>u(K=>({...K,isOpen:$}))})}})}catch(V){Fo.error("Error with streaming request:",V);const $=V instanceof Error?V.message:"An unexpected error occurred.";c.removeProgressMessages(),c.setErrorMessage(b,$),u({isOpen:!0,type:"error",title:"Failed to generate AI response",description:$,onOpenChange:K=>u(X=>({...X,isOpen:K}))})}};return C.jsxs("div",{className:"bg-main scrollbar-hide flex h-screen flex-col overflow-hidden",children:[C.jsx("div",{className:"flex-shrink-0",children:C.jsx(ss,{defaultValue:["ai-input"],children:C.jsx(ss.Item,{value:"ai-input",title:s?"Change multiple elements":"Change an element",icon:C.jsx(oR,{className:"text-content h-4 w-4"}),children:C.jsxs("div",{className:"flex h-96 flex-col",children:[C.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:C.jsx(Q2,{messages:e})}),C.jsx("div",{className:"border-divider bg-main flex-shrink-0 border-t py-4",children:C.jsx(Z2,{onSend:P,disabled:h})})]})})})}),C.jsx("div",{className:"border-divider flex-shrink-0 border-t pt-4",children:C.jsx(ss,{defaultValue:["style-properties"],className:"overflow-visible",children:C.jsx(ss.Item,{value:"style-properties",title:"Style properties",icon:C.jsx(eR,{className:"text-content h-4 w-4"}),children:C.jsxs("div",{className:"flex flex-col",children:[C.jsx("div",{className:"space-y-3 p-2",children:J2.filter(({isHidden:E})=>!E).map(({key:E,label:k,type:b})=>C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsx("label",{className:"text-content flex-1 text-xs",children:k}),C.jsx(_2,{type:b,value:b==="range"?w(E):p(E),onChange:R=>{b==="spacing"?v(E,R):b==="range"?S(E,R+"%"):g(E,R)}})]},E))}),C.jsx("div",{className:"border-divider border-t px-2 pt-3",children:C.jsx(iM,{onClick:A,disabled:Object.keys(o).length===0||h||!y,isLoading:h,children:h?"Applying Style Changes...":"Apply Style Changes"})})]})})})}),y?null:C.jsx("div",{className:"border-accent-warning bg-accent-warning/20 text-accent-warning rounded border p-3 text-xs",children:s?"Cannot modify - component files not found for some elements.":"Cannot modify - no component file found."}),C.jsx(E1,{children:C.jsx(S1,{isOpen:l.isOpen,onOpenChange:l.onOpenChange,type:l.type,title:l.title,description:l.description})})]})},aM=()=>{const[t,e]=Qw(Dl),[n,r]=x.useState([]);x.useEffect(()=>{r([])},[t]);const i=()=>{e([])};return C.jsxs(Vw.div,{className:"flex h-screen",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5,ease:"easeOut"},children:[C.jsx("div",{className:"relative flex flex-1 flex-col",children:C.jsx(y2,{})}),C.jsx(sM,{onClose:i,chatMessages:n,setChatMessages:r})]})};var T=typeof window<"u"?window:void 0,lt=typeof globalThis<"u"?globalThis:T,H1=Array.prototype,Bm=H1.forEach,zm=H1.indexOf,gt=lt==null?void 0:lt.navigator,j=lt==null?void 0:lt.document,st=lt==null?void 0:lt.location,Cd=lt==null?void 0:lt.fetch,bd=lt!=null&<.XMLHttpRequest&&"withCredentials"in new lt.XMLHttpRequest?lt.XMLHttpRequest:void 0,Um=lt==null?void 0:lt.AbortController,rt=gt==null?void 0:gt.userAgent,H=T??{},hn={DEBUG:!1,LIB_VERSION:"1.268.0"};function Hm(t,e,n,r,i,s,o){try{var a=t[s](o),l=a.value}catch(u){return void n(u)}a.done?e(l):Promise.resolve(l).then(r,i)}function Wm(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function o(l){Hm(s,r,i,o,a,"next",l)}function a(l){Hm(s,r,i,o,a,"throw",l)}o(void 0)})}}function D(){return D=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},D.apply(null,arguments)}function W1(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var lM=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function q(t,e){return t.indexOf(e)!==-1}var Vl=function(t){return t.trim()},Pd=function(t){return t.replace(/^\$/,"")},uM=Array.isArray,K1=Object.prototype,G1=K1.hasOwnProperty,Bl=K1.toString,oe=uM||function(t){return Bl.call(t)==="[object Array]"},Tt=t=>typeof t=="function",we=t=>t===Object(t)&&!oe(t),ii=t=>{if(we(t)){for(var e in t)if(G1.call(t,e))return!1;return!0}return!1},L=t=>t===void 0,xe=t=>Bl.call(t)=="[object String]",Td=t=>xe(t)&&t.trim().length===0,bn=t=>t===null,J=t=>L(t)||bn(t),He=t=>Bl.call(t)=="[object Number]",Vt=t=>Bl.call(t)==="[object Boolean]",cM=t=>t instanceof FormData,dM=t=>q(lM,t);function Ad(t){return t===null||typeof t!="object"}function Xa(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"}function q1(t){return!L(Event)&&function(e,n){try{return e instanceof n}catch{return!1}}(t,Event)}var fM=[!0,"true",1,"1","yes"],Bu=t=>q(fM,t),hM=[!1,"false",0,"0","no"];function mt(t,e,n,r,i){return e>n&&(r.warn("min cannot be greater than max."),e=n),He(t)?t>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t<e?(r.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),mt(i||n,e,n,r))}class Y1{stop(){this.t&&(clearInterval(this.t),this.t=void 0)}constructor(e){this.i=e,this.o={},this.h=()=>{Object.keys(this.o).forEach(n=>{var r=this.m(n)+this.S;r>=this.k?delete this.o[n]:this.$(n,r)})},this.m=n=>this.o[String(n)],this.$=(n,r)=>{this.o[String(n)]=r},this.consumeRateLimit=n=>{var r,i=(r=this.m(n))!=null?r:this.k;if((i=Math.max(i-1,0))===0)return!0;this.$(n,i);var s,o=i===0;return o&&((s=this.P)==null||s.call(this,n)),o},this.P=this.i.P,this.k=mt(this.i.bucketSize,0,100,this.i.I),this.S=mt(this.i.refillRate,0,this.k,this.i.I),this.R=mt(this.i.refillInterval,0,864e5,this.i.I),this.t=setInterval(()=>{this.h()},this.R)}}var Vo,Km,zu,pM=t=>t instanceof Error;function gM(t){var e=globalThis._posthogChunkIds;if(e){var n=Object.keys(e);return zu&&n.length===Km||(Km=n.length,zu=n.reduce((r,i)=>{Vo||(Vo={});var s=Vo[i];if(s)r[s[0]]=s[1];else for(var o=t(i),a=o.length-1;a>=0;a--){var l=o[a],u=l==null?void 0:l.filename,c=e[i];if(u&&c){r[u]=c,Vo[i]=[u,c];break}}return r},{})),zu}}var Ci="?";function Rd(t,e,n,r){var i={platform:"web:javascript",filename:t,function:e==="<anonymous>"?Ci:e,in_app:!0};return L(n)||(i.lineno=n),L(r)||(i.colno=r),i}var X1=(t,e)=>{var n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:Ci,n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]},mM=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,vM=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,yM=/\((\S*)(?::(\d+))(?::(\d+))\)/,_M=t=>{var e=mM.exec(t);if(e){var[,n,r,i]=e;return Rd(n,Ci,+r,+i)}var s=vM.exec(t);if(s){if(s[2]&&s[2].indexOf("eval")===0){var o=yM.exec(s[2]);o&&(s[2]=o[1],s[3]=o[2],s[4]=o[3])}var[a,l]=X1(s[1]||Ci,s[2]);return Rd(l,a,s[3]?+s[3]:void 0,s[4]?+s[4]:void 0)}},wM=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xM=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,SM=t=>{var e=wM.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){var n=xM.exec(e[3]);n&&(e[1]=e[1]||"eval",e[3]=n[1],e[4]=n[2],e[5]="")}var r=e[3],i=e[1]||Ci;return[i,r]=X1(i,r),Rd(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Gm=/\(error: (.*)\)/,qm=50;function EM(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=[],o=r.split(`
|
|
143
|
-
`),a=i;a<o.length;a++){var l=o[a];if(!(l.length>1024)){var u=Gm.test(l)?l.replace(Gm,"$1"):l;if(!u.match(/\S*Error: /)){for(var c of e){var d=c(u);if(d){s.push(d);break}}if(s.length>=qm)break}}}return function(f){if(!f.length)return[];var h=Array.from(f);return h.reverse(),h.slice(0,qm).map(y=>{return D({},y,{filename:y.filename||(m=h,m[m.length-1]||{}).filename,function:y.function||Ci});var m})}(s)}}class kM{buildFromUnknown(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n&&n.mechanism||{handled:!0,type:"generic"},i=this.buildCoercingContext(r,n,0).apply(e),s=this.buildParsingContext(),o=this.parseStacktrace(i,s);return{$exception_list:this.convertToExceptionList(o,r),$exception_level:"error"}}coerceFallback(e){var n;return{type:"Error",value:"Unknown error",stack:(n=e.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(e,n){var r,i;return e.cause!=null&&(r=this.parseStacktrace(e.cause,n)),e.stack!=""&&e.stack!=null&&(i=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?1:0),n.chunkIdMap)),D({},e,{cause:r,stack:i})}applyChunkIds(e,n){return e.map(r=>(r.filename&&n&&(r.chunk_id=n[r.filename]),r))}applyCoercers(e,n){for(var r of this.coercers)if(r.match(e))return r.coerce(e,n);return this.coerceFallback(n)}applyModifiers(e){var n=this;return Wm(function*(){var r=e;for(var i of n.modifiers)r=yield i(r);return r})()}modifyFrames(e){var n=this;return Wm(function*(){var r;e.cause!=null&&(r=yield n.modifyFrames(e.cause));var i=[];return e.stack!=null&&(i=yield n.applyModifiers(e.stack)),D({},e,{cause:r,stack:i})})()}convertToExceptionList(e,n){var r,i,s,o={type:e.type,value:e.value,mechanism:{type:(r=n.type)!=null?r:"generic",handled:(i=n.handled)==null||i,synthetic:(s=e.synthetic)!=null&&s}};e.stack&&(o.stacktrace={type:"raw",frames:e.stack});var a=[o];return e.cause!=null&&a.push(...this.convertToExceptionList(e.cause,D({},n,{handled:!0}))),a}buildParsingContext(){return{chunkIdMap:gM(this.stackParser)}}buildCoercingContext(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=(s,o)=>{if(o<=4){var a=this.buildCoercingContext(e,n,o);return this.applyCoercers(s,a)}};return D({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:e,apply:s=>i(s,r),next:s=>i(s,r+1)})}constructor(e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r=[]),this.coercers=e,this.modifiers=r,this.stackParser=EM(...n)}}class CM{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,n){var r=xe(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var n=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?n+": "+e.message:n}isDOMException(e){return Xa(e,"DOMException")}isDOMError(e){return Xa(e,"DOMError")}}class bM{match(e){return(n=>n instanceof Error)(e)}coerce(e,n){return{type:this.getType(e),value:this.getMessage(e,n),stack:this.getStack(e),cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,n){var r=e.message;return r.error&&typeof r.error.message=="string"?String(r.error.message):String(r)}getStack(e){return e.stacktrace||e.stack||void 0}}class PM{match(e){return Xa(e,"ErrorEvent")&&e.error!=null}coerce(e,n){var r,i=n.apply(e.error);return i||{type:"ErrorEvent",value:e.message,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}constructor(){}}var TM=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class AM{match(e){return typeof e=="string"}coerce(e,n){var r,[i,s]=this.getInfos(e);return{type:i??"Error",value:s??e,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(e){var n="Error",r=e,i=e.match(TM);return i&&(n=i[1],r=i[2]),[n,r]}}var RM=["fatal","error","warning","log","info","debug"];function Q1(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:40,n=Object.keys(t);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(!(i.length>e))return r===n.length||i.length<=e?i:i.slice(0,e)+"..."}return""}class MM{match(e){return typeof e=="object"&&e!==null}coerce(e,n){var r,i=this.getErrorPropertyFromObject(e);return i?n.apply(i):{type:this.getType(e),value:this.getValue(e),stack:(r=n.syntheticException)==null?void 0:r.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return q1(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&typeof e.name=="string"){var n="'"+e.name+"' captured as exception";return"message"in e&&typeof e.message=="string"&&(n+=" with message: '"+e.message+"'"),n}if("message"in e&&typeof e.message=="string")return e.message;var r=this.getObjectClassName(e);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+Q1(e)}isSeverityLevel(e){return xe(e)&&!Td(e)&&RM.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];if(pM(r))return r}}getObjectClassName(e){try{var n=Object.getPrototypeOf(e);return n?n.constructor.name:void 0}catch{return}}}class IM{match(e){return q1(e)}coerce(e,n){var r,i=e.constructor.name;return{type:i,value:i+" captured as exception with keys: "+Q1(e),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class NM{match(e){return Ad(e)}coerce(e,n){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class LM{match(e){return Xa(e,"PromiseRejectionEvent")}coerce(e,n){var r,i=this.getUnhandledRejectionReason(e);return Ad(i)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(i),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(i)}getUnhandledRejectionReason(e){if(Ad(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}}var Z1=t=>{var e={T:function(n){if(T&&(hn.DEBUG||H.POSTHOG_DEBUG)&&!L(T.console)&&T.console){for(var r=("__rrweb_original__"in T.console[n])?T.console[n].__rrweb_original__:T.console[n],i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];r(t,...s)}},info:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.T("log",...r)},warn:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.T("warn",...r)},error:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.T("error",...r)},critical:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];console.error(t,...r)},uninitializedWarning:n=>{e.error("You must initialize PostHog before calling "+n)},createLogger:n=>Z1(t+" "+n)};return e},F=Z1("[PostHog.js]"),Re=F.createLogger,OM=Re("[ExternalScriptsLoader]"),Ym=(t,e,n)=>{if(t.config.disable_external_dependency_loading)return OM.warn(e+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=j==null?void 0:j.querySelectorAll("script");if(r){for(var i,s=function(){if(r[o].src===e){var l=r[o];return l.__posthog_loading_callback_fired?{v:n()}:(l.addEventListener("load",u=>{l.__posthog_loading_callback_fired=!0,n(void 0,u)}),l.onerror=u=>n(u),{v:void 0})}},o=0;o<r.length;o++)if(i=s())return i.v}var a=()=>{if(!j)return n("document not found");var l=j.createElement("script");if(l.type="text/javascript",l.crossOrigin="anonymous",l.src=e,l.onload=d=>{l.__posthog_loading_callback_fired=!0,n(void 0,d)},l.onerror=d=>n(d),t.config.prepare_external_dependency_script&&(l=t.config.prepare_external_dependency_script(l)),!l)return n("prepare_external_dependency_script returned null");var u,c=j.querySelectorAll("body > script");c.length>0?(u=c[0].parentNode)==null||u.insertBefore(l,c[0]):j.body.appendChild(l)};j!=null&&j.body?a():j==null||j.addEventListener("DOMContentLoaded",a)};H.__PosthogExtensions__=H.__PosthogExtensions__||{},H.__PosthogExtensions__.loadExternalDependency=(t,e,n)=>{var r="/static/"+e+".js?v="+t.version;if(e==="remote-config"&&(r="/array/"+t.config.token+"/config.js"),e==="toolbar"){var i=3e5;r=r+"&t="+Math.floor(Date.now()/i)*i}var s=t.requestRouter.endpointFor("assets",r);Ym(t,s,n)},H.__PosthogExtensions__.loadSiteApp=(t,e,n)=>{var r=t.requestRouter.endpointFor("api",e);Ym(t,r,n)};var Qa={};function qn(t,e,n){if(oe(t)){if(Bm&&t.forEach===Bm)t.forEach(e,n);else if("length"in t&&t.length===+t.length){for(var r=0,i=t.length;r<i;r++)if(r in t&&e.call(n,t[r],r)===Qa)return}}}function re(t,e,n){if(!J(t)){if(oe(t))return qn(t,e,n);if(cM(t)){for(var r of t.entries())if(e.call(n,r[1],r[0])===Qa)return}else for(var i in t)if(G1.call(t,i)&&e.call(n,t[i],i)===Qa)return}}var Ee=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return qn(n,function(i){for(var s in i)i[s]!==void 0&&(t[s]=i[s])}),t},zl=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return qn(n,function(i){qn(i,function(s){t.push(s)})}),t};function fa(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r}var Xm=function(t){try{return t()}catch{return}},DM=function(t){return function(){try{for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.apply(this,n)}catch(i){F.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),F.critical(i)}}},Hh=function(t){var e={};return re(t,function(n,r){(xe(n)&&n.length>0||He(n))&&(e[r]=n)}),e};function $M(t,e){return n=t,r=s=>xe(s)&&!bn(e)?s.slice(0,e):s,i=new Set,function s(o,a){return o!==Object(o)?r?r(o,a):o:i.has(o)?void 0:(i.add(o),oe(o)?(l=[],qn(o,u=>{l.push(s(u))})):(l={},re(o,(u,c)=>{i.has(u)||(l[c]=s(u,c))})),l);var l}(n);var n,r,i}var FM=["herokuapp.com","vercel.app","netlify.app"];function jM(t){var e=t==null?void 0:t.hostname;if(!xe(e))return!1;var n=e.split(".").slice(-2).join(".");for(var r of FM)if(n===r)return!1;return!0}function J1(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n]}function pe(t,e,n,r){var{capture:i=!1,passive:s=!0}=r??{};t==null||t.addEventListener(e,n,{capture:i,passive:s})}var ex="$people_distinct_id",os="__alias",as="__timers",Qm="$autocapture_disabled_server_side",Md="$heatmaps_enabled_server_side",Zm="$exception_capture_enabled_server_side",Id="$error_tracking_suppression_rules",Jm="$error_tracking_capture_extension_exceptions",ev="$web_vitals_enabled_server_side",tx="$dead_clicks_enabled_server_side",tv="$web_vitals_allowed_metrics",eo="$session_recording_enabled_server_side",nv="$console_log_recording_enabled_server_side",rv="$session_recording_network_payload_capture",iv="$session_recording_masking",sv="$session_recording_canvas_recording",ov="$replay_sample_rate",av="$replay_minimum_duration",Za="$replay_script_config",Ja="$sesid",ls="$session_is_sampled",Nd="$session_recording_url_trigger_activated_session",Ld="$session_recording_event_trigger_activated_session",si="$enabled_feature_flags",us="$early_access_features",Od="$feature_flag_details",cs="$stored_person_properties",hr="$stored_group_properties",Dd="$surveys",Bo="$surveys_activated",el="$flag_call_reported",un="$user_state",$d="$client_session_props",Fd="$capture_rate_limit",jd="$initial_campaign_params",Vd="$initial_referrer_info",tl="$initial_person_info",nl="$epp",nx="__POSTHOG_TOOLBAR__",qi="$posthog_cookieless",VM=[ex,os,"__cmpns",as,eo,Md,Ja,si,Id,un,us,Od,hr,cs,Dd,el,$d,Fd,jd,Vd,nl,tl];function lv(t){return t instanceof Element&&(t.id===nx||!(t.closest==null||!t.closest(".toolbar-global-fade-container")))}function Ul(t){return!!t&&t.nodeType===1}function Yn(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function rx(t){return!!t&&t.nodeType===3}function ix(t){return!!t&&t.nodeType===11}function Wh(t){return t?Vl(t).split(/\s+/):[]}function uv(t){var e=T==null?void 0:T.location.href;return!!(e&&t&&t.some(n=>e.match(n)))}function rl(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return Wh(e)}function sx(t){return J(t)?null:Vl(t).split(/(\s+)/).filter(e=>bi(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Hl(t){var e="";return Bd(t)&&!cx(t)&&t.childNodes&&t.childNodes.length&&re(t.childNodes,function(n){var r;rx(n)&&n.textContent&&(e+=(r=sx(n.textContent))!==null&&r!==void 0?r:"")}),Vl(e)}function ox(t){return L(t.target)?t.srcElement||null:(e=t.target)!=null&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e}var Kh=["a","button","form","input","select","textarea","label"];function ax(t,e){if(L(e))return!0;var n,r=function(s){if(e.some(o=>s.matches(o)))return{v:!0}};for(var i of t)if(n=r(i))return n.v;return!1}function lx(t){var e=t.parentNode;return!(!e||!Ul(e))&&e}var cv=[".ph-no-rageclick",".ph-no-capture"],Gh=t=>!t||Yn(t,"html")||!Ul(t),ux=(t,e)=>{if(!T||Gh(t))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[t],i=t;i.parentNode&&!Yn(i,"body");)if(ix(i.parentNode))r.push(i.parentNode.host),i=i.parentNode.host;else{var s=lx(i);if(!s)break;if(e||Kh.indexOf(s.tagName.toLowerCase())>-1)n=!0;else{var o=T.getComputedStyle(s);o&&o.getPropertyValue("cursor")==="pointer"&&(n=!0)}r.push(s),i=s}return{parentIsUsefulElement:n,targetElementList:r}};function BM(t,e,n,r,i){var s,o,a,l;if(n===void 0&&(n=void 0),!T||Gh(t)||(s=n)!=null&&s.url_allowlist&&!uv(n.url_allowlist)||(o=n)!=null&&o.url_ignorelist&&uv(n.url_ignorelist))return!1;if((a=n)!=null&&a.dom_event_allowlist){var u=n.dom_event_allowlist;if(u&&!u.some(y=>e.type===y))return!1}var{parentIsUsefulElement:c,targetElementList:d}=ux(t,r);if(!function(y,m){var _=m==null?void 0:m.element_allowlist;if(L(_))return!0;var p,g=function(w){if(_.some(S=>w.tagName.toLowerCase()===S))return{v:!0}};for(var v of y)if(p=g(v))return p.v;return!1}(d,n)||!ax(d,(l=n)==null?void 0:l.css_selector_allowlist))return!1;var f=T.getComputedStyle(t);if(f&&f.getPropertyValue("cursor")==="pointer"&&e.type==="click")return!0;var h=t.tagName.toLowerCase();switch(h){case"html":return!1;case"form":return(i||["submit"]).indexOf(e.type)>=0;case"input":case"select":case"textarea":return(i||["change","click"]).indexOf(e.type)>=0;default:return c?(i||["click"]).indexOf(e.type)>=0:(i||["click"]).indexOf(e.type)>=0&&(Kh.indexOf(h)>-1||t.getAttribute("contenteditable")==="true")}}function Bd(t){for(var e=t;e.parentNode&&!Yn(e,"body");e=e.parentNode){var n=rl(e);if(q(n,"ph-sensitive")||q(n,"ph-no-capture"))return!1}if(q(rl(t),"ph-include"))return!0;var r=t.type||"";if(xe(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=t.name||t.id||"";return!(xe(i)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))}function cx(t){return!!(Yn(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||Yn(t,"select")||Yn(t,"textarea")||t.getAttribute("contenteditable")==="true")}var dx="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",zM=new RegExp("^(?:"+dx+")$"),UM=new RegExp(dx),fx="\\d{3}-?\\d{2}-?\\d{4}",HM=new RegExp("^("+fx+")$"),WM=new RegExp("("+fx+")");function bi(t,e){return e===void 0&&(e=!0),!(J(t)||xe(t)&&(t=Vl(t),(e?zM:UM).test((t||"").replace(/[- ]/g,""))||(e?HM:WM).test(t)))}function hx(t){var e=Hl(t);return bi(e=(e+" "+px(t)).trim())?e:""}function px(t){var e="";return t&&t.childNodes&&t.childNodes.length&&re(t.childNodes,function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var i=Hl(n);e=(e+" "+i).trim(),n.childNodes&&n.childNodes.length&&(e=(e+" "+px(n)).trim())}catch(s){F.error("[AutoCapture]",s)}}),e}function KM(t){return function(e){var n=e.map(r=>{var i,s,o="";if(r.tag_name&&(o+=r.tag_name),r.attr_class)for(var a of(r.attr_class.sort(),r.attr_class))o+="."+a.replace(/"/g,"");var l=D({},r.text?{text:r.text}:{},{"nth-child":(i=r.nth_child)!==null&&i!==void 0?i:0,"nth-of-type":(s=r.nth_of_type)!==null&&s!==void 0?s:0},r.href?{href:r.href}:{},r.attr_id?{attr_id:r.attr_id}:{},r.attributes),u={};return fa(l).sort((c,d)=>{var[f]=c,[h]=d;return f.localeCompare(h)}).forEach(c=>{var[d,f]=c;return u[dv(d.toString())]=dv(f.toString())}),o+=":",o+=fa(u).map(c=>{var[d,f]=c;return d+'="'+f+'"'}).join("")});return n.join(";")}(function(e){return e.map(n=>{var r,i,s={text:(r=n.$el_text)==null?void 0:r.slice(0,400),tag_name:n.tag_name,href:(i=n.attr__href)==null?void 0:i.slice(0,2048),attr_class:GM(n),attr_id:n.attr__id,nth_child:n.nth_child,nth_of_type:n.nth_of_type,attributes:{}};return fa(n).filter(o=>{var[a]=o;return a.indexOf("attr__")===0}).forEach(o=>{var[a,l]=o;return s.attributes[a]=l}),s})}(t))}function dv(t){return t.replace(/"|\\"/g,'\\"')}function GM(t){var e=t.attr__class;return e?oe(e)?e:Wh(e):void 0}class gx{constructor(){this.clicks=[]}isRageClick(e,n,r){var i=this.clicks[this.clicks.length-1];if(i&&Math.abs(e-i.x)+Math.abs(n-i.y)<30&&r-i.timestamp<1e3){if(this.clicks.push({x:e,y:n,timestamp:r}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:n,timestamp:r}];return!1}}var Uu="$copy_autocapture",pn=function(t){return t.GZipJS="gzip-js",t.Base64="base64",t}({}),qM=["localhost","127.0.0.1"],Pi=t=>{var e=j==null?void 0:j.createElement("a");return L(e)?null:(e.href=t,e)},YM=function(t,e){var n,r;e===void 0&&(e="&");var i=[];return re(t,function(s,o){L(s)||L(o)||o==="undefined"||(n=encodeURIComponent((a=>a instanceof File)(s)?s.name:s.toString()),r=encodeURIComponent(o),i[i.length]=r+"="+n)}),i.join(e)},il=function(t,e){for(var n,r=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;i<r.length;i++){var s=r[i].split("=");if(s[0]===e){n=s;break}}if(!oe(n)||n.length<2)return"";var o=n[1];try{o=decodeURIComponent(o)}catch{F.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},qh=function(t,e,n){if(!t||!e||!e.length)return t;for(var r=t.split("#"),i=r[0]||"",s=r[1],o=i.split("?"),a=o[1],l=o[0],u=(a||"").split("&"),c=[],d=0;d<u.length;d++){var f=u[d].split("=");oe(f)&&(e.includes(f[0])?c.push(f[0]+"="+n):c.push(u[d]))}var h=l;return a!=null&&(h+="?"+c.join("&")),s!=null&&(h+="#"+s),h},sl=function(t,e){var n=t.match(new RegExp(e+"=([^&]*)"));return n?n[1]:null},fv=Re("[AutoCapture]");function Hu(t,e){return e.length>t?e.slice(0,t)+"...":e}function XM(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!Ul(e));return e}function QM(t,e,n,r){var i=t.tagName.toLowerCase(),s={tag_name:i};Kh.indexOf(i)>-1&&!n&&(i.toLowerCase()==="a"||i.toLowerCase()==="button"?s.$el_text=Hu(1024,hx(t)):s.$el_text=Hu(1024,Hl(t)));var o=rl(t);o.length>0&&(s.classes=o.filter(function(c){return c!==""})),re(t.attributes,function(c){var d;if((!cx(t)||["name","id","class","aria-label"].indexOf(c.name)!==-1)&&(r==null||!r.includes(c.name))&&!e&&bi(c.value)&&(d=c.name,!xe(d)||d.substring(0,10)!=="_ngcontent"&&d.substring(0,7)!=="_nghost")){var f=c.value;c.name==="class"&&(f=Wh(f).join(" ")),s["attr__"+c.name]=Hu(1024,f)}});for(var a=1,l=1,u=t;u=XM(u);)a++,u.tagName===t.tagName&&l++;return s.nth_child=a,s.nth_of_type=l,s}function ZM(t,e){for(var n,r,{e:i,maskAllElementAttributes:s,maskAllText:o,elementAttributeIgnoreList:a,elementsChainAsString:l}=e,u=[t],c=t;c.parentNode&&!Yn(c,"body");)ix(c.parentNode)?(u.push(c.parentNode.host),c=c.parentNode.host):(u.push(c.parentNode),c=c.parentNode);var d,f=[],h={},y=!1,m=!1;if(re(u,w=>{var S=Bd(w);w.tagName.toLowerCase()==="a"&&(y=w.getAttribute("href"),y=S&&y&&bi(y)&&y),q(rl(w),"ph-no-capture")&&(m=!0),f.push(QM(w,s,o,a));var A=function(P){if(!Bd(P))return{};var E={};return re(P.attributes,function(k){if(k.name&&k.name.indexOf("data-ph-capture-attribute")===0){var b=k.name.replace("data-ph-capture-attribute-",""),R=k.value;b&&R&&bi(R)&&(E[b]=R)}}),E}(w);Ee(h,A)}),m)return{props:{},explicitNoCapture:m};if(o||(t.tagName.toLowerCase()==="a"||t.tagName.toLowerCase()==="button"?f[0].$el_text=hx(t):f[0].$el_text=Hl(t)),y){var _,p;f[0].attr__href=y;var g=(_=Pi(y))==null?void 0:_.host,v=T==null||(p=T.location)==null?void 0:p.host;g&&v&&g!==v&&(d=y)}return{props:Ee({$event_type:i.type,$ce_version:1},l?{}:{$elements:f},{$elements_chain:KM(f)},(n=f[0])!=null&&n.$el_text?{$el_text:(r=f[0])==null?void 0:r.$el_text}:{},d&&i.type==="click"?{$external_click_url:d}:{},h)}}class JM{constructor(e){this.C=!1,this.M=null,this.rageclicks=new gx,this.O=!1,this.instance=e,this.F=null}get A(){var e,n,r=we(this.instance.config.autocapture)?this.instance.config.autocapture:{};return r.url_allowlist=(e=r.url_allowlist)==null?void 0:e.map(i=>new RegExp(i)),r.url_ignorelist=(n=r.url_ignorelist)==null?void 0:n.map(i=>new RegExp(i)),r}D(){if(this.isBrowserSupported()){if(T&&j){var e=r=>{r=r||(T==null?void 0:T.event);try{this.j(r)}catch(i){fv.error("Failed to capture event",i)}};if(pe(j,"submit",e,{capture:!0}),pe(j,"change",e,{capture:!0}),pe(j,"click",e,{capture:!0}),this.A.capture_copied_text){var n=r=>{r=r||(T==null?void 0:T.event),this.j(r,Uu)};pe(j,"copy",n,{capture:!0}),pe(j,"cut",n,{capture:!0})}}}else fv.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.C&&(this.D(),this.C=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.O=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[Qm]:!!e.autocapture_opt_out}),this.M=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.F=e}getElementSelectors(e){var n,r=[];return(n=this.F)==null||n.forEach(i=>{var s=j==null?void 0:j.querySelectorAll(i);s==null||s.forEach(o=>{e===o&&r.push(i)})}),r}get isEnabled(){var e,n,r=(e=this.instance.persistence)==null?void 0:e.props[Qm],i=this.M;if(bn(i)&&!Vt(r)&&!this.instance.L())return!1;var s=(n=this.M)!==null&&n!==void 0?n:!!r;return!!this.instance.config.autocapture&&!s}j(e,n){if(n===void 0&&(n="$autocapture"),this.isEnabled){var r,i=ox(e);rx(i)&&(i=i.parentNode||null),n==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(r=this.rageclicks)!=null&&r.isRageClick(e.clientX,e.clientY,new Date().getTime())&&function(f,h){if(!T||Gh(f))return!1;var y,m;if((y=Vt(h)?!!h&&cv:(m=h==null?void 0:h.css_selector_ignorelist)!==null&&m!==void 0?m:cv)===!1)return!1;var{targetElementList:_}=ux(f,!1);return!ax(_,y)}(i,this.instance.config.rageclick)&&this.j(e,"$rageclick");var s=n===Uu;if(i&&BM(i,e,this.A,s,s?["copy","cut"]:void 0)){var{props:o,explicitNoCapture:a}=ZM(i,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.A.element_attribute_ignorelist,elementsChainAsString:this.O});if(a)return!1;var l=this.getElementSelectors(i);if(l&&l.length>0&&(o.$element_selectors=l),n===Uu){var u,c=sx(T==null||(u=T.getSelection())==null?void 0:u.toString()),d=e.type||"clipboard";if(!c)return!1;o.$selected_content=c,o.$copy_type=d}return this.instance.capture(n,o),!0}}}isBrowserSupported(){return Tt(j==null?void 0:j.querySelectorAll)}}Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return He(t)&&isFinite(t)&&Math.floor(t)===t});var hv="0123456789abcdef";class ol{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,n,r,i){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||e<0||n<0||r<0||i<0||e>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/Math.pow(2,40),s[1]=e/Math.pow(2,32),s[2]=e/Math.pow(2,24),s[3]=e/Math.pow(2,16),s[4]=e/Math.pow(2,8),s[5]=e,s[6]=112|n>>>8,s[7]=n,s[8]=128|r>>>24,s[9]=r>>>16,s[10]=r>>>8,s[11]=r,s[12]=i>>>24,s[13]=i>>>16,s[14]=i>>>8,s[15]=i,new ol(s)}toString(){for(var e="",n=0;n<this.bytes.length;n++)e=e+hv.charAt(this.bytes[n]>>>4)+hv.charAt(15&this.bytes[n]),n!==3&&n!==5&&n!==7&&n!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new ol(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var n=0;n<16;n++){var r=this.bytes[n]-e.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class eI{constructor(){this.N=0,this.U=0,this.q=new tI}generate(){var e=this.generateOrAbort();if(L(e)){this.N=0;var n=this.generateOrAbort();if(L(n))throw new Error("Could not generate UUID after timestamp reset");return n}return e}generateOrAbort(){var e=Date.now();if(e>this.N)this.N=e,this.B();else{if(!(e+1e4>this.N))return;this.U++,this.U>4398046511103&&(this.N++,this.B())}return ol.fromFieldsV7(this.N,Math.trunc(this.U/Math.pow(2,30)),this.U&Math.pow(2,30)-1,this.q.nextUint32())}B(){this.U=1024*this.q.nextUint32()+(1023&this.q.nextUint32())}}var pv,mx=t=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;e<t.length;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};T&&!L(T.crypto)&&crypto.getRandomValues&&(mx=t=>crypto.getRandomValues(t));class tI{constructor(){this.H=new Uint32Array(8),this.W=1/0}nextUint32(){return this.W>=this.H.length&&(mx(this.H),this.W=0),this.H[this.W++]}}var jn=()=>nI().toString(),nI=()=>(pv||(pv=new eI)).generate(),Yi="",rI=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function iI(t,e){if(e){var n=function(i,s){if(s===void 0&&(s=j),Yi)return Yi;if(!s||["localhost","127.0.0.1"].includes(i))return"";for(var o=i.split("."),a=Math.min(o.length,8),l="dmn_chk_"+jn();!Yi&&a--;){var u=o.slice(a).join("."),c=l+"=1;domain=."+u+";path=/";s.cookie=c+";max-age=3",s.cookie.includes(l)&&(s.cookie=c+";max-age=0",Yi=u)}return Yi}(t);if(!n){var r=(i=>{var s=i.match(rI);return s?s[0]:""})(t);r!==n&&F.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}var rn={G:()=>!!j,V:function(t){F.error("cookieStore error: "+t)},J:function(t){if(j){try{for(var e=t+"=",n=j.cookie.split(";").filter(s=>s.length),r=0;r<n.length;r++){for(var i=n[r];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return decodeURIComponent(i.substring(e.length,i.length))}}catch{}return null}},K:function(t){var e;try{e=JSON.parse(rn.J(t))||{}}catch{}return e},Y:function(t,e,n,r,i){if(j)try{var s="",o="",a=iI(j.location.hostname,r);if(n){var l=new Date;l.setTime(l.getTime()+24*n*60*60*1e3),s="; expires="+l.toUTCString()}i&&(o="; secure");var u=t+"="+encodeURIComponent(JSON.stringify(e))+s+"; SameSite=Lax; path=/"+a+o;return u.length>3686.4&&F.warn("cookieStore warning: large cookie, len="+u.length),j.cookie=u,u}catch{return}},X:function(t,e){if(j!=null&&j.cookie)try{rn.Y(t,"",-1,e)}catch{return}}},Wu=null,Te={G:function(){if(!bn(Wu))return Wu;var t=!0;if(L(T))t=!1;else try{var e="__mplssupport__";Te.Y(e,"xyz"),Te.J(e)!=='"xyz"'&&(t=!1),Te.X(e)}catch{t=!1}return t||F.error("localStorage unsupported; falling back to cookie store"),Wu=t,t},V:function(t){F.error("localStorage error: "+t)},J:function(t){try{return T==null?void 0:T.localStorage.getItem(t)}catch(e){Te.V(e)}return null},K:function(t){try{return JSON.parse(Te.J(t))||{}}catch{}return null},Y:function(t,e){try{T==null||T.localStorage.setItem(t,JSON.stringify(e))}catch(n){Te.V(n)}},X:function(t){try{T==null||T.localStorage.removeItem(t)}catch(e){Te.V(e)}}},sI=["distinct_id",Ja,ls,nl,tl],zo=D({},Te,{K:function(t){try{var e={};try{e=rn.K(t)||{}}catch{}var n=Ee(e,JSON.parse(Te.J(t)||"{}"));return Te.Y(t,n),n}catch{}return null},Y:function(t,e,n,r,i,s){try{Te.Y(t,e,void 0,void 0,s);var o={};sI.forEach(a=>{e[a]&&(o[a]=e[a])}),Object.keys(o).length&&rn.Y(t,o,n,r,i,s)}catch(a){Te.V(a)}},X:function(t,e){try{T==null||T.localStorage.removeItem(t),rn.X(t,e)}catch(n){Te.V(n)}}}),Uo={},oI={G:function(){return!0},V:function(t){F.error("memoryStorage error: "+t)},J:function(t){return Uo[t]||null},K:function(t){return Uo[t]||null},Y:function(t,e){Uo[t]=e},X:function(t){delete Uo[t]}},or=null,De={G:function(){if(!bn(or))return or;if(or=!0,L(T))or=!1;else try{var t="__support__";De.Y(t,"xyz"),De.J(t)!=='"xyz"'&&(or=!1),De.X(t)}catch{or=!1}return or},V:function(t){F.error("sessionStorage error: ",t)},J:function(t){try{return T==null?void 0:T.sessionStorage.getItem(t)}catch(e){De.V(e)}return null},K:function(t){try{return JSON.parse(De.J(t))||null}catch{}return null},Y:function(t,e){try{T==null||T.sessionStorage.setItem(t,JSON.stringify(e))}catch(n){De.V(n)}},X:function(t){try{T==null||T.sessionStorage.removeItem(t)}catch(e){De.V(e)}}},cn=function(t){return t[t.PENDING=-1]="PENDING",t[t.DENIED=0]="DENIED",t[t.GRANTED=1]="GRANTED",t}({});class aI{constructor(e){this._instance=e}get A(){return this._instance.config}get consent(){return this.Z()?cn.DENIED:this.tt}isOptedOut(){return this.A.cookieless_mode==="always"||this.consent===cn.DENIED||this.consent===cn.PENDING&&(this.A.opt_out_capturing_by_default||this.A.cookieless_mode==="on_reject")}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===cn.DENIED}optInOut(e){this.it.Y(this.et,e?1:0,this.A.cookie_expiration,this.A.cross_subdomain_cookie,this.A.secure_cookie)}reset(){this.it.X(this.et,this.A.cross_subdomain_cookie)}get et(){var{token:e,opt_out_capturing_cookie_prefix:n,consent_persistence_name:r}=this._instance.config;return r||(n?n+e:"__ph_opt_in_out_"+e)}get tt(){var e=this.it.J(this.et);return Bu(e)?cn.GRANTED:q(hM,e)?cn.DENIED:cn.PENDING}get it(){if(!this.rt){var e=this.A.opt_out_capturing_persistence_type;this.rt=e==="localStorage"?Te:rn;var n=e==="localStorage"?rn:Te;n.J(this.et)&&(this.rt.J(this.et)||this.optInOut(Bu(n.J(this.et))),n.X(this.et,this.A.cross_subdomain_cookie))}return this.rt}Z(){return!!this.A.respect_dnt&&!!J1([gt==null?void 0:gt.doNotTrack,gt==null?void 0:gt.msDoNotTrack,H.doNotTrack],e=>Bu(e))}}var Ho=Re("[Dead Clicks]"),lI=()=>!0,uI=t=>{var e,n=!((e=t.instance.persistence)==null||!e.get_property(tx)),r=t.instance.config.capture_dead_clicks;return Vt(r)?r:n};class vx{get lazyLoadedDeadClicksAutocapture(){return this.st}constructor(e,n,r){this.instance=e,this.isEnabled=n,this.onCapture=r,this.startIfEnabled()}onRemoteConfig(e){this.instance.persistence&&this.instance.persistence.register({[tx]:e==null?void 0:e.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.nt(()=>{this.ot()})}nt(e){var n,r;(n=H.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture&&e(),(r=H.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",i=>{i?Ho.error("failed to load script",i):e()})}ot(){var e;if(j){if(!this.st&&(e=H.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var n=we(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.st=H.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.st.start(j),Ho.info("starting...")}}else Ho.error("`document` not found. Cannot start.")}stop(){this.st&&(this.st.stop(),this.st=void 0,Ho.info("stopping..."))}}var Xi=Re("[ExceptionAutocapture]");class cI{constructor(e){var n,r,i;this.lt=()=>{var s;if(T&&this.isEnabled&&(s=H.__PosthogExtensions__)!=null&&s.errorWrappingFunctions){var o=H.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,a=H.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,l=H.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ht&&this.A.capture_unhandled_errors&&(this.ht=o(this.captureException.bind(this))),!this.ut&&this.A.capture_unhandled_rejections&&(this.ut=a(this.captureException.bind(this))),!this.dt&&this.A.capture_console_errors&&(this.dt=l(this.captureException.bind(this)))}catch(u){Xi.error("failed to start",u),this.vt()}}},this._instance=e,this.ct=!((n=this._instance.persistence)==null||!n.props[Zm]),this.A=this.ft(),this.gt=new Y1({refillRate:(r=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:1,bucketSize:(i=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&i!==void 0?i:10,refillInterval:1e4,I:Xi}),this.startIfEnabled()}ft(){var e=this._instance.config.capture_exceptions,n={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return we(e)?n=D({},n,e):(L(e)?this.ct:e)&&(n=D({},n,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),n}get isEnabled(){return this.A.capture_console_errors||this.A.capture_unhandled_errors||this.A.capture_unhandled_rejections}startIfEnabled(){this.isEnabled&&(Xi.info("enabled"),this.nt(this.lt))}nt(e){var n,r;(n=H.__PosthogExtensions__)!=null&&n.errorWrappingFunctions&&e(),(r=H.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"exception-autocapture",i=>{if(i)return Xi.error("failed to load script",i);e()})}vt(){var e,n,r;(e=this.ht)==null||e.call(this),this.ht=void 0,(n=this.ut)==null||n.call(this),this.ut=void 0,(r=this.dt)==null||r.call(this),this.dt=void 0}onRemoteConfig(e){var n=e.autocaptureExceptions;this.ct=!!n||!1,this.A=this.ft(),this._instance.persistence&&this._instance.persistence.register({[Zm]:this.ct}),this.startIfEnabled()}captureException(e){var n,r,i=(n=e==null||(r=e.$exception_list)==null||(r=r[0])==null?void 0:r.type)!==null&&n!==void 0?n:"Exception";this.gt.consumeRateLimit(i)?Xi.info("Skipping exception capture because of client rate limiting.",{exception:i}):this._instance.exceptions.sendExceptionEvent(e)}}function gv(t,e,n){try{if(!(e in t))return()=>{};var r=t[e],i=n(r);return Tt(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=i,()=>{t[e]=r}}catch{return()=>{}}}class dI{constructor(e){var n;this._instance=e,this._t=(T==null||(n=T.location)==null?void 0:n.pathname)||""}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(F.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.yt&&this.yt(),this.yt=void 0,F.info("History API monitoring stopped")}monitorHistoryChanges(){var e,n;if(T&&T.history){var r=this;(e=T.history.pushState)!=null&&e.__posthog_wrapped__||gv(T.history,"pushState",i=>function(s,o,a){i.call(this,s,o,a),r.bt("pushState")}),(n=T.history.replaceState)!=null&&n.__posthog_wrapped__||gv(T.history,"replaceState",i=>function(s,o,a){i.call(this,s,o,a),r.bt("replaceState")}),this.wt()}}bt(e){try{var n,r=T==null||(n=T.location)==null?void 0:n.pathname;if(!r)return;r!==this._t&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this._t=r}catch(i){F.error("Error capturing "+e+" pageview",i)}}wt(){if(!this.yt){var e=()=>{this.bt("popstate")};pe(T,"popstate",e),this.yt=()=>{T&&T.removeEventListener("popstate",e)}}}}function al(t){var e,n;return((e=JSON.stringify(t,(n=[],function(r,i){if(we(i)){for(;n.length>0&&n[n.length-1]!==this;)n.pop();return n.includes(i)?"[Circular]":(n.push(i),i)}return i})))==null?void 0:e.length)||0}function zd(t,e){if(e===void 0&&(e=66060288e-1),t.size>=e&&t.data.length>1){var n=Math.floor(t.data.length/2),r=t.data.slice(0,n),i=t.data.slice(n);return[zd({size:al(r),data:r,sessionId:t.sessionId,windowId:t.windowId}),zd({size:al(i),data:i,sessionId:t.sessionId,windowId:t.windowId})].flatMap(s=>s)}return[t]}var dn=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(dn||{}),$t=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))($t||{}),Ud="[SessionRecording]",Hd="redacted",Wo={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:t=>t,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},fI=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],hI=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],pI=["/s/","/e/","/i/"];function mv(t,e,n,r){if(J(t))return t;var i=(e==null?void 0:e["content-length"])||function(s){return new Blob([s]).size}(t);return xe(i)&&(i=parseInt(i)),i>n?Ud+" "+r+" body too large to record ("+i+" bytes)":t}function vv(t,e){if(J(t))return t;var n=t;return bi(n,!1)||(n=Ud+" "+e+" body "+Hd),re(hI,r=>{var i,s;(i=n)!=null&&i.length&&((s=n)==null?void 0:s.indexOf(r))!==-1&&(n=Ud+" "+e+" body "+Hd+" as might contain: "+r)}),n}var gI=(t,e)=>{var n,r,i,s={payloadSizeLimitBytes:Wo.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...Wo.performanceEntryTypeToObserve],payloadHostDenyList:[...e.payloadHostDenyList||[],...Wo.payloadHostDenyList]},o=t.session_recording.recordHeaders!==!1&&e.recordHeaders,a=t.session_recording.recordBody!==!1&&e.recordBody,l=t.capture_performance!==!1&&e.recordPerformance,u=(n=s,i=Math.min(1e6,(r=n.payloadSizeLimitBytes)!==null&&r!==void 0?r:1e6),f=>(f!=null&&f.requestBody&&(f.requestBody=mv(f.requestBody,f.requestHeaders,i,"Request")),f!=null&&f.responseBody&&(f.responseBody=mv(f.responseBody,f.responseHeaders,i,"Response")),f)),c=f=>{return u(((m,_)=>{var p,g=Pi(m.name),v=_.indexOf("http")===0?(p=Pi(_))==null?void 0:p.pathname:_;v==="/"&&(v="");var w=g==null?void 0:g.pathname.replace(v||"","");if(!(g&&w&&pI.some(S=>w.indexOf(S)===0)))return m})((y=(h=f).requestHeaders,J(y)||re(Object.keys(y??{}),m=>{fI.includes(m.toLowerCase())&&(y[m]=Hd)}),h),t.api_host));var h,y},d=Tt(t.session_recording.maskNetworkRequestFn);return d&&Tt(t.session_recording.maskCapturedNetworkRequestFn)&&F.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),d&&(t.session_recording.maskCapturedNetworkRequestFn=f=>{var h=t.session_recording.maskNetworkRequestFn({url:f.name});return D({},f,{name:h==null?void 0:h.url})}),s.maskRequestFn=Tt(t.session_recording.maskCapturedNetworkRequestFn)?f=>{var h,y=c(f);return y&&(h=t.session_recording.maskCapturedNetworkRequestFn==null?void 0:t.session_recording.maskCapturedNetworkRequestFn(y))!==null&&h!==void 0?h:void 0}:f=>function(h){if(!L(h))return h.requestBody=vv(h.requestBody,"Request"),h.responseBody=vv(h.responseBody,"Response"),h}(c(f)),D({},Wo,s,{recordHeaders:o,recordBody:a,recordPerformance:l,recordInitialRequests:l})};class mI{constructor(e,n){var r,i;n===void 0&&(n={}),this.St={},this.kt=s=>{if(!this.St[s]){var o,a;this.St[s]=!0;var l=this.$t(s);(o=(a=this.i).onBlockedNode)==null||o.call(a,s,l)}},this.xt=s=>{var o=this.$t(s);if((o==null?void 0:o.nodeName)!=="svg"&&o instanceof Element){var a=o.closest("svg");if(a)return[this._rrweb.mirror.getId(a),a]}return[s,o]},this.$t=s=>this._rrweb.mirror.getNode(s),this.Et=s=>{var o,a,l,u,c,d,f,h;return((o=(a=s.removes)==null?void 0:a.length)!==null&&o!==void 0?o:0)+((l=(u=s.attributes)==null?void 0:u.length)!==null&&l!==void 0?l:0)+((c=(d=s.texts)==null?void 0:d.length)!==null&&c!==void 0?c:0)+((f=(h=s.adds)==null?void 0:h.length)!==null&&f!==void 0?f:0)},this.throttleMutations=s=>{if(s.type!==3||s.data.source!==0)return s;var o=s.data,a=this.Et(o);o.attributes&&(o.attributes=o.attributes.filter(u=>{var[c]=this.xt(u.id);return!this.gt.consumeRateLimit(c)&&u}));var l=this.Et(o);return l!==0||a===l?s:void 0},this._rrweb=e,this.i=n,this.gt=new Y1({bucketSize:(r=this.i.bucketSize)!==null&&r!==void 0?r:100,refillRate:(i=this.i.refillRate)!==null&&i!==void 0?i:10,refillInterval:1e3,P:this.kt,I:F})}}var At=Uint8Array,ut=Uint16Array,Ti=Uint32Array,Yh=new At([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Xh=new At([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),yv=new At([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yx=function(t,e){for(var n=new ut(31),r=0;r<31;++r)n[r]=e+=1<<t[r-1];var i=new Ti(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return[n,i]},_x=yx(Yh,2),vI=_x[0],Wd=_x[1];vI[28]=258,Wd[258]=28;for(var _v=yx(Xh,0)[1],wx=new ut(32768),ae=0;ae<32768;++ae){var ar=(43690&ae)>>>1|(21845&ae)<<1;ar=(61680&(ar=(52428&ar)>>>2|(13107&ar)<<2))>>>4|(3855&ar)<<4,wx[ae]=((65280&ar)>>>8|(255&ar)<<8)>>>1}var As=function(t,e,n){for(var r=t.length,i=0,s=new ut(e);i<r;++i)++s[t[i]-1];var o,a=new ut(e);for(i=0;i<e;++i)a[i]=a[i-1]+s[i-1]<<1;for(o=new ut(r),i=0;i<r;++i)o[i]=wx[a[t[i]-1]++]>>>15-t[i];return o},Mr=new At(288);for(ae=0;ae<144;++ae)Mr[ae]=8;for(ae=144;ae<256;++ae)Mr[ae]=9;for(ae=256;ae<280;++ae)Mr[ae]=7;for(ae=280;ae<288;++ae)Mr[ae]=8;var ll=new At(32);for(ae=0;ae<32;++ae)ll[ae]=5;var yI=As(Mr,9),_I=As(ll,5),xx=function(t){return(t/8>>0)+(7&t&&1)},Sx=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var r=new(t instanceof ut?ut:t instanceof Ti?Ti:At)(n-e);return r.set(t.subarray(e,n)),r},an=function(t,e,n){n<<=7&e;var r=e/8>>0;t[r]|=n,t[r+1]|=n>>>8},Qi=function(t,e,n){n<<=7&e;var r=e/8>>0;t[r]|=n,t[r+1]|=n>>>8,t[r+2]|=n>>>16},Ku=function(t,e){for(var n=[],r=0;r<t.length;++r)t[r]&&n.push({s:r,f:t[r]});var i=n.length,s=n.slice();if(!i)return[new At(0),0];if(i==1){var o=new At(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort(function(S,A){return S.f-A.f}),n.push({s:-1,f:25001});var a=n[0],l=n[1],u=0,c=1,d=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=n[n[u].f<n[d].f?u++:d++],l=n[u!=c&&n[u].f<n[d].f?u++:d++],n[c++]={s:-1,f:a.f+l.f,l:a,r:l};var f=s[0].s;for(r=1;r<i;++r)s[r].s>f&&(f=s[r].s);var h=new ut(f+1),y=Kd(n[c-1],h,0);if(y>e){r=0;var m=0,_=y-e,p=1<<_;for(s.sort(function(S,A){return h[A.s]-h[S.s]||S.f-A.f});r<i;++r){var g=s[r].s;if(!(h[g]>e))break;m+=p-(1<<y-h[g]),h[g]=e}for(m>>>=_;m>0;){var v=s[r].s;h[v]<e?m-=1<<e-h[v]++-1:++r}for(;r>=0&&m;--r){var w=s[r].s;h[w]==e&&(--h[w],++m)}y=e}return[new At(h),y]},Kd=function(t,e,n){return t.s==-1?Math.max(Kd(t.l,e,n+1),Kd(t.r,e,n+1)):e[t.s]=n},wv=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new ut(++e),r=0,i=t[0],s=1,o=function(l){n[r++]=l},a=1;a<=e;++a)if(t[a]==i&&a!=e)++s;else{if(!i&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=t[a]}return[n.subarray(0,r),e]},Zi=function(t,e){for(var n=0,r=0;r<e.length;++r)n+=t[r]*e[r];return n},Gd=function(t,e,n){var r=n.length,i=xx(e+2);t[i]=255&r,t[i+1]=r>>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<r;++s)t[i+s+4]=n[s];return 8*(i+4+r)},xv=function(t,e,n,r,i,s,o,a,l,u,c){an(e,c++,n),++i[256];for(var d=Ku(i,15),f=d[0],h=d[1],y=Ku(s,15),m=y[0],_=y[1],p=wv(f),g=p[0],v=p[1],w=wv(m),S=w[0],A=w[1],P=new ut(19),E=0;E<g.length;++E)P[31&g[E]]++;for(E=0;E<S.length;++E)P[31&S[E]]++;for(var k=Ku(P,7),b=k[0],R=k[1],N=19;N>4&&!b[yv[N-1]];--N);var V,$,K,X,U=u+5<<3,M=Zi(i,Mr)+Zi(s,ll)+o,O=Zi(i,f)+Zi(s,m)+o+14+3*N+Zi(P,b)+(2*P[16]+3*P[17]+7*P[18]);if(U<=M&&U<=O)return Gd(e,c,t.subarray(l,l+u));if(an(e,c,1+(O<M)),c+=2,O<M){V=As(f,h),$=f,K=As(m,_),X=m;var z=As(b,R);for(an(e,c,v-257),an(e,c+5,A-1),an(e,c+10,N-4),c+=14,E=0;E<N;++E)an(e,c+3*E,b[yv[E]]);c+=3*N;for(var Z=[g,S],G=0;G<2;++G){var ve=Z[G];for(E=0;E<ve.length;++E){var ue=31&ve[E];an(e,c,z[ue]),c+=b[ue],ue>15&&(an(e,c,ve[E]>>>5&127),c+=ve[E]>>>12)}}}else V=yI,$=Mr,K=_I,X=ll;for(E=0;E<a;++E)if(r[E]>255){ue=r[E]>>>18&31,Qi(e,c,V[ue+257]),c+=$[ue+257],ue>7&&(an(e,c,r[E]>>>23&31),c+=Yh[ue]);var Kt=31&r[E];Qi(e,c,K[Kt]),c+=X[Kt],Kt>3&&(Qi(e,c,r[E]>>>5&8191),c+=Xh[Kt])}else Qi(e,c,V[r[E]]),c+=$[r[E]];return Qi(e,c,V[256]),c+$[256]},wI=new Ti([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),xI=function(){for(var t=new Ti(256),e=0;e<256;++e){for(var n=e,r=9;--r;)n=(1&n&&3988292384)^n>>>1;t[e]=n}return t}(),SI=function(){var t=4294967295;return{p:function(e){for(var n=t,r=0;r<e.length;++r)n=xI[255&n^e[r]]^n>>>8;t=n},d:function(){return 4294967295^t}}},EI=function(t,e,n,r,i){return function(s,o,a,l,u,c){var d=s.length,f=new At(l+d+5*(1+Math.floor(d/7e3))+u),h=f.subarray(l,f.length-u),y=0;if(!o||d<8)for(var m=0;m<=d;m+=65535){var _=m+65535;_<d?y=Gd(h,y,s.subarray(m,_)):(h[m]=c,y=Gd(h,y,s.subarray(m,d)))}else{for(var p=wI[o-1],g=p>>>13,v=8191&p,w=(1<<a)-1,S=new ut(32768),A=new ut(w+1),P=Math.ceil(a/3),E=2*P,k=function(ql){return(s[ql]^s[ql+1]<<P^s[ql+2]<<E)&w},b=new Ti(25e3),R=new ut(288),N=new ut(32),V=0,$=0,K=(m=0,0),X=0,U=0;m<d;++m){var M=k(m),O=32767&m,z=A[M];if(S[O]=z,A[M]=O,X<=m){var Z=d-m;if((V>7e3||K>24576)&&Z>423){y=xv(s,h,0,b,R,N,$,K,U,m-U,y),K=V=$=0,U=m;for(var G=0;G<286;++G)R[G]=0;for(G=0;G<30;++G)N[G]=0}var ve=2,ue=0,Kt=v,je=O-z&32767;if(Z>2&&M==k(m-je))for(var Dr=Math.min(g,Z)-1,sS=Math.min(32767,m),oS=Math.min(258,Z);je<=sS&&--Kt&&O!=z;){if(s[m+ve]==s[m+ve-je]){for(var Pn=0;Pn<oS&&s[m+Pn]==s[m+Pn-je];++Pn);if(Pn>ve){if(ve=Pn,ue=je,Pn>Dr)break;var aS=Math.min(je,Pn-2),sp=0;for(G=0;G<aS;++G){var Gl=m-je+G+32768&32767,op=Gl-S[Gl]+32768&32767;op>sp&&(sp=op,z=Gl)}}}je+=(O=z)-(z=S[O])+32768&32767}if(ue){b[K++]=268435456|Wd[ve]<<18|_v[ue];var ap=31&Wd[ve],lp=31&_v[ue];$+=Yh[ap]+Xh[lp],++R[257+ap],++N[lp],X=m+ve,++V}else b[K++]=s[m],++R[s[m]]}}y=xv(s,h,c,b,R,N,$,K,U,m-U,y)}return Sx(f,0,l+xx(y)+u)}(t,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,n,r,!0)},qd=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8},kI=function(t,e){var n=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&qd(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),n){t[3]=8;for(var r=0;r<=n.length;++r)t[r+10]=n.charCodeAt(r)}},CI=function(t){return 10+(t.filename&&t.filename.length+1||0)};function Ex(t,e){e===void 0&&(e={});var n=SI(),r=t.length;n.p(t);var i=EI(t,e,CI(e),8),s=i.length;return kI(i,e),qd(i,s-8,n.d()),qd(i,s-4,r),i}function kx(t,e){var n=t.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(t);for(var r=new At(t.length+(t.length>>>1)),i=0,s=function(u){r[i++]=u},o=0;o<n;++o){if(i+5>r.length){var a=new At(i+8+(n-o<<1));a.set(r),r=a}var l=t.charCodeAt(o);l<128||e?s(l):l<2048?(s(192|l>>>6),s(128|63&l)):l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&t.charCodeAt(++o))>>>18),s(128|l>>>12&63),s(128|l>>>6&63),s(128|63&l)):(s(224|l>>>12),s(128|l>>>6&63),s(128|63&l))}return Sx(r,0,i)}function bI(t,e){return function(n){for(var r=0,i=0;i<n.length;i++)r=(r<<5)-r+n.charCodeAt(i),r|=0;return Math.abs(r)}(t)%100<mt(100*e,0,100,F)}var er="disabled",Qh="sampled",ul="active",Ir="buffering",Zh="paused",Jh="trigger",sn=Jh+"_activated",Ge=Jh+"_pending",on=Jh+"_"+er;function Sv(t,e){return e.some(n=>n.matching==="regex"&&new RegExp(n.url).test(t))}class Cx{constructor(e){this.Pt=e}triggerStatus(e){var n=this.Pt.map(r=>r.triggerStatus(e));return n.includes(sn)?sn:n.includes(Ge)?Ge:on}stop(){this.Pt.forEach(e=>e.stop())}}class bx{constructor(e){this.Pt=e}triggerStatus(e){var n=new Set;for(var r of this.Pt)n.add(r.triggerStatus(e));switch(n.delete(on),n.size){case 0:return on;case 1:return Array.from(n)[0];default:return Ge}}stop(){this.Pt.forEach(e=>e.stop())}}class PI{triggerStatus(){return Ge}stop(){}}class TI{constructor(e){this.It=[],this.Rt=[],this.urlBlocked=!1,this._instance=e}onRemoteConfig(e){var n,r;this.It=((n=e.sessionRecording)==null?void 0:n.urlTriggers)||[],this.Rt=((r=e.sessionRecording)==null?void 0:r.urlBlocklist)||[]}Tt(e){var n;return this.It.length===0?on:((n=this._instance)==null?void 0:n.get_property(Nd))===e?sn:Ge}triggerStatus(e){var n=this.Tt(e),r=n===sn?sn:n===Ge?Ge:on;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:r}),r}checkUrlTriggerConditions(e,n,r){if(T!==void 0&&T.location.href){var i=T.location.href,s=this.urlBlocked,o=Sv(i,this.Rt);s&&o||(o&&!s?e():!o&&s&&n(),Sv(i,this.It)&&r("url"))}}stop(){}}class AI{constructor(e){this.linkedFlag=null,this.linkedFlagSeen=!1,this.Ct=()=>{},this._instance=e}triggerStatus(){var e=Ge;return J(this.linkedFlag)&&(e=on),this.linkedFlagSeen&&(e=sn),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:e}),e}onRemoteConfig(e,n){var r;if(this.linkedFlag=((r=e.sessionRecording)==null?void 0:r.linkedFlag)||null,!J(this.linkedFlag)&&!this.linkedFlagSeen){var i=xe(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,s=xe(this.linkedFlag)?null:this.linkedFlag.variant;this.Ct=this._instance.onFeatureFlags((o,a)=>{var l=!1;if(we(a)&&i in a){var u=a[i];l=Vt(u)?u===!0:s?u===s:!!u}this.linkedFlagSeen=l,l&&n(i,s)})}}stop(){this.Ct()}}class RI{constructor(e){this.Mt=[],this._instance=e}onRemoteConfig(e){var n;this.Mt=((n=e.sessionRecording)==null?void 0:n.eventTriggers)||[]}Ot(e){var n;return this.Mt.length===0?on:((n=this._instance)==null?void 0:n.get_property(Ld))===e?sn:Ge}triggerStatus(e){var n=this.Ot(e),r=n===sn?sn:n===Ge?Ge:on;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:r}),r}stop(){}}function MI(t){return t.isRecordingEnabled?Ir:er}function II(t){if(!t.receivedFlags)return Ir;if(!t.isRecordingEnabled)return er;if(t.urlTriggerMatching.urlBlocked)return Zh;var e=t.isSampled===!0,n=new Cx([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId);return e?Qh:n===sn?ul:n===Ge?Ir:t.isSampled===!1?er:ul}function NI(t){if(!t.receivedFlags)return Ir;if(!t.isRecordingEnabled)return er;if(t.urlTriggerMatching.urlBlocked)return Zh;var e=new bx([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId),n=e!==on,r=Vt(t.isSampled);return n&&e===Ge?Ir:n&&e===on||r&&!t.isSampled?er:t.isSampled===!0?Qh:ul}var ds="[SessionRecording]",Me=Re(ds);function Ko(){var t;return H==null||(t=H.__PosthogExtensions__)==null||(t=t.rrweb)==null?void 0:t.record}var LI=3e5,OI=[$t.MouseMove,$t.MouseInteraction,$t.Scroll,$t.ViewportResize,$t.Input,$t.TouchMove,$t.MediaInteraction,$t.Drag],Ev=t=>({rrwebMethod:t,enqueuedAt:Date.now(),attempt:1});function lr(t){return function(e,n){for(var r="",i=0;i<e.length;){var s=e[i++];r+=String.fromCharCode(s)}return r}(Ex(kx(JSON.stringify(t))))}function kv(t){return t.type===dn.Custom&&t.data.tag==="sessionIdle"}class Cv{get sessionId(){return this.Ft}get At(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get started(){return this.Dt}get jt(){if(!this._instance.sessionManager)throw new Error(ds+" must be started with a valid sessionManager.");return this._instance.sessionManager}get Lt(){var e,n;return this.Nt.triggerStatus(this.sessionId)===Ge?6e4:(e=(n=this._instance.config.session_recording)==null?void 0:n.full_snapshot_interval_millis)!==null&&e!==void 0?e:LI}get Ut(){var e=this._instance.get_property(ls);return Vt(e)?e:null}get zt(){var e,n,r=(e=this.H)==null?void 0:e.data[((n=this.H)==null?void 0:n.data.length)-1],{sessionStartTimestamp:i}=this.jt.checkAndGetSessionAndWindowId(!0);return r?r.timestamp-i:null}get qt(){var e=!!this._instance.get_property(eo),n=!this._instance.config.disable_session_recording;return T&&e&&n}get Bt(){var e=!!this._instance.get_property(nv),n=this._instance.config.enable_recording_console_log;return n??e}get Ht(){var e,n,r,i,s,o,a=this._instance.config.session_recording.captureCanvas,l=this._instance.get_property(sv),u=(e=(n=a==null?void 0:a.recordCanvas)!==null&&n!==void 0?n:l==null?void 0:l.enabled)!==null&&e!==void 0&&e,c=(r=(i=a==null?void 0:a.canvasFps)!==null&&i!==void 0?i:l==null?void 0:l.fps)!==null&&r!==void 0?r:4,d=(s=(o=a==null?void 0:a.canvasQuality)!==null&&o!==void 0?o:l==null?void 0:l.quality)!==null&&s!==void 0?s:.4;if(typeof d=="string"){var f=parseFloat(d);d=isNaN(f)?.4:f}return{enabled:u,fps:mt(c,0,12,Me.createLogger("canvas recording fps"),4),quality:mt(d,0,1,Me.createLogger("canvas recording quality"),.4)}}get Wt(){var e,n,r=this._instance.get_property(rv),i={recordHeaders:(e=this._instance.config.session_recording)==null?void 0:e.recordHeaders,recordBody:(n=this._instance.config.session_recording)==null?void 0:n.recordBody},s=(i==null?void 0:i.recordHeaders)||(r==null?void 0:r.recordHeaders),o=(i==null?void 0:i.recordBody)||(r==null?void 0:r.recordBody),a=we(this._instance.config.capture_performance)?this._instance.config.capture_performance.network_timing:this._instance.config.capture_performance,l=!!(Vt(a)?a:r!=null&&r.capturePerformance);return s||o||l?{recordHeaders:s,recordBody:o,recordPerformance:l}:void 0}get Gt(){var e,n,r,i,s,o,a=this._instance.get_property(iv),l={maskAllInputs:(e=this._instance.config.session_recording)==null?void 0:e.maskAllInputs,maskTextSelector:(n=this._instance.config.session_recording)==null?void 0:n.maskTextSelector,blockSelector:(r=this._instance.config.session_recording)==null?void 0:r.blockSelector},u=(i=l==null?void 0:l.maskAllInputs)!==null&&i!==void 0?i:a==null?void 0:a.maskAllInputs,c=(s=l==null?void 0:l.maskTextSelector)!==null&&s!==void 0?s:a==null?void 0:a.maskTextSelector,d=(o=l==null?void 0:l.blockSelector)!==null&&o!==void 0?o:a==null?void 0:a.blockSelector;return L(u)&&L(c)&&L(d)?void 0:{maskAllInputs:u==null||u,maskTextSelector:c,blockSelector:d}}get Vt(){var e=this._instance.get_property(ov);return He(e)?e:null}get Jt(){var e=this._instance.get_property(av);return He(e)?e:null}get status(){return this.Kt?this.Yt({receivedFlags:this.Kt,isRecordingEnabled:this.qt,isSampled:this.Ut,urlTriggerMatching:this.Xt,eventTriggerMatching:this.Qt,linkedFlagMatching:this.Zt,sessionId:this.sessionId}):Ir}constructor(e){if(this.Yt=MI,this.Kt=!1,this.ti=[],this.ii="unknown",this.ei=Date.now(),this.Nt=new PI,this.ri=void 0,this.si=void 0,this.ni=void 0,this.oi=void 0,this.ai=void 0,this._forceAllowLocalhostNetworkCapture=!1,this.li=()=>{this.hi()},this.ui=()=>{this.tryAddCustomEvent("browser offline",{})},this.di=()=>{this.tryAddCustomEvent("browser online",{})},this.vi=()=>{if(j!=null&&j.visibilityState){var i="window "+j.visibilityState;this.tryAddCustomEvent(i,{})}},this._instance=e,this.Dt=!1,this.ci="/s/",this.fi=void 0,this.Kt=!1,!this._instance.sessionManager)throw Me.error("started without valid sessionManager"),new Error(ds+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(ds+' cannot be used with cookieless_mode="always"');this.Zt=new AI(this._instance),this.Xt=new TI(this._instance),this.Qt=new RI(this._instance);var{sessionId:n,windowId:r}=this.jt.checkAndGetSessionAndWindowId();this.Ft=n,this.pi=r,this.H=this.gi(),this.At>=this.jt.sessionTimeoutMs&&Me.warn("session_idle_threshold_ms ("+this.At+") is greater than the session timeout ("+this.jt.sessionTimeoutMs+"). Session will never be detected as idle")}startIfEnabledOrStop(e){this.qt?(this.mi(e),pe(T,"beforeunload",this.li),pe(T,"offline",this.ui),pe(T,"online",this.di),pe(T,"visibilitychange",this.vi),this.yi(),this.bi(),J(this.ri)&&(this.ri=this._instance.on("eventCaptured",n=>{try{if(n.event==="$pageview"){var r=n!=null&&n.properties.$current_url?this.wi(n==null?void 0:n.properties.$current_url):"";if(!r)return;this.tryAddCustomEvent("$pageview",{href:r})}}catch(i){Me.error("Could not add $pageview to rrweb session",i)}})),this.si||(this.si=this.jt.onSessionId((n,r,i)=>{var s,o;i&&(this.tryAddCustomEvent("$session_id_change",{sessionId:n,windowId:r,changeReason:i}),(s=this._instance)==null||(s=s.persistence)==null||s.unregister(Ld),(o=this._instance)==null||(o=o.persistence)==null||o.unregister(Nd))}))):this.stopRecording()}stopRecording(){var e,n,r,i;this.Dt&&this.fi&&(this.fi(),this.fi=void 0,this.Dt=!1,T==null||T.removeEventListener("beforeunload",this.li),T==null||T.removeEventListener("offline",this.ui),T==null||T.removeEventListener("online",this.di),T==null||T.removeEventListener("visibilitychange",this.vi),this.gi(),clearInterval(this.Si),(e=this.ri)==null||e.call(this),this.ri=void 0,(n=this.ai)==null||n.call(this),this.ai=void 0,(r=this.si)==null||r.call(this),this.si=void 0,(i=this.oi)==null||i.call(this),this.oi=void 0,this.Qt.stop(),this.Xt.stop(),this.Zt.stop(),Me.info("stopped"))}ki(){var e;(e=this._instance.persistence)==null||e.unregister(ls)}$i(e){var n,r=this.Ft!==e,i=this.Vt;if(He(i)){var s=this.Ut,o=r||!Vt(s),a=o?bI(e,i):s;o&&(a?this.xi(Qh):Me.warn("Sample rate ("+i+") has determined that this sessionId ("+e+") will not be sent to the server."),this.tryAddCustomEvent("samplingDecisionMade",{sampleRate:i,isSampled:a})),(n=this._instance.persistence)==null||n.register({[ls]:a})}else this.ki()}onRemoteConfig(e){var n,r,i,s;this.tryAddCustomEvent("$remote_config_received",e),this.Ei(e),(n=e.sessionRecording)!=null&&n.endpoint&&(this.ci=(s=e.sessionRecording)==null?void 0:s.endpoint),this.yi(),((r=e.sessionRecording)==null?void 0:r.triggerMatchType)==="any"?(this.Yt=II,this.Nt=new Cx([this.Qt,this.Xt])):(this.Yt=NI,this.Nt=new bx([this.Qt,this.Xt])),this._instance.register_for_session({$sdk_debug_replay_remote_trigger_matching_config:(i=e.sessionRecording)==null?void 0:i.triggerMatchType}),this.Xt.onRemoteConfig(e),this.Qt.onRemoteConfig(e),this.Zt.onRemoteConfig(e,(o,a)=>{this.xi("linked_flag_matched",{flag:o,variant:a})}),this.Kt=!0,this.startIfEnabledOrStop()}yi(){He(this.Vt)&&J(this.oi)&&(this.oi=this.jt.onSessionId(e=>{this.$i(e)}))}Ei(e){if(this._instance.persistence){var n,r=this._instance.persistence,i=()=>{var s,o,a,l,u,c,d,f,h,y=(s=e.sessionRecording)==null?void 0:s.sampleRate,m=J(y)?null:parseFloat(y);J(m)&&this.ki();var _=(o=e.sessionRecording)==null?void 0:o.minimumDurationMilliseconds;r.register({[eo]:!!e.sessionRecording,[nv]:(a=e.sessionRecording)==null?void 0:a.consoleLogRecordingEnabled,[rv]:D({capturePerformance:e.capturePerformance},(l=e.sessionRecording)==null?void 0:l.networkPayloadCapture),[iv]:(u=e.sessionRecording)==null?void 0:u.masking,[sv]:{enabled:(c=e.sessionRecording)==null?void 0:c.recordCanvas,fps:(d=e.sessionRecording)==null?void 0:d.canvasFps,quality:(f=e.sessionRecording)==null?void 0:f.canvasQuality},[ov]:m,[av]:L(_)?null:_,[Za]:(h=e.sessionRecording)==null?void 0:h.scriptConfig})};i(),(n=this.ni)==null||n.call(this),this.ni=this.jt.onSessionId(i)}}log(e,n){var r;n===void 0&&(n="log"),(r=this._instance.sessionRecording)==null||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:n,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}mi(e){if(!L(Object.assign)&&!L(Array.from)&&!(this.Dt||this._instance.config.disable_session_recording||this._instance.consent.isOptedOut())){var n;this.Dt=!0,this.jt.checkAndGetSessionAndWindowId(),Ko()?this.Pi():(n=H.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.Ii,r=>{if(r)return Me.error("could not load recorder",r);this.Pi()}),Me.info("starting"),this.status===ul&&this.xi(e||"recording_initialized")}}get Ii(){var e;return((e=this._instance)==null||(e=e.persistence)==null||(e=e.get_property(Za))==null?void 0:e.script)||"recorder"}Ri(e){var n;return e.type===3&&OI.indexOf((n=e.data)==null?void 0:n.source)!==-1}Ti(e){var n=this.Ri(e);n||this.ii||e.timestamp-this.ei>this.At&&(this.ii=!0,clearInterval(this.Si),this.tryAddCustomEvent("sessionIdle",{eventTimestamp:e.timestamp,lastActivityTimestamp:this.ei,threshold:this.At,bufferLength:this.H.data.length,bufferSize:this.H.size}),this.hi());var r=!1;if(n&&(this.ei=e.timestamp,this.ii)){var i=this.ii==="unknown";this.ii=!1,i||(this.tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:e.type}),r=!0)}if(!this.ii){var{windowId:s,sessionId:o}=this.jt.checkAndGetSessionAndWindowId(!n,e.timestamp),a=this.Ft!==o,l=this.pi!==s;this.pi=s,this.Ft=o,a||l?(this.stopRecording(),this.startIfEnabledOrStop("session_id_changed")):r&&this.Ci()}}Mi(e){try{return e.rrwebMethod(),!0}catch(n){return this.ti.length<10?this.ti.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt++,rrwebMethod:e.rrwebMethod}):Me.warn("could not emit queued rrweb event.",n,e),!1}}tryAddCustomEvent(e,n){return this.Mi(Ev(()=>Ko().addCustomEvent(e,n)))}Oi(){return this.Mi(Ev(()=>Ko().takeFullSnapshot()))}Pi(){var e,n,r,i,s={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},o=this._instance.config.session_recording;for(var[a,l]of Object.entries(o||{}))a in s&&(a==="maskInputOptions"?s.maskInputOptions=D({password:!0},l):s[a]=l);this.Ht&&this.Ht.enabled&&(s.recordCanvas=!0,s.sampling={canvas:this.Ht.fps},s.dataURLOptions={type:"image/webp",quality:this.Ht.quality}),this.Gt&&(s.maskAllInputs=(n=this.Gt.maskAllInputs)===null||n===void 0||n,s.maskTextSelector=(r=this.Gt.maskTextSelector)!==null&&r!==void 0?r:void 0,s.blockSelector=(i=this.Gt.blockSelector)!==null&&i!==void 0?i:void 0);var u=Ko();if(u){this.Fi=(e=this.Fi)!==null&&e!==void 0?e:new mI(u,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(d,f)=>{var h="Too many mutations on node '"+d+"'. Rate limiting. This could be due to SVG animations or something similar";Me.info(h,{node:f}),this.log(ds+" "+h,"warn")}});var c=this.Ai();this.fi=u(D({emit:d=>{this.onRRwebEmit(d)},plugins:c},s)),this.ei=Date.now(),this.ii=Vt(this.ii)?this.ii:"unknown",this.tryAddCustomEvent("$session_options",{sessionRecordingOptions:s,activePlugins:c.map(d=>d==null?void 0:d.name)}),this.tryAddCustomEvent("$posthog_config",{config:this._instance.config})}else Me.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}Ci(){if(this.Si&&clearInterval(this.Si),this.ii!==!0){var e=this.Lt;e&&(this.Si=setInterval(()=>{this.Oi()},e))}}Ai(){var e,n,r=[],i=(e=H.__PosthogExtensions__)==null||(e=e.rrwebPlugins)==null?void 0:e.getRecordConsolePlugin;i&&this.Bt&&r.push(i());var s=(n=H.__PosthogExtensions__)==null||(n=n.rrwebPlugins)==null?void 0:n.getRecordNetworkPlugin;return this.Wt&&Tt(s)&&(!qM.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?r.push(s(gI(this._instance.config,this.Wt))):Me.info("NetworkCapture not started because we are on localhost.")),r}onRRwebEmit(e){var n;if(this.Di(),e&&we(e)){if(e.type===dn.Meta){var r=this.wi(e.data.href);if(this.ji=r,!r)return;e.data.href=r}else this.Li();if(this.Xt.checkUrlTriggerConditions(()=>this.Ni(),()=>this.Ui(),f=>this.zi(f)),!this.Xt.urlBlocked||(i=e).type===dn.Custom&&i.data.tag==="recording paused"){var i;e.type===dn.FullSnapshot&&this.Ci(),e.type===dn.FullSnapshot&&this.Kt&&this.Nt.triggerStatus(this.sessionId)===Ge&&this.gi();var s=this.Fi?this.Fi.throttleMutations(e):e;if(s){var o=function(f){var h=f;if(h&&we(h)&&h.type===6&&we(h.data)&&h.data.plugin==="rrweb/console@1"){h.data.payload.payload.length>10&&(h.data.payload.payload=h.data.payload.payload.slice(0,10),h.data.payload.payload.push("...[truncated]"));for(var y=[],m=0;m<h.data.payload.payload.length;m++)h.data.payload.payload[m]&&h.data.payload.payload[m].length>2e3?y.push(h.data.payload.payload[m].slice(0,2e3)+"...[truncated]"):y.push(h.data.payload.payload[m]);return h.data.payload.payload=y,f}return f}(s);if(this.Ti(o),this.ii!==!0||kv(o)){if(kv(o)){var a=o.data.payload;if(a){var l=a.lastActivityTimestamp,u=a.threshold;o.timestamp=l+u}}var c=(n=this._instance.config.session_recording.compress_events)===null||n===void 0||n?function(f){if(al(f)<1024)return f;try{if(f.type===dn.FullSnapshot)return D({},f,{data:lr(f.data),cv:"2024-10"});if(f.type===dn.IncrementalSnapshot&&f.data.source===$t.Mutation)return D({},f,{cv:"2024-10",data:D({},f.data,{texts:lr(f.data.texts),attributes:lr(f.data.attributes),removes:lr(f.data.removes),adds:lr(f.data.adds)})});if(f.type===dn.IncrementalSnapshot&&f.data.source===$t.StyleSheetRule)return D({},f,{cv:"2024-10",data:D({},f.data,{adds:f.data.adds?lr(f.data.adds):void 0,removes:f.data.removes?lr(f.data.removes):void 0})})}catch(h){Me.error("could not compress event - will use uncompressed event",h)}return f}(o):o,d={$snapshot_bytes:al(c),$snapshot_data:c,$session_id:this.Ft,$window_id:this.pi};this.status!==er?this.qi(d):this.gi()}}}}}Li(){if(!this._instance.config.capture_pageview&&T){var e=this.wi(T.location.href);this.ji!==e&&(this.tryAddCustomEvent("$url_changed",{href:e}),this.ji=e)}}Di(){if(this.ti.length){var e=[...this.ti];this.ti=[],e.forEach(n=>{Date.now()-n.enqueuedAt<=2e3&&this.Mi(n)})}}wi(e){var n=this._instance.config.session_recording;if(n.maskNetworkRequestFn){var r,i={url:e};return(r=i=n.maskNetworkRequestFn(i))==null?void 0:r.url}return e}gi(){return this.H={size:0,data:[],sessionId:this.Ft,windowId:this.pi},this.H}hi(){this.Bi&&(clearTimeout(this.Bi),this.Bi=void 0);var e=this.Jt,n=this.zt,r=He(n)&&n>=0,i=He(e)&&r&&n<e;return this.status===Ir||this.status===Zh||this.status===er||i?(this.Bi=setTimeout(()=>{this.hi()},2e3),this.H):(this.H.data.length>0&&zd(this.H).forEach(s=>{this.Hi({$snapshot_bytes:s.size,$snapshot_data:s.data,$session_id:s.sessionId,$window_id:s.windowId,$lib:"web",$lib_version:hn.LIB_VERSION})}),this.gi())}qi(e){var n,r=2+(((n=this.H)==null?void 0:n.data.length)||0);!this.ii&&(this.H.size+e.$snapshot_bytes+r>943718.4||this.H.sessionId!==this.Ft)&&(this.H=this.hi()),this.H.size+=e.$snapshot_bytes,this.H.data.push(e.$snapshot_data),this.Bi||this.ii||(this.Bi=setTimeout(()=>{this.hi()},2e3))}Hi(e){this._instance.capture("$snapshot",e,{_url:this._instance.requestRouter.endpointFor("api",this.ci),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}zi(e){var n;this.Nt.triggerStatus(this.sessionId)===Ge&&((n=this._instance)==null||(n=n.persistence)==null||n.register({[e==="url"?Nd:Ld]:this.Ft}),this.hi(),this.xi(e+"_trigger_matched"))}Ni(){this.Xt.urlBlocked||(this.Xt.urlBlocked=!0,clearInterval(this.Si),Me.info("recording paused due to URL blocker"),this.tryAddCustomEvent("recording paused",{reason:"url blocker"}))}Ui(){this.Xt.urlBlocked&&(this.Xt.urlBlocked=!1,this.Oi(),this.Ci(),this.tryAddCustomEvent("recording resumed",{reason:"left blocked url"}),Me.info("recording resumed"))}bi(){this.Qt.Mt.length!==0&&J(this.ai)&&(this.ai=this._instance.on("eventCaptured",e=>{try{this.Qt.Mt.includes(e.event)&&this.zi("event")}catch(n){Me.error("Could not activate event trigger",n)}}))}overrideLinkedFlag(){this.Zt.linkedFlagSeen=!0,this.Oi(),this.xi("linked_flag_overridden")}overrideSampling(){var e;(e=this._instance.persistence)==null||e.register({[ls]:!0}),this.Oi(),this.xi("sampling_overridden")}overrideTrigger(e){this.zi(e)}xi(e,n){this._instance.register_for_session({$session_recording_start_reason:e}),Me.info(e.replace("_"," "),n),q(["recording_initialized","session_id_changed"],e)||this.tryAddCustomEvent(e,n)}get sdkDebugProperties(){var{sessionStartTimestamp:e}=this.jt.checkAndGetSessionAndWindowId(!0);return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this.H.data.length,$sdk_debug_replay_internal_buffer_size:this.H.size,$sdk_debug_current_session_duration:this.zt,$sdk_debug_session_start:e}}}var Gu=Re("[SegmentIntegration]");function DI(t,e){var n=t.config.segment;if(!n)return e();(function(r,i){var s=r.config.segment;if(!s)return i();var o=l=>{var u=()=>l.anonymousId()||jn();r.config.get_device_id=u,l.id()&&(r.register({distinct_id:l.id(),$device_id:u()}),r.persistence.set_property(un,"identified")),i()},a=s.user();"then"in a&&Tt(a.then)?a.then(l=>o(l)):o(a)})(t,()=>{n.register((r=>{Promise&&Promise.resolve||Gu.warn("This browser does not have Promise support, and can not use the segment integration");var i=(s,o)=>{if(!o)return s;s.event.userId||s.event.anonymousId===r.get_distinct_id()||(Gu.info("No userId set, resetting PostHog"),r.reset()),s.event.userId&&s.event.userId!==r.get_distinct_id()&&(Gu.info("UserId set, identifying with PostHog"),r.identify(s.event.userId));var a=r.calculateEventProperties(o,s.event.properties);return s.event.properties=Object.assign({},a,s.event.properties),s};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:s=>i(s,s.event.event),page:s=>i(s,"$pageview"),identify:s=>i(s,"$identify"),screen:s=>i(s,"$screen")}})(t)).then(()=>{e()})})}var Px="posthog-js";function Tx(t,e){var{organization:n,projectId:r,prefix:i,severityAllowList:s=["error"],sendExceptionsToPostHog:o=!0}=e===void 0?{}:e;return a=>{var l,u,c,d,f;if(!(s==="*"||s.includes(a.level))||!t.__loaded)return a;a.tags||(a.tags={});var h=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/person/"+t.get_distinct_id());a.tags["PostHog Person URL"]=h,t.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var y=((l=a.exception)==null?void 0:l.values)||[],m=y.map(p=>D({},p,{stacktrace:p.stacktrace?D({},p.stacktrace,{type:"raw",frames:(p.stacktrace.frames||[]).map(g=>D({},g,{platform:"web:javascript"}))}):void 0})),_={$exception_message:((u=y[0])==null?void 0:u.value)||a.message,$exception_type:(c=y[0])==null?void 0:c.type,$exception_personURL:h,$exception_level:a.level,$exception_list:m,$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:((d=y[0])==null?void 0:d.value)||a.message,$sentry_exception_type:(f=y[0])==null?void 0:f.type,$sentry_tags:a.tags};return n&&r&&(_.$sentry_url=(i||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+a.event_id),o&&t.exceptions.sendExceptionEvent(_),a}}class $I{constructor(e,n,r,i,s,o){this.name=Px,this.setupOnce=function(a){a(Tx(e,{organization:n,projectId:r,prefix:i,severityAllowList:s,sendExceptionsToPostHog:o==null||o}))}}}var FI=T!=null&&T.location?sl(T.location.hash,"__posthog")||sl(location.hash,"state"):null,bv="_postHogToolbarParams",Pv=Re("[Toolbar]"),In=function(t){return t[t.UNINITIALIZED=0]="UNINITIALIZED",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED",t}(In||{});class jI{constructor(e){this.instance=e}Wi(e){H.ph_toolbar_state=e}Gi(){var e;return(e=H.ph_toolbar_state)!==null&&e!==void 0?e:In.UNINITIALIZED}maybeLoadToolbar(e,n,r){if(e===void 0&&(e=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),!T||!j)return!1;e=e??T.location,r=r??T.history;try{if(!n){try{T.localStorage.setItem("test","test"),T.localStorage.removeItem("test")}catch{return!1}n=T==null?void 0:T.localStorage}var i,s=FI||sl(e.hash,"__posthog")||sl(e.hash,"state"),o=s?Xm(()=>JSON.parse(atob(decodeURIComponent(s))))||Xm(()=>JSON.parse(decodeURIComponent(s))):null;return o&&o.action==="ph_authorize"?((i=o).source="url",i&&Object.keys(i).length>0&&(o.desiredHash?e.hash=o.desiredHash:r?r.replaceState(r.state,"",e.pathname+e.search):e.hash="")):((i=JSON.parse(n.getItem(bv)||"{}")).source="localstorage",delete i.userIntent),!(!i.token||this.instance.config.token!==i.token)&&(this.loadToolbar(i),!0)}catch{return!1}}Vi(e){var n=H.ph_load_toolbar||H.ph_load_editor;!J(n)&&Tt(n)?n(e,this.instance):Pv.warn("No toolbar load function found")}loadToolbar(e){var n=!(j==null||!j.getElementById(nx));if(!T||n)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,i=D({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(T.localStorage.setItem(bv,JSON.stringify(D({},i,{source:void 0}))),this.Gi()===In.LOADED)this.Vi(i);else if(this.Gi()===In.UNINITIALIZED){var s;this.Wi(In.LOADING),(s=H.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this.instance,"toolbar",o=>{if(o)return Pv.error("[Toolbar] Failed to load",o),void this.Wi(In.UNINITIALIZED);this.Wi(In.LOADED),this.Vi(i)}),pe(T,"turbolinks:load",()=>{this.Wi(In.UNINITIALIZED),this.loadToolbar(i)})}return!0}Ji(e){return this.loadToolbar(e)}maybeLoadEditor(e,n,r){return e===void 0&&(e=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),this.maybeLoadToolbar(e,n,r)}}var VI=Re("[TracingHeaders]");class BI{constructor(e){this.Ki=void 0,this.Yi=void 0,this.lt=()=>{var n,r;L(this.Ki)&&((n=H.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),L(this.Yi)&&((r=H.__PosthogExtensions__)==null||(r=r.tracingHeadersPatchFns)==null||r._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}nt(e){var n,r;(n=H.__PosthogExtensions__)!=null&&n.tracingHeadersPatchFns&&e(),(r=H.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"tracing-headers",i=>{if(i)return VI.error("failed to load script",i);e()})}startIfEnabledOrStop(){var e,n;this._instance.config.__add_tracing_headers?this.nt(this.lt):((e=this.Ki)==null||e.call(this),(n=this.Yi)==null||n.call(this),this.Ki=void 0,this.Yi=void 0)}}var An=Re("[Web Vitals]"),Tv=9e5;class zI{constructor(e){var n;this.Xi=!1,this.C=!1,this.H={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Qi=()=>{clearTimeout(this.Zi),this.H.metrics.length!==0&&(this._instance.capture("$web_vitals",this.H.metrics.reduce((r,i)=>D({},r,{["$web_vitals_"+i.name+"_event"]:D({},i),["$web_vitals_"+i.name+"_value"]:i.value}),{})),this.H={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.te=r=>{var i,s=(i=this._instance.sessionManager)==null?void 0:i.checkAndGetSessionAndWindowId(!0);if(L(s))An.error("Could not read session ID. Dropping metrics!");else{this.H=this.H||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var o=this.ie();L(o)||(J(r==null?void 0:r.name)||J(r==null?void 0:r.value)?An.error("Invalid metric received",r):this.ee&&r.value>=this.ee?An.error("Ignoring metric with value >= "+this.ee,r):(this.H.url!==o&&(this.Qi(),this.Zi=setTimeout(this.Qi,this.flushToCaptureTimeoutMs)),L(this.H.url)&&(this.H.url=o),this.H.firstMetricTimestamp=L(this.H.firstMetricTimestamp)?Date.now():this.H.firstMetricTimestamp,r.attribution&&r.attribution.interactionTargetElement&&(r.attribution.interactionTargetElement=void 0),this.H.metrics.push(D({},r,{$current_url:o,$session_id:s.sessionId,$window_id:s.windowId,timestamp:Date.now()})),this.H.metrics.length===this.allowedMetrics.length&&this.Qi()))}},this.lt=()=>{var r,i,s,o,a=H.__PosthogExtensions__;L(a)||L(a.postHogWebVitalsCallbacks)||({onLCP:r,onCLS:i,onFCP:s,onINP:o}=a.postHogWebVitalsCallbacks),r&&i&&s&&o?(this.allowedMetrics.indexOf("LCP")>-1&&r(this.te.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&i(this.te.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&s(this.te.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&o(this.te.bind(this)),this.C=!0):An.error("web vitals callbacks not loaded - not starting")},this._instance=e,this.Xi=!((n=this._instance.persistence)==null||!n.props[ev]),this.startIfEnabled()}get allowedMetrics(){var e,n,r=we(this._instance.config.capture_performance)?(e=this._instance.config.capture_performance)==null?void 0:e.web_vitals_allowed_metrics:void 0;return L(r)?((n=this._instance.persistence)==null?void 0:n.props[tv])||["CLS","FCP","INP","LCP"]:r}get flushToCaptureTimeoutMs(){return(we(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get ee(){var e=we(this._instance.config.capture_performance)&&He(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:Tv;return 0<e&&e<=6e4?Tv:e}get isEnabled(){var e=st==null?void 0:st.protocol;if(e!=="http:"&&e!=="https:")return An.info("Web Vitals are disabled on non-http/https protocols"),!1;var n=we(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:Vt(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return Vt(n)?n:this.Xi}startIfEnabled(){this.isEnabled&&!this.C&&(An.info("enabled, starting..."),this.nt(this.lt))}onRemoteConfig(e){var n=we(e.capturePerformance)&&!!e.capturePerformance.web_vitals,r=we(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[ev]:n}),this._instance.persistence.register({[tv]:r})),this.Xi=n,this.startIfEnabled()}nt(e){var n,r;(n=H.__PosthogExtensions__)!=null&&n.postHogWebVitalsCallbacks&&e(),(r=H.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"web-vitals",i=>{i?An.error("failed to load script",i):e()})}ie(){var e=T?T.location.href:void 0;return e||An.error("Could not determine current URL"),e}}var UI=Re("[Heatmaps]");function Av(t){return we(t)&&"clientX"in t&&"clientY"in t&&He(t.clientX)&&He(t.clientY)}class HI{constructor(e){var n;this.rageclicks=new gx,this.Xi=!1,this.C=!1,this.re=null,this.instance=e,this.Xi=!((n=this.instance.persistence)==null||!n.props[Md])}get flushIntervalMilliseconds(){var e=5e3;return we(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return L(this.instance.config.capture_heatmaps)?L(this.instance.config.enable_heatmaps)?this.Xi:this.instance.config.enable_heatmaps:this.instance.config.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.C)return;UI.info("starting..."),this.se(),this.re=setInterval(this.ne.bind(this),this.flushIntervalMilliseconds)}else{var e,n;clearInterval((e=this.re)!==null&&e!==void 0?e:void 0),(n=this.oe)==null||n.stop(),this.getAndClearBuffer()}}onRemoteConfig(e){var n=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[Md]:n}),this.Xi=n,this.startIfEnabled()}getAndClearBuffer(){var e=this.H;return this.H=void 0,e}ae(e){this.le(e.originalEvent,"deadclick")}se(){T&&j&&(pe(T,"beforeunload",this.ne.bind(this)),pe(j,"click",e=>this.le(e||(T==null?void 0:T.event)),{capture:!0}),pe(j,"mousemove",e=>this.he(e||(T==null?void 0:T.event)),{capture:!0}),this.oe=new vx(this.instance,lI,this.ae.bind(this)),this.oe.startIfEnabled(),this.C=!0)}ue(e,n){var r=this.instance.scrollManager.scrollY(),i=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),o=function(a,l,u){for(var c=a;c&&Ul(c)&&!Yn(c,"body");){if(c===u)return!1;if(q(l,T==null?void 0:T.getComputedStyle(c).position))return!0;c=lx(c)}return!1}(ox(e),["fixed","sticky"],s);return{x:e.clientX+(o?0:i),y:e.clientY+(o?0:r),target_fixed:o,type:n}}le(e,n){var r;if(n===void 0&&(n="click"),!lv(e.target)&&Av(e)){var i=this.ue(e,n);(r=this.rageclicks)!=null&&r.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.de(D({},i,{type:"rageclick"})),this.de(i)}}he(e){!lv(e.target)&&Av(e)&&(clearTimeout(this.ve),this.ve=setTimeout(()=>{this.de(this.ue(e,"mousemove"))},500))}de(e){if(T){var n=T.location.href;this.H=this.H||{},this.H[n]||(this.H[n]=[]),this.H[n].push(e)}}ne(){this.H&&!ii(this.H)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class WI{constructor(e){this._instance=e}doPageView(e,n){var r,i=this.ce(e,n);return this.fe={pathname:(r=T==null?void 0:T.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:e},this._instance.scrollManager.resetContext(),i}doPageLeave(e){var n;return this.ce(e,(n=this.fe)==null?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.fe)==null?void 0:e.pageViewId}}ce(e,n){var r=this.fe;if(!r)return{$pageview_id:n};var i={$pageview_id:n,$prev_pageview_id:r.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:o,lastScrollY:a,maxScrollY:l,maxContentHeight:u,lastContentY:c,maxContentY:d}=s;if(!(L(o)||L(a)||L(l)||L(u)||L(c)||L(d))){o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),u=Math.ceil(u),c=Math.ceil(c),d=Math.ceil(d);var f=o<=1?1:mt(a/o,0,1,F),h=o<=1?1:mt(l/o,0,1,F),y=u<=1?1:mt(c/u,0,1,F),m=u<=1?1:mt(d/u,0,1,F);i=Ee(i,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:f,$prev_pageview_max_scroll:l,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:c,$prev_pageview_last_content_percentage:y,$prev_pageview_max_content:d,$prev_pageview_max_content_percentage:m})}}return r.pathname&&(i.$prev_pageview_pathname=r.pathname),r.timestamp&&(i.$prev_pageview_duration=(e.getTime()-r.timestamp.getTime())/1e3),i}}var KI=function(t){var e,n,r,i,s="";for(e=n=0,r=(t=(t+"").replace(/\r\n/g,`
|
|
144
|
-
`).replace(/\r/g,`
|
|
145
|
-
`)).length,i=0;i<r;i++){var o=t.charCodeAt(i),a=null;o<128?n++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),bn(a)||(n>e&&(s+=t.substring(e,n)),s+=a,e=n=i+1)}return n>e&&(s+=t.substring(e,t.length)),s},GI=!!bd||!!Cd,Rv="text/plain",cl=(t,e)=>{var[n,r]=t.split("?"),i=D({},e);r==null||r.split("&").forEach(o=>{var[a]=o.split("=");delete i[a]});var s=YM(i);return n+"?"+(s=s?(r?r+"&":"")+s:r)},fs=(t,e)=>JSON.stringify(t,(n,r)=>typeof r=="bigint"?r.toString():r,e),qu=t=>{var{data:e,compression:n}=t;if(e){if(n===pn.GZipJS){var r=Ex(kx(fs(e)),{mtime:0}),i=new Blob([r],{type:Rv});return{contentType:Rv,body:i,estimatedSize:i.size}}if(n===pn.Base64){var s=function(l){var u,c,d,f,h,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",m=0,_=0,p="",g=[];if(!l)return l;l=KI(l);do u=(h=l.charCodeAt(m++)<<16|l.charCodeAt(m++)<<8|l.charCodeAt(m++))>>18&63,c=h>>12&63,d=h>>6&63,f=63&h,g[_++]=y.charAt(u)+y.charAt(c)+y.charAt(d)+y.charAt(f);while(m<l.length);switch(p=g.join(""),l.length%3){case 1:p=p.slice(0,-2)+"==";break;case 2:p=p.slice(0,-1)+"="}return p}(fs(e)),o=(l=>"data="+encodeURIComponent(typeof l=="string"?l:fs(l)))(s);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var a=fs(e);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},ha=[];Cd&&ha.push({transport:"fetch",method:t=>{var e,n,{contentType:r,body:i,estimatedSize:s}=(e=qu(t))!==null&&e!==void 0?e:{},o=new Headers;re(t.headers,function(c,d){o.append(d,c)}),r&&o.append("Content-Type",r);var a=t.url,l=null;if(Um){var u=new Um;l={signal:u.signal,timeout:setTimeout(()=>u.abort(),t.timeout)}}Cd(a,D({method:(t==null?void 0:t.method)||"GET",headers:o,keepalive:t.method==="POST"&&(s||0)<52428.8,body:i,signal:(n=l)==null?void 0:n.signal},t.fetchOptions)).then(c=>c.text().then(d=>{var f={statusCode:c.status,text:d};if(c.status===200)try{f.json=JSON.parse(d)}catch(h){F.error(h)}t.callback==null||t.callback(f)})).catch(c=>{F.error(c),t.callback==null||t.callback({statusCode:0,text:c})}).finally(()=>l?clearTimeout(l.timeout):null)}}),bd&&ha.push({transport:"XHR",method:t=>{var e,n=new bd;n.open(t.method||"GET",t.url,!0);var{contentType:r,body:i}=(e=qu(t))!==null&&e!==void 0?e:{};re(t.headers,function(s,o){n.setRequestHeader(o,s)}),r&&n.setRequestHeader("Content-Type",r),t.timeout&&(n.timeout=t.timeout),t.disableXHRCredentials||(n.withCredentials=!0),n.onreadystatechange=()=>{if(n.readyState===4){var s={statusCode:n.status,text:n.responseText};if(n.status===200)try{s.json=JSON.parse(n.responseText)}catch{}t.callback==null||t.callback(s)}},n.send(i)}}),gt!=null&>.sendBeacon&&ha.push({transport:"sendBeacon",method:t=>{var e=cl(t.url,{beacon:"1"});try{var n,{contentType:r,body:i}=(n=qu(t))!==null&&n!==void 0?n:{},s=typeof i=="string"?new Blob([i],{type:r}):i;gt.sendBeacon(e,s)}catch{}}});var Ai=function(t,e){if(!function(n){try{new RegExp(n)}catch{return!1}return!0}(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}};function Mv(t,e,n){return fs({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}var Ax={exact:(t,e)=>e.some(n=>t.some(r=>n===r)),is_not:(t,e)=>e.every(n=>t.every(r=>n!==r)),regex:(t,e)=>e.some(n=>t.some(r=>Ai(n,r))),not_regex:(t,e)=>e.every(n=>t.every(r=>!Ai(n,r))),icontains:(t,e)=>e.map(Go).some(n=>t.map(Go).some(r=>n.includes(r))),not_icontains:(t,e)=>e.map(Go).every(n=>t.map(Go).every(r=>!n.includes(r)))},Go=t=>t.toLowerCase(),Iv=Re("[Error tracking]");class qI{constructor(e){var n,r;this.pe=[],this.ge=new kM([new CM,new LM,new PM,new bM,new IM,new MM,new AM,new NM],[_M,SM]),this._instance=e,this.pe=(n=(r=this._instance.persistence)==null?void 0:r.get_property(Id))!==null&&n!==void 0?n:[]}onRemoteConfig(e){var n,r,i,s=(n=(r=e.errorTracking)==null?void 0:r.suppressionRules)!==null&&n!==void 0?n:[],o=(i=e.errorTracking)==null?void 0:i.captureExtensionExceptions;this.pe=s,this._instance.persistence&&this._instance.persistence.register({[Id]:this.pe,[Jm]:o})}get _e(){var e,n=!!this._instance.get_property(Jm),r=this._instance.config.error_tracking.captureExtensionExceptions;return(e=r??n)!==null&&e!==void 0&&e}buildProperties(e,n){return this.ge.buildFromUnknown(e,{syntheticException:n==null?void 0:n.syntheticException,mechanism:{handled:n==null?void 0:n.handled}})}sendExceptionEvent(e){if(this.me(e))Iv.info("Skipping exception capture because a suppression rule matched");else{if(this._e||!this.ye(e))return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"});Iv.info("Skipping exception capture because it was thrown by an extension")}}me(e){var n=e.$exception_list;if(!n||!oe(n)||n.length===0)return!1;var r=n.reduce((i,s)=>{var{type:o,value:a}=s;return xe(o)&&o.length>0&&i.$exception_types.push(o),xe(a)&&a.length>0&&i.$exception_values.push(a),i},{$exception_types:[],$exception_values:[]});return this.pe.some(i=>{var s=i.values.map(o=>{var a,l=Ax[o.operator],u=oe(o.value)?o.value:[o.value],c=(a=r[o.key])!==null&&a!==void 0?a:[];return u.length>0&&l(u,c)});return i.type==="OR"?s.some(Boolean):s.every(Boolean)})}ye(e){var n=e.$exception_list;return!(!n||!oe(n))&&n.flatMap(r=>{var i,s;return(i=(s=r.stacktrace)==null?void 0:s.frames)!==null&&i!==void 0?i:[]}).some(r=>r.filename&&r.filename.startsWith("chrome-extension://"))}}var Rt="Mobile",dl="iOS",Qt="Android",to="Tablet",Rx=Qt+" "+to,Mx="iPad",Ix="Apple",Nx=Ix+" Watch",no="Safari",Ri="BlackBerry",Lx="Samsung",Ox=Lx+"Browser",Dx=Lx+" Internet",Nr="Chrome",YI=Nr+" OS",$x=Nr+" "+dl,ep="Internet Explorer",Fx=ep+" "+Rt,tp="Opera",XI=tp+" Mini",np="Edge",jx="Microsoft "+np,hi="Firefox",Vx=hi+" "+dl,ro="Nintendo",io="PlayStation",pi="Xbox",Bx=Qt+" "+Rt,zx=Rt+" "+no,hs="Windows",Yd=hs+" Phone",Nv="Nokia",Xd="Ouya",Ux="Generic",QI=Ux+" "+Rt.toLowerCase(),Hx=Ux+" "+to.toLowerCase(),Qd="Konqueror",Ye="(\\d+(\\.\\d+)?)",Yu=new RegExp("Version/"+Ye),ZI=new RegExp(pi,"i"),JI=new RegExp(io+" \\w+","i"),eN=new RegExp(ro+" \\w+","i"),rp=new RegExp(Ri+"|PlayBook|BB10","i"),tN={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},nN=(t,e)=>e&&q(e,Ix)||function(n){return q(n,no)&&!q(n,Nr)&&!q(n,Qt)}(t),Wx=function(t,e){return e=e||"",q(t," OPR/")&&q(t,"Mini")?XI:q(t," OPR/")?tp:rp.test(t)?Ri:q(t,"IE"+Rt)||q(t,"WPDesktop")?Fx:q(t,Ox)?Dx:q(t,np)||q(t,"Edg/")?jx:q(t,"FBIOS")?"Facebook "+Rt:q(t,"UCWEB")||q(t,"UCBrowser")?"UC Browser":q(t,"CriOS")?$x:q(t,"CrMo")||q(t,Nr)?Nr:q(t,Qt)&&q(t,no)?Bx:q(t,"FxiOS")?Vx:q(t.toLowerCase(),Qd.toLowerCase())?Qd:nN(t,e)?q(t,Rt)?zx:no:q(t,hi)?hi:q(t,"MSIE")||q(t,"Trident/")?ep:q(t,"Gecko")?hi:""},rN={[Fx]:[new RegExp("rv:"+Ye)],[jx]:[new RegExp(np+"?\\/"+Ye)],[Nr]:[new RegExp("("+Nr+"|CrMo)\\/"+Ye)],[$x]:[new RegExp("CriOS\\/"+Ye)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Ye)],[no]:[Yu],[zx]:[Yu],[tp]:[new RegExp("(Opera|OPR)\\/"+Ye)],[hi]:[new RegExp(hi+"\\/"+Ye)],[Vx]:[new RegExp("FxiOS\\/"+Ye)],[Qd]:[new RegExp("Konqueror[:/]?"+Ye,"i")],[Ri]:[new RegExp(Ri+" "+Ye),Yu],[Bx]:[new RegExp("android\\s"+Ye,"i")],[Dx]:[new RegExp(Ox+"\\/"+Ye)],[ep]:[new RegExp("(rv:|MSIE )"+Ye)],Mozilla:[new RegExp("rv:"+Ye)]},iN=function(t,e){var n=Wx(t,e),r=rN[n];if(L(r))return null;for(var i=0;i<r.length;i++){var s=r[i],o=t.match(s);if(o)return parseFloat(o[o.length-2])}return null},Lv=[[new RegExp(pi+"; "+pi+" (.*?)[);]","i"),t=>[pi,t&&t[1]||""]],[new RegExp(ro,"i"),[ro,""]],[new RegExp(io,"i"),[io,""]],[rp,[Ri,""]],[new RegExp(hs,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Yd,""];if(new RegExp(Rt).test(e)&&!/IEMobile\b/.test(e))return[hs+" "+Rt,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var r=n[1],i=tN[r]||"";return/arm/i.test(e)&&(i="RT"),[hs,i]}return[hs,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>{if(t&&t[3]){var e=[t[3],t[4],t[5]||"0"];return[dl,e.join(".")]}return[dl,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=L(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+Qt+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Qt+")","i"),t=>{if(t&&t[2]){var e=[t[2],t[3],t[4]||"0"];return[Qt,e.join(".")]}return[Qt,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];if(t&&t[1]){var n=[t[1],t[2],t[3]||"0"];e[1]=n.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[YI,""]],[/Linux|debian/i,["Linux",""]]],Ov=function(t){return eN.test(t)?ro:JI.test(t)?io:ZI.test(t)?pi:new RegExp(Xd,"i").test(t)?Xd:new RegExp("("+Yd+"|WPDesktop)","i").test(t)?Yd:/iPad/.test(t)?Mx:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?Nx:rp.test(t)?Ri:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(Nv,"i").test(t)?Nv:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?!new RegExp(Rt).test(t)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)?/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?Qt:Rx:Qt:new RegExp("(pda|"+Rt+")","i").test(t)?QI:new RegExp(to,"i").test(t)&&!new RegExp(to+" pc","i").test(t)?Hx:""},qo="https?://(.*)",Wl=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],sN=zl(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Wl),ip="<masked>",oN=["li_fat_id"];function Kx(t,e,n){if(!j)return{};var r,i=e?zl([],Wl,n||[]):[],s=Gx(qh(j.URL,i,ip),t),o=(r={},re(oN,function(a){var l=rn.J(a);r[a]=l||null}),r);return Ee(o,s)}function Gx(t,e){var n=sN.concat(e||[]),r={};return re(n,function(i){var s=il(t,i);r[i]=s||null}),r}function qx(t){var e=function(s){return s?s.search(qo+"google.([^/?]*)")===0?"google":s.search(qo+"bing.com")===0?"bing":s.search(qo+"yahoo.com")===0?"yahoo":s.search(qo+"duckduckgo.com")===0?"duckduckgo":null:null}(t),n=e!="yahoo"?"q":"p",r={};if(!bn(e)){r.$search_engine=e;var i=j?il(j.referrer,n):"";i.length&&(r.ph_keyword=i)}return r}function Dv(){return navigator.language||navigator.userLanguage}function Yx(){return(j==null?void 0:j.referrer)||"$direct"}function Xx(t,e){var n=t?zl([],Wl,e||[]):[],r=st==null?void 0:st.href.substring(0,1e3);return{r:Yx().substring(0,1e3),u:r?qh(r,n,ip):void 0}}function Qx(t){var e,{r:n,u:r}=t,i={$referrer:n,$referring_domain:n==null?void 0:n=="$direct"?"$direct":(e=Pi(n))==null?void 0:e.host};if(r){i.$current_url=r;var s=Pi(r);i.$host=s==null?void 0:s.host,i.$pathname=s==null?void 0:s.pathname;var o=Gx(r);Ee(i,o)}if(n){var a=qx(n);Ee(i,a)}return i}function Zx(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function aN(){try{return new Date().getTimezoneOffset()}catch{return}}function lN(t,e){if(!rt)return{};var n,r,i,s=t?zl([],Wl,e||[]):[],[o,a]=function(l){for(var u=0;u<Lv.length;u++){var[c,d]=Lv[u],f=c.exec(l),h=f&&(Tt(d)?d(f,l):d);if(h)return h}return["",""]}(rt);return Ee(Hh({$os:o,$os_version:a,$browser:Wx(rt,navigator.vendor),$device:Ov(rt),$device_type:(r=rt,i=Ov(r),i===Mx||i===Rx||i==="Kobo"||i==="Kindle Fire"||i===Hx?to:i===ro||i===pi||i===io||i===Xd?"Console":i===Nx?"Wearable":i?Rt:"Desktop"),$timezone:Zx(),$timezone_offset:aN()}),{$current_url:qh(st==null?void 0:st.href,s,ip),$host:st==null?void 0:st.host,$pathname:st==null?void 0:st.pathname,$raw_user_agent:rt.length>1e3?rt.substring(0,997)+"...":rt,$browser_version:iN(rt,navigator.vendor),$browser_language:Dv(),$browser_language_prefix:(n=Dv(),typeof n=="string"?n.split("-")[0]:void 0),$screen_height:T==null?void 0:T.screen.height,$screen_width:T==null?void 0:T.screen.width,$viewport_height:T==null?void 0:T.innerHeight,$viewport_width:T==null?void 0:T.innerWidth,$lib:"web",$lib_version:hn.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var qt=Re("[FeatureFlags]"),Xu="$active_feature_flags",Fr="$override_feature_flags",$v="$feature_flag_payloads",Ji="$override_feature_flag_payloads",Fv="$feature_flag_request_id",jv=t=>{var e={};for(var[n,r]of fa(t||{}))r&&(e[n]=r);return e},uN=t=>{var e=t.flags;return e?(t.featureFlags=Object.fromEntries(Object.keys(e).map(n=>{var r;return[n,(r=e[n].variant)!==null&&r!==void 0?r:e[n].enabled]})),t.featureFlagPayloads=Object.fromEntries(Object.keys(e).filter(n=>e[n].enabled).filter(n=>{var r;return(r=e[n].metadata)==null?void 0:r.payload}).map(n=>{var r;return[n,(r=e[n].metadata)==null?void 0:r.payload]}))):qt.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),t},cN=function(t){return t.FeatureFlags="feature_flags",t.Recordings="recordings",t}({});class dN{constructor(e){this.be=!1,this.we=!1,this.Se=!1,this.ke=!1,this.$e=!1,this.xe=!1,this.Ee=!1,this._instance=e,this.featureFlagEventHandlers=[]}flags(){if(this._instance.config.__preview_remote_config)this.xe=!0;else{var e=!this.Pe&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.Ie({disableFlags:e})}}get hasLoadedFlags(){return this.we}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(Od),n=this._instance.get_property(Fr),r=this._instance.get_property(Ji);if(!r&&!n)return e||{};var i=Ee({},e||{}),s=[...new Set([...Object.keys(r||{}),...Object.keys(n||{})])];for(var o of s){var a,l,u=i[o],c=n==null?void 0:n[o],d=L(c)?(a=u==null?void 0:u.enabled)!==null&&a!==void 0&&a:!!c,f=L(c)?u.variant:typeof c=="string"?c:void 0,h=r==null?void 0:r[o],y=D({},u,{enabled:d,variant:d?f??(u==null?void 0:u.variant):void 0});d!==(u==null?void 0:u.enabled)&&(y.original_enabled=u==null?void 0:u.enabled),f!==(u==null?void 0:u.variant)&&(y.original_variant=u==null?void 0:u.variant),h&&(y.metadata=D({},u==null?void 0:u.metadata,{payload:h,original_payload:u==null||(l=u.metadata)==null?void 0:l.payload})),i[o]=y}return this.be||(qt.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:r,finalDetails:i}),this.be=!0),i}getFlagVariants(){var e=this._instance.get_property(si),n=this._instance.get_property(Fr);if(!n)return e||{};for(var r=Ee({},e),i=Object.keys(n),s=0;s<i.length;s++)r[i[s]]=n[i[s]];return this.be||(qt.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:n,finalFlags:r}),this.be=!0),r}getFlagPayloads(){var e=this._instance.get_property($v),n=this._instance.get_property(Ji);if(!n)return e||{};for(var r=Ee({},e||{}),i=Object.keys(n),s=0;s<i.length;s++)r[i[s]]=n[i[s]];return this.be||(qt.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:n,finalPayloads:r}),this.be=!0),r}reloadFeatureFlags(){this.ke||this._instance.config.advanced_disable_feature_flags||this.Pe||(this.Pe=setTimeout(()=>{this.Ie()},5))}Re(){clearTimeout(this.Pe),this.Pe=void 0}ensureFlagsLoaded(){this.we||this.Se||this.Pe||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.ke=e}Ie(e){var n;if(this.Re(),!this._instance.L())if(this.Se)this.$e=!0;else{var r={token:this._instance.config.token,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:D({},((n=this._instance.persistence)==null?void 0:n.get_initial_props())||{},this._instance.get_property(cs)||{}),group_properties:this._instance.get_property(hr)};(e!=null&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(r.disable_flags=!0);var i=this._instance.config.__preview_remote_config,s=i?"/flags/?v=2":"/flags/?v=2&config=true",o=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",a=this._instance.requestRouter.endpointFor("api",s+o);i&&(r.timezone=Zx()),this.Se=!0,this._instance.Te({method:"POST",url:a,data:r,compression:this._instance.config.disable_compression?void 0:pn.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:l=>{var u,c,d=!0;if(l.statusCode===200&&(this.$e||(this.$anon_distinct_id=void 0),d=!1),this.Se=!1,this.xe||(this.xe=!0,this._instance.Ce((c=l.json)!==null&&c!==void 0?c:{})),!r.disable_flags||this.$e)if(this.Ee=!d,l.json&&(u=l.json.quotaLimited)!=null&&u.includes(cN.FeatureFlags))qt.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else{var f;r.disable_flags||this.receivedFeatureFlags((f=l.json)!==null&&f!==void 0?f:{},d),this.$e&&(this.$e=!1,this.Ie())}}})}}getFeatureFlag(e,n){if(n===void 0&&(n={}),this.we||this.getFlags()&&this.getFlags().length>0){var r=this.getFlagVariants()[e],i=""+r,s=this._instance.get_property(Fv)||void 0,o=this._instance.get_property(el)||{};if((n.send_event||!("send_event"in n))&&(!(e in o)||!o[e].includes(i))){var a,l,u,c,d,f,h,y,m;oe(o[e])?o[e].push(i):o[e]=[i],(a=this._instance.persistence)==null||a.register({[el]:o});var _=this.getFeatureFlagDetails(e),p={$feature_flag:e,$feature_flag_response:r,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_request_id:s,$feature_flag_bootstrapped_response:((l=this._instance.config.bootstrap)==null||(l=l.featureFlags)==null?void 0:l[e])||null,$feature_flag_bootstrapped_payload:((u=this._instance.config.bootstrap)==null||(u=u.featureFlagPayloads)==null?void 0:u[e])||null,$used_bootstrap_value:!this.Ee};L(_==null||(c=_.metadata)==null?void 0:c.version)||(p.$feature_flag_version=_.metadata.version);var g,v=(d=_==null||(f=_.reason)==null?void 0:f.description)!==null&&d!==void 0?d:_==null||(h=_.reason)==null?void 0:h.code;v&&(p.$feature_flag_reason=v),_!=null&&(y=_.metadata)!=null&&y.id&&(p.$feature_flag_id=_.metadata.id),L(_==null?void 0:_.original_variant)&&L(_==null?void 0:_.original_enabled)||(p.$feature_flag_original_response=L(_.original_variant)?_.original_enabled:_.original_variant),_!=null&&(m=_.metadata)!=null&&m.original_payload&&(p.$feature_flag_original_payload=_==null||(g=_.metadata)==null?void 0:g.original_payload),this._instance.capture("$feature_flag_called",p)}return r}qt.warn('getFeatureFlag for key "'+e+`" failed. Feature flags didn't load in time.`)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){return this.getFlagPayloads()[e]}getRemoteConfigPayload(e,n){var r=this._instance.config.token;this._instance.Te({method:"POST",url:this._instance.requestRouter.endpointFor("api","/flags/?v=2&config=true"),data:{distinct_id:this._instance.get_distinct_id(),token:r},compression:this._instance.config.disable_compression?void 0:pn.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:i=>{var s,o=(s=i.json)==null?void 0:s.featureFlagPayloads;n((o==null?void 0:o[e])||void 0)}})}isFeatureEnabled(e,n){if(n===void 0&&(n={}),this.we||this.getFlags()&&this.getFlags().length>0){var r=this.getFeatureFlag(e,n);return L(r)?void 0:!!r}qt.warn('isFeatureEnabled for key "'+e+`" failed. Feature flags didn't load in time.`)}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(n=>n!==e)}receivedFeatureFlags(e,n){if(this._instance.persistence){this.we=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(o,a,l,u,c){l===void 0&&(l={}),u===void 0&&(u={}),c===void 0&&(c={});var d=uN(o),f=d.flags,h=d.featureFlags,y=d.featureFlagPayloads;if(h){var m=o.requestId;if(oe(h)){qt.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var _={};if(h)for(var p=0;p<h.length;p++)_[h[p]]=!0;a&&a.register({[Xu]:h,[si]:_})}else{var g=h,v=y,w=f;o.errorsWhileComputingFlags&&(g=D({},l,g),v=D({},u,v),w=D({},c,w)),a&&a.register(D({[Xu]:Object.keys(jv(g)),[si]:g||{},[$v]:v||{},[Od]:w||{}},m?{[Fv]:m}:{}))}}})(e,this._instance.persistence,r,i,s),this.Me(n)}}override(e,n){n===void 0&&(n=!1),qt.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:n})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return qt.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this._instance.persistence.unregister(Fr),this._instance.persistence.unregister(Ji),void this.Me();if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var n,r=e;if(this.be=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this._instance.persistence.unregister(Fr);else if(r.flags)if(oe(r.flags)){for(var i={},s=0;s<r.flags.length;s++)i[r.flags[s]]=!0;this._instance.persistence.register({[Fr]:i})}else this._instance.persistence.register({[Fr]:r.flags})}return"payloads"in r&&(r.payloads===!1?this._instance.persistence.unregister(Ji):r.payloads&&this._instance.persistence.register({[Ji]:r.payloads})),void this.Me()}this.Me()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.we){var{flags:n,flagVariants:r}=this.Oe();e(n,r)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,n,r){var i,s=(this._instance.get_property(us)||[]).find(u=>u.flagKey===e),o={["$feature_enrollment/"+e]:n},a={$feature_flag:e,$feature_enrollment:n,$set:o};s&&(a.$early_access_feature_name=s.name),r&&(a.$feature_enrollment_stage=r),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(o,!1);var l=D({},this.getFlagVariants(),{[e]:n});(i=this._instance.persistence)==null||i.register({[Xu]:Object.keys(jv(l)),[si]:l}),this.Me()}getEarlyAccessFeatures(e,n,r){n===void 0&&(n=!1);var i=this._instance.get_property(us),s=r?"&"+r.map(o=>"stage="+o).join("&"):"";if(i&&!n)return e(i);this._instance.Te({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+s),method:"GET",callback:o=>{var a,l;if(o.json){var u=o.json.earlyAccessFeatures;return(a=this._instance.persistence)==null||a.unregister(us),(l=this._instance.persistence)==null||l.register({[us]:u}),e(u)}}})}Oe(){var e=this.getFlags(),n=this.getFlagVariants();return{flags:e.filter(r=>n[r]),flagVariants:Object.keys(n).filter(r=>n[r]).reduce((r,i)=>(r[i]=n[i],r),{})}}Me(e){var{flags:n,flagVariants:r}=this.Oe();this.featureFlagEventHandlers.forEach(i=>i(n,r,{errorsLoading:e}))}setPersonPropertiesForFlags(e,n){n===void 0&&(n=!0);var r=this._instance.get_property(cs)||{};this._instance.register({[cs]:D({},r,e)}),n&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(cs)}setGroupPropertiesForFlags(e,n){n===void 0&&(n=!0);var r=this._instance.get_property(hr)||{};Object.keys(r).length!==0&&Object.keys(r).forEach(i=>{r[i]=D({},r[i],e[i]),delete e[i]}),this._instance.register({[hr]:D({},r,e)}),n&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var n=this._instance.get_property(hr)||{};this._instance.register({[hr]:D({},n,{[e]:{}})})}else this._instance.unregister(hr)}reset(){this.we=!1,this.Se=!1,this.ke=!1,this.$e=!1,this.xe=!1,this.Ee=!1,this.$anon_distinct_id=void 0,this.Re(),this.be=!1}}var fN=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class Qu{constructor(e,n){this.A=e,this.props={},this.Fe=!1,this.Ae=(r=>{var i="";return r.token&&(i=r.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),r.persistence_name?"ph_"+r.persistence_name:"ph_"+i+"_posthog"})(e),this.it=this.De(e),this.load(),e.debug&&F.info("Persistence loaded",e.persistence,D({},this.props)),this.update_config(e,e,n),this.save()}isDisabled(){return!!this.je}De(e){fN.indexOf(e.persistence.toLowerCase())===-1&&(F.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var n=e.persistence.toLowerCase();return n==="localstorage"&&Te.G()?Te:n==="localstorage+cookie"&&zo.G()?zo:n==="sessionstorage"&&De.G()?De:n==="memory"?oI:n==="cookie"?rn:zo.G()?zo:rn}properties(){var e={};return re(this.props,function(n,r){if(r===si&&we(n))for(var i=Object.keys(n),s=0;s<i.length;s++)e["$feature/"+i[s]]=n[i[s]];else a=r,l=!1,(bn(o=VM)?l:zm&&o.indexOf===zm?o.indexOf(a)!=-1:(re(o,function(u){if(l||(l=u===a))return Qa}),l))||(e[r]=n);var o,a,l}),e}load(){if(!this.je){var e=this.it.K(this.Ae);e&&(this.props=Ee({},e))}}save(){this.je||this.it.Y(this.Ae,this.props,this.Le,this.Ne,this.Ue,this.A.debug)}remove(){this.it.X(this.Ae,!1),this.it.X(this.Ae,!0)}clear(){this.remove(),this.props={}}register_once(e,n,r){if(we(e)){L(n)&&(n="None"),this.Le=L(r)?this.ze:r;var i=!1;if(re(e,(s,o)=>{this.props.hasOwnProperty(o)&&this.props[o]!==n||(this.props[o]=s,i=!0)}),i)return this.save(),!0}return!1}register(e,n){if(we(e)){this.Le=L(n)?this.ze:n;var r=!1;if(re(e,(i,s)=>{e.hasOwnProperty(s)&&this.props[s]!==i&&(this.props[s]=i,r=!0)}),r)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.Fe){var e=Kx(this.A.custom_campaign_params,this.A.mask_personal_data_properties,this.A.custom_personal_data_properties);ii(Hh(e))||this.register(e),this.Fe=!0}}update_search_keyword(){var e;this.register((e=j==null?void 0:j.referrer)?qx(e):{})}update_referrer_info(){var e;this.register_once({$referrer:Yx(),$referring_domain:j!=null&&j.referrer&&((e=Pi(j.referrer))==null?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[jd]||this.props[Vd]||this.register_once({[tl]:Xx(this.A.mask_personal_data_properties,this.A.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};re([Vd,jd],o=>{var a=this.props[o];a&&re(a,function(l,u){e["$initial_"+Pd(u)]=l})});var n,r,i=this.props[tl];if(i){var s=(n=Qx(i),r={},re(n,function(o,a){r["$initial_"+Pd(a)]=o}),r);Ee(e,s)}return e}safe_merge(e){return re(this.props,function(n,r){r in e||(e[r]=n)}),e}update_config(e,n,r){if(this.ze=this.Le=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!r),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==n.persistence){var i=this.De(e),s=this.props;this.clear(),this.it=i,this.props=s,this.save()}}set_disabled(e){this.je=e,this.je?this.remove():this.save()}set_cross_subdomain(e){e!==this.Ne&&(this.Ne=e,this.remove(),this.save())}set_secure(e){e!==this.Ue&&(this.Ue=e,this.remove(),this.save())}set_event_timer(e,n){var r=this.props[as]||{};r[e]=n,this.props[as]=r,this.save()}remove_event_timer(e){var n=(this.props[as]||{})[e];return L(n)||(delete this.props[as][e],this.save()),n}get_property(e){return this.props[e]}set_property(e,n){this.props[e]=n,this.save()}}(function(t){return t.Button="button",t.Tab="tab",t.Selector="selector",t})({});(function(t){return t.TopLeft="top_left",t.TopRight="top_right",t.TopCenter="top_center",t.MiddleLeft="middle_left",t.MiddleRight="middle_right",t.MiddleCenter="middle_center",t.Left="left",t.Center="center",t.Right="right",t.NextToTrigger="next_to_trigger",t})({});var Zu=function(t){return t.Popover="popover",t.API="api",t.Widget="widget",t.ExternalSurvey="external_survey",t}({});(function(t){return t.Open="open",t.MultipleChoice="multiple_choice",t.SingleChoice="single_choice",t.Rating="rating",t.Link="link",t})({});(function(t){return t.NextQuestion="next_question",t.End="end",t.ResponseBased="response_based",t.SpecificQuestion="specific_question",t})({});(function(t){return t.Once="once",t.Recurring="recurring",t.Always="always",t})({});var pa=function(t){return t.SHOWN="survey shown",t.DISMISSED="survey dismissed",t.SENT="survey sent",t}({}),Vv=function(t){return t.SURVEY_ID="$survey_id",t.SURVEY_NAME="$survey_name",t.SURVEY_RESPONSE="$survey_response",t.SURVEY_ITERATION="$survey_iteration",t.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",t.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",t.SURVEY_SUBMISSION_ID="$survey_submission_id",t.SURVEY_QUESTIONS="$survey_questions",t.SURVEY_COMPLETED="$survey_completed",t}({}),Jx=function(t){return t.Popover="popover",t.Inline="inline",t}({});class eS{constructor(){this.qe={},this.qe={}}on(e,n){return this.qe[e]||(this.qe[e]=[]),this.qe[e].push(n),()=>{this.qe[e]=this.qe[e].filter(r=>r!==n)}}emit(e,n){for(var r of this.qe[e]||[])r(n);for(var i of this.qe["*"]||[])i(e,n)}}class pr{constructor(e){this.Be=new eS,this.He=(n,r)=>this.We(n,r)&&this.Ge(n,r)&&this.Ve(n,r),this.We=(n,r)=>r==null||!r.event||(n==null?void 0:n.event)===(r==null?void 0:r.event),this._instance=e,this.Je=new Set,this.Ke=new Set}init(){var e;if(!L((e=this._instance)==null?void 0:e.Ye)){var n;(n=this._instance)==null||n.Ye((r,i)=>{this.on(r,i)})}}register(e){var n,r;if(!L((n=this._instance)==null?void 0:n.Ye)&&(e.forEach(o=>{var a,l;(a=this.Ke)==null||a.add(o),(l=o.steps)==null||l.forEach(u=>{var c;(c=this.Je)==null||c.add((u==null?void 0:u.event)||"")})}),(r=this._instance)!=null&&r.autocapture)){var i,s=new Set;e.forEach(o=>{var a;(a=o.steps)==null||a.forEach(l=>{l!=null&&l.selector&&s.add(l==null?void 0:l.selector)})}),(i=this._instance)==null||i.autocapture.setElementSelectors(s)}}on(e,n){var r;n!=null&&e.length!=0&&(this.Je.has(e)||this.Je.has(n==null?void 0:n.event))&&this.Ke&&((r=this.Ke)==null?void 0:r.size)>0&&this.Ke.forEach(i=>{this.Xe(n,i)&&this.Be.emit("actionCaptured",i.name)})}Qe(e){this.onAction("actionCaptured",n=>e(n))}Xe(e,n){if((n==null?void 0:n.steps)==null)return!1;for(var r of n.steps)if(this.He(e,r))return!0;return!1}onAction(e,n){return this.Be.on(e,n)}Ge(e,n){if(n!=null&&n.url){var r,i=e==null||(r=e.properties)==null?void 0:r.$current_url;if(!i||typeof i!="string"||!pr.Ze(i,n==null?void 0:n.url,(n==null?void 0:n.url_matching)||"contains"))return!1}return!0}static Ze(e,n,r){switch(r){case"regex":return!!T&&Ai(e,n);case"exact":return n===e;case"contains":var i=pr.tr(n).replace(/_/g,".").replace(/%/g,".*");return Ai(e,i);default:return!1}}static tr(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Ve(e,n){if((n!=null&&n.href||n!=null&&n.tag_name||n!=null&&n.text)&&!this.ir(e).some(s=>!(n!=null&&n.href&&!pr.Ze(s.href||"",n==null?void 0:n.href,(n==null?void 0:n.href_matching)||"exact"))&&(n==null||!n.tag_name||s.tag_name===(n==null?void 0:n.tag_name))&&!(n!=null&&n.text&&!pr.Ze(s.text||"",n==null?void 0:n.text,(n==null?void 0:n.text_matching)||"exact")&&!pr.Ze(s.$el_text||"",n==null?void 0:n.text,(n==null?void 0:n.text_matching)||"exact"))))return!1;if(n!=null&&n.selector){var r,i=e==null||(r=e.properties)==null?void 0:r.$element_selectors;if(!i||!i.includes(n==null?void 0:n.selector))return!1}return!0}ir(e){return(e==null?void 0:e.properties.$elements)==null?[]:e==null?void 0:e.properties.$elements}}var ne=Re("[Surveys]"),Zd="seenSurvey_",hN=(t,e)=>{var n="$survey_"+e+"/"+t.id;return t.current_iteration&&t.current_iteration>0&&(n="$survey_"+e+"/"+t.id+"/"+t.current_iteration),n},Bv=t=>{var e=""+Zd+t.id;return t.current_iteration&&t.current_iteration>0&&(e=""+Zd+t.id+"_"+t.current_iteration),e},pN=[Zu.Popover,Zu.Widget,Zu.API],gN={ignoreConditions:!1,ignoreDelay:!1,displayType:Jx.Popover};class mN{constructor(e){this._instance=e,this.er=new Map,this.rr=new Map}register(e){var n;L((n=this._instance)==null?void 0:n.Ye)||(this.sr(e),this.nr(e))}nr(e){var n=e.filter(r=>{var i,s;return((i=r.conditions)==null?void 0:i.actions)&&((s=r.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0});n.length!==0&&(this.ar==null&&(this.ar=new pr(this._instance),this.ar.init(),this.ar.Qe(r=>{this.onAction(r)})),n.forEach(r=>{var i,s,o,a,l;r.conditions&&(i=r.conditions)!=null&&i.actions&&(s=r.conditions)!=null&&(s=s.actions)!=null&&s.values&&((o=r.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0&&((a=this.ar)==null||a.register(r.conditions.actions.values),(l=r.conditions)==null||(l=l.actions)==null||(l=l.values)==null||l.forEach(u=>{if(u&&u.name){var c=this.rr.get(u.name);c&&c.push(r.id),this.rr.set(u.name,c||[r.id])}}))}))}sr(e){var n;e.filter(r=>{var i,s;return((i=r.conditions)==null?void 0:i.events)&&((s=r.conditions)==null||(s=s.events)==null||(s=s.values)==null?void 0:s.length)>0}).length!==0&&((n=this._instance)==null||n.Ye((r,i)=>{this.onEvent(r,i)}),e.forEach(r=>{var i;(i=r.conditions)==null||(i=i.events)==null||(i=i.values)==null||i.forEach(s=>{if(s&&s.name){var o=this.er.get(s.name);o&&o.push(r.id),this.er.set(s.name,o||[r.id])}})}))}onEvent(e,n){var r,i,s=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[Bo])||[];if(pa.SHOWN===e&&n&&s.length>0){var o;ne.info("survey event matched, removing survey from activated surveys",{event:e,eventPayload:n,existingActivatedSurveys:s});var a=n==null||(o=n.properties)==null?void 0:o.$survey_id;if(a){var l=s.indexOf(a);l>=0&&(s.splice(l,1),this.lr(s))}}else if(this.er.has(e)){ne.info("survey event name matched",{event:e,eventPayload:n,surveys:this.er.get(e)});var u=[];(i=this._instance)==null||i.getSurveys(d=>{u=d.filter(f=>{var h;return(h=this.er.get(e))==null?void 0:h.includes(f.id)})});var c=u.filter(d=>{var f,h=(f=d.conditions)==null||(f=f.events)==null||(f=f.values)==null?void 0:f.find(y=>y.name===e);return!!h&&(!h.propertyFilters||Object.entries(h.propertyFilters).every(y=>{var m,[_,p]=y,g=n==null||(m=n.properties)==null?void 0:m[_];if(L(g)||bn(g))return!1;var v=[String(g)],w=Ax[p.operator];return w?w(p.values,v):(ne.warn("Unknown property comparison operator: "+p.operator),!1)}))});this.lr(s.concat(c.map(d=>d.id)||[]))}}onAction(e){var n,r=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[Bo])||[];this.rr.has(e)&&this.lr(r.concat(this.rr.get(e)||[]))}lr(e){var n;ne.info("updating activated surveys",{activatedSurveys:e}),(n=this._instance)==null||(n=n.persistence)==null||n.register({[Bo]:[...new Set(e)]})}getSurveys(){var e,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[Bo];return n||[]}getEventToSurveys(){return this.er}hr(){return this.ar}}class vN{constructor(e){this.ur=void 0,this._surveyManager=null,this.dr=!1,this.vr=!1,this.cr=[],this._instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var n=e.surveys;if(J(n))return ne.warn("Flags not loaded yet. Not loading surveys.");var r=oe(n);this.ur=r?n.length>0:n,ne.info("flags response received, isSurveysEnabled: "+this.ur),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);(r!=null&&r.startsWith(Zd)||r!=null&&r.startsWith("inProgressSurvey_"))&&e.push(r)}e.forEach(i=>localStorage.removeItem(i))}loadIfEnabled(){if(!this._surveyManager)if(this.vr)ne.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)ne.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())ne.info("Not loading surveys in cookieless mode without consent.");else{var e=H==null?void 0:H.__PosthogExtensions__;if(e){if(!L(this.ur)||this._instance.config.advanced_enable_surveys){var n=this.ur||this._instance.config.advanced_enable_surveys;this.vr=!0;try{var r=e.generateSurveys;if(r)return void this.pr(r,n);var i=e.loadExternalDependency;if(!i)return void this.gr("PostHog loadExternalDependency extension not found.");i(this._instance,"surveys",s=>{s||!e.generateSurveys?this.gr("Could not load surveys script",s):this.pr(e.generateSurveys,n)})}catch(s){throw this.gr("Error initializing surveys",s),s}finally{this.vr=!1}}}else ne.error("PostHog Extensions not found.")}}pr(e,n){this._surveyManager=e(this._instance,n),this._surveyEventReceiver=new mN(this._instance),ne.info("Surveys loaded successfully"),this._r({isLoaded:!0})}gr(e,n){ne.error(e,n),this._r({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.cr.push(e),this._surveyManager&&this._r({isLoaded:!0}),()=>{this.cr=this.cr.filter(n=>n!==e)}}getSurveys(e,n){if(n===void 0&&(n=!1),this._instance.config.disable_surveys)return ne.info("Disabled. Not loading surveys."),e([]);var r=this._instance.get_property(Dd);if(r&&!n)return e(r,{isLoaded:!0});if(this.dr)return e([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.dr=!0,this._instance.Te({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:i=>{var s;this.dr=!1;var o=i.statusCode;if(o!==200||!i.json){var a="Surveys API could not be loaded, status: "+o;return ne.error(a),e([],{isLoaded:!1,error:a})}var l,u=i.json.surveys||[],c=u.filter(d=>function(f){return!(!f.start_date||f.end_date)}(d)&&(function(f){var h;return!((h=f.conditions)==null||(h=h.events)==null||(h=h.values)==null||!h.length)}(d)||function(f){var h;return!((h=f.conditions)==null||(h=h.actions)==null||(h=h.values)==null||!h.length)}(d)));return c.length>0&&((l=this._surveyEventReceiver)==null||l.register(c)),(s=this._instance.persistence)==null||s.register({[Dd]:u}),e(u,{isLoaded:!0})}})}catch(i){throw this.dr=!1,i}}_r(e){for(var n of this.cr)try{if(!e.isLoaded)return n([],e);this.getSurveys(n)}catch(r){ne.error("Error in survey callback",r)}}getActiveMatchingSurveys(e,n){if(n===void 0&&(n=!1),!J(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,n);ne.warn("init was not called")}mr(e){var n=null;return this.getSurveys(r=>{var i;n=(i=r.find(s=>s.id===e))!==null&&i!==void 0?i:null}),n}yr(e){if(J(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var n=typeof e=="string"?this.mr(e):e;return n?this._surveyManager.checkSurveyEligibility(n):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(J(this._surveyManager))return ne.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var n=this.yr(e);return{visible:n.eligible,disabledReason:n.reason}}canRenderSurveyAsync(e,n){return J(this._surveyManager)?(ne.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise(r=>{this.getSurveys(i=>{var s,o=(s=i.find(l=>l.id===e))!==null&&s!==void 0?s:null;if(o){var a=this.yr(o);r({visible:a.eligible,disabledReason:a.reason})}else r({visible:!1,disabledReason:"Survey not found"})},n)})}renderSurvey(e,n){var r;if(J(this._surveyManager))ne.warn("init was not called");else{var i=typeof e=="string"?this.mr(e):e;if(i!=null&&i.id)if(pN.includes(i.type)){var s=j==null?void 0:j.querySelector(n);if(s)return(r=i.appearance)!=null&&r.surveyPopupDelaySeconds?(ne.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var o,a;ne.info("Rendering survey "+i.id+" with delay of "+((o=i.appearance)==null?void 0:o.surveyPopupDelaySeconds)+" seconds"),(a=this._surveyManager)==null||a.renderSurvey(i,s),ne.info("Survey "+i.id+" rendered")},1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,s);ne.warn("Survey element not found")}else ne.warn("Surveys of type "+i.type+" cannot be rendered in the app");else ne.warn("Survey not found")}}displaySurvey(e,n){var r;if(J(this._surveyManager))ne.warn("init was not called");else{var i=this.mr(e);if(i){var s=i;if((r=i.appearance)!=null&&r.surveyPopupDelaySeconds&&n.ignoreDelay&&(s=D({},i,{appearance:D({},i.appearance,{surveyPopupDelaySeconds:0})})),n.ignoreConditions===!1){var o=this.canRenderSurvey(i);if(!o.visible)return void ne.warn("Survey is not eligible to be displayed: ",o.disabledReason)}n.displayType!==Jx.Inline?this._surveyManager.handlePopoverSurvey(s):this.renderSurvey(s,n.selector)}else ne.warn("Survey not found")}}}var zv=Re("[RateLimiter]");class yN{constructor(e){var n,r;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=i=>{var s=i.text;if(s&&s.length)try{(JSON.parse(s).quota_limited||[]).forEach(o=>{zv.info((o||"events")+" is quota limited."),this.serverLimits[o]=new Date().getTime()+6e4})}catch(o){return void zv.warn('could not rate limit - continuing. Error: "'+(o==null?void 0:o.message)+'"',{text:s})}},this.instance=e,this.captureEventsPerSecond=((n=e.config.rate_limiting)==null?void 0:n.events_per_second)||10,this.captureEventsBurstLimit=Math.max(((r=e.config.rate_limiting)==null?void 0:r.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(e){var n,r,i;e===void 0&&(e=!1);var s=new Date().getTime(),o=(n=(r=this.instance.persistence)==null?void 0:r.get_property(Fd))!==null&&n!==void 0?n:{tokens:this.captureEventsBurstLimit,last:s};o.tokens+=(s-o.last)/1e3*this.captureEventsPerSecond,o.last=s,o.tokens>this.captureEventsBurstLimit&&(o.tokens=this.captureEventsBurstLimit);var a=o.tokens<1;return a||e||(o.tokens=Math.max(0,o.tokens-1)),!a||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+this.captureEventsPerSecond+" events per second and "+this.captureEventsBurstLimit+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=a,(i=this.instance.persistence)==null||i.set_property(Fd,o),{isRateLimited:a,remainingTokens:o.tokens}}isServerRateLimited(e){var n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var ur=Re("[RemoteConfig]");class _N{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=H._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}br(e){var n,r;(n=H.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=H.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):(ur.error("PostHog Extensions not found. Cannot load remote config."),e())}wr(e){this._instance.Te({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:n=>{e(n.json)}})}load(){try{if(this.remoteConfig)return ur.info("Using preloaded remote config",this.remoteConfig),void this.Ce(this.remoteConfig);if(this._instance.L())return void ur.warn("Remote config is disabled. Falling back to local config.");this.br(e=>{if(!e)return ur.info("No config found after loading remote JS config. Falling back to JSON."),void this.wr(n=>{this.Ce(n)});this.Ce(e)})}catch(e){ur.error("Error loading remote config",e)}}Ce(e){e?this._instance.config.__preview_remote_config?(this._instance.Ce(e),e.hasFeatureFlags!==!1&&this._instance.featureFlags.ensureFlagsLoaded()):ur.info("__preview_remote_config is disabled. Logging config instead",e):ur.error("Failed to fetch remote config from PostHog.")}}var Jd=3e3;class wN{constructor(e,n){this.Sr=!0,this.kr=[],this.$r=mt((n==null?void 0:n.flush_interval_ms)||Jd,250,5e3,F.createLogger("flush interval"),Jd),this.Er=e}enqueue(e){this.kr.push(e),this.Pr||this.Ir()}unload(){this.Rr();var e=this.kr.length>0?this.Tr():{},n=Object.values(e);[...n.filter(r=>r.url.indexOf("/e")===0),...n.filter(r=>r.url.indexOf("/e")!==0)].map(r=>{this.Er(D({},r,{transport:"sendBeacon"}))})}enable(){this.Sr=!1,this.Ir()}Ir(){var e=this;this.Sr||(this.Pr=setTimeout(()=>{if(this.Rr(),this.kr.length>0){var n=this.Tr(),r=function(){var s=n[i],o=new Date().getTime();s.data&&oe(s.data)&&re(s.data,a=>{a.offset=Math.abs(a.timestamp-o),delete a.timestamp}),e.Er(s)};for(var i in n)r()}},this.$r))}Rr(){clearTimeout(this.Pr),this.Pr=void 0}Tr(){var e={};return re(this.kr,n=>{var r,i=n,s=(i?i.batchKey:null)||i.url;L(e[s])&&(e[s]=D({},i,{data:[]})),(r=e[s].data)==null||r.push(i.data)}),this.kr=[],e}}var xN=["retriesPerformedSoFar"];class SN{constructor(e){this.Cr=!1,this.Mr=3e3,this.kr=[],this._instance=e,this.kr=[],this.Or=!0,!L(T)&&"onLine"in T.navigator&&(this.Or=T.navigator.onLine,pe(T,"online",()=>{this.Or=!0,this.ne()}),pe(T,"offline",()=>{this.Or=!1}))}get length(){return this.kr.length}retriableRequest(e){var{retriesPerformedSoFar:n}=e,r=W1(e,xN);He(n)&&n>0&&(r.url=cl(r.url,{retry_count:n})),this._instance.Te(D({},r,{callback:i=>{i.statusCode!==200&&(i.statusCode<400||i.statusCode>=500)&&(n??0)<10?this.Fr(D({retriesPerformedSoFar:n},r)):r.callback==null||r.callback(i)}}))}Fr(e){var n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;var r=function(o){var a=3e3*Math.pow(2,o),l=a/2,u=Math.min(18e5,a),c=(Math.random()-.5)*(u-l);return Math.ceil(u+c)}(n),i=Date.now()+r;this.kr.push({retryAt:i,requestOptions:e});var s="Enqueued failed request for retry in "+r;navigator.onLine||(s+=" (Browser is offline)"),F.warn(s),this.Cr||(this.Cr=!0,this.Ar())}Ar(){this.Dr&&clearTimeout(this.Dr),this.Dr=setTimeout(()=>{this.Or&&this.kr.length>0&&this.ne(),this.Ar()},this.Mr)}ne(){var e=Date.now(),n=[],r=this.kr.filter(s=>s.retryAt<e||(n.push(s),!1));if(this.kr=n,r.length>0)for(var{requestOptions:i}of r)this.retriableRequest(i)}unload(){for(var{requestOptions:e}of(this.Dr&&(clearTimeout(this.Dr),this.Dr=void 0),this.kr))try{this._instance.Te(D({},e,{transport:"sendBeacon"}))}catch(n){F.error(n)}this.kr=[]}}class EN{constructor(e){this.jr=()=>{var n,r,i,s;this.Lr||(this.Lr={});var o=this.scrollElement(),a=this.scrollY(),l=o?Math.max(0,o.scrollHeight-o.clientHeight):0,u=a+((o==null?void 0:o.clientHeight)||0),c=(o==null?void 0:o.scrollHeight)||0;this.Lr.lastScrollY=Math.ceil(a),this.Lr.maxScrollY=Math.max(a,(n=this.Lr.maxScrollY)!==null&&n!==void 0?n:0),this.Lr.maxScrollHeight=Math.max(l,(r=this.Lr.maxScrollHeight)!==null&&r!==void 0?r:0),this.Lr.lastContentY=u,this.Lr.maxContentY=Math.max(u,(i=this.Lr.maxContentY)!==null&&i!==void 0?i:0),this.Lr.maxContentHeight=Math.max(c,(s=this.Lr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=e}getContext(){return this.Lr}resetContext(){var e=this.Lr;return setTimeout(this.jr,0),e}startMeasuringScrollPosition(){pe(T,"scroll",this.jr,{capture:!0}),pe(T,"scrollend",this.jr,{capture:!0}),pe(T,"resize",this.jr)}scrollElement(){if(!this._instance.config.scroll_root_selector)return T==null?void 0:T.document.documentElement;var e=oe(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var n of e){var r=T==null?void 0:T.document.querySelector(n);if(r)return r}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return T&&(T.scrollY||T.pageYOffset||T.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return T&&(T.scrollX||T.pageXOffset||T.document.documentElement.scrollLeft)||0}}var kN=t=>Xx(t==null?void 0:t.config.mask_personal_data_properties,t==null?void 0:t.config.custom_personal_data_properties);class Uv{constructor(e,n,r,i){this.Nr=s=>{var o=this.Ur();if(!o||o.sessionId!==s){var a={sessionId:s,props:this.zr(this._instance)};this.qr.register({[$d]:a})}},this._instance=e,this.Br=n,this.qr=r,this.zr=i||kN,this.Br.onSessionId(this.Nr)}Ur(){return this.qr.props[$d]}getSetOnceProps(){var e,n=(e=this.Ur())==null?void 0:e.props;return n?"r"in n?Qx(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var e={};return re(Hh(this.getSetOnceProps()),(n,r)=>{r==="$current_url"&&(r="url"),e["$session_entry_"+Pd(r)]=n}),e}}var Ju=Re("[SessionId]");class Hv{constructor(e,n,r){var i;if(this.Hr=[],this.Wr=(c,d)=>Math.abs(c-d)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode==="always")throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.A=e.config,this.qr=e.persistence,this.pi=void 0,this.Ft=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Gr=n||jn,this.Vr=r||jn;var s=this.A.persistence_name||this.A.token,o=this.A.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*mt(o,60,36e3,Ju.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Jr(),this.Kr="ph_"+s+"_window_id",this.Yr="ph_"+s+"_primary_window_exists",this.Xr()){var a=De.K(this.Kr),l=De.K(this.Yr);a&&!l?this.pi=a:De.X(this.Kr),De.Y(this.Yr,!0)}if((i=this.A.bootstrap)!=null&&i.sessionID)try{var u=(c=>{var d=c.replace(/-/g,"");if(d.length!==32)throw new Error("Not a valid UUID");if(d[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(d.substring(0,12),16)})(this.A.bootstrap.sessionID);this.Qr(this.A.bootstrap.sessionID,new Date().getTime(),u)}catch(c){Ju.error("Invalid sessionID in bootstrap",c)}this.Zr()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return L(this.Hr)&&(this.Hr=[]),this.Hr.push(e),this.Ft&&e(this.Ft,this.pi),()=>{this.Hr=this.Hr.filter(n=>n!==e)}}Xr(){return this.A.persistence!=="memory"&&!this.qr.je&&De.G()}ts(e){e!==this.pi&&(this.pi=e,this.Xr()&&De.Y(this.Kr,e))}es(){return this.pi?this.pi:this.Xr()?De.K(this.Kr):null}Qr(e,n,r){e===this.Ft&&n===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.Ft=e,this.qr.register({[Ja]:[n,e,r]}))}rs(){if(this.Ft&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this.Ft,this._sessionStartTimestamp];var e=this.qr.props[Ja];return oe(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Qr(null,null,null)}Zr(){pe(T,"beforeunload",()=>{this.Xr()&&De.X(this.Yr)},{capture:!1})}checkAndGetSessionAndWindowId(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=null),this.A.cookieless_mode==="always")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),[i,s,o]=this.rs(),a=this.es(),l=He(o)&&o>0&&Math.abs(r-o)>864e5,u=!1,c=!s,d=!e&&this.Wr(r,i);c||d||l?(s=this.Gr(),a=this.Vr(),Ju.info("new session ID generated",{sessionId:s,windowId:a,changeReason:{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:l}}),o=r,u=!0):a||(a=this.Vr(),u=!0);var f=i===0||!e||l?r:i,h=o===0?new Date().getTime():o;return this.ts(a),this.Qr(s,f,h),e||this.Jr(),u&&this.Hr.forEach(y=>y(s,a,u?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:l}:void 0)),{sessionId:s,windowId:a,sessionStartTimestamp:h,changeReason:u?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:l}:void 0,lastActivityTimestamp:i}}Jr(){clearTimeout(this.ss),this.ss=setTimeout(()=>{var[e]=this.rs();this.Wr(new Date().getTime(),e)&&this.resetSessionId()},1.1*this.sessionTimeoutMs)}}var CN=["$set_once","$set"],Rn=Re("[SiteApps]");class bN{constructor(e){this._instance=e,this.ns=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}os(e,n){if(n){var r=this.globalsForEvent(n);this.ns.push(r),this.ns.length>1e3&&(this.ns=this.ns.slice(10))}}get siteAppLoaders(){var e;return(e=H._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance.Ye(this.os.bind(this));this.ls=()=>{e(),this.ns=[],this.ls=void 0}}}globalsForEvent(e){var n,r,i,s,o,a,l;if(!e)throw new Error("Event payload is required");var u={},c=this._instance.get_property("$groups")||[],d=this._instance.get_property("$stored_group_properties")||{};for(var[f,h]of Object.entries(d))u[f]={id:c[f],type:f,properties:h};var{$set_once:y,$set:m}=e;return{event:D({},W1(e,CN),{properties:D({},e.properties,m?{$set:D({},(n=(r=e.properties)==null?void 0:r.$set)!==null&&n!==void 0?n:{},m)}:{},y?{$set_once:D({},(i=(s=e.properties)==null?void 0:s.$set_once)!==null&&i!==void 0?i:{},y)}:{}),elements_chain:(o=(a=e.properties)==null?void 0:a.$elements_chain)!==null&&o!==void 0?o:"",distinct_id:(l=e.properties)==null?void 0:l.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}setupSiteApp(e){var n=this.apps[e.id],r=()=>{var a;!n.errored&&this.ns.length&&(Rn.info("Processing "+this.ns.length+" events for site app with id "+e.id),this.ns.forEach(l=>n.processEvent==null?void 0:n.processEvent(l)),n.processedBuffer=!0),Object.values(this.apps).every(l=>l.processedBuffer||l.errored)&&((a=this.ls)==null||a.call(this))},i=!1,s=a=>{n.errored=!a,n.loaded=!0,Rn.info("Site app with id "+e.id+" "+(a?"loaded":"errored")),i&&r()};try{var{processEvent:o}=e.init({posthog:this._instance,callback:a=>{s(a)}});o&&(n.processEvent=o),i=!0}catch(a){Rn.error("Error while initializing PostHog app with config id "+e.id,a),s(!1)}if(i&&n.loaded)try{r()}catch(a){Rn.error("Error while processing buffered events PostHog app with config id "+e.id,a),n.errored=!0}}hs(){var e=this.siteAppLoaders||[];for(var n of e)this.apps[n.id]={id:n.id,loaded:!1,errored:!1,processedBuffer:!1};for(var r of e)this.setupSiteApp(r)}us(e){if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(e);for(var r of Object.values(this.apps))try{r.processEvent==null||r.processEvent(n)}catch(i){Rn.error("Error while processing event "+e.event+" for site app "+r.id,i)}}}onRemoteConfig(e){var n,r,i,s=this;if((n=this.siteAppLoaders)!=null&&n.length)return this.isEnabled?(this.hs(),void this._instance.on("eventCaptured",u=>this.us(u))):void Rn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((r=this.ls)==null||r.call(this),(i=e.siteApps)!=null&&i.length)if(this.isEnabled){var o=function(u){var c;H["__$$ph_site_app_"+u]=s._instance,(c=H.__PosthogExtensions__)==null||c.loadSiteApp==null||c.loadSiteApp(s._instance,l,d=>{if(d)return Rn.error("Error while initializing PostHog app with config id "+u,d)})};for(var{id:a,url:l}of e.siteApps)o(a)}else Rn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}var PN=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],Wv=function(t,e){if(!t)return!1;var n=t.toLowerCase();return PN.concat(e||[]).some(r=>{var i=r.toLowerCase();return n.indexOf(i)!==-1})},tS=function(t,e){if(!t)return!1;var n=t.userAgent;if(n&&Wv(n,e))return!0;try{var r=t==null?void 0:t.userAgentData;if(r!=null&&r.brands&&r.brands.some(i=>Wv(i==null?void 0:i.brand,e)))return!0}catch{}return!!t.webdriver},ps=function(t){return t.US="us",t.EU="eu",t.CUSTOM="custom",t}({}),Kv="i.posthog.com";class TN{constructor(e){this.ds={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get uiHost(){var e,n=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+Kv,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.ds[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.ds[this.apiHost]=ps.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.ds[this.apiHost]=ps.EU:this.ds[this.apiHost]=ps.CUSTOM),this.ds[this.apiHost]}endpointFor(e,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),e==="ui")return this.uiHost+n;if(this.region===ps.CUSTOM)return this.apiHost+n;var r=Kv+n;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var AN={icontains:(t,e)=>!!T&&e.href.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>!!T&&e.href.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>!!T&&Ai(e.href,t),not_regex:(t,e)=>!!T&&!Ai(e.href,t),exact:(t,e)=>e.href===t,is_not:(t,e)=>e.href!==t};class ze{constructor(e){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments(i=>{ze.vs("retrieved web experiments from the server"),n.cs=new Map,i.forEach(s=>{if(s.feature_flag_key){var o;n.cs&&(ze.vs("setting flag key ",s.feature_flag_key," to web experiment ",s),(o=n.cs)==null||o.set(s.feature_flag_key,s));var a=n._instance.getFeatureFlag(s.feature_flag_key);xe(a)&&s.variants[a]&&n.fs(s.name,a,s.variants[a].transforms)}else if(s.variants)for(var l in s.variants){var u=s.variants[l];ze.ps(u)&&n.fs(s.name,l,u.transforms)}})},r)},this._instance=e,this._instance.onFeatureFlags(r=>{this.onFeatureFlags(r)})}onFeatureFlags(e){if(this._is_bot())ze.vs("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(J(this.cs))return this.cs=new Map,this.loadIfEnabled(),void this.previewWebExperiment();ze.vs("applying feature flags",e),e.forEach(n=>{var r;if(this.cs&&(r=this.cs)!=null&&r.has(n)){var i,s=this._instance.getFeatureFlag(n),o=(i=this.cs)==null?void 0:i.get(n);s&&o!=null&&o.variants[s]&&this.fs(o.name,s,o.variants[s].transforms)}})}}previewWebExperiment(){var e=ze.getWindowLocation();if(e!=null&&e.search){var n=il(e==null?void 0:e.search,"__experiment_id"),r=il(e==null?void 0:e.search,"__experiment_variant");n&&r&&(ze.vs("previewing web experiments "+n+" && "+r),this.getWebExperiments(i=>{this.gs(parseInt(n),r,i)},!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,r){if(this._instance.config.disable_web_experiments&&!r)return e([]);var i=this._instance.get_property("$web_experiments");if(i&&!n)return e(i);this._instance.Te({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:s=>{if(s.statusCode!==200||!s.json)return e([]);var o=s.json.experiments||[];return e(o)}})}gs(e,n,r){var i=r.filter(s=>s.id===e);i&&i.length>0&&(ze.vs("Previewing web experiment ["+i[0].name+"] with variant ["+n+"]"),this.fs(i[0].name,n,i[0].variants[n].transforms))}static ps(e){return!J(e.conditions)&&ze._s(e)&&ze.ys(e)}static _s(e){var n;if(J(e.conditions)||J((n=e.conditions)==null?void 0:n.url))return!0;var r,i,s,o=ze.getWindowLocation();return!!o&&((r=e.conditions)==null||!r.url||AN[(i=(s=e.conditions)==null?void 0:s.urlMatchType)!==null&&i!==void 0?i:"icontains"](e.conditions.url,o))}static getWindowLocation(){return T==null?void 0:T.location}static ys(e){var n;if(J(e.conditions)||J((n=e.conditions)==null?void 0:n.utm))return!0;var r=Kx();if(r.utm_source){var i,s,o,a,l,u,c,d,f=(i=e.conditions)==null||(i=i.utm)==null||!i.utm_campaign||((s=e.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==r.utm_campaign,h=(o=e.conditions)==null||(o=o.utm)==null||!o.utm_source||((a=e.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==r.utm_source,y=(l=e.conditions)==null||(l=l.utm)==null||!l.utm_medium||((u=e.conditions)==null||(u=u.utm)==null?void 0:u.utm_medium)==r.utm_medium,m=(c=e.conditions)==null||(c=c.utm)==null||!c.utm_term||((d=e.conditions)==null||(d=d.utm)==null?void 0:d.utm_term)==r.utm_term;return f&&y&&m&&h}return!1}static vs(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];F.info("[WebExperiments] "+e,r)}fs(e,n,r){this._is_bot()?ze.vs("Refusing to render web experiment since the viewer is a likely bot"):n!=="control"?r.forEach(i=>{if(i.selector){var s;ze.vs("applying transform of variant "+n+" for experiment "+e+" ",i);var o=(s=document)==null?void 0:s.querySelectorAll(i.selector);o==null||o.forEach(a=>{var l=a;i.html&&(l.innerHTML=i.html),i.css&&l.setAttribute("style",i.css)})}}):ze.vs("Control variants leave the page unmodified.")}_is_bot(){return gt&&this._instance?tS(gt,this._instance.config.custom_blocked_useragents):void 0}}var RN=Re("[PostHog ExternalIntegrations]"),MN={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class IN{constructor(e){this._instance=e}nt(e,n){var r;(r=H.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,e,i=>{if(i)return RN.error("failed to load script",i);n()})}startIfEnabledOrStop(){var e=this,n=function(o){var a,l,u;!i||(a=H.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[o]||e.nt(MN[o],()=>{var c;(c=H.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[o])==null||c.start(e._instance)}),!i&&(l=H.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[o]&&((u=H.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[o])==null||u.stop())};for(var[r,i]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n(r)}}}var ef="[SessionRecording]",Yo=Re(ef);class NN{get started(){var e;return!((e=this.bs)==null||!e.isStarted)}get status(){var e;return((e=this.bs)==null?void 0:e.status)||"lazy_loading"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this._instance=e,!this._instance.sessionManager)throw Yo.error("started without valid sessionManager"),new Error(ef+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(ef+' cannot be used with cookieless_mode="always"')}get qt(){var e=!!this._instance.get_property(eo),n=!this._instance.config.disable_session_recording,r=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return T&&e&&n&&!r}startIfEnabledOrStop(e){var n;if(!this.qt||(n=this.bs)==null||!n.isStarted){var r=!L(Object.assign)&&!L(Array.from);this.qt&&r?(this.ws(e),Yo.info("starting")):this.stopRecording()}}ws(e){var n,r,i;this.qt&&(H!=null&&(n=H.__PosthogExtensions__)!=null&&(n=n.rrweb)!=null&&n.record&&(r=H.__PosthogExtensions__)!=null&&r.initSessionRecording?this.Pi(e):(i=H.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this._instance,this.Ii,s=>{if(s)return Yo.error("could not load recorder",s);this.Pi(e)}))}stopRecording(){var e;(e=this.bs)==null||e.stop()}onRemoteConfig(e){this.Ss=e;var n,r=this._instance.persistence;r&&r.register({[eo]:!!e.sessionRecording,[Za]:(n=e.sessionRecording)==null?void 0:n.scriptConfig}),this.bs?(this.bs.onRemoteConfig(e),this.Ss=void 0):this.ws(),this.startIfEnabledOrStop()}log(e,n){var r;n===void 0&&(n="log"),(r=this.bs)!=null&&r.log?this.bs.log(e,n):Yo.warn("log called before recorder was ready")}get Ii(){var e;return((e=this._instance)==null||(e=e.persistence)==null||(e=e.get_property(Za))==null?void 0:e.script)||"lazy-recorder"}Pi(e){var n,r;if((n=H.__PosthogExtensions__)==null||!n.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.bs||(this.bs=(r=H.__PosthogExtensions__)==null?void 0:r.initSessionRecording(this._instance),this.bs._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture,this.Ss&&(this.bs.onRemoteConfig(this.Ss),this.Ss=void 0)),this.bs.start(e)}onRRwebEmit(e){var n;(n=this.bs)==null||n.onRRwebEmit==null||n.onRRwebEmit(e)}overrideLinkedFlag(){var e;(e=this.bs)==null||e.overrideLinkedFlag()}overrideSampling(){var e;(e=this.bs)==null||e.overrideSampling()}overrideTrigger(e){var n;(n=this.bs)==null||n.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.bs)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,n){var r;return!((r=this.bs)==null||!r.tryAddCustomEvent(e,n))}}var Rs={},tf=()=>{},jr="posthog",nS=!GI&&(rt==null?void 0:rt.indexOf("MSIE"))===-1&&(rt==null?void 0:rt.indexOf("Mozilla"))===-1,Gv=t=>{var e;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:jM(j==null?void 0:j.location),persistence:"localStorage+cookie",persistence_name:"",loaded:tf,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:t!=="2025-05-24"||"history_change",capture_pageleave:"if_capture_pageview",defaults:t??"unset",debug:st&&xe(st==null?void 0:st.search)&&st.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(T==null||(e=T.location)==null?void 0:e.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:n=>{var r="Bad HTTP status: "+n.statusCode+" "+n.text;F.error(r)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:Jd},error_tracking:{},_onCapture:tf,__preview_eager_load_replay:!0}},qv=t=>{var e={};L(t.process_person)||(e.person_profiles=t.process_person),L(t.xhr_headers)||(e.request_headers=t.xhr_headers),L(t.cookie_name)||(e.persistence_name=t.cookie_name),L(t.disable_cookie)||(e.disable_persistence=t.disable_cookie),L(t.store_google)||(e.save_campaign_params=t.store_google),L(t.verbose)||(e.debug=t.verbose);var n=Ee({},e,t);return oe(t.property_blacklist)&&(L(t.property_denylist)?n.property_denylist=t.property_blacklist:oe(t.property_denylist)?n.property_denylist=[...t.property_blacklist,...t.property_denylist]:F.error("Invalid value for property_denylist config: "+t.property_denylist)),n};class LN{constructor(){this.__forceAllowLocalhost=!1}get ks(){return this.__forceAllowLocalhost}set ks(e){F.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class Kl{get decideEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){this.webPerformance=new LN,this.$s=!1,this.version=hn.LIB_VERSION,this.xs=new eS,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Gv(),this.SentryIntegration=$I,this.sentryIntegration=e=>function(n,r){var i=Tx(n,r);return{name:Px,processEvent:s=>i(s)}}(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Es=!1,this.Ps=null,this.Is=null,this.Rs=null,this.featureFlags=new dN(this),this.toolbar=new jI(this),this.scrollManager=new EN(this),this.pageViewManager=new WI(this),this.surveys=new vN(this),this.experiments=new ze(this),this.exceptions=new qI(this),this.rateLimiter=new yN(this),this.requestRouter=new TN(this),this.consent=new aI(this),this.externalIntegrations=new IN(this),this.people={set:(e,n,r)=>{var i=xe(e)?{[e]:n}:e;this.setPersonProperties(i),r==null||r({})},set_once:(e,n,r)=>{var i=xe(e)?{[e]:n}:e;this.setPersonProperties(void 0,i),r==null||r({})}},this.on("eventCaptured",e=>F.info('send "'+(e==null?void 0:e.event)+'"',e))}init(e,n,r){if(r&&r!==jr){var i,s=(i=Rs[r])!==null&&i!==void 0?i:new Kl;return s._init(e,n,r),Rs[r]=s,Rs[jr][r]=s,s}return this._init(e,n,r)}_init(e,n,r){var i,s;if(n===void 0&&(n={}),L(e)||Td(e))return F.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return F.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},this.Ts=n,this.Cs=[],n.person_profiles&&(this.Is=n.person_profiles),this.set_config(Ee({},Gv(n.defaults),qv(n),{name:r,token:e})),this.config.on_xhr_error&&F.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:pn.GZipJS;var o=this.Ms();this.persistence=new Qu(this.config,o),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Qu(D({},this.config,{persistence:"sessionStorage"}),o);var a=D({},this.persistence.props),l=D({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Os=new wN(v=>this.Fs(v),this.config.request_queue_config),this.As=new SN(this),this.__request_queue=[];var u=this.config.cookieless_mode==="always"||this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut();if(u||(this.sessionManager=new Hv(this),this.sessionPropsManager=new Uv(this,this.sessionManager,this.persistence)),new BI(this).startIfEnabledOrStop(),this.siteApps=new bN(this),(i=this.siteApps)==null||i.init(),u||(this.config.__preview_eager_load_replay?this.sessionRecording=new Cv(this):this.sessionRecording=new NN(this),this.sessionRecording.startIfEnabledOrStop()),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new JM(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new HI(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new zI(this),this.exceptionObserver=new cI(this),this.exceptionObserver.startIfEnabled(),this.deadClicksAutocapture=new vx(this,uI),this.deadClicksAutocapture.startIfEnabled(),this.historyAutocapture=new dI(this),this.historyAutocapture.startIfEnabled(),hn.DEBUG=hn.DEBUG||this.config.debug,hn.DEBUG&&F.info("Starting in debug mode",{this:this,config:n,thisC:D({},this.config),p:a,s:l}),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var c,d,f=this.config.get_device_id(jn()),h=(c=n.bootstrap)!=null&&c.isIdentifiedID?f:n.bootstrap.distinctID;this.persistence.set_property(un,(d=n.bootstrap)!=null&&d.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:n.bootstrap.distinctID,$device_id:h})}if(this.Ds()){var y,m,_=Object.keys(((y=n.bootstrap)==null?void 0:y.featureFlags)||{}).filter(v=>{var w;return!((w=n.bootstrap)==null||(w=w.featureFlags)==null||!w[v])}).reduce((v,w)=>{var S;return v[w]=((S=n.bootstrap)==null||(S=S.featureFlags)==null?void 0:S[w])||!1,v},{}),p=Object.keys(((m=n.bootstrap)==null?void 0:m.featureFlagPayloads)||{}).filter(v=>_[v]).reduce((v,w)=>{var S,A;return(S=n.bootstrap)!=null&&(S=S.featureFlagPayloads)!=null&&S[w]&&(v[w]=(A=n.bootstrap)==null||(A=A.featureFlagPayloads)==null?void 0:A[w]),v},{});this.featureFlags.receivedFeatureFlags({featureFlags:_,featureFlagPayloads:p})}if(u)this.register_once({distinct_id:qi,$device_id:null},"");else if(!this.get_distinct_id()){var g=this.config.get_device_id(jn());this.register_once({distinct_id:g,$device_id:g},""),this.persistence.set_property(un,"anonymous")}return pe(T,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),n.segment?DI(this,()=>this.js()):this.js(),Tt(this.config._onCapture)&&this.config._onCapture!==tf&&(F.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",v=>this.config._onCapture(v.event,v))),this.config.ip&&F.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Ce(e){var n,r,i,s,o,a,l,u;if(!j||!j.body)return F.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.Ce(e)},500);this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=q(e.supportedCompression,pn.GZipJS)?pn.GZipJS:q(e.supportedCompression,pn.Base64)?pn.Base64:void 0),(n=e.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Is?this.Is:"identified_only"}),(r=this.siteApps)==null||r.onRemoteConfig(e),(i=this.sessionRecording)==null||i.onRemoteConfig(e),(s=this.autocapture)==null||s.onRemoteConfig(e),(o=this.heatmaps)==null||o.onRemoteConfig(e),this.surveys.onRemoteConfig(e),(a=this.webVitalsAutocapture)==null||a.onRemoteConfig(e),(l=this.exceptionObserver)==null||l.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),(u=this.deadClicksAutocapture)==null||u.onRemoteConfig(e)}js(){try{this.config.loaded(this)}catch(e){F.critical("`loaded` function failed",e)}this.Ls(),this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.config.cookieless_mode==="always")&&this.Ns()},1),new _N(this).load(),this.featureFlags.flags()}Ls(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.Os)==null||e.enable())}_dom_loaded(){this.is_capturing()&&qn(this.__request_queue,e=>this.Fs(e)),this.__request_queue=[],this.Ls()}_handle_unload(){var e,n;this.config.request_batching?(this.Us()&&this.capture("$pageleave"),(e=this.Os)==null||e.unload(),(n=this.As)==null||n.unload()):this.Us()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}Te(e){this.__loaded&&(nS?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=cl(e.url,{ip:this.config.ip?1:0}),e.headers=D({},this.config.request_headers),e.compression=e.compression==="best-available"?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(n=>{var r,i,s,o=D({},n);o.timeout=o.timeout||6e4,o.url=cl(o.url,{_:new Date().getTime().toString(),ver:hn.LIB_VERSION,compression:o.compression});var a=(r=o.transport)!==null&&r!==void 0?r:"fetch",l=ha.filter(c=>!o.disableTransport||!c.transport||!o.disableTransport.includes(c.transport)),u=(i=(s=J1(l,c=>c.transport===a))==null?void 0:s.method)!==null&&i!==void 0?i:l[0].method;if(!u)throw new Error("No available transport method");u(o)})(D({},e,{callback:n=>{var r,i;this.rateLimiter.checkForLimiting(n),n.statusCode>=400&&((r=(i=this.config).on_request_error)==null||r.call(i,n)),e.callback==null||e.callback(n)}}))))}Fs(e){this.As?this.As.retriableRequest(e):this.Te(e)}_execute_array(e){var n,r=[],i=[],s=[];qn(e,a=>{a&&(n=a[0],oe(n)?s.push(a):Tt(a)?a.call(this):oe(a)&&n==="alias"?r.push(a):oe(a)&&n.indexOf("capture")!==-1&&Tt(this[n])?s.push(a):i.push(a))});var o=function(a,l){qn(a,function(u){if(oe(u[0])){var c=l;re(u,function(d){c=c[d[0]].apply(c,d.slice(1))})}else this[u[0]].apply(this,u.slice(1))},l)};o(r,this),o(i,this),o(s,this)}Ds(){var e,n;return((e=this.config.bootstrap)==null?void 0:e.featureFlags)&&Object.keys((n=this.config.bootstrap)==null?void 0:n.featureFlags).length>0||!1}push(e){this._execute_array([e])}capture(e,n,r){var i;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Os){if(this.is_capturing())if(!L(e)&&xe(e)){if(this.config.opt_out_useragent_filter||!this._is_bot()){var s=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(s==null||!s.isRateLimited){n!=null&&n.$current_url&&!xe(n==null?void 0:n.$current_url)&&(F.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var o=new Date,a=(r==null?void 0:r.timestamp)||o,l=jn(),u={uuid:l,event:e,properties:this.calculateEventProperties(e,n||{},a,l)};s&&(u.properties.$lib_rate_limit_remaining_tokens=s.remainingTokens),r!=null&&r.$set&&(u.$set=r==null?void 0:r.$set);var c,d=this.zs(r==null?void 0:r.$set_once);if(d&&(u.$set_once=d),(u=$M(u,r!=null&&r._noTruncate?null:this.config.properties_string_max_length)).timestamp=a,L(r==null?void 0:r.timestamp)||(u.properties.$event_time_override_provided=!0,u.properties.$event_time_override_system_time=o),e===pa.DISMISSED||e===pa.SENT){var f=n==null?void 0:n[Vv.SURVEY_ID],h=n==null?void 0:n[Vv.SURVEY_ITERATION];c={id:f,current_iteration:h},localStorage.getItem(Bv(c))||localStorage.setItem(Bv(c),"true"),u.$set=D({},u.$set,{[hN({id:f,current_iteration:h},e===pa.SENT?"responded":"dismissed")]:!0})}var y=D({},u.properties.$set,u.$set);if(ii(y)||this.setPersonPropertiesForFlags(y),!J(this.config.before_send)){var m=this.qs(u);if(!m)return;u=m}this.xs.emit("eventCaptured",u);var _={method:"POST",url:(i=r==null?void 0:r._url)!==null&&i!==void 0?i:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:u,compression:"best-available",batchKey:r==null?void 0:r._batchKey};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.Fs(_):this.Os.enqueue(_),u}F.critical("This capture call is ignored due to client rate limiting.")}}else F.error("No event name provided to posthog.capture")}else F.uninitializedWarning("posthog.capture")}Ye(e){return this.on("eventCaptured",n=>e(n.event,n))}calculateEventProperties(e,n,r,i,s){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var o=s?void 0:this.persistence.remove_event_timer(e),a=D({},n);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,(this.config.cookieless_mode=="always"||this.config.cookieless_mode=="on_reject"&&this.consent.isExplicitlyOptedOut())&&(a.$cookieless_mode=!0),e==="$snapshot"){var l=D({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=l.distinct_id,(!xe(a.distinct_id)&&!He(a.distinct_id)||Td(a.distinct_id))&&F.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var u,c=lN(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:d,windowId:f}=this.sessionManager.checkAndGetSessionAndWindowId(s,r.getTime());a.$session_id=d,a.$window_id=f}this.sessionPropsManager&&Ee(a,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&Ee(a,this.sessionRecording.sdkDebugProperties),a.$sdk_debug_retry_queue_size=(h=this.As)==null?void 0:h.length}catch(p){a.$sdk_debug_error_capturing_properties=String(p)}if(this.requestRouter.region===ps.CUSTOM&&(a.$lib_custom_api_host=this.config.api_host),u=e!=="$pageview"||s?e!=="$pageleave"||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,i),a=Ee(a,u),e==="$pageview"&&j&&(a.title=j.title),!L(o)){var y=r.getTime()-o;a.$duration=parseFloat((y/1e3).toFixed(3))}rt&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=Ee({},c,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),oe(this.config.property_denylist)?re(this.config.property_denylist,function(p){delete a[p]}):F.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var m=this.config.sanitize_properties;m&&(F.error("sanitize_properties is deprecated. Use before_send instead"),a=m(a,e));var _=this.Bs();return a.$process_person_profile=_,_&&!s&&this.Hs("_calculate_event_properties"),a}zs(e){var n;if(!this.persistence||!this.Bs()||this.$s)return e;var r=this.persistence.get_initial_props(),i=(n=this.sessionPropsManager)==null?void 0:n.getSetOnceProps(),s=Ee({},r,i||{},e||{}),o=this.config.sanitize_properties;return o&&(F.error("sanitize_properties is deprecated. Use before_send instead"),s=o(s,"$set_once")),this.$s=!0,ii(s)?void 0:s}register(e,n){var r;(r=this.persistence)==null||r.register(e,n)}register_once(e,n,r){var i;(i=this.persistence)==null||i.register_once(e,n,r)}register_for_session(e){var n;(n=this.sessionPersistence)==null||n.register(e)}unregister(e){var n;(n=this.persistence)==null||n.unregister(e)}unregister_for_session(e){var n;(n=this.sessionPersistence)==null||n.unregister(e)}Ws(e,n){this.register({[e]:n})}getFeatureFlag(e,n){return this.featureFlags.getFeatureFlag(e,n)}getFeatureFlagPayload(e){var n=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(n)}catch{return n}}isFeatureEnabled(e,n){return this.featureFlags.isFeatureEnabled(e,n)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(e,n,r){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,n,r)}getEarlyAccessFeatures(e,n,r){return n===void 0&&(n=!1),this.featureFlags.getEarlyAccessFeatures(e,n,r)}on(e,n){return this.xs.on(e,n)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSurveysLoaded(e){return this.surveys.onSurveysLoaded(e)}onSessionId(e){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(e))!==null&&n!==void 0?n:()=>{}}getSurveys(e,n){n===void 0&&(n=!1),this.surveys.getSurveys(e,n)}getActiveMatchingSurveys(e,n){n===void 0&&(n=!1),this.surveys.getActiveMatchingSurveys(e,n)}renderSurvey(e,n){this.surveys.renderSurvey(e,n)}displaySurvey(e,n){n===void 0&&(n=gN),this.surveys.displaySurvey(e,n)}canRenderSurvey(e){return this.surveys.canRenderSurvey(e)}canRenderSurveyAsync(e,n){return n===void 0&&(n=!1),this.surveys.canRenderSurveyAsync(e,n)}identify(e,n,r){if(!this.__loaded||!this.persistence)return F.uninitializedWarning("posthog.identify");if(He(e)&&(e=e.toString(),F.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e)if(["distinct_id","distinctid"].includes(e.toLowerCase()))F.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if(e!==qi){if(this.Hs("posthog.identify")){var i=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var s=i;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}e!==i&&e!==this.get_property(os)&&(this.unregister(os),this.register({distinct_id:e}));var o=(this.persistence.get_property(un)||"anonymous")==="anonymous";e!==i&&o?(this.persistence.set_property(un,"identified"),this.setPersonPropertiesForFlags(D({},r||{},n||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:i},{$set:n||{},$set_once:r||{}}),this.Rs=Mv(e,n,r),this.featureFlags.setAnonymousDistinctId(i)):(n||r)&&this.setPersonProperties(n,r),e!==i&&(this.reloadFeatureFlags(),this.unregister(el))}}else F.critical('The string "'+qi+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else F.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,n){if((e||n)&&this.Hs("posthog.setPersonProperties")){var r=Mv(this.get_distinct_id(),e,n);this.Rs!==r?(this.setPersonPropertiesForFlags(D({},n||{},e||{})),this.capture("$set",{$set:e||{},$set_once:n||{}}),this.Rs=r):F.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,n,r){if(e&&n){if(this.Hs("posthog.group")){var i=this.getGroups();i[e]!==n&&this.resetGroupPropertiesForFlags(e),this.register({$groups:D({},i,{[e]:n})}),r&&(this.capture("$groupidentify",{$group_type:e,$group_key:n,$group_set:r}),this.setGroupPropertiesForFlags({[e]:r})),i[e]===n||r||this.reloadFeatureFlags()}}else F.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n){n===void 0&&(n=!0),this.featureFlags.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,n){n===void 0&&(n=!0),this.Hs("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,n)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){var n,r,i,s;if(F.info("reset"),!this.__loaded)return F.uninitializedWarning("posthog.reset");var o=this.get_property("$device_id");if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),this.surveys.reset(),this.featureFlags.reset(),(i=this.persistence)==null||i.set_property(un,"anonymous"),(s=this.sessionManager)==null||s.resetSessionId(),this.Rs=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:qi,$device_id:null},"");else{var a=this.config.get_device_id(jn());this.register_once({distinct_id:a,$device_id:e?a:o},"")}this.register({$last_posthog_reset:new Date().toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,n;return(e=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(e!=null&&e.withTimestamp&&r){var s,o=(s=e.timestampLookBack)!==null&&s!==void 0?s:10;if(!r)return i;i+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-o,0)}return i}alias(e,n){return e===this.get_property(ex)?(F.critical("Attempting to create alias for existing People user - aborting."),-2):this.Hs("posthog.alias")?(L(n)&&(n=this.get_distinct_id()),e!==n?(this.Ws(os,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(F.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var n=D({},this.config);if(we(e)){var r,i,s,o,a;Ee(this.config,qv(e));var l=this.Ms();(r=this.persistence)==null||r.update_config(this.config,n,l),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Qu(D({},this.config,{persistence:"sessionStorage"}),l),Te.G()&&Te.J("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(hn.DEBUG=!0,F.info("set_config",{config:e,oldConfig:n,newConfig:D({},this.config)})),(i=this.sessionRecording)==null||i.startIfEnabledOrStop(),(s=this.autocapture)==null||s.startIfEnabled(),(o=this.heatmaps)==null||o.startIfEnabled(),this.surveys.loadIfEnabled(),this.Gs(),(a=this.externalIntegrations)==null||a.startIfEnabledOrStop()}}startSessionRecording(e){var n=e===!0,r={sampling:n||!(e==null||!e.sampling),linked_flag:n||!(e==null||!e.linked_flag),url_trigger:n||!(e==null||!e.url_trigger),event_trigger:n||!(e==null||!e.event_trigger)};if(Object.values(r).some(Boolean)){var i,s,o,a,l;(i=this.sessionManager)==null||i.checkAndGetSessionAndWindowId(),r.sampling&&((s=this.sessionRecording)==null||s.overrideSampling()),r.linked_flag&&((o=this.sessionRecording)==null||o.overrideLinkedFlag()),r.url_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger("url")),r.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,n){var r=new Error("PostHog syntheticException"),i=this.exceptions.buildProperties(e,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(D({},i,n))}loadToolbar(e){return this.toolbar.loadToolbar(e)}get_property(e){var n;return(n=this.persistence)==null?void 0:n.props[e]}getSessionProperty(e){var n;return(n=this.sessionPersistence)==null?void 0:n.props[e]}toString(){var e,n=(e=this.config.name)!==null&&e!==void 0?e:jr;return n!==jr&&(n=jr+"."+n),n}_isIdentified(){var e,n;return((e=this.persistence)==null?void 0:e.get_property(un))==="identified"||((n=this.sessionPersistence)==null?void 0:n.get_property(un))==="identified"}Bs(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&ii(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[os])&&((n=this.persistence)==null||(n=n.props)==null||!n[nl]))}Us(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Bs()||this.Hs("posthog.createPersonProfile")&&this.setPersonProperties({},{})}Hs(e){return this.config.person_profiles==="never"?(F.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Ws(nl,!0),!0)}Ms(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut(),n=this.config.opt_out_persistence_by_default||this.config.cookieless_mode==="on_reject";return this.config.disable_persistence||e&&!!n}Gs(){var e,n,r,i,s=this.Ms();return((e=this.persistence)==null?void 0:e.je)!==s&&((r=this.persistence)==null||r.set_disabled(s)),((n=this.sessionPersistence)==null?void 0:n.je)!==s&&((i=this.sessionPersistence)==null||i.set_disabled(s)),s}opt_in_capturing(e){if(this.config.cookieless_mode!=="always"){var n;this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),this.sessionManager=new Hv(this),this.persistence&&(this.sessionPropsManager=new Uv(this,this.sessionManager,this.persistence)),this.sessionRecording=new Cv(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.Gs(),this.config.cookieless_mode=="on_reject"&&this.surveys.loadIfEnabled(),(L(e==null?void 0:e.captureEventName)||e!=null&&e.captureEventName)&&this.capture((n=e==null?void 0:e.captureEventName)!==null&&n!==void 0?n:"$opt_in",e==null?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ns()}else F.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e;this.config.cookieless_mode!=="always"?(this.config.cookieless_mode==="on_reject"&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Gs(),this.config.cookieless_mode==="on_reject"&&(this.register({distinct_id:qi,$device_id:null}),this.sessionManager=void 0,this.sessionPropsManager=void 0,(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,this.Ns())):F.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===cn.GRANTED?"granted":e===cn.DENIED?"denied":"pending"}is_capturing(){return this.config.cookieless_mode==="always"||(this.config.cookieless_mode==="on_reject"?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Gs()}_is_bot(){return gt?tS(gt,this.config.custom_blocked_useragents):void 0}Ns(){j&&(j.visibilityState==="visible"?this.Es||(this.Es=!0,this.capture("$pageview",{title:j.title},{send_instantly:!0}),this.Ps&&(j.removeEventListener("visibilitychange",this.Ps),this.Ps=null)):this.Ps||(this.Ps=this.Ns.bind(this),pe(j,"visibilitychange",this.Ps)))}debug(e){e===!1?(T==null||T.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(T==null||T.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}L(){var e,n,r,i,s,o,a,l=this.Ts||{};return"advanced_disable_flags"in l?!!l.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(F.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(r="advanced_disable_decide",i=!1,s=F,o=(n="advanced_disable_flags")in(e=l)&&!L(e[n]),a=r in e&&!L(e[r]),o?e[n]:a?(s&&s.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),e[r]):i)}qs(e){if(J(this.config.before_send))return e;var n=oe(this.config.before_send)?this.config.before_send:[this.config.before_send],r=e;for(var i of n){if(r=i(r),J(r)){var s="Event '"+e.event+"' was rejected in beforeSend function";return dM(e.event)?F.warn(s+". This can cause unexpected behavior."):F.info(s),null}r.properties&&!ii(r.properties)||F.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return r}getPageViewId(){var e;return(e=this.pageViewManager.fe)==null?void 0:e.pageViewId}captureTraceFeedback(e,n){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:n})}captureTraceMetric(e,n,r){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:n,$ai_metric_value:String(r)})}}(function(t,e){for(var n=0;n<e.length;n++)t.prototype[e[n]]=DM(t.prototype[e[n]])})(Kl,["identify"]);var Yv,Vr=(Yv=Rs[jr]=new Kl,function(){function t(){t.done||(t.done=!0,nS=!1,re(Rs,function(e){e._dom_loaded()}))}j!=null&&j.addEventListener?j.readyState==="complete"?t():pe(j,"DOMContentLoaded",t,{capture:!1}):T&&F.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),Yv),rS=x.createContext({client:Vr});function iS(t,e,n){if(n===void 0&&(n=new WeakMap),t===e)return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(n.has(t)&&n.get(t)===e)return!0;n.set(t,e);var r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;for(var s=0,o=r;s<o.length;s++){var a=o[s];if(!i.includes(a)||!iS(t[a],e[a],n))return!1}return!0}function ON(t){var e=t.children,n=t.client,r=t.apiKey,i=t.options,s=x.useRef(null),o=x.useMemo(function(){return n?(r&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),i&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),n):(r||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),Vr)},[n,r,JSON.stringify(i)]);return x.useEffect(function(){if(!n){var a=s.current;a?(r!==a.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),i&&!iS(i,a.options)&&Vr.set_config(i),s.current={apiKey:r,options:i??{}}):(Vr.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),Vr.init(r,i),s.current={apiKey:r,options:i??{}})}},[n,r,JSON.stringify(i)]),ee.createElement(rS.Provider,{value:{client:o}},e)}var nf=function(t,e){return nf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},nf(t,e)};function DN(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");nf(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var ec=function(t){return typeof t=="function"},$N={componentStack:null,exceptionEvent:null,error:null},FN={INVALID_FALLBACK:"[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."};(function(t){DN(e,t);function e(n){var r=t.call(this,n)||this;return r.state=$N,r}return e.prototype.componentDidCatch=function(n,r){var i=this.props.additionalProperties,s;ec(i)?s=i(n):typeof i=="object"&&(s=i);var o=this.context.client,a=o.captureException(n,s),l=r.componentStack;this.setState({error:n,componentStack:l,exceptionEvent:a})},e.prototype.render=function(){var n=this.props,r=n.children,i=n.fallback,s=this.state;if(s.componentStack==null)return ec(r)?r():r;var o=ec(i)?ee.createElement(i,{error:s.error,componentStack:s.componentStack,exceptionEvent:s.exceptionEvent}):i;return ee.isValidElement(o)?o:(console.warn(FN.INVALID_FALLBACK),ee.createElement(ee.Fragment,null))},e.contextType=rS,e})(ee.Component);const jN="phc_Ntj9tXHbS64XgYxlTfhglRmFivFsfm0AERph4ZlnNH",VN="https://us.i.posthog.com";tc.createRoot(document.getElementById("root")).render(C.jsx(ee.StrictMode,{children:C.jsx(ON,{apiKey:jN,options:{api_host:VN,capture_exceptions:!0,debug:!1},children:C.jsx(aM,{})})}));
|