@opencx/widget 3.0.40 → 3.0.42
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/designs.cjs +1 -1
- package/dist/designs.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/src/headless/core/context/session.ctx.d.ts +1 -0
- package/dist/{useUploadFiles-CbNwKf9g.js → useUploadFiles-BmEispgd.js} +3 -3
- package/dist/{useUploadFiles-CbNwKf9g.js.map → useUploadFiles-BmEispgd.js.map} +1 -1
- package/dist/{useUploadFiles-CH6LO6bs.cjs → useUploadFiles-eYRjtkaZ.cjs} +2 -2
- package/dist/{useUploadFiles-CH6LO6bs.cjs.map → useUploadFiles-eYRjtkaZ.cjs.map} +1 -1
- package/dist/{widget.ctx-Du1SCswT.cjs → widget.ctx-DB_VxiMQ.cjs} +2 -2
- package/dist/widget.ctx-DB_VxiMQ.cjs.map +1 -0
- package/dist/{widget.ctx-ijfuvINp.js → widget.ctx-DIcAO9ZA.js} +39 -34
- package/dist/widget.ctx-DIcAO9ZA.js.map +1 -0
- package/dist-embed/script.js +12 -12
- package/dist-embed/script.js.map +1 -1
- package/package.json +1 -1
- package/dist/widget.ctx-Du1SCswT.cjs.map +0 -1
- package/dist/widget.ctx-ijfuvINp.js.map +0 -1
package/dist-embed/script.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Sie=Object.defineProperty;var Aie=(Fo,yn,Jr)=>yn in Fo?Sie(Fo,yn,{enumerable:!0,configurable:!0,writable:!0,value:Jr}):Fo[yn]=Jr;var
|
|
1
|
+
var Sie=Object.defineProperty;var Aie=(Fo,yn,Jr)=>yn in Fo?Sie(Fo,yn,{enumerable:!0,configurable:!0,writable:!0,value:Jr}):Fo[yn]=Jr;var X=(Fo,yn,Jr)=>Aie(Fo,typeof yn!="symbol"?yn+"":yn,Jr);(function(){"use strict";function Fo(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var yn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function NO(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Jv={exports:{}},wc={},ex={exports:{}},Le={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -22,7 +22,7 @@ var Sie=Object.defineProperty;var Aie=(Fo,yn,Jr)=>yn in Fo?Sie(Fo,yn,{enumerable
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/(function(e){function t(F,B){var A=F.length;F.push(B);e:for(;0<A;){var oe=A-1>>>1,he=F[oe];if(0<i(he,B))F[oe]=B,F[A]=he,A=oe;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var B=F[0],A=F.pop();if(A!==B){F[0]=A;e:for(var oe=0,he=F.length,D=he>>>1;oe<D;){var Oe=2*(oe+1)-1,ge=F[Oe],xe=Oe+1,$e=F[xe];if(0>i(ge,A))xe<he&&0>i($e,ge)?(F[oe]=$e,F[xe]=A,oe=xe):(F[oe]=ge,F[Oe]=A,oe=Oe);else if(xe<he&&0>i($e,A))F[oe]=$e,F[xe]=A,oe=xe;else break e}}return B}function i(F,B){var A=F.sortIndex-B.sortIndex;return A!==0?A:F.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var u=[],l=[],c=1,d=null,f=3,p=!1,m=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(F){for(var B=n(l);B!==null;){if(B.callback===null)r(l);else if(B.startTime<=F)r(l),B.sortIndex=B.expirationTime,t(u,B);else break;B=n(l)}}function T(F){if(y=!1,w(F),!m)if(n(u)!==null)m=!0,ie(_);else{var B=n(l);B!==null&&te(T,B.startTime-F)}}function _(F,B){m=!1,y&&(y=!1,g(O),O=-1),p=!0;var A=f;try{for(w(B),d=n(u);d!==null&&(!(d.expirationTime>B)||F&&!$());){var oe=d.callback;if(typeof oe=="function"){d.callback=null,f=d.priorityLevel;var he=oe(d.expirationTime<=B);B=e.unstable_now(),typeof he=="function"?d.callback=he:d===n(u)&&r(u),w(B)}else r(u);d=n(u)}if(d!==null)var D=!0;else{var Oe=n(l);Oe!==null&&te(T,Oe.startTime-B),D=!1}return D}finally{d=null,f=A,p=!1}}var C=!1,R=null,O=-1,V=5,P=-1;function $(){return!(e.unstable_now()-P<V)}function z(){if(R!==null){var F=e.unstable_now();P=F;var B=!0;try{B=R(!0,F)}finally{B?
|
|
25
|
+
*/(function(e){function t(F,B){var A=F.length;F.push(B);e:for(;0<A;){var oe=A-1>>>1,he=F[oe];if(0<i(he,B))F[oe]=B,F[A]=he,A=oe;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var B=F[0],A=F.pop();if(A!==B){F[0]=A;e:for(var oe=0,he=F.length,D=he>>>1;oe<D;){var Oe=2*(oe+1)-1,ge=F[Oe],xe=Oe+1,$e=F[xe];if(0>i(ge,A))xe<he&&0>i($e,ge)?(F[oe]=$e,F[xe]=A,oe=xe):(F[oe]=ge,F[Oe]=A,oe=Oe);else if(xe<he&&0>i($e,A))F[oe]=$e,F[xe]=A,oe=xe;else break e}}return B}function i(F,B){var A=F.sortIndex-B.sortIndex;return A!==0?A:F.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var u=[],l=[],c=1,d=null,f=3,p=!1,m=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(F){for(var B=n(l);B!==null;){if(B.callback===null)r(l);else if(B.startTime<=F)r(l),B.sortIndex=B.expirationTime,t(u,B);else break;B=n(l)}}function T(F){if(y=!1,w(F),!m)if(n(u)!==null)m=!0,ie(_);else{var B=n(l);B!==null&&te(T,B.startTime-F)}}function _(F,B){m=!1,y&&(y=!1,g(O),O=-1),p=!0;var A=f;try{for(w(B),d=n(u);d!==null&&(!(d.expirationTime>B)||F&&!$());){var oe=d.callback;if(typeof oe=="function"){d.callback=null,f=d.priorityLevel;var he=oe(d.expirationTime<=B);B=e.unstable_now(),typeof he=="function"?d.callback=he:d===n(u)&&r(u),w(B)}else r(u);d=n(u)}if(d!==null)var D=!0;else{var Oe=n(l);Oe!==null&&te(T,Oe.startTime-B),D=!1}return D}finally{d=null,f=A,p=!1}}var C=!1,R=null,O=-1,V=5,P=-1;function $(){return!(e.unstable_now()-P<V)}function z(){if(R!==null){var F=e.unstable_now();P=F;var B=!0;try{B=R(!0,F)}finally{B?Q():(C=!1,R=null)}}else C=!1}var Q;if(typeof x=="function")Q=function(){x(z)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,re=Y.port2;Y.port1.onmessage=z,Q=function(){re.postMessage(null)}}else Q=function(){b(z,0)};function ie(F){R=F,C||(C=!0,Q())}function te(F,B){O=b(function(){F(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,ie(_))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(F){switch(f){case 1:case 2:case 3:var B=3;break;default:B=f}var A=f;f=B;try{return F()}finally{f=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,B){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var A=f;f=F;try{return B()}finally{f=A}},e.unstable_scheduleCallback=function(F,B,A){var oe=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?oe+A:oe):A=oe,F){case 1:var he=-1;break;case 2:he=250;break;case 5:he=1073741823;break;case 4:he=1e4;break;default:he=5e3}return he=A+he,F={id:c++,callback:B,priorityLevel:F,startTime:A,expirationTime:he,sortIndex:-1},A>oe?(F.sortIndex=A,t(l,F),n(u)===null&&F===n(l)&&(y?(g(O),O=-1):y=!0,te(T,A-oe))):(F.sortIndex=he,t(u,F),m||p||(m=!0,ie(_))),F},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(F){var B=f;return function(){var A=f;f=B;try{return F.apply(this,arguments)}finally{f=A}}}})(mx),hx.exports=mx;var JO=hx.exports;/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.min.js
|
|
28
28
|
*
|
|
@@ -37,7 +37,7 @@ var Sie=Object.defineProperty;var Aie=(Fo,yn,Jr)=>yn in Fo?Sie(Fo,yn,{enumerable
|
|
|
37
37
|
`+i[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=s);break}}}finally{_h=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ou(e):""}function oD(e){switch(e.tag){case 5:return ou(e.type);case 16:return ou("Lazy");case 13:return ou("Suspense");case 19:return ou("SuspenseList");case 0:case 2:case 15:return e=Ch(e.type,!1),e;case 11:return e=Ch(e.type.render,!1),e;case 1:return e=Ch(e.type,!0),e;default:return""}}function Sh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ra:return"Fragment";case ka:return"Portal";case vh:return"Profiler";case yh:return"StrictMode";case wh:return"Suspense";case bh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case wx:return(e.displayName||"Context")+".Consumer";case xx:return(e._context.displayName||"Context")+".Provider";case xh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Eh:return t=e.displayName||null,t!==null?t:Sh(e.type)||"Memo";case Ii:t=e._payload,e=e._init;try{return Sh(e(t))}catch{}}return null}function aD(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Sh(t);case 8:return t===yh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Oi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Tx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sD(e){var t=Tx(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Cc(e){e._valueTracker||(e._valueTracker=sD(e))}function _x(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Tx(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Sc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ah(e,t){var n=t.checked;return lt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Cx(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Oi(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Sx(e,t){t=t.checked,t!=null&&gh(e,"checked",t,!1)}function kh(e,t){Sx(e,t);var n=Oi(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Rh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Rh(e,t.type,Oi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ax(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Rh(e,t,n){(t!=="number"||Sc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var au=Array.isArray;function Na(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Oi(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Nh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Z(91));return lt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function kx(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Z(92));if(au(n)){if(1<n.length)throw Error(Z(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Oi(n)}}function Rx(e,t){var n=Oi(t.value),r=Oi(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Nx(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Px(e){switch(e){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 Ph(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Px(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ac,Ix=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ac=Ac||document.createElement("div"),Ac.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ac.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function su(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var uu={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},uD=["Webkit","ms","Moz","O"];Object.keys(uu).forEach(function(e){uD.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),uu[t]=uu[e]})});function Ox(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||uu.hasOwnProperty(e)&&uu[e]?(""+t).trim():t+"px"}function Dx(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Ox(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var lD=lt({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 Ih(e,t){if(t){if(lD[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Z(62))}}function Oh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Dh=null;function Lh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Mh=null,Pa=null,Ia=null;function Lx(e){if(e=Nu(e)){if(typeof Mh!="function")throw Error(Z(280));var t=e.stateNode;t&&(t=Xc(t),Mh(e.stateNode,e.type,t))}}function Mx(e){Pa?Ia?Ia.push(e):Ia=[e]:Pa=e}function Fx(){if(Pa){var e=Pa,t=Ia;if(Ia=Pa=null,Lx(e),t)for(e=0;e<t.length;e++)Lx(t[e])}}function Bx(e,t){return e(t)}function jx(){}var Fh=!1;function Ux(e,t,n){if(Fh)return e(t,n);Fh=!0;try{return Bx(e,t,n)}finally{Fh=!1,(Pa!==null||Ia!==null)&&(jx(),Fx())}}function lu(e,t){var n=e.stateNode;if(n===null)return null;var r=Xc(n);if(r===null)return null;n=r[t];e:switch(t){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)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Z(231,t,typeof n));return n}var Bh=!1;if(ei)try{var cu={};Object.defineProperty(cu,"passive",{get:function(){Bh=!0}}),window.addEventListener("test",cu,cu),window.removeEventListener("test",cu,cu)}catch{Bh=!1}function cD(e,t,n,r,i,o,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(c){this.onError(c)}}var du=!1,kc=null,Rc=!1,jh=null,dD={onError:function(e){du=!0,kc=e}};function fD(e,t,n,r,i,o,a,s,u){du=!1,kc=null,cD.apply(dD,arguments)}function pD(e,t,n,r,i,o,a,s,u){if(fD.apply(this,arguments),du){if(du){var l=kc;du=!1,kc=null}else throw Error(Z(198));Rc||(Rc=!0,jh=l)}}function jo(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function zx(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Hx(e){if(jo(e)!==e)throw Error(Z(188))}function hD(e){var t=e.alternate;if(!t){if(t=jo(e),t===null)throw Error(Z(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Hx(i),e;if(o===r)return Hx(i),t;o=o.sibling}throw Error(Z(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(Z(189))}}if(n.alternate!==r)throw Error(Z(190))}if(n.tag!==3)throw Error(Z(188));return n.stateNode.current===n?e:t}function Vx(e){return e=hD(e),e!==null?$x(e):null}function $x(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=$x(e);if(t!==null)return t;e=e.sibling}return null}var Wx=In.unstable_scheduleCallback,Yx=In.unstable_cancelCallback,mD=In.unstable_shouldYield,gD=In.unstable_requestPaint,wt=In.unstable_now,yD=In.unstable_getCurrentPriorityLevel,Uh=In.unstable_ImmediatePriority,qx=In.unstable_UserBlockingPriority,Nc=In.unstable_NormalPriority,vD=In.unstable_LowPriority,Gx=In.unstable_IdlePriority,Pc=null,Ir=null;function xD(e){if(Ir&&typeof Ir.onCommitFiberRoot=="function")try{Ir.onCommitFiberRoot(Pc,e,void 0,(e.current.flags&128)===128)}catch{}}var pr=Math.clz32?Math.clz32:ED,wD=Math.log,bD=Math.LN2;function ED(e){return e>>>=0,e===0?32:31-(wD(e)/bD|0)|0}var Ic=64,Oc=4194304;function fu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Dc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=fu(s):(o&=a,o!==0&&(r=fu(o)))}else a=n&~i,a!==0?r=fu(a):o!==0&&(r=fu(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-pr(t),i=1<<n,r|=e[n],t&=~i;return r}function TD(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 _D(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-pr(o),s=1<<a,u=i[a];u===-1?(!(s&n)||s&r)&&(i[a]=TD(s,t)):u<=t&&(e.expiredLanes|=s),o&=~s}}function zh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Kx(){var e=Ic;return Ic<<=1,!(Ic&4194240)&&(Ic=64),e}function Hh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function pu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pr(t),e[t]=n}function CD(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-pr(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Vh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pr(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var qe=0;function Xx(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Qx,$h,Zx,Jx,ew,Wh=!1,Lc=[],Di=null,Li=null,Mi=null,hu=new Map,mu=new Map,Fi=[],SD="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 tw(e,t){switch(e){case"focusin":case"focusout":Di=null;break;case"dragenter":case"dragleave":Li=null;break;case"mouseover":case"mouseout":Mi=null;break;case"pointerover":case"pointerout":hu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":mu.delete(t.pointerId)}}function gu(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Nu(t),t!==null&&$h(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function AD(e,t,n,r,i){switch(t){case"focusin":return Di=gu(Di,e,t,n,r,i),!0;case"dragenter":return Li=gu(Li,e,t,n,r,i),!0;case"mouseover":return Mi=gu(Mi,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return hu.set(o,gu(hu.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,mu.set(o,gu(mu.get(o)||null,e,t,n,r,i)),!0}return!1}function nw(e){var t=Uo(e.target);if(t!==null){var n=jo(t);if(n!==null){if(t=n.tag,t===13){if(t=zx(n),t!==null){e.blockedOn=t,ew(e.priority,function(){Zx(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=qh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Dh=r,n.target.dispatchEvent(r),Dh=null}else return t=Nu(n),t!==null&&$h(t),e.blockedOn=n,!1;t.shift()}return!0}function rw(e,t,n){Mc(e)&&n.delete(t)}function kD(){Wh=!1,Di!==null&&Mc(Di)&&(Di=null),Li!==null&&Mc(Li)&&(Li=null),Mi!==null&&Mc(Mi)&&(Mi=null),hu.forEach(rw),mu.forEach(rw)}function yu(e,t){e.blockedOn===t&&(e.blockedOn=null,Wh||(Wh=!0,In.unstable_scheduleCallback(In.unstable_NormalPriority,kD)))}function vu(e){function t(i){return yu(i,e)}if(0<Lc.length){yu(Lc[0],e);for(var n=1;n<Lc.length;n++){var r=Lc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Di!==null&&yu(Di,e),Li!==null&&yu(Li,e),Mi!==null&&yu(Mi,e),hu.forEach(t),mu.forEach(t),n=0;n<Fi.length;n++)r=Fi[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Fi.length&&(n=Fi[0],n.blockedOn===null);)nw(n),n.blockedOn===null&&Fi.shift()}var Oa=ti.ReactCurrentBatchConfig,Fc=!0;function RD(e,t,n,r){var i=qe,o=Oa.transition;Oa.transition=null;try{qe=1,Yh(e,t,n,r)}finally{qe=i,Oa.transition=o}}function ND(e,t,n,r){var i=qe,o=Oa.transition;Oa.transition=null;try{qe=4,Yh(e,t,n,r)}finally{qe=i,Oa.transition=o}}function Yh(e,t,n,r){if(Fc){var i=qh(e,t,n,r);if(i===null)cm(e,t,r,Bc,n),tw(e,r);else if(AD(i,e,t,n,r))r.stopPropagation();else if(tw(e,r),t&4&&-1<SD.indexOf(e)){for(;i!==null;){var o=Nu(i);if(o!==null&&Qx(o),o=qh(e,t,n,r),o===null&&cm(e,t,r,Bc,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else cm(e,t,r,null,n)}}var Bc=null;function qh(e,t,n,r){if(Bc=null,e=Lh(r),e=Uo(e),e!==null)if(t=jo(e),t===null)e=null;else if(n=t.tag,n===13){if(e=zx(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Bc=e,null}function iw(e){switch(e){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(yD()){case Uh:return 1;case qx:return 4;case Nc:case vD:return 16;case Gx:return 536870912;default:return 16}default:return 16}}var Bi=null,Gh=null,jc=null;function ow(){if(jc)return jc;var e,t=Gh,n=t.length,r,i="value"in Bi?Bi.value:Bi.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return jc=i.slice(e,1<r?1-r:void 0)}function Uc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zc(){return!0}function aw(){return!1}function On(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?zc:aw,this.isPropagationStopped=aw,this}return lt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=zc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=zc)},persist:function(){},isPersistent:zc}),t}var Da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kh=On(Da),xu=lt({},Da,{view:0,detail:0}),PD=On(xu),Xh,Qh,wu,Hc=lt({},xu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==wu&&(wu&&e.type==="mousemove"?(Xh=e.screenX-wu.screenX,Qh=e.screenY-wu.screenY):Qh=Xh=0,wu=e),Xh)},movementY:function(e){return"movementY"in e?e.movementY:Qh}}),sw=On(Hc),ID=lt({},Hc,{dataTransfer:0}),OD=On(ID),DD=lt({},xu,{relatedTarget:0}),Zh=On(DD),LD=lt({},Da,{animationName:0,elapsedTime:0,pseudoElement:0}),MD=On(LD),FD=lt({},Da,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),BD=On(FD),jD=lt({},Da,{data:0}),uw=On(jD),UD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zD={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"},HD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function VD(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=HD[e])?!!t[e]:!1}function Jh(){return VD}var $D=lt({},xu,{key:function(e){if(e.key){var t=UD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Uc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?zD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jh,charCode:function(e){return e.type==="keypress"?Uc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Uc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),WD=On($D),YD=lt({},Hc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lw=On(YD),qD=lt({},xu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jh}),GD=On(qD),KD=lt({},Da,{propertyName:0,elapsedTime:0,pseudoElement:0}),XD=On(KD),QD=lt({},Hc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ZD=On(QD),JD=[9,13,27,32],em=ei&&"CompositionEvent"in window,bu=null;ei&&"documentMode"in document&&(bu=document.documentMode);var e6=ei&&"TextEvent"in window&&!bu,cw=ei&&(!em||bu&&8<bu&&11>=bu),dw=" ",fw=!1;function pw(e,t){switch(e){case"keyup":return JD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var La=!1;function t6(e,t){switch(e){case"compositionend":return hw(t);case"keypress":return t.which!==32?null:(fw=!0,dw);case"textInput":return e=t.data,e===dw&&fw?null:e;default:return null}}function n6(e,t){if(La)return e==="compositionend"||!em&&pw(e,t)?(e=ow(),jc=Gh=Bi=null,La=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return cw&&t.locale!=="ko"?null:t.data;default:return null}}var r6={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 mw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!r6[e.type]:t==="textarea"}function gw(e,t,n,r){Mx(r),t=qc(t,"onChange"),0<t.length&&(n=new Kh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Eu=null,Tu=null;function i6(e){Dw(e,0)}function Vc(e){var t=Ua(e);if(_x(t))return e}function o6(e,t){if(e==="change")return t}var yw=!1;if(ei){var tm;if(ei){var nm="oninput"in document;if(!nm){var vw=document.createElement("div");vw.setAttribute("oninput","return;"),nm=typeof vw.oninput=="function"}tm=nm}else tm=!1;yw=tm&&(!document.documentMode||9<document.documentMode)}function xw(){Eu&&(Eu.detachEvent("onpropertychange",ww),Tu=Eu=null)}function ww(e){if(e.propertyName==="value"&&Vc(Tu)){var t=[];gw(t,Tu,e,Lh(e)),Ux(i6,t)}}function a6(e,t,n){e==="focusin"?(xw(),Eu=t,Tu=n,Eu.attachEvent("onpropertychange",ww)):e==="focusout"&&xw()}function s6(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vc(Tu)}function u6(e,t){if(e==="click")return Vc(t)}function l6(e,t){if(e==="input"||e==="change")return Vc(t)}function c6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hr=typeof Object.is=="function"?Object.is:c6;function _u(e,t){if(hr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ph.call(t,i)||!hr(e[i],t[i]))return!1}return!0}function bw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ew(e,t){var n=bw(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=bw(n)}}function Tw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _w(){for(var e=window,t=Sc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Sc(e.document)}return t}function rm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function d6(e){var t=_w(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Tw(n.ownerDocument.documentElement,n)){if(r!==null&&rm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Ew(n,o);var a=Ew(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var f6=ei&&"documentMode"in document&&11>=document.documentMode,Ma=null,im=null,Cu=null,om=!1;function Cw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;om||Ma==null||Ma!==Sc(r)||(r=Ma,"selectionStart"in r&&rm(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}),Cu&&_u(Cu,r)||(Cu=r,r=qc(im,"onSelect"),0<r.length&&(t=new Kh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ma)))}function $c(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Fa={animationend:$c("Animation","AnimationEnd"),animationiteration:$c("Animation","AnimationIteration"),animationstart:$c("Animation","AnimationStart"),transitionend:$c("Transition","TransitionEnd")},am={},Sw={};ei&&(Sw=document.createElement("div").style,"AnimationEvent"in window||(delete Fa.animationend.animation,delete Fa.animationiteration.animation,delete Fa.animationstart.animation),"TransitionEvent"in window||delete Fa.transitionend.transition);function Wc(e){if(am[e])return am[e];if(!Fa[e])return e;var t=Fa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Sw)return am[e]=t[n];return e}var Aw=Wc("animationend"),kw=Wc("animationiteration"),Rw=Wc("animationstart"),Nw=Wc("transitionend"),Pw=new Map,Iw="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 ji(e,t){Pw.set(e,t),Bo(t,[e])}for(var sm=0;sm<Iw.length;sm++){var um=Iw[sm],p6=um.toLowerCase(),h6=um[0].toUpperCase()+um.slice(1);ji(p6,"on"+h6)}ji(Aw,"onAnimationEnd"),ji(kw,"onAnimationIteration"),ji(Rw,"onAnimationStart"),ji("dblclick","onDoubleClick"),ji("focusin","onFocus"),ji("focusout","onBlur"),ji(Nw,"onTransitionEnd"),Aa("onMouseEnter",["mouseout","mouseover"]),Aa("onMouseLeave",["mouseout","mouseover"]),Aa("onPointerEnter",["pointerout","pointerover"]),Aa("onPointerLeave",["pointerout","pointerover"]),Bo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Bo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Bo("onBeforeInput",["compositionend","keypress","textInput","paste"]),Bo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Bo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Bo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Su="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(" "),m6=new Set("cancel close invalid load scroll toggle".split(" ").concat(Su));function Ow(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,pD(r,t,void 0,e),e.currentTarget=null}function Dw(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,l=s.currentTarget;if(s=s.listener,u!==o&&i.isPropagationStopped())break e;Ow(i,s,l),o=u}else for(a=0;a<r.length;a++){if(s=r[a],u=s.instance,l=s.currentTarget,s=s.listener,u!==o&&i.isPropagationStopped())break e;Ow(i,s,l),o=u}}}if(Rc)throw e=jh,Rc=!1,jh=null,e}function tt(e,t){var n=t[gm];n===void 0&&(n=t[gm]=new Set);var r=e+"__bubble";n.has(r)||(Lw(t,e,2,!1),n.add(r))}function lm(e,t,n){var r=0;t&&(r|=4),Lw(n,e,r,t)}var Yc="_reactListening"+Math.random().toString(36).slice(2);function Au(e){if(!e[Yc]){e[Yc]=!0,gx.forEach(function(n){n!=="selectionchange"&&(m6.has(n)||lm(n,!1,e),lm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yc]||(t[Yc]=!0,lm("selectionchange",!1,t))}}function Lw(e,t,n,r){switch(iw(t)){case 1:var i=RD;break;case 4:i=ND;break;default:i=Yh}n=i.bind(null,t,n,e),i=void 0,!Bh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function cm(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;a=a.return}for(;s!==null;){if(a=Uo(s),a===null)return;if(u=a.tag,u===5||u===6){r=o=a;continue e}s=s.parentNode}}r=r.return}Ux(function(){var l=o,c=Lh(n),d=[];e:{var f=Pw.get(e);if(f!==void 0){var p=Kh,m=e;switch(e){case"keypress":if(Uc(n)===0)break e;case"keydown":case"keyup":p=WD;break;case"focusin":m="focus",p=Zh;break;case"focusout":m="blur",p=Zh;break;case"beforeblur":case"afterblur":p=Zh;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":p=sw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=OD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=GD;break;case Aw:case kw:case Rw:p=MD;break;case Nw:p=XD;break;case"scroll":p=PD;break;case"wheel":p=ZD;break;case"copy":case"cut":case"paste":p=BD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=lw}var y=(t&4)!==0,b=!y&&e==="scroll",g=y?f!==null?f+"Capture":null:f;y=[];for(var x=l,w;x!==null;){w=x;var T=w.stateNode;if(w.tag===5&&T!==null&&(w=T,g!==null&&(T=lu(x,g),T!=null&&y.push(ku(x,T,w)))),b)break;x=x.return}0<y.length&&(f=new p(f,m,null,n,c),d.push({event:f,listeners:y}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==Dh&&(m=n.relatedTarget||n.fromElement)&&(Uo(m)||m[ni]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=l,m=m?Uo(m):null,m!==null&&(b=jo(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=l),p!==m)){if(y=sw,T="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(y=lw,T="onPointerLeave",g="onPointerEnter",x="pointer"),b=p==null?f:Ua(p),w=m==null?f:Ua(m),f=new y(T,x+"leave",p,n,c),f.target=b,f.relatedTarget=w,T=null,Uo(c)===l&&(y=new y(g,x+"enter",m,n,c),y.target=w,y.relatedTarget=b,T=y),b=T,p&&m)t:{for(y=p,g=m,x=0,w=y;w;w=Ba(w))x++;for(w=0,T=g;T;T=Ba(T))w++;for(;0<x-w;)y=Ba(y),x--;for(;0<w-x;)g=Ba(g),w--;for(;x--;){if(y===g||g!==null&&y===g.alternate)break t;y=Ba(y),g=Ba(g)}y=null}else y=null;p!==null&&Mw(d,f,p,y,!1),m!==null&&b!==null&&Mw(d,b,m,y,!0)}}e:{if(f=l?Ua(l):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var _=o6;else if(mw(f))if(yw)_=l6;else{_=s6;var C=a6}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(_=u6);if(_&&(_=_(e,l))){gw(d,_,n,c);break e}C&&C(e,f,l),e==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&Rh(f,"number",f.value)}switch(C=l?Ua(l):window,e){case"focusin":(mw(C)||C.contentEditable==="true")&&(Ma=C,im=l,Cu=null);break;case"focusout":Cu=im=Ma=null;break;case"mousedown":om=!0;break;case"contextmenu":case"mouseup":case"dragend":om=!1,Cw(d,n,c);break;case"selectionchange":if(f6)break;case"keydown":case"keyup":Cw(d,n,c)}var R;if(em)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else La?pw(e,n)&&(O="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(O="onCompositionStart");O&&(cw&&n.locale!=="ko"&&(La||O!=="onCompositionStart"?O==="onCompositionEnd"&&La&&(R=ow()):(Bi=c,Gh="value"in Bi?Bi.value:Bi.textContent,La=!0)),C=qc(l,O),0<C.length&&(O=new uw(O,e,null,n,c),d.push({event:O,listeners:C}),R?O.data=R:(R=hw(n),R!==null&&(O.data=R)))),(R=e6?t6(e,n):n6(e,n))&&(l=qc(l,"onBeforeInput"),0<l.length&&(c=new uw("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:l}),c.data=R))}Dw(d,t)})}function ku(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qc(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=lu(e,n),o!=null&&r.unshift(ku(e,o,i)),o=lu(e,t),o!=null&&r.push(ku(e,o,i))),e=e.return}return r}function Ba(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Mw(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var s=n,u=s.alternate,l=s.stateNode;if(u!==null&&u===r)break;s.tag===5&&l!==null&&(s=l,i?(u=lu(n,o),u!=null&&a.unshift(ku(n,u,s))):i||(u=lu(n,o),u!=null&&a.push(ku(n,u,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var g6=/\r\n?/g,y6=/\u0000|\uFFFD/g;function Fw(e){return(typeof e=="string"?e:""+e).replace(g6,`
|
|
38
38
|
`).replace(y6,"")}function Gc(e,t,n){if(t=Fw(t),Fw(e)!==t&&n)throw Error(Z(425))}function Kc(){}var dm=null,fm=null;function pm(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var hm=typeof setTimeout=="function"?setTimeout:void 0,v6=typeof clearTimeout=="function"?clearTimeout:void 0,Bw=typeof Promise=="function"?Promise:void 0,x6=typeof queueMicrotask=="function"?queueMicrotask:typeof Bw<"u"?function(e){return Bw.resolve(null).then(e).catch(w6)}:hm;function w6(e){setTimeout(function(){throw e})}function mm(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),vu(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);vu(t)}function Ui(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function jw(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ja=Math.random().toString(36).slice(2),Or="__reactFiber$"+ja,Ru="__reactProps$"+ja,ni="__reactContainer$"+ja,gm="__reactEvents$"+ja,b6="__reactListeners$"+ja,E6="__reactHandles$"+ja;function Uo(e){var t=e[Or];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ni]||n[Or]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=jw(e);e!==null;){if(n=e[Or])return n;e=jw(e)}return t}e=n,n=e.parentNode}return null}function Nu(e){return e=e[Or]||e[ni],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ua(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Z(33))}function Xc(e){return e[Ru]||null}var ym=[],za=-1;function zi(e){return{current:e}}function nt(e){0>za||(e.current=ym[za],ym[za]=null,za--)}function Je(e,t){za++,ym[za]=e.current,e.current=t}var Hi={},Gt=zi(Hi),vn=zi(!1),zo=Hi;function Ha(e,t){var n=e.type.contextTypes;if(!n)return Hi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function xn(e){return e=e.childContextTypes,e!=null}function Qc(){nt(vn),nt(Gt)}function Uw(e,t,n){if(Gt.current!==Hi)throw Error(Z(168));Je(Gt,t),Je(vn,n)}function zw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Z(108,aD(e)||"Unknown",i));return lt({},n,r)}function Zc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hi,zo=Gt.current,Je(Gt,e),Je(vn,vn.current),!0}function Hw(e,t,n){var r=e.stateNode;if(!r)throw Error(Z(169));n?(e=zw(e,t,zo),r.__reactInternalMemoizedMergedChildContext=e,nt(vn),nt(Gt),Je(Gt,e)):nt(vn),Je(vn,n)}var ri=null,Jc=!1,vm=!1;function Vw(e){ri===null?ri=[e]:ri.push(e)}function T6(e){Jc=!0,Vw(e)}function Vi(){if(!vm&&ri!==null){vm=!0;var e=0,t=qe;try{var n=ri;for(qe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ri=null,Jc=!1}catch(i){throw ri!==null&&(ri=ri.slice(e+1)),Wx(Uh,Vi),i}finally{qe=t,vm=!1}}return null}var Va=[],$a=0,ed=null,td=0,Xn=[],Qn=0,Ho=null,ii=1,oi="";function Vo(e,t){Va[$a++]=td,Va[$a++]=ed,ed=e,td=t}function $w(e,t,n){Xn[Qn++]=ii,Xn[Qn++]=oi,Xn[Qn++]=Ho,Ho=e;var r=ii;e=oi;var i=32-pr(r)-1;r&=~(1<<i),n+=1;var o=32-pr(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,ii=1<<32-pr(t)+i|n<<i|r,oi=o+e}else ii=1<<o|n<<i|r,oi=e}function xm(e){e.return!==null&&(Vo(e,1),$w(e,1,0))}function wm(e){for(;e===ed;)ed=Va[--$a],Va[$a]=null,td=Va[--$a],Va[$a]=null;for(;e===Ho;)Ho=Xn[--Qn],Xn[Qn]=null,oi=Xn[--Qn],Xn[Qn]=null,ii=Xn[--Qn],Xn[Qn]=null}var Dn=null,Ln=null,ot=!1,mr=null;function Ww(e,t){var n=tr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Yw(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Dn=e,Ln=Ui(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Dn=e,Ln=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ho!==null?{id:ii,overflow:oi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=tr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Dn=e,Ln=null,!0):!1;default:return!1}}function bm(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Em(e){if(ot){var t=Ln;if(t){var n=t;if(!Yw(e,t)){if(bm(e))throw Error(Z(418));t=Ui(n.nextSibling);var r=Dn;t&&Yw(e,t)?Ww(r,n):(e.flags=e.flags&-4097|2,ot=!1,Dn=e)}}else{if(bm(e))throw Error(Z(418));e.flags=e.flags&-4097|2,ot=!1,Dn=e}}}function qw(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Dn=e}function nd(e){if(e!==Dn)return!1;if(!ot)return qw(e),ot=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!pm(e.type,e.memoizedProps)),t&&(t=Ln)){if(bm(e))throw Gw(),Error(Z(418));for(;t;)Ww(e,t),t=Ui(t.nextSibling)}if(qw(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Z(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ln=Ui(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ln=null}}else Ln=Dn?Ui(e.stateNode.nextSibling):null;return!0}function Gw(){for(var e=Ln;e;)e=Ui(e.nextSibling)}function Wa(){Ln=Dn=null,ot=!1}function Tm(e){mr===null?mr=[e]:mr.push(e)}var _6=ti.ReactCurrentBatchConfig;function Pu(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Z(309));var r=n.stateNode}if(!r)throw Error(Z(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=i.refs;a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(Z(284));if(!n._owner)throw Error(Z(290,e))}return e}function rd(e,t){throw e=Object.prototype.toString.call(t),Error(Z(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Kw(e){var t=e._init;return t(e._payload)}function Xw(e){function t(g,x){if(e){var w=g.deletions;w===null?(g.deletions=[x],g.flags|=16):w.push(x)}}function n(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function r(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function i(g,x){return g=Qi(g,x),g.index=0,g.sibling=null,g}function o(g,x,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<x?(g.flags|=2,x):w):(g.flags|=2,x)):(g.flags|=1048576,x)}function a(g){return e&&g.alternate===null&&(g.flags|=2),g}function s(g,x,w,T){return x===null||x.tag!==6?(x=hg(w,g.mode,T),x.return=g,x):(x=i(x,w),x.return=g,x)}function u(g,x,w,T){var _=w.type;return _===Ra?c(g,x,w.props.children,T,w.key):x!==null&&(x.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Ii&&Kw(_)===x.type)?(T=i(x,w.props),T.ref=Pu(g,x,w),T.return=g,T):(T=Ad(w.type,w.key,w.props,null,g.mode,T),T.ref=Pu(g,x,w),T.return=g,T)}function l(g,x,w,T){return x===null||x.tag!==4||x.stateNode.containerInfo!==w.containerInfo||x.stateNode.implementation!==w.implementation?(x=mg(w,g.mode,T),x.return=g,x):(x=i(x,w.children||[]),x.return=g,x)}function c(g,x,w,T,_){return x===null||x.tag!==7?(x=Qo(w,g.mode,T,_),x.return=g,x):(x=i(x,w),x.return=g,x)}function d(g,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return x=hg(""+x,g.mode,w),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case _c:return w=Ad(x.type,x.key,x.props,null,g.mode,w),w.ref=Pu(g,null,x),w.return=g,w;case ka:return x=mg(x,g.mode,w),x.return=g,x;case Ii:var T=x._init;return d(g,T(x._payload),w)}if(au(x)||iu(x))return x=Qo(x,g.mode,w,null),x.return=g,x;rd(g,x)}return null}function f(g,x,w,T){var _=x!==null?x.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return _!==null?null:s(g,x,""+w,T);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case _c:return w.key===_?u(g,x,w,T):null;case ka:return w.key===_?l(g,x,w,T):null;case Ii:return _=w._init,f(g,x,_(w._payload),T)}if(au(w)||iu(w))return _!==null?null:c(g,x,w,T,null);rd(g,w)}return null}function p(g,x,w,T,_){if(typeof T=="string"&&T!==""||typeof T=="number")return g=g.get(w)||null,s(x,g,""+T,_);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case _c:return g=g.get(T.key===null?w:T.key)||null,u(x,g,T,_);case ka:return g=g.get(T.key===null?w:T.key)||null,l(x,g,T,_);case Ii:var C=T._init;return p(g,x,w,C(T._payload),_)}if(au(T)||iu(T))return g=g.get(w)||null,c(x,g,T,_,null);rd(x,T)}return null}function m(g,x,w,T){for(var _=null,C=null,R=x,O=x=0,V=null;R!==null&&O<w.length;O++){R.index>O?(V=R,R=null):V=R.sibling;var P=f(g,R,w[O],T);if(P===null){R===null&&(R=V);break}e&&R&&P.alternate===null&&t(g,R),x=o(P,x,O),C===null?_=P:C.sibling=P,C=P,R=V}if(O===w.length)return n(g,R),ot&&Vo(g,O),_;if(R===null){for(;O<w.length;O++)R=d(g,w[O],T),R!==null&&(x=o(R,x,O),C===null?_=R:C.sibling=R,C=R);return ot&&Vo(g,O),_}for(R=r(g,R);O<w.length;O++)V=p(R,g,O,w[O],T),V!==null&&(e&&V.alternate!==null&&R.delete(V.key===null?O:V.key),x=o(V,x,O),C===null?_=V:C.sibling=V,C=V);return e&&R.forEach(function($){return t(g,$)}),ot&&Vo(g,O),_}function y(g,x,w,T){var _=iu(w);if(typeof _!="function")throw Error(Z(150));if(w=_.call(w),w==null)throw Error(Z(151));for(var C=_=null,R=x,O=x=0,V=null,P=w.next();R!==null&&!P.done;O++,P=w.next()){R.index>O?(V=R,R=null):V=R.sibling;var $=f(g,R,P.value,T);if($===null){R===null&&(R=V);break}e&&R&&$.alternate===null&&t(g,R),x=o($,x,O),C===null?_=$:C.sibling=$,C=$,R=V}if(P.done)return n(g,R),ot&&Vo(g,O),_;if(R===null){for(;!P.done;O++,P=w.next())P=d(g,P.value,T),P!==null&&(x=o(P,x,O),C===null?_=P:C.sibling=P,C=P);return ot&&Vo(g,O),_}for(R=r(g,R);!P.done;O++,P=w.next())P=p(R,g,O,P.value,T),P!==null&&(e&&P.alternate!==null&&R.delete(P.key===null?O:P.key),x=o(P,x,O),C===null?_=P:C.sibling=P,C=P);return e&&R.forEach(function(z){return t(g,z)}),ot&&Vo(g,O),_}function b(g,x,w,T){if(typeof w=="object"&&w!==null&&w.type===Ra&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case _c:e:{for(var _=w.key,C=x;C!==null;){if(C.key===_){if(_=w.type,_===Ra){if(C.tag===7){n(g,C.sibling),x=i(C,w.props.children),x.return=g,g=x;break e}}else if(C.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Ii&&Kw(_)===C.type){n(g,C.sibling),x=i(C,w.props),x.ref=Pu(g,C,w),x.return=g,g=x;break e}n(g,C);break}else t(g,C);C=C.sibling}w.type===Ra?(x=Qo(w.props.children,g.mode,T,w.key),x.return=g,g=x):(T=Ad(w.type,w.key,w.props,null,g.mode,T),T.ref=Pu(g,x,w),T.return=g,g=T)}return a(g);case ka:e:{for(C=w.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){n(g,x.sibling),x=i(x,w.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=mg(w,g.mode,T),x.return=g,g=x}return a(g);case Ii:return C=w._init,b(g,x,C(w._payload),T)}if(au(w))return m(g,x,w,T);if(iu(w))return y(g,x,w,T);rd(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(n(g,x.sibling),x=i(x,w),x.return=g,g=x):(n(g,x),x=hg(w,g.mode,T),x.return=g,g=x),a(g)):n(g,x)}return b}var Ya=Xw(!0),Qw=Xw(!1),id=zi(null),od=null,qa=null,_m=null;function Cm(){_m=qa=od=null}function Sm(e){var t=id.current;nt(id),e._currentValue=t}function Am(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ga(e,t){od=e,_m=qa=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(wn=!0),e.firstContext=null)}function Zn(e){var t=e._currentValue;if(_m!==e)if(e={context:e,memoizedValue:t,next:null},qa===null){if(od===null)throw Error(Z(308));qa=e,od.dependencies={lanes:0,firstContext:e}}else qa=qa.next=e;return t}var $o=null;function km(e){$o===null?$o=[e]:$o.push(e)}function Zw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,km(t)):(n.next=i.next,i.next=n),t.interleaved=n,ai(e,r)}function ai(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var $i=!1;function Rm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jw(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function si(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wi(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ue&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ai(e,n)}return i=r.interleaved,i===null?(t.next=t,km(r)):(t.next=i.next,i.next=t),r.interleaved=t,ai(e,n)}function ad(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vh(e,n)}}function eb(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function sd(e,t,n,r){var i=e.updateQueue;$i=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var u=s,l=u.next;u.next=null,a===null?o=l:a.next=l,a=u;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==a&&(s===null?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u))}if(o!==null){var d=i.baseState;a=0,c=l=u=null,s=o;do{var f=s.lane,p=s.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,y=s;switch(f=t,p=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=lt({},d,f);break e;case 2:$i=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(l=c=p,u=d):c=c.next=p,a|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(u=d),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);qo|=a,e.lanes=a,e.memoizedState=d}}function tb(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Z(191,i));i.call(r)}}}var Iu={},Dr=zi(Iu),Ou=zi(Iu),Du=zi(Iu);function Wo(e){if(e===Iu)throw Error(Z(174));return e}function Nm(e,t){switch(Je(Du,t),Je(Ou,e),Je(Dr,Iu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ph(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ph(t,e)}nt(Dr),Je(Dr,t)}function Ka(){nt(Dr),nt(Ou),nt(Du)}function nb(e){Wo(Du.current);var t=Wo(Dr.current),n=Ph(t,e.type);t!==n&&(Je(Ou,e),Je(Dr,n))}function Pm(e){Ou.current===e&&(nt(Dr),nt(Ou))}var ct=zi(0);function ud(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Im=[];function Om(){for(var e=0;e<Im.length;e++)Im[e]._workInProgressVersionPrimary=null;Im.length=0}var ld=ti.ReactCurrentDispatcher,Dm=ti.ReactCurrentBatchConfig,Yo=0,dt=null,Rt=null,Dt=null,cd=!1,Lu=!1,Mu=0,C6=0;function Kt(){throw Error(Z(321))}function Lm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!hr(e[n],t[n]))return!1;return!0}function Mm(e,t,n,r,i,o){if(Yo=o,dt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ld.current=e===null||e.memoizedState===null?R6:N6,e=n(r,i),Lu){o=0;do{if(Lu=!1,Mu=0,25<=o)throw Error(Z(301));o+=1,Dt=Rt=null,t.updateQueue=null,ld.current=P6,e=n(r,i)}while(Lu)}if(ld.current=pd,t=Rt!==null&&Rt.next!==null,Yo=0,Dt=Rt=dt=null,cd=!1,t)throw Error(Z(300));return e}function Fm(){var e=Mu!==0;return Mu=0,e}function Lr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?dt.memoizedState=Dt=e:Dt=Dt.next=e,Dt}function Jn(){if(Rt===null){var e=dt.alternate;e=e!==null?e.memoizedState:null}else e=Rt.next;var t=Dt===null?dt.memoizedState:Dt.next;if(t!==null)Dt=t,Rt=e;else{if(e===null)throw Error(Z(310));Rt=e,e={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},Dt===null?dt.memoizedState=Dt=e:Dt=Dt.next=e}return Dt}function Fu(e,t){return typeof t=="function"?t(e):t}function Bm(e){var t=Jn(),n=t.queue;if(n===null)throw Error(Z(311));n.lastRenderedReducer=e;var r=Rt,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=a=null,u=null,l=o;do{var c=l.lane;if((Yo&c)===c)u!==null&&(u=u.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var d={lane:c,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};u===null?(s=u=d,a=r):u=u.next=d,dt.lanes|=c,qo|=c}l=l.next}while(l!==null&&l!==o);u===null?a=r:u.next=s,hr(r,t.memoizedState)||(wn=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,dt.lanes|=o,qo|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function jm(e){var t=Jn(),n=t.queue;if(n===null)throw Error(Z(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);hr(o,t.memoizedState)||(wn=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function rb(){}function ib(e,t){var n=dt,r=Jn(),i=t(),o=!hr(r.memoizedState,i);if(o&&(r.memoizedState=i,wn=!0),r=r.queue,Um(sb.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Dt!==null&&Dt.memoizedState.tag&1){if(n.flags|=2048,Bu(9,ab.bind(null,n,r,i,t),void 0,null),Lt===null)throw Error(Z(349));Yo&30||ob(n,t,i)}return i}function ob(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=dt.updateQueue,t===null?(t={lastEffect:null,stores:null},dt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ab(e,t,n,r){t.value=n,t.getSnapshot=r,ub(t)&&lb(e)}function sb(e,t,n){return n(function(){ub(t)&&lb(e)})}function ub(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hr(e,n)}catch{return!0}}function lb(e){var t=ai(e,1);t!==null&&xr(t,e,1,-1)}function cb(e){var t=Lr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fu,lastRenderedState:e},t.queue=e,e=e.dispatch=k6.bind(null,dt,e),[t.memoizedState,e]}function Bu(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=dt.updateQueue,t===null?(t={lastEffect:null,stores:null},dt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function db(){return Jn().memoizedState}function dd(e,t,n,r){var i=Lr();dt.flags|=e,i.memoizedState=Bu(1|t,n,void 0,r===void 0?null:r)}function fd(e,t,n,r){var i=Jn();r=r===void 0?null:r;var o=void 0;if(Rt!==null){var a=Rt.memoizedState;if(o=a.destroy,r!==null&&Lm(r,a.deps)){i.memoizedState=Bu(t,n,o,r);return}}dt.flags|=e,i.memoizedState=Bu(1|t,n,o,r)}function fb(e,t){return dd(8390656,8,e,t)}function Um(e,t){return fd(2048,8,e,t)}function pb(e,t){return fd(4,2,e,t)}function hb(e,t){return fd(4,4,e,t)}function mb(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gb(e,t,n){return n=n!=null?n.concat([e]):null,fd(4,4,mb.bind(null,t,e),n)}function zm(){}function yb(e,t){var n=Jn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Lm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vb(e,t){var n=Jn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Lm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function xb(e,t,n){return Yo&21?(hr(n,t)||(n=Kx(),dt.lanes|=n,qo|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,wn=!0),e.memoizedState=n)}function S6(e,t){var n=qe;qe=n!==0&&4>n?n:4,e(!0);var r=Dm.transition;Dm.transition={};try{e(!1),t()}finally{qe=n,Dm.transition=r}}function wb(){return Jn().memoizedState}function A6(e,t,n){var r=Ki(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bb(e))Eb(t,n);else if(n=Zw(e,t,n,r),n!==null){var i=fn();xr(n,e,r,i),Tb(n,t,r)}}function k6(e,t,n){var r=Ki(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bb(e))Eb(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,hr(s,a)){var u=t.interleaved;u===null?(i.next=i,km(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=Zw(e,t,i,r),n!==null&&(i=fn(),xr(n,e,r,i),Tb(n,t,r))}}function bb(e){var t=e.alternate;return e===dt||t!==null&&t===dt}function Eb(e,t){Lu=cd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Tb(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vh(e,n)}}var pd={readContext:Zn,useCallback:Kt,useContext:Kt,useEffect:Kt,useImperativeHandle:Kt,useInsertionEffect:Kt,useLayoutEffect:Kt,useMemo:Kt,useReducer:Kt,useRef:Kt,useState:Kt,useDebugValue:Kt,useDeferredValue:Kt,useTransition:Kt,useMutableSource:Kt,useSyncExternalStore:Kt,useId:Kt,unstable_isNewReconciler:!1},R6={readContext:Zn,useCallback:function(e,t){return Lr().memoizedState=[e,t===void 0?null:t],e},useContext:Zn,useEffect:fb,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dd(4194308,4,mb.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dd(4194308,4,e,t)},useInsertionEffect:function(e,t){return dd(4,2,e,t)},useMemo:function(e,t){var n=Lr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Lr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=A6.bind(null,dt,e),[r.memoizedState,e]},useRef:function(e){var t=Lr();return e={current:e},t.memoizedState=e},useState:cb,useDebugValue:zm,useDeferredValue:function(e){return Lr().memoizedState=e},useTransition:function(){var e=cb(!1),t=e[0];return e=S6.bind(null,e[1]),Lr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dt,i=Lr();if(ot){if(n===void 0)throw Error(Z(407));n=n()}else{if(n=t(),Lt===null)throw Error(Z(349));Yo&30||ob(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,fb(sb.bind(null,r,o,e),[e]),r.flags|=2048,Bu(9,ab.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Lr(),t=Lt.identifierPrefix;if(ot){var n=oi,r=ii;n=(r&~(1<<32-pr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Mu++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=C6++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},N6={readContext:Zn,useCallback:yb,useContext:Zn,useEffect:Um,useImperativeHandle:gb,useInsertionEffect:pb,useLayoutEffect:hb,useMemo:vb,useReducer:Bm,useRef:db,useState:function(){return Bm(Fu)},useDebugValue:zm,useDeferredValue:function(e){var t=Jn();return xb(t,Rt.memoizedState,e)},useTransition:function(){var e=Bm(Fu)[0],t=Jn().memoizedState;return[e,t]},useMutableSource:rb,useSyncExternalStore:ib,useId:wb,unstable_isNewReconciler:!1},P6={readContext:Zn,useCallback:yb,useContext:Zn,useEffect:Um,useImperativeHandle:gb,useInsertionEffect:pb,useLayoutEffect:hb,useMemo:vb,useReducer:jm,useRef:db,useState:function(){return jm(Fu)},useDebugValue:zm,useDeferredValue:function(e){var t=Jn();return Rt===null?t.memoizedState=e:xb(t,Rt.memoizedState,e)},useTransition:function(){var e=jm(Fu)[0],t=Jn().memoizedState;return[e,t]},useMutableSource:rb,useSyncExternalStore:ib,useId:wb,unstable_isNewReconciler:!1};function gr(e,t){if(e&&e.defaultProps){t=lt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Hm(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:lt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var hd={isMounted:function(e){return(e=e._reactInternals)?jo(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fn(),i=Ki(e),o=si(r,i);o.payload=t,n!=null&&(o.callback=n),t=Wi(e,o,i),t!==null&&(xr(t,e,i,r),ad(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fn(),i=Ki(e),o=si(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Wi(e,o,i),t!==null&&(xr(t,e,i,r),ad(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fn(),r=Ki(e),i=si(n,r);i.tag=2,t!=null&&(i.callback=t),t=Wi(e,i,r),t!==null&&(xr(t,e,r,n),ad(t,e,r))}};function _b(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!_u(n,r)||!_u(i,o):!0}function Cb(e,t,n){var r=!1,i=Hi,o=t.contextType;return typeof o=="object"&&o!==null?o=Zn(o):(i=xn(t)?zo:Gt.current,r=t.contextTypes,o=(r=r!=null)?Ha(e,i):Hi),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=hd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Sb(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&hd.enqueueReplaceState(t,t.state,null)}function Vm(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Rm(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Zn(o):(o=xn(t)?zo:Gt.current,i.context=Ha(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Hm(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&hd.enqueueReplaceState(i,i.state,null),sd(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Xa(e,t){try{var n="",r=t;do n+=oD(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
39
39
|
Error generating stack: `+o.message+`
|
|
40
|
-
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function $m(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Wm(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var I6=typeof WeakMap=="function"?WeakMap:Map;function Ab(e,t,n){n=si(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){bd||(bd=!0,ag=r),Wm(e,t)},n}function kb(e,t,n){n=si(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Wm(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Wm(e,t),typeof r!="function"&&(qi===null?qi=new Set([this]):qi.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Rb(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new I6;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Y6.bind(null,e,t,n),t.then(e,e))}function Nb(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Pb(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=si(-1,1),t.tag=2,Wi(n,t,1))),n.lanes|=1),e)}var O6=ti.ReactCurrentOwner,wn=!1;function dn(e,t,n,r){t.child=e===null?Qw(t,null,n,r):Ya(t,e.child,n,r)}function Ib(e,t,n,r,i){n=n.render;var o=t.ref;return Ga(t,i),r=Mm(e,t,n,r,o,i),n=Fm(),e!==null&&!wn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ui(e,t,i)):(ot&&n&&xm(t),t.flags|=1,dn(e,t,r,i),t.child)}function Ob(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!pg(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Db(e,t,o,r,i)):(e=Ad(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:_u,n(a,r)&&e.ref===t.ref)return ui(e,t,i)}return t.flags|=1,e=Qi(o,r),e.ref=t.ref,e.return=t,t.child=e}function Db(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(_u(o,r)&&e.ref===t.ref)if(wn=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(wn=!0);else return t.lanes=e.lanes,ui(e,t,i)}return Ym(e,t,n,r,i)}function Lb(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Je(Za,Mn),Mn|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Je(Za,Mn),Mn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Je(Za,Mn),Mn|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Je(Za,Mn),Mn|=r;return dn(e,t,i,n),t.child}function Mb(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ym(e,t,n,r,i){var o=xn(n)?zo:Gt.current;return o=Ha(t,o),Ga(t,i),n=Mm(e,t,n,r,o,i),r=Fm(),e!==null&&!wn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ui(e,t,i)):(ot&&r&&xm(t),t.flags|=1,dn(e,t,n,i),t.child)}function Fb(e,t,n,r,i){if(xn(n)){var o=!0;Zc(t)}else o=!1;if(Ga(t,i),t.stateNode===null)gd(e,t),Cb(t,n,r),Vm(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,l=n.contextType;typeof l=="object"&&l!==null?l=Zn(l):(l=xn(n)?zo:Gt.current,l=Ha(t,l));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||u!==l)&&Sb(t,a,r,l),$i=!1;var f=t.memoizedState;a.state=f,sd(t,r,a,i),u=t.memoizedState,s!==r||f!==u||vn.current||$i?(typeof c=="function"&&(Hm(t,n,c,r),u=t.memoizedState),(s=$i||_b(t,n,s,r,f,u,l))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Jw(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:gr(t.type,s),a.props=l,d=t.pendingProps,f=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=Zn(u):(u=xn(n)?zo:Gt.current,u=Ha(t,u));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||f!==u)&&Sb(t,a,r,u),$i=!1,f=t.memoizedState,a.state=f,sd(t,r,a,i);var m=t.memoizedState;s!==d||f!==m||vn.current||$i?(typeof p=="function"&&(Hm(t,n,p,r),m=t.memoizedState),(l=$i||_b(t,n,l,r,f,m,u)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,m,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,m,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=u,r=l):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return qm(e,t,n,r,o,i)}function qm(e,t,n,r,i,o){Mb(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Hw(t,n,!1),ui(e,t,o);r=t.stateNode,O6.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Ya(t,e.child,null,o),t.child=Ya(t,null,s,o)):dn(e,t,s,o),t.memoizedState=r.state,i&&Hw(t,n,!0),t.child}function Bb(e){var t=e.stateNode;t.pendingContext?Uw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Uw(e,t.context,!1),Nm(e,t.containerInfo)}function jb(e,t,n,r,i){return Wa(),Tm(i),t.flags|=256,dn(e,t,n,r),t.child}var Gm={dehydrated:null,treeContext:null,retryLane:0};function Km(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ub(e,t,n){var r=t.pendingProps,i=ct.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Je(ct,i&1),e===null)return Em(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=kd(a,r,0,null),e=Qo(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Km(n),t.memoizedState=Gm,e):Xm(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return D6(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Qi(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Qi(s,o):(o=Qo(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?Km(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=Gm,r}return o=e.child,e=o.sibling,r=Qi(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Xm(e,t){return t=kd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function md(e,t,n,r){return r!==null&&Tm(r),Ya(t,e.child,null,n),e=Xm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function D6(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=$m(Error(Z(422))),md(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=kd({mode:"visible",children:r.children},i,0,null),o=Qo(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Ya(t,e.child,null,a),t.child.memoizedState=Km(a),t.memoizedState=Gm,o);if(!(t.mode&1))return md(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Z(419)),r=$m(o,r,void 0),md(e,t,a,r)}if(s=(a&e.childLanes)!==0,wn||s){if(r=Lt,r!==null){switch(a&-a){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|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,ai(e,i),xr(r,e,i,-1))}return fg(),r=$m(Error(Z(421))),md(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=q6.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ln=Ui(i.nextSibling),Dn=t,ot=!0,mr=null,e!==null&&(Xn[Qn++]=ii,Xn[Qn++]=oi,Xn[Qn++]=Ho,ii=e.id,oi=e.overflow,Ho=t),t=Xm(t,r.children),t.flags|=4096,t)}function zb(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Am(e.return,t,n)}function Qm(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Hb(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(dn(e,t,r.children,n),r=ct.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zb(e,n,t);else if(e.tag===19)zb(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Je(ct,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ud(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Qm(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ud(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Qm(t,!0,n,null,o);break;case"together":Qm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function gd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ui(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qo|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Z(153));if(t.child!==null){for(e=t.child,n=Qi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function L6(e,t,n){switch(t.tag){case 3:Bb(t),Wa();break;case 5:nb(t);break;case 1:xn(t.type)&&Zc(t);break;case 4:Nm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Je(id,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Je(ct,ct.current&1),t.flags|=128,null):n&t.child.childLanes?Ub(e,t,n):(Je(ct,ct.current&1),e=ui(e,t,n),e!==null?e.sibling:null);Je(ct,ct.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Hb(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Je(ct,ct.current),r)break;return null;case 22:case 23:return t.lanes=0,Lb(e,t,n)}return ui(e,t,n)}var Vb,Zm,$b,Wb;Vb=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Zm=function(){},$b=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Wo(Dr.current);var o=null;switch(n){case"input":i=Ah(e,i),r=Ah(e,r),o=[];break;case"select":i=lt({},i,{value:void 0}),r=lt({},r,{value:void 0}),o=[];break;case"textarea":i=Nh(e,i),r=Nh(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Kc)}Ih(n,r);var a;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(ru.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var u=r[l];if(s=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&u!==s&&(u!=null||s!=null))if(l==="style")if(s){for(a in s)!s.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&s[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(o||(o=[]),o.push(l,n)),n=u;else l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(o=o||[]).push(l,u)):l==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(l,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(ru.hasOwnProperty(l)?(u!=null&&l==="onScroll"&&tt("scroll",e),o||s===u||(o=[])):(o=o||[]).push(l,u))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}},Wb=function(e,t,n,r){n!==r&&(t.flags|=4)};function ju(e,t){if(!ot)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function M6(e,t,n){var r=t.pendingProps;switch(wm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(t),null;case 1:return xn(t.type)&&Qc(),Xt(t),null;case 3:return r=t.stateNode,Ka(),nt(vn),nt(Gt),Om(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(nd(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,mr!==null&&(lg(mr),mr=null))),Zm(e,t),Xt(t),null;case 5:Pm(t);var i=Wo(Du.current);if(n=t.type,e!==null&&t.stateNode!=null)$b(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Z(166));return Xt(t),null}if(e=Wo(Dr.current),nd(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Or]=t,r[Ru]=o,e=(t.mode&1)!==0,n){case"dialog":tt("cancel",r),tt("close",r);break;case"iframe":case"object":case"embed":tt("load",r);break;case"video":case"audio":for(i=0;i<Su.length;i++)tt(Su[i],r);break;case"source":tt("error",r);break;case"img":case"image":case"link":tt("error",r),tt("load",r);break;case"details":tt("toggle",r);break;case"input":Cx(r,o),tt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},tt("invalid",r);break;case"textarea":kx(r,o),tt("invalid",r)}Ih(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&Gc(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&Gc(r.textContent,s,e),i=["children",""+s]):ru.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&tt("scroll",r)}switch(n){case"input":Cc(r),Ax(r,o,!0);break;case"textarea":Cc(r),Nx(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Kc)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Px(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Or]=t,e[Ru]=r,Vb(e,t,!1,!1),t.stateNode=e;e:{switch(a=Oh(n,r),n){case"dialog":tt("cancel",e),tt("close",e),i=r;break;case"iframe":case"object":case"embed":tt("load",e),i=r;break;case"video":case"audio":for(i=0;i<Su.length;i++)tt(Su[i],e);i=r;break;case"source":tt("error",e),i=r;break;case"img":case"image":case"link":tt("error",e),tt("load",e),i=r;break;case"details":tt("toggle",e),i=r;break;case"input":Cx(e,r),i=Ah(e,r),tt("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=lt({},r,{value:void 0}),tt("invalid",e);break;case"textarea":kx(e,r),i=Nh(e,r),tt("invalid",e);break;default:i=r}Ih(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var u=s[o];o==="style"?Dx(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Ix(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&su(e,u):typeof u=="number"&&su(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ru.hasOwnProperty(o)?u!=null&&o==="onScroll"&&tt("scroll",e):u!=null&&gh(e,o,u,a))}switch(n){case"input":Cc(e),Ax(e,r,!1);break;case"textarea":Cc(e),Nx(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Oi(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Na(e,!!r.multiple,o,!1):r.defaultValue!=null&&Na(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Kc)}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&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Xt(t),null;case 6:if(e&&t.stateNode!=null)Wb(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Z(166));if(n=Wo(Du.current),Wo(Dr.current),nd(t)){if(r=t.stateNode,n=t.memoizedProps,r[Or]=t,(o=r.nodeValue!==n)&&(e=Dn,e!==null))switch(e.tag){case 3:Gc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Gc(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Or]=t,t.stateNode=r}return Xt(t),null;case 13:if(nt(ct),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ot&&Ln!==null&&t.mode&1&&!(t.flags&128))Gw(),Wa(),t.flags|=98560,o=!1;else if(o=nd(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Z(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Z(317));o[Or]=t}else Wa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xt(t),o=!1}else mr!==null&&(lg(mr),mr=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ct.current&1?Nt===0&&(Nt=3):fg())),t.updateQueue!==null&&(t.flags|=4),Xt(t),null);case 4:return Ka(),Zm(e,t),e===null&&Au(t.stateNode.containerInfo),Xt(t),null;case 10:return Sm(t.type._context),Xt(t),null;case 17:return xn(t.type)&&Qc(),Xt(t),null;case 19:if(nt(ct),o=t.memoizedState,o===null)return Xt(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)ju(o,!1);else{if(Nt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=ud(e),a!==null){for(t.flags|=128,ju(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Je(ct,ct.current&1|2),t.child}e=e.sibling}o.tail!==null&&wt()>Ja&&(t.flags|=128,r=!0,ju(o,!1),t.lanes=4194304)}else{if(!r)if(e=ud(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ju(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ot)return Xt(t),null}else 2*wt()-o.renderingStartTime>Ja&&n!==1073741824&&(t.flags|=128,r=!0,ju(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=wt(),t.sibling=null,n=ct.current,Je(ct,r?n&1|2:n&1),t):(Xt(t),null);case 22:case 23:return dg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Mn&1073741824&&(Xt(t),t.subtreeFlags&6&&(t.flags|=8192)):Xt(t),null;case 24:return null;case 25:return null}throw Error(Z(156,t.tag))}function F6(e,t){switch(wm(t),t.tag){case 1:return xn(t.type)&&Qc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ka(),nt(vn),nt(Gt),Om(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Pm(t),null;case 13:if(nt(ct),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Z(340));Wa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return nt(ct),null;case 4:return Ka(),null;case 10:return Sm(t.type._context),null;case 22:case 23:return dg(),null;case 24:return null;default:return null}}var yd=!1,Qt=!1,B6=typeof WeakSet=="function"?WeakSet:Set,ue=null;function Qa(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){gt(e,t,r)}else n.current=null}function Jm(e,t,n){try{n()}catch(r){gt(e,t,r)}}var Yb=!1;function j6(e,t){if(dm=Fc,e=_w(),rm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,u=-1,l=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(u=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++l===i&&(s=a),f===o&&++c===r&&(u=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(fm={focusedElem:e,selectionRange:n},Fc=!1,ue=t;ue!==null;)if(t=ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ue=e;else for(;ue!==null;){t=ue;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,b=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:gr(t.type,y),b);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Z(163))}}catch(T){gt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,ue=e;break}ue=t.return}return m=Yb,Yb=!1,m}function Uu(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Jm(t,n,o)}i=i.next}while(i!==r)}}function vd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function eg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function qb(e){var t=e.alternate;t!==null&&(e.alternate=null,qb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Or],delete t[Ru],delete t[gm],delete t[b6],delete t[E6])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Gb(e){return e.tag===5||e.tag===3||e.tag===4}function Kb(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kc));else if(r!==4&&(e=e.child,e!==null))for(tg(e,t,n),e=e.sibling;e!==null;)tg(e,t,n),e=e.sibling}function ng(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ng(e,t,n),e=e.sibling;e!==null;)ng(e,t,n),e=e.sibling}var Ht=null,yr=!1;function Yi(e,t,n){for(n=n.child;n!==null;)Xb(e,t,n),n=n.sibling}function Xb(e,t,n){if(Ir&&typeof Ir.onCommitFiberUnmount=="function")try{Ir.onCommitFiberUnmount(Pc,n)}catch{}switch(n.tag){case 5:Qt||Qa(n,t);case 6:var r=Ht,i=yr;Ht=null,Yi(e,t,n),Ht=r,yr=i,Ht!==null&&(yr?(e=Ht,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ht.removeChild(n.stateNode));break;case 18:Ht!==null&&(yr?(e=Ht,n=n.stateNode,e.nodeType===8?mm(e.parentNode,n):e.nodeType===1&&mm(e,n),vu(e)):mm(Ht,n.stateNode));break;case 4:r=Ht,i=yr,Ht=n.stateNode.containerInfo,yr=!0,Yi(e,t,n),Ht=r,yr=i;break;case 0:case 11:case 14:case 15:if(!Qt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&Jm(n,t,a),i=i.next}while(i!==r)}Yi(e,t,n);break;case 1:if(!Qt&&(Qa(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){gt(n,t,s)}Yi(e,t,n);break;case 21:Yi(e,t,n);break;case 22:n.mode&1?(Qt=(r=Qt)||n.memoizedState!==null,Yi(e,t,n),Qt=r):Yi(e,t,n);break;default:Yi(e,t,n)}}function Qb(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new B6),t.forEach(function(r){var i=G6.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function vr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:Ht=s.stateNode,yr=!1;break e;case 3:Ht=s.stateNode.containerInfo,yr=!0;break e;case 4:Ht=s.stateNode.containerInfo,yr=!0;break e}s=s.return}if(Ht===null)throw Error(Z(160));Xb(o,a,i),Ht=null,yr=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(l){gt(i,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Zb(t,e),t=t.sibling}function Zb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vr(t,e),Mr(e),r&4){try{Uu(3,e,e.return),vd(3,e)}catch(y){gt(e,e.return,y)}try{Uu(5,e,e.return)}catch(y){gt(e,e.return,y)}}break;case 1:vr(t,e),Mr(e),r&512&&n!==null&&Qa(n,n.return);break;case 5:if(vr(t,e),Mr(e),r&512&&n!==null&&Qa(n,n.return),e.flags&32){var i=e.stateNode;try{su(i,"")}catch(y){gt(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,s=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&Sx(i,o),Oh(s,a);var l=Oh(s,o);for(a=0;a<u.length;a+=2){var c=u[a],d=u[a+1];c==="style"?Dx(i,d):c==="dangerouslySetInnerHTML"?Ix(i,d):c==="children"?su(i,d):gh(i,c,d,l)}switch(s){case"input":kh(i,o);break;case"textarea":Rx(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?Na(i,!!o.multiple,p,!1):f!==!!o.multiple&&(o.defaultValue!=null?Na(i,!!o.multiple,o.defaultValue,!0):Na(i,!!o.multiple,o.multiple?[]:"",!1))}i[Ru]=o}catch(y){gt(e,e.return,y)}}break;case 6:if(vr(t,e),Mr(e),r&4){if(e.stateNode===null)throw Error(Z(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(y){gt(e,e.return,y)}}break;case 3:if(vr(t,e),Mr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{vu(t.containerInfo)}catch(y){gt(e,e.return,y)}break;case 4:vr(t,e),Mr(e);break;case 13:vr(t,e),Mr(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(og=wt())),r&4&&Qb(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Qt=(l=Qt)||c,vr(t,e),Qt=l):vr(t,e),Mr(e),r&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!c&&e.mode&1)for(ue=e,c=e.child;c!==null;){for(d=ue=c;ue!==null;){switch(f=ue,p=f.child,f.tag){case 0:case 11:case 14:case 15:Uu(4,f,f.return);break;case 1:Qa(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(y){gt(r,n,y)}}break;case 5:Qa(f,f.return);break;case 22:if(f.memoizedState!==null){tE(d);continue}}p!==null?(p.return=f,ue=p):tE(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,l?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=d.stateNode,u=d.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=Ox("display",a))}catch(y){gt(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(y){gt(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:vr(t,e),Mr(e),r&4&&Qb(e);break;case 21:break;default:vr(t,e),Mr(e)}}function Mr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Gb(n)){var r=n;break e}n=n.return}throw Error(Z(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(su(i,""),r.flags&=-33);var o=Kb(e);ng(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=Kb(e);tg(e,s,a);break;default:throw Error(Z(161))}}catch(u){gt(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function U6(e,t,n){ue=e,Jb(e)}function Jb(e,t,n){for(var r=(e.mode&1)!==0;ue!==null;){var i=ue,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||yd;if(!a){var s=i.alternate,u=s!==null&&s.memoizedState!==null||Qt;s=yd;var l=Qt;if(yd=a,(Qt=u)&&!l)for(ue=i;ue!==null;)a=ue,u=a.child,a.tag===22&&a.memoizedState!==null?nE(i):u!==null?(u.return=a,ue=u):nE(i);for(;o!==null;)ue=o,Jb(o),o=o.sibling;ue=i,yd=s,Qt=l}eE(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,ue=o):eE(e)}}function eE(e){for(;ue!==null;){var t=ue;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Qt||vd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Qt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:gr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&tb(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}tb(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var c=l.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&vu(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Z(163))}Qt||t.flags&512&&eg(t)}catch(f){gt(t,t.return,f)}}if(t===e){ue=null;break}if(n=t.sibling,n!==null){n.return=t.return,ue=n;break}ue=t.return}}function tE(e){for(;ue!==null;){var t=ue;if(t===e){ue=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ue=n;break}ue=t.return}}function nE(e){for(;ue!==null;){var t=ue;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{vd(4,t)}catch(u){gt(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){gt(t,i,u)}}var o=t.return;try{eg(t)}catch(u){gt(t,o,u)}break;case 5:var a=t.return;try{eg(t)}catch(u){gt(t,a,u)}}}catch(u){gt(t,t.return,u)}if(t===e){ue=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ue=s;break}ue=t.return}}var z6=Math.ceil,xd=ti.ReactCurrentDispatcher,rg=ti.ReactCurrentOwner,er=ti.ReactCurrentBatchConfig,Ue=0,Lt=null,Ct=null,Vt=0,Mn=0,Za=zi(0),Nt=0,zu=null,qo=0,wd=0,ig=0,Hu=null,bn=null,og=0,Ja=1/0,li=null,bd=!1,ag=null,qi=null,Ed=!1,Gi=null,Td=0,Vu=0,sg=null,_d=-1,Cd=0;function fn(){return Ue&6?wt():_d!==-1?_d:_d=wt()}function Ki(e){return e.mode&1?Ue&2&&Vt!==0?Vt&-Vt:_6.transition!==null?(Cd===0&&(Cd=Kx()),Cd):(e=qe,e!==0||(e=window.event,e=e===void 0?16:iw(e.type)),e):1}function xr(e,t,n,r){if(50<Vu)throw Vu=0,sg=null,Error(Z(185));pu(e,n,r),(!(Ue&2)||e!==Lt)&&(e===Lt&&(!(Ue&2)&&(wd|=n),Nt===4&&Xi(e,Vt)),En(e,r),n===1&&Ue===0&&!(t.mode&1)&&(Ja=wt()+500,Jc&&Vi()))}function En(e,t){var n=e.callbackNode;_D(e,t);var r=Dc(e,e===Lt?Vt:0);if(r===0)n!==null&&Yx(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Yx(n),t===1)e.tag===0?T6(iE.bind(null,e)):Vw(iE.bind(null,e)),x6(function(){!(Ue&6)&&Vi()}),n=null;else{switch(Xx(r)){case 1:n=Uh;break;case 4:n=qx;break;case 16:n=Nc;break;case 536870912:n=Gx;break;default:n=Nc}n=fE(n,rE.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function rE(e,t){if(_d=-1,Cd=0,Ue&6)throw Error(Z(327));var n=e.callbackNode;if(es()&&e.callbackNode!==n)return null;var r=Dc(e,e===Lt?Vt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Sd(e,r);else{t=r;var i=Ue;Ue|=2;var o=aE();(Lt!==e||Vt!==t)&&(li=null,Ja=wt()+500,Ko(e,t));do try{$6();break}catch(s){oE(e,s)}while(!0);Cm(),xd.current=o,Ue=i,Ct!==null?t=0:(Lt=null,Vt=0,t=Nt)}if(t!==0){if(t===2&&(i=zh(e),i!==0&&(r=i,t=ug(e,i))),t===1)throw n=zu,Ko(e,0),Xi(e,r),En(e,wt()),n;if(t===6)Xi(e,r);else{if(i=e.current.alternate,!(r&30)&&!H6(i)&&(t=Sd(e,r),t===2&&(o=zh(e),o!==0&&(r=o,t=ug(e,o))),t===1))throw n=zu,Ko(e,0),Xi(e,r),En(e,wt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Z(345));case 2:Xo(e,bn,li);break;case 3:if(Xi(e,r),(r&130023424)===r&&(t=og+500-wt(),10<t)){if(Dc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){fn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=hm(Xo.bind(null,e,bn,li),t);break}Xo(e,bn,li);break;case 4:if(Xi(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-pr(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=wt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*z6(r/1960))-r,10<r){e.timeoutHandle=hm(Xo.bind(null,e,bn,li),r);break}Xo(e,bn,li);break;case 5:Xo(e,bn,li);break;default:throw Error(Z(329))}}}return En(e,wt()),e.callbackNode===n?rE.bind(null,e):null}function ug(e,t){var n=Hu;return e.current.memoizedState.isDehydrated&&(Ko(e,t).flags|=256),e=Sd(e,t),e!==2&&(t=bn,bn=n,t!==null&&lg(t)),e}function lg(e){bn===null?bn=e:bn.push.apply(bn,e)}function H6(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!hr(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Xi(e,t){for(t&=~ig,t&=~wd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pr(t),r=1<<n;e[n]=-1,t&=~r}}function iE(e){if(Ue&6)throw Error(Z(327));es();var t=Dc(e,0);if(!(t&1))return En(e,wt()),null;var n=Sd(e,t);if(e.tag!==0&&n===2){var r=zh(e);r!==0&&(t=r,n=ug(e,r))}if(n===1)throw n=zu,Ko(e,0),Xi(e,t),En(e,wt()),n;if(n===6)throw Error(Z(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xo(e,bn,li),En(e,wt()),null}function cg(e,t){var n=Ue;Ue|=1;try{return e(t)}finally{Ue=n,Ue===0&&(Ja=wt()+500,Jc&&Vi())}}function Go(e){Gi!==null&&Gi.tag===0&&!(Ue&6)&&es();var t=Ue;Ue|=1;var n=er.transition,r=qe;try{if(er.transition=null,qe=1,e)return e()}finally{qe=r,er.transition=n,Ue=t,!(Ue&6)&&Vi()}}function dg(){Mn=Za.current,nt(Za)}function Ko(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,v6(n)),Ct!==null)for(n=Ct.return;n!==null;){var r=n;switch(wm(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Qc();break;case 3:Ka(),nt(vn),nt(Gt),Om();break;case 5:Pm(r);break;case 4:Ka();break;case 13:nt(ct);break;case 19:nt(ct);break;case 10:Sm(r.type._context);break;case 22:case 23:dg()}n=n.return}if(Lt=e,Ct=e=Qi(e.current,null),Vt=Mn=t,Nt=0,zu=null,ig=wd=qo=0,bn=Hu=null,$o!==null){for(t=0;t<$o.length;t++)if(n=$o[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}$o=null}return e}function oE(e,t){do{var n=Ct;try{if(Cm(),ld.current=pd,cd){for(var r=dt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}cd=!1}if(Yo=0,Dt=Rt=dt=null,Lu=!1,Mu=0,rg.current=null,n===null||n.return===null){Nt=1,zu=t,Ct=null;break}e:{var o=e,a=n.return,s=n,u=t;if(t=Vt,s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var l=u,c=s,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 p=Nb(a);if(p!==null){p.flags&=-257,Pb(p,a,s,o,t),p.mode&1&&Rb(o,l,t),t=p,u=l;var m=t.updateQueue;if(m===null){var y=new Set;y.add(u),t.updateQueue=y}else m.add(u);break e}else{if(!(t&1)){Rb(o,l,t),fg();break e}u=Error(Z(426))}}else if(ot&&s.mode&1){var b=Nb(a);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Pb(b,a,s,o,t),Tm(Xa(u,s));break e}}o=u=Xa(u,s),Nt!==4&&(Nt=2),Hu===null?Hu=[o]:Hu.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=Ab(o,u,t);eb(o,g);break e;case 1:s=u;var x=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(qi===null||!qi.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var T=kb(o,s,t);eb(o,T);break e}}o=o.return}while(o!==null)}uE(n)}catch(_){t=_,Ct===n&&n!==null&&(Ct=n=n.return);continue}break}while(!0)}function aE(){var e=xd.current;return xd.current=pd,e===null?pd:e}function fg(){(Nt===0||Nt===3||Nt===2)&&(Nt=4),Lt===null||!(qo&268435455)&&!(wd&268435455)||Xi(Lt,Vt)}function Sd(e,t){var n=Ue;Ue|=2;var r=aE();(Lt!==e||Vt!==t)&&(li=null,Ko(e,t));do try{V6();break}catch(i){oE(e,i)}while(!0);if(Cm(),Ue=n,xd.current=r,Ct!==null)throw Error(Z(261));return Lt=null,Vt=0,Nt}function V6(){for(;Ct!==null;)sE(Ct)}function $6(){for(;Ct!==null&&!mD();)sE(Ct)}function sE(e){var t=dE(e.alternate,e,Mn);e.memoizedProps=e.pendingProps,t===null?uE(e):Ct=t,rg.current=null}function uE(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=F6(n,t),n!==null){n.flags&=32767,Ct=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Nt=6,Ct=null;return}}else if(n=M6(n,t,Mn),n!==null){Ct=n;return}if(t=t.sibling,t!==null){Ct=t;return}Ct=t=e}while(t!==null);Nt===0&&(Nt=5)}function Xo(e,t,n){var r=qe,i=er.transition;try{er.transition=null,qe=1,W6(e,t,n,r)}finally{er.transition=i,qe=r}return null}function W6(e,t,n,r){do es();while(Gi!==null);if(Ue&6)throw Error(Z(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Z(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(CD(e,o),e===Lt&&(Ct=Lt=null,Vt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ed||(Ed=!0,fE(Nc,function(){return es(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=er.transition,er.transition=null;var a=qe;qe=1;var s=Ue;Ue|=4,rg.current=null,j6(e,n),Zb(n,e),d6(fm),Fc=!!dm,fm=dm=null,e.current=n,U6(n),gD(),Ue=s,qe=a,er.transition=o}else e.current=n;if(Ed&&(Ed=!1,Gi=e,Td=i),o=e.pendingLanes,o===0&&(qi=null),xD(n.stateNode),En(e,wt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(bd)throw bd=!1,e=ag,ag=null,e;return Td&1&&e.tag!==0&&es(),o=e.pendingLanes,o&1?e===sg?Vu++:(Vu=0,sg=e):Vu=0,Vi(),null}function es(){if(Gi!==null){var e=Xx(Td),t=er.transition,n=qe;try{if(er.transition=null,qe=16>e?16:e,Gi===null)var r=!1;else{if(e=Gi,Gi=null,Td=0,Ue&6)throw Error(Z(331));var i=Ue;for(Ue|=4,ue=e.current;ue!==null;){var o=ue,a=o.child;if(ue.flags&16){var s=o.deletions;if(s!==null){for(var u=0;u<s.length;u++){var l=s[u];for(ue=l;ue!==null;){var c=ue;switch(c.tag){case 0:case 11:case 15:Uu(8,c,o)}var d=c.child;if(d!==null)d.return=c,ue=d;else for(;ue!==null;){c=ue;var f=c.sibling,p=c.return;if(qb(c),c===l){ue=null;break}if(f!==null){f.return=p,ue=f;break}ue=p}}}var m=o.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var b=y.sibling;y.sibling=null,y=b}while(y!==null)}}ue=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,ue=a;else e:for(;ue!==null;){if(o=ue,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Uu(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,ue=g;break e}ue=o.return}}var x=e.current;for(ue=x;ue!==null;){a=ue;var w=a.child;if(a.subtreeFlags&2064&&w!==null)w.return=a,ue=w;else e:for(a=x;ue!==null;){if(s=ue,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:vd(9,s)}}catch(_){gt(s,s.return,_)}if(s===a){ue=null;break e}var T=s.sibling;if(T!==null){T.return=s.return,ue=T;break e}ue=s.return}}if(Ue=i,Vi(),Ir&&typeof Ir.onPostCommitFiberRoot=="function")try{Ir.onPostCommitFiberRoot(Pc,e)}catch{}r=!0}return r}finally{qe=n,er.transition=t}}return!1}function lE(e,t,n){t=Xa(n,t),t=Ab(e,t,1),e=Wi(e,t,1),t=fn(),e!==null&&(pu(e,1,t),En(e,t))}function gt(e,t,n){if(e.tag===3)lE(e,e,n);else for(;t!==null;){if(t.tag===3){lE(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qi===null||!qi.has(r))){e=Xa(n,e),e=kb(t,e,1),t=Wi(t,e,1),e=fn(),t!==null&&(pu(t,1,e),En(t,e));break}}t=t.return}}function Y6(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=fn(),e.pingedLanes|=e.suspendedLanes&n,Lt===e&&(Vt&n)===n&&(Nt===4||Nt===3&&(Vt&130023424)===Vt&&500>wt()-og?Ko(e,0):ig|=n),En(e,t)}function cE(e,t){t===0&&(e.mode&1?(t=Oc,Oc<<=1,!(Oc&130023424)&&(Oc=4194304)):t=1);var n=fn();e=ai(e,t),e!==null&&(pu(e,t,n),En(e,n))}function q6(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cE(e,n)}function G6(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Z(314))}r!==null&&r.delete(t),cE(e,n)}var dE;dE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||vn.current)wn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return wn=!1,L6(e,t,n);wn=!!(e.flags&131072)}else wn=!1,ot&&t.flags&1048576&&$w(t,td,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;gd(e,t),e=t.pendingProps;var i=Ha(t,Gt.current);Ga(t,n),i=Mm(null,t,r,e,i,n);var o=Fm();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xn(r)?(o=!0,Zc(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Rm(t),i.updater=hd,t.stateNode=i,i._reactInternals=t,Vm(t,r,e,n),t=qm(null,t,r,!0,o,n)):(t.tag=0,ot&&o&&xm(t),dn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(gd(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=X6(r),e=gr(r,e),i){case 0:t=Ym(null,t,r,e,n);break e;case 1:t=Fb(null,t,r,e,n);break e;case 11:t=Ib(null,t,r,e,n);break e;case 14:t=Ob(null,t,r,gr(r.type,e),n);break e}throw Error(Z(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gr(r,i),Ym(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gr(r,i),Fb(e,t,r,i,n);case 3:e:{if(Bb(t),e===null)throw Error(Z(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Jw(e,t),sd(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Xa(Error(Z(423)),t),t=jb(e,t,r,n,i);break e}else if(r!==i){i=Xa(Error(Z(424)),t),t=jb(e,t,r,n,i);break e}else for(Ln=Ui(t.stateNode.containerInfo.firstChild),Dn=t,ot=!0,mr=null,n=Qw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wa(),r===i){t=ui(e,t,n);break e}dn(e,t,r,n)}t=t.child}return t;case 5:return nb(t),e===null&&Em(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,pm(r,i)?a=null:o!==null&&pm(r,o)&&(t.flags|=32),Mb(e,t),dn(e,t,a,n),t.child;case 6:return e===null&&Em(t),null;case 13:return Ub(e,t,n);case 4:return Nm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ya(t,null,r,n):dn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gr(r,i),Ib(e,t,r,i,n);case 7:return dn(e,t,t.pendingProps,n),t.child;case 8:return dn(e,t,t.pendingProps.children,n),t.child;case 12:return dn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Je(id,r._currentValue),r._currentValue=a,o!==null)if(hr(o.value,a)){if(o.children===i.children&&!vn.current){t=ui(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=si(-1,n&-n),u.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Am(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Z(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Am(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}dn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ga(t,n),i=Zn(i),r=r(i),t.flags|=1,dn(e,t,r,n),t.child;case 14:return r=t.type,i=gr(r,t.pendingProps),i=gr(r.type,i),Ob(e,t,r,i,n);case 15:return Db(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gr(r,i),gd(e,t),t.tag=1,xn(r)?(e=!0,Zc(t)):e=!1,Ga(t,n),Cb(t,r,i),Vm(t,r,i,n),qm(null,t,r,!0,e,n);case 19:return Hb(e,t,n);case 22:return Lb(e,t,n)}throw Error(Z(156,t.tag))};function fE(e,t){return Wx(e,t)}function K6(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tr(e,t,n,r){return new K6(e,t,n,r)}function pg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function X6(e){if(typeof e=="function")return pg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xh)return 11;if(e===Eh)return 14}return 2}function Qi(e,t){var n=e.alternate;return n===null?(n=tr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ad(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")pg(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ra:return Qo(n.children,i,o,t);case yh:a=8,i|=8;break;case vh:return e=tr(12,n,t,i|2),e.elementType=vh,e.lanes=o,e;case wh:return e=tr(13,n,t,i),e.elementType=wh,e.lanes=o,e;case bh:return e=tr(19,n,t,i),e.elementType=bh,e.lanes=o,e;case bx:return kd(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xx:a=10;break e;case wx:a=9;break e;case xh:a=11;break e;case Eh:a=14;break e;case Ii:a=16,r=null;break e}throw Error(Z(130,e==null?e:typeof e,""))}return t=tr(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Qo(e,t,n,r){return e=tr(7,e,r,t),e.lanes=n,e}function kd(e,t,n,r){return e=tr(22,e,r,t),e.elementType=bx,e.lanes=n,e.stateNode={isHidden:!1},e}function hg(e,t,n){return e=tr(6,e,null,t),e.lanes=n,e}function mg(e,t,n){return t=tr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Q6(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hh(0),this.expirationTimes=Hh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gg(e,t,n,r,i,o,a,s,u){return e=new Q6(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=tr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rm(o),e}function Z6(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ka,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function pE(e){if(!e)return Hi;e=e._reactInternals;e:{if(jo(e)!==e||e.tag!==1)throw Error(Z(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(xn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Z(171))}if(e.tag===1){var n=e.type;if(xn(n))return zw(e,n,t)}return t}function hE(e,t,n,r,i,o,a,s,u){return e=gg(n,r,!0,e,i,o,a,s,u),e.context=pE(null),n=e.current,r=fn(),i=Ki(n),o=si(r,i),o.callback=t??null,Wi(n,o,i),e.current.lanes=i,pu(e,i,r),En(e,r),e}function Rd(e,t,n,r){var i=t.current,o=fn(),a=Ki(i);return n=pE(n),t.context===null?t.context=n:t.pendingContext=n,t=si(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Wi(i,t,a),e!==null&&(xr(e,i,a,o),ad(e,i,a)),a}function Nd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function mE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function yg(e,t){mE(e,t),(e=e.alternate)&&mE(e,t)}function J6(){return null}var gE=typeof reportError=="function"?reportError:function(e){console.error(e)};function vg(e){this._internalRoot=e}Pd.prototype.render=vg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Z(409));Rd(e,t,null,null)},Pd.prototype.unmount=vg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Go(function(){Rd(null,e,null,null)}),t[ni]=null}};function Pd(e){this._internalRoot=e}Pd.prototype.unstable_scheduleHydration=function(e){if(e){var t=Jx();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Fi.length&&t!==0&&t<Fi[n].priority;n++);Fi.splice(n,0,e),n===0&&nw(e)}};function xg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Id(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function yE(){}function eL(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var l=Nd(a);o.call(l)}}var a=hE(t,r,e,0,null,!1,!1,"",yE);return e._reactRootContainer=a,e[ni]=a.current,Au(e.nodeType===8?e.parentNode:e),Go(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var l=Nd(u);s.call(l)}}var u=gg(e,0,!1,null,null,!1,!1,"",yE);return e._reactRootContainer=u,e[ni]=u.current,Au(e.nodeType===8?e.parentNode:e),Go(function(){Rd(t,u,n,r)}),u}function Od(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var u=Nd(a);s.call(u)}}Rd(t,a,e,i)}else a=eL(n,t,e,i,r);return Nd(a)}Qx=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=fu(t.pendingLanes);n!==0&&(Vh(t,n|1),En(t,wt()),!(Ue&6)&&(Ja=wt()+500,Vi()))}break;case 13:Go(function(){var r=ai(e,1);if(r!==null){var i=fn();xr(r,e,1,i)}}),yg(e,1)}},$h=function(e){if(e.tag===13){var t=ai(e,134217728);if(t!==null){var n=fn();xr(t,e,134217728,n)}yg(e,134217728)}},Zx=function(e){if(e.tag===13){var t=Ki(e),n=ai(e,t);if(n!==null){var r=fn();xr(n,e,t,r)}yg(e,t)}},Jx=function(){return qe},ew=function(e,t){var n=qe;try{return qe=e,t()}finally{qe=n}},Mh=function(e,t,n){switch(t){case"input":if(kh(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Xc(r);if(!i)throw Error(Z(90));_x(r),kh(r,i)}}}break;case"textarea":Rx(e,n);break;case"select":t=n.value,t!=null&&Na(e,!!n.multiple,t,!1)}},Bx=cg,jx=Go;var tL={usingClientEntryPoint:!1,Events:[Nu,Ua,Xc,Mx,Fx,cg]},$u={findFiberByHostInstance:Uo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nL={bundleType:$u.bundleType,version:$u.version,rendererPackageName:$u.rendererPackageName,rendererConfig:$u.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ti.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Vx(e),e===null?null:e.stateNode},findFiberByHostInstance:$u.findFiberByHostInstance||J6,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 Dd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dd.isDisabled&&Dd.supportsFiber)try{Pc=Dd.inject(nL),Ir=Dd}catch{}}Pn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tL,Pn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!xg(t))throw Error(Z(200));return Z6(e,t,null,n)},Pn.createRoot=function(e,t){if(!xg(e))throw Error(Z(299));var n=!1,r="",i=gE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=gg(e,1,!1,null,null,n,!1,r,i),e[ni]=t.current,Au(e.nodeType===8?e.parentNode:e),new vg(t)},Pn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Z(188)):(e=Object.keys(e).join(","),Error(Z(268,e)));return e=Vx(t),e=e===null?null:e.stateNode,e},Pn.flushSync=function(e){return Go(e)},Pn.hydrate=function(e,t,n){if(!Id(t))throw Error(Z(200));return Od(null,e,t,!0,n)},Pn.hydrateRoot=function(e,t,n){if(!xg(e))throw Error(Z(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=gE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=hE(t,null,e,1,n??null,i,!1,o,a),e[ni]=t.current,Au(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Pd(t)},Pn.render=function(e,t,n){if(!Id(t))throw Error(Z(200));return Od(null,e,t,!1,n)},Pn.unmountComponentAtNode=function(e){if(!Id(e))throw Error(Z(40));return e._reactRootContainer?(Go(function(){Od(null,null,e,!1,function(){e._reactRootContainer=null,e[ni]=null})}),!0):!1},Pn.unstable_batchedUpdates=cg,Pn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Id(n))throw Error(Z(200));if(e==null||e._reactInternals===void 0)throw Error(Z(38));return Od(e,t,n,!1,r)},Pn.version="18.3.1-next-f1338f8080-20240426";function vE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vE)}catch(e){console.error(e)}}vE(),px.exports=Pn;var Zo=px.exports,xE,wE=Zo;xE=wE.createRoot,wE.hydrateRoot;const bE="3.0.40";function Ld(e){"@babel/helpers - typeof";return Ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ld(e)}var rL=/^\s+/,iL=/\s+$/;function fe(e,t){if(e=e||"",t=t||{},e instanceof fe)return e;if(!(this instanceof fe))return new fe(e,t);var n=oL(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}fe.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,o,a,s;return n=t.r/255,r=t.g/255,i=t.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*a+.0722*s},setAlpha:function(t){return this._a=AE(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=TE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=TE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=EE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=EE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return _E(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return lL(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(at(this._r,255)*100)+"%",g:Math.round(at(this._g,255)*100)+"%",b:Math.round(at(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(at(this._r,255)*100)+"%, "+Math.round(at(this._g,255)*100)+"%, "+Math.round(at(this._b,255)*100)+"%)":"rgba("+Math.round(at(this._r,255)*100)+"%, "+Math.round(at(this._g,255)*100)+"%, "+Math.round(at(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:bL[_E(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+CE(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=fe(t);r="#"+CE(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return fe(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(pL,arguments)},brighten:function(){return this._applyModification(hL,arguments)},darken:function(){return this._applyModification(mL,arguments)},desaturate:function(){return this._applyModification(cL,arguments)},saturate:function(){return this._applyModification(dL,arguments)},greyscale:function(){return this._applyModification(fL,arguments)},spin:function(){return this._applyModification(gL,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(xL,arguments)},complement:function(){return this._applyCombination(yL,arguments)},monochromatic:function(){return this._applyCombination(wL,arguments)},splitcomplement:function(){return this._applyCombination(vL,arguments)},triad:function(){return this._applyCombination(SE,[3])},tetrad:function(){return this._applyCombination(SE,[4])}},fe.fromRatio=function(e,t){if(Ld(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Wu(e[r]));e=n}return fe(e,t)};function oL(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=CL(e)),Ld(e)=="object"&&(ci(e.r)&&ci(e.g)&&ci(e.b)?(t=aL(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ci(e.h)&&ci(e.s)&&ci(e.v)?(r=Wu(e.s),i=Wu(e.v),t=uL(e.h,r,i),a=!0,s="hsv"):ci(e.h)&&ci(e.s)&&ci(e.l)&&(r=Wu(e.s),o=Wu(e.l),t=sL(e.h,r,o),a=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=AE(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function aL(e,t,n){return{r:at(e,255)*255,g:at(t,255)*255,b:at(n,255)*255}}function EE(e,t,n){e=at(e,255),t=at(t,255),n=at(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,a,s=(r+i)/2;if(r==i)o=a=0;else{var u=r-i;switch(a=s>.5?u/(2-r-i):u/(r+i),r){case e:o=(t-n)/u+(t<n?6:0);break;case t:o=(n-e)/u+2;break;case n:o=(e-t)/u+4;break}o/=6}return{h:o,s:a,l:s}}function sL(e,t,n){var r,i,o;e=at(e,360),t=at(t,100),n=at(n,100);function a(l,c,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?l+(c-l)*6*d:d<1/2?c:d<2/3?l+(c-l)*(2/3-d)*6:l}if(t===0)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=a(u,s,e+1/3),i=a(u,s,e),o=a(u,s,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function TE(e,t,n){e=at(e,255),t=at(t,255),n=at(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,a,s=r,u=r-i;if(a=r===0?0:u/r,r==i)o=0;else{switch(r){case e:o=(t-n)/u+(t<n?6:0);break;case t:o=(n-e)/u+2;break;case n:o=(e-t)/u+4;break}o/=6}return{h:o,s:a,v:s}}function uL(e,t,n){e=at(e,360)*6,t=at(t,100),n=at(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),u=r%6,l=[n,a,o,o,s,n][u],c=[s,n,n,a,o,o][u],d=[o,o,s,n,n,a][u];return{r:l*255,g:c*255,b:d*255}}function _E(e,t,n,r){var i=[wr(Math.round(e).toString(16)),wr(Math.round(t).toString(16)),wr(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function lL(e,t,n,r,i){var o=[wr(Math.round(e).toString(16)),wr(Math.round(t).toString(16)),wr(Math.round(n).toString(16)),wr(kE(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function CE(e,t,n,r){var i=[wr(kE(r)),wr(Math.round(e).toString(16)),wr(Math.round(t).toString(16)),wr(Math.round(n).toString(16))];return i.join("")}fe.equals=function(e,t){return!e||!t?!1:fe(e).toRgbString()==fe(t).toRgbString()},fe.random=function(){return fe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function cL(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s-=t/100,n.s=Md(n.s),fe(n)}function dL(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s+=t/100,n.s=Md(n.s),fe(n)}function fL(e){return fe(e).desaturate(100)}function pL(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l+=t/100,n.l=Md(n.l),fe(n)}function hL(e,t){t=t===0?0:t||10;var n=fe(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),fe(n)}function mL(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l-=t/100,n.l=Md(n.l),fe(n)}function gL(e,t){var n=fe(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,fe(n)}function yL(e){var t=fe(e).toHsl();return t.h=(t.h+180)%360,fe(t)}function SE(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=fe(e).toHsl(),r=[fe(e)],i=360/t,o=1;o<t;o++)r.push(fe({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function vL(e){var t=fe(e).toHsl(),n=t.h;return[fe(e),fe({h:(n+72)%360,s:t.s,l:t.l}),fe({h:(n+216)%360,s:t.s,l:t.l})]}function xL(e,t,n){t=t||6,n=n||30;var r=fe(e).toHsl(),i=360/n,o=[fe(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(fe(r));return o}function wL(e,t){t=t||6;for(var n=fe(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(fe({h:r,s:i,v:o})),o=(o+s)%1;return a}fe.mix=function(e,t,n){n=n===0?0:n||50;var r=fe(e).toRgb(),i=fe(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return fe(a)},fe.readability=function(e,t){var n=fe(e),r=fe(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},fe.isReadable=function(e,t,n){var r=fe.readability(e,t),i,o;switch(o=!1,i=SL(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},fe.mostReadable=function(e,t,n){var r=null,i=0,o,a,s,u;n=n||{},a=n.includeFallbackColors,s=n.level,u=n.size;for(var l=0;l<t.length;l++)o=fe.readability(e,t[l]),o>i&&(i=o,r=fe(t[l]));return fe.isReadable(e,r,{level:s,size:u})||!a?r:(n.includeFallbackColors=!1,fe.mostReadable(e,["#fff","#000"],n))};var wg=fe.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},bL=fe.hexNames=EL(wg);function EL(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function AE(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function at(e,t){TL(e)&&(e="100%");var n=_L(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Md(e){return Math.min(1,Math.max(0,e))}function Fn(e){return parseInt(e,16)}function TL(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function _L(e){return typeof e=="string"&&e.indexOf("%")!=-1}function wr(e){return e.length==1?"0"+e:""+e}function Wu(e){return e<=1&&(e=e*100+"%"),e}function kE(e){return Math.round(parseFloat(e)*255).toString(16)}function RE(e){return Fn(e)/255}var br=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ci(e){return!!br.CSS_UNIT.exec(e)}function CL(e){e=e.replace(rL,"").replace(iL,"").toLowerCase();var t=!1;if(wg[e])e=wg[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=br.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=br.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=br.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=br.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=br.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=br.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=br.hex8.exec(e))?{r:Fn(n[1]),g:Fn(n[2]),b:Fn(n[3]),a:RE(n[4]),format:t?"name":"hex8"}:(n=br.hex6.exec(e))?{r:Fn(n[1]),g:Fn(n[2]),b:Fn(n[3]),format:t?"name":"hex"}:(n=br.hex4.exec(e))?{r:Fn(n[1]+""+n[1]),g:Fn(n[2]+""+n[2]),b:Fn(n[3]+""+n[3]),a:RE(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=br.hex3.exec(e))?{r:Fn(n[1]+""+n[1]),g:Fn(n[2]+""+n[2]),b:Fn(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function SL(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}const AL=350,NE=400,PE=600,bg={widgetMinHeight:"min-h-[400px]",widgetMaxHeight:"max-h-[600px]",widgetHeight:"h-[600px]"},IE=({primary:e="hsl(0, 0%, 0%)"})=>{const t=fe(e).toHsl(),n=fe(e).isLight()?"240 10% 3.9%":"0 0% 100%";return{"--opencx-primary":`${t.h} ${t.s*100}% ${t.l*100}%`,"--opencx-primary-foreground":n,"--opencx-background":"0 0% 100%","--opencx-foreground":"240 10% 3.9%","--opencx-accent":"240 4.8% 95.9%","--opencx-accent-foreground":"240 5.9% 10%","--opencx-destructive":"0 84.2% 60.2%","--opencx-destructive-foreground":"0 0% 98%","--opencx-secondary":"240 4.8% 95.9%","--opencx-secondary-foreground":"240 5.9% 10%","--opencx-muted":"240 4.8% 95.9%","--opencx-muted-foreground":"240 3.8% 46.1%","--opencx-input":"240 5.9% 90%","--opencx-border":"240 5.9% 90%","--opencx-ring":"240 5.9% 10%"}};function kL(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function Yu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Eg=e=>Array.isArray(e);function OE(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function qu(e){return typeof e=="string"||Array.isArray(e)}function DE(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Tg(e,t,n,r){if(typeof t=="function"){const[i,o]=DE(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=DE(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function Fd(e,t,n){const r=e.getProps();return Tg(r,t,n!==void 0?n:r.custom,e)}const _g=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Cg=["initial",..._g],Gu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Zi=new Set(Gu),di=e=>e*1e3,fi=e=>e/1e3,RL={type:"spring",stiffness:500,damping:25,restSpeed:10},NL=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),PL={type:"keyframes",duration:.8},IL={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},OL=(e,{keyframes:t})=>t.length>2?PL:Zi.has(e)?e.startsWith("scale")?NL(t[1]):RL:IL;function Sg(e,t){return e?e[t]||e.default||e:void 0}const DL={skipAnimations:!1,useManualTiming:!1},LL=e=>e!==null;function Bd(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(LL),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const Zt=e=>e;function ML(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(l){o.has(l)&&(u.schedule(l),e()),l(a)}const u={schedule:(l,c=!1,d=!1)=>{const p=d&&r?t:n;return c&&o.add(l),p.has(l)||p.add(l),l},cancel:l=>{n.delete(l),o.delete(l)},process:l=>{if(a=l,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,i&&(i=!1,u.process(l))}};return u}const jd=["read","resolveKeyframes","update","preRender","render","postRender"],FL=40;function LE(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=jd.reduce((g,x)=>(g[x]=ML(o),g),{}),{read:s,resolveKeyframes:u,update:l,preRender:c,render:d,postRender:f}=a,p=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,FL),1),i.timestamp=g,i.isProcessing=!0,s.process(i),u.process(i),l.process(i),c.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:jd.reduce((g,x)=>{const w=a[x];return g[x]=(T,_=!1,C=!1)=>(n||m(),w.schedule(T,_,C)),g},{}),cancel:g=>{for(let x=0;x<jd.length;x++)a[jd[x]].cancel(g)},state:i,steps:a}}const{schedule:Xe,cancel:Ji,state:$t,steps:Ag}=LE(typeof requestAnimationFrame<"u"?requestAnimationFrame:Zt,!0),ME=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,BL=1e-7,jL=12;function UL(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=ME(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>BL&&++s<jL);return a}function Ku(e,t,n,r){if(e===t&&n===r)return Zt;const i=o=>UL(o,0,1,e,n);return o=>o===0||o===1?o:ME(i(o),t,r)}const FE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,BE=e=>t=>1-e(1-t),jE=Ku(.33,1.53,.69,.99),kg=BE(jE),UE=FE(kg),zE=e=>(e*=2)<1?.5*kg(e):.5*(2-Math.pow(2,-10*(e-1))),Rg=e=>1-Math.sin(Math.acos(e)),HE=BE(Rg),VE=FE(Rg),$E=e=>/^0[^.\s]+$/u.test(e);function zL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$E(e):!0}let Ng=Zt;const WE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),YE=e=>t=>typeof t=="string"&&t.startsWith(e),qE=YE("--"),HL=YE("var(--"),Pg=e=>HL(e)?VL.test(e.split("/*")[0].trim()):!1,VL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$L=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function WL(e){const t=$L.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function GE(e,t,n=1){const[r,i]=WL(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return WE(a)?parseFloat(a):a}return Pg(i)?GE(i,t,n+1):i}const eo=(e,t,n)=>n>t?t:n<e?e:n,ts={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Xu={...ts,transform:e=>eo(0,1,e)},Ud={...ts,default:1},Qu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),to=Qu("deg"),Fr=Qu("%"),ye=Qu("px"),YL=Qu("vh"),qL=Qu("vw"),KE={...Fr,parse:e=>Fr.parse(e)/100,transform:e=>Fr.transform(e*100)},GL=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),XE=e=>e===ts||e===ye,QE=(e,t)=>parseFloat(e.split(", ")[t]),ZE=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return QE(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?QE(o[1],e):0}},KL=new Set(["x","y","z"]),XL=Gu.filter(e=>!KL.has(e));function QL(e){const t=[];return XL.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ns={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:ZE(4,13),y:ZE(5,14)};ns.translateX=ns.x,ns.translateY=ns.y;const JE=e=>t=>t.test(e),eT=[ts,ye,Fr,to,qL,YL,{test:e=>e==="auto",parse:e=>e}],tT=e=>eT.find(JE(e)),Jo=new Set;let Ig=!1,Og=!1;function nT(){if(Og){const e=Array.from(Jo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=QL(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{var s;(s=r.getValue(o))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Og=!1,Ig=!1,Jo.forEach(e=>e.complete()),Jo.clear()}function rT(){Jo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Og=!0)})}function ZL(){rT(),nT()}class Dg{constructor(t,n,r,i,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Jo.add(this),Ig||(Ig=!0,Xe.read(rT),Xe.resolveKeyframes(nT))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const a=i==null?void 0:i.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const u=r.readValue(n,s);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=s),i&&a===void 0&&i.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Jo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Jo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Zu=e=>Math.round(e*1e5)/1e5,Lg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function JL(e){return e==null}const e4=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Mg=(e,t)=>n=>!!(typeof n=="string"&&e4.test(n)&&n.startsWith(e)||t&&!JL(n)&&Object.prototype.hasOwnProperty.call(n,t)),iT=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,s]=r.match(Lg);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},t4=e=>eo(0,255,e),Fg={...ts,transform:e=>Math.round(t4(e))},ea={test:Mg("rgb","red"),parse:iT("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Fg.transform(e)+", "+Fg.transform(t)+", "+Fg.transform(n)+", "+Zu(Xu.transform(r))+")"};function n4(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Bg={test:Mg("#"),parse:n4,transform:ea.transform},rs={test:Mg("hsl","hue"),parse:iT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Fr.transform(Zu(t))+", "+Fr.transform(Zu(n))+", "+Zu(Xu.transform(r))+")"},Jt={test:e=>ea.test(e)||Bg.test(e)||rs.test(e),parse:e=>ea.test(e)?ea.parse(e):rs.test(e)?rs.parse(e):Bg.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ea.transform(e):rs.transform(e)},r4=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function i4(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Lg))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(r4))===null||n===void 0?void 0:n.length)||0)>0}const oT="number",aT="color",o4="var",a4="var(",sT="${}",s4=/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 Ju(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(s4,u=>(Jt.test(u)?(r.color.push(o),i.push(aT),n.push(Jt.parse(u))):u.startsWith(a4)?(r.var.push(o),i.push(o4),n.push(u)):(r.number.push(o),i.push(oT),n.push(parseFloat(u))),++o,sT)).split(sT);return{values:n,split:s,indexes:r,types:i}}function uT(e){return Ju(e).values}function lT(e){const{split:t,types:n}=Ju(e),r=t.length;return i=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],i[a]!==void 0){const s=n[a];s===oT?o+=Zu(i[a]):s===aT?o+=Jt.transform(i[a]):o+=i[a]}return o}}const u4=e=>typeof e=="number"?0:e;function l4(e){const t=uT(e);return lT(e)(t.map(u4))}const no={test:i4,parse:uT,createTransformer:lT,getAnimatableNone:l4},c4=new Set(["brightness","contrast","saturate","opacity"]);function d4(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Lg)||[];if(!r)return e;const i=n.replace(r,"");let o=c4.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const f4=/\b([a-z-]*)\(.*?\)/gu,jg={...no,getAnimatableNone:e=>{const t=e.match(f4);return t?t.map(d4).join(" "):e}},p4={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},h4={rotate:to,rotateX:to,rotateY:to,rotateZ:to,scale:Ud,scaleX:Ud,scaleY:Ud,scaleZ:Ud,skew:to,skewX:to,skewY:to,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Xu,originX:KE,originY:KE,originZ:ye},cT={...ts,transform:Math.round},Ug={...p4,...h4,zIndex:cT,size:ye,fillOpacity:Xu,strokeOpacity:Xu,numOctaves:cT},m4={...Ug,color:Jt,backgroundColor:Jt,outlineColor:Jt,fill:Jt,stroke:Jt,borderColor:Jt,borderTopColor:Jt,borderRightColor:Jt,borderBottomColor:Jt,borderLeftColor:Jt,filter:jg,WebkitFilter:jg},zg=e=>m4[e];function dT(e,t){let n=zg(e);return n!==jg&&(n=no),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const g4=new Set(["auto","none","0"]);function y4(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!g4.has(o)&&Ju(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=dT(n,i)}class fT extends Dg{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let l=t[u];if(typeof l=="string"&&(l=l.trim(),Pg(l))){const c=GE(l,n.current);c!==void 0&&(t[u]=c),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!GL.has(r)||t.length!==2)return;const[i,o]=t,a=tT(i),s=tT(o);if(a!==s)if(XE(a)&&XE(s))for(let u=0;u<t.length;u++){const l=t[u];typeof l=="string"&&(t[u]=parseFloat(l))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)zL(t[i])&&r.push(i);r.length&&y4(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ns[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const a=i.length-1,s=i[a];i[a]=ns[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([u,l])=>{n.getValue(u).set(l)}),this.resolveNoneKeyframes()}}function Hg(e){return typeof e=="function"}let zd;function v4(){zd=void 0}const Br={now:()=>(zd===void 0&&Br.set($t.isProcessing||DL.useManualTiming?$t.timestamp:performance.now()),zd),set:e=>{zd=e,queueMicrotask(v4)}},pT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(no.test(e)||e==="0")&&!e.startsWith("url("));function x4(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function w4(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=pT(i,t),s=pT(o,t);return!a||!s?!1:x4(e)||(n==="spring"||Hg(n))&&r}const b4=40;class hT{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Br.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>b4?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&ZL(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Br.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:a,onComplete:s,onUpdate:u,isGenerator:l}=this.options;if(!l&&!w4(t,r,i,o))if(a)this.options.duration=0;else{u==null||u(Bd(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function mT(e,t){return t?e*(1e3/t):0}const E4=5;function gT(e,t,n){const r=Math.max(t-E4,0);return mT(n-e(r),t-r)}const Vg=.001,T4=.01,_4=10,C4=.05,S4=1;function A4({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,a=1-t;a=eo(C4,S4,a),e=eo(T4,_4,fi(e)),a<1?(i=l=>{const c=l*a,d=c*e,f=c-n,p=$g(l,a),m=Math.exp(-d);return Vg-f/p*m},o=l=>{const d=l*a*e,f=d*n+n,p=Math.pow(a,2)*Math.pow(l,2)*e,m=Math.exp(-d),y=$g(Math.pow(l,2),a);return(-i(l)+Vg>0?-1:1)*((f-p)*m)/y}):(i=l=>{const c=Math.exp(-l*e),d=(l-n)*e+1;return-Vg+c*d},o=l=>{const c=Math.exp(-l*e),d=(n-l)*(e*e);return c*d});const s=5/e,u=R4(i,o,s);if(e=di(e),isNaN(u))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const k4=12;function R4(e,t,n){let r=n;for(let i=1;i<k4;i++)r=r-e(r)/t(r);return r}function $g(e,t){return e*Math.sqrt(1-t*t)}const N4=["duration","bounce"],P4=["stiffness","damping","mass"];function yT(e,t){return t.some(n=>e[n]!==void 0)}function I4(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!yT(e,P4)&&yT(e,N4)){const n=A4(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function vT({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:s,damping:u,mass:l,duration:c,velocity:d,isResolvedFromDuration:f}=I4({...r,velocity:-fi(r.velocity||0)}),p=d||0,m=u/(2*Math.sqrt(s*l)),y=o-i,b=fi(Math.sqrt(s/l)),g=Math.abs(y)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let x;if(m<1){const w=$g(b,m);x=T=>{const _=Math.exp(-m*b*T);return o-_*((p+m*b*y)/w*Math.sin(w*T)+y*Math.cos(w*T))}}else if(m===1)x=w=>o-Math.exp(-b*w)*(y+(p+b*y)*w);else{const w=b*Math.sqrt(m*m-1);x=T=>{const _=Math.exp(-m*b*T),C=Math.min(w*T,300);return o-_*((p+m*b*y)*Math.sinh(C)+w*y*Math.cosh(C))/w}}return{calculatedDuration:f&&c||null,next:w=>{const T=x(w);if(f)a.done=w>=c;else{let _=0;m<1&&(_=w===0?di(p):gT(x,w,T));const C=Math.abs(_)<=n,R=Math.abs(o-T)<=t;a.done=C&&R}return a.value=a.done?o:T,a}}}function xT({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:u,restDelta:l=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=O=>s!==void 0&&O<s||u!==void 0&&O>u,m=O=>s===void 0?u:u===void 0||Math.abs(s-O)<Math.abs(u-O)?s:u;let y=n*t;const b=d+y,g=a===void 0?b:a(b);g!==b&&(y=g-d);const x=O=>-y*Math.exp(-O/r),w=O=>g+x(O),T=O=>{const V=x(O),P=w(O);f.done=Math.abs(V)<=l,f.value=f.done?g:P};let _,C;const R=O=>{p(f.value)&&(_=O,C=vT({keyframes:[f.value,m(f.value)],velocity:gT(w,O,f.value),damping:i,stiffness:o,restDelta:l,restSpeed:c}))};return R(0),{calculatedDuration:null,next:O=>{let V=!1;return!C&&_===void 0&&(V=!0,T(O),R(O)),_!==void 0&&O>=_?C.next(O-_):(!V&&T(O),f)}}}const O4=Ku(.42,0,1,1),D4=Ku(0,0,.58,1),wT=Ku(.42,0,.58,1),L4=e=>Array.isArray(e)&&typeof e[0]!="number",Wg=e=>Array.isArray(e)&&typeof e[0]=="number",bT={linear:Zt,easeIn:O4,easeInOut:wT,easeOut:D4,circIn:Rg,circInOut:VE,circOut:HE,backIn:kg,backInOut:UE,backOut:jE,anticipate:zE},ET=e=>{if(Wg(e)){Ng(e.length===4);const[t,n,r,i]=e;return Ku(t,n,r,i)}else if(typeof e=="string")return Ng(bT[e]!==void 0),bT[e];return e},M4=(e,t)=>n=>t(e(n)),pi=(...e)=>e.reduce(M4),is=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ft=(e,t,n)=>e+(t-e)*n;function Yg(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function F4({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;i=Yg(u,s,e+1/3),o=Yg(u,s,e),a=Yg(u,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function Hd(e,t){return n=>n>0?t:e}const qg=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},B4=[Bg,ea,rs],j4=e=>B4.find(t=>t.test(e));function TT(e){const t=j4(e);if(!t)return!1;let n=t.parse(e);return t===rs&&(n=F4(n)),n}const _T=(e,t)=>{const n=TT(e),r=TT(t);if(!n||!r)return Hd(e,t);const i={...n};return o=>(i.red=qg(n.red,r.red,o),i.green=qg(n.green,r.green,o),i.blue=qg(n.blue,r.blue,o),i.alpha=ft(n.alpha,r.alpha,o),ea.transform(i))},Gg=new Set(["none","hidden"]);function U4(e,t){return Gg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function z4(e,t){return n=>ft(e,t,n)}function Kg(e){return typeof e=="number"?z4:typeof e=="string"?Pg(e)?Hd:Jt.test(e)?_T:$4:Array.isArray(e)?CT:typeof e=="object"?Jt.test(e)?_T:H4:Hd}function CT(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>Kg(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}}function H4(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Kg(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function V4(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],s=e.indexes[a][i[a]],u=(n=e.values[s])!==null&&n!==void 0?n:0;r[o]=u,i[a]++}return r}const $4=(e,t)=>{const n=no.createTransformer(t),r=Ju(e),i=Ju(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Gg.has(e)&&!i.values.length||Gg.has(t)&&!r.values.length?U4(e,t):pi(CT(V4(r,i),i.values),n):Hd(e,t)};function ST(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ft(e,t,n):Kg(e)(e,t)}function W4(e,t,n){const r=[],i=n||ST,o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]||Zt:t;s=pi(u,s)}r.push(s)}return r}function Y4(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Ng(o===t.length),o===1)return()=>t[0];if(o===2&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=W4(t,r,i),s=a.length,u=l=>{let c=0;if(s>1)for(;c<e.length-2&&!(l<e[c+1]);c++);const d=is(e[c],e[c+1],l);return a[c](d)};return n?l=>u(eo(e[0],e[o-1],l)):u}function q4(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=is(0,t,r);e.push(ft(n,1,i))}}function G4(e){const t=[0];return q4(t,e.length-1),t}function K4(e,t){return e.map(n=>n*t)}function X4(e,t){return e.map(()=>t||wT).splice(0,e.length-1)}function Vd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=L4(r)?r.map(ET):ET(r),o={done:!1,value:t[0]},a=K4(n&&n.length===t.length?n:G4(t),e),s=Y4(a,t,{ease:Array.isArray(i)?i:X4(t,i)});return{calculatedDuration:e,next:u=>(o.value=s(u),o.done=u>=e,o)}}const AT=2e4;function Q4(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<AT;)t+=n,r=e.next(t);return t>=AT?1/0:t}const Z4=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Xe.update(t,!0),stop:()=>Ji(t),now:()=>$t.isProcessing?$t.timestamp:Br.now()}},J4={decay:xT,inertia:xT,tween:Vd,keyframes:Vd,spring:vT},eM=e=>e/100;class Xg extends hT{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:u}=this.options;u&&u()};const{name:n,motionValue:r,element:i,keyframes:o}=this.options,a=(i==null?void 0:i.KeyframeResolver)||Dg,s=(u,l)=>this.onKeyframesResolved(u,l);this.resolver=new a(o,s,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=this.options,s=Hg(n)?n:J4[n]||Vd;let u,l;s!==Vd&&typeof t[0]!="number"&&(u=pi(eM,ST(t[0],t[1])),t=[0,100]);const c=s({...this.options,keyframes:t});o==="mirror"&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Q4(c));const{calculatedDuration:d}=c,f=d+i,p=f*(r+1)-i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:u,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:u,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return o.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:y,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let w=this.currentTime,T=o;if(p){const O=Math.min(this.currentTime,c)/d;let V=Math.floor(O),P=O%1;!P&&O>=1&&(P=1),P===1&&V--,V=Math.min(V,p+1),!!(V%2)&&(m==="reverse"?(P=1-P,y&&(P-=y/d)):m==="mirror"&&(T=a)),w=eo(0,1,P)*d}const _=x?{done:!1,value:u[0]}:T.next(w);s&&(_.value=s(_.value));let{done:C}=_;!x&&l!==null&&(C=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return R&&i!==void 0&&(_.value=Bd(u,this.options,i)),b&&b(_.value),R&&this.finish(),_}get duration(){const{resolved:t}=this;return t?fi(t.calculatedDuration):0}get time(){return fi(this.currentTime)}set time(t){t=di(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=fi(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Z4,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const kT=new Set(["opacity","clipPath","filter","transform"]),tM=10,nM=(e,t)=>{let n="";const r=Math.max(Math.round(t/tM),2);for(let i=0;i<r;i++)n+=e(is(0,r-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function Qg(e){let t;return()=>(t===void 0&&(t=e()),t)}const rM={linearEasing:void 0};function iM(e,t){const n=Qg(e);return()=>{var r;return(r=rM[t])!==null&&r!==void 0?r:n()}}const $d=iM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function RT(e){return!!(typeof e=="function"&&$d()||!e||typeof e=="string"&&(e in Zg||$d())||Wg(e)||Array.isArray(e)&&e.every(RT))}const el=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Zg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:el([0,.65,.55,1]),circOut:el([.55,0,1,.45]),backIn:el([.31,.01,.66,-.59]),backOut:el([.33,1.53,.69,.99])};function NT(e,t){if(e)return typeof e=="function"&&$d()?nM(e,t):Wg(e)?el(e):Array.isArray(e)?e.map(n=>NT(n,t)||Zg.easeOut):Zg[e]}function oM(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s,times:u}={}){const l={[t]:n};u&&(l.offset=u);const c=NT(s,i);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}function PT(e,t){e.timeline=t,e.onfinish=null}const aM=Qg(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Wd=10,sM=2e4;function uM(e){return Hg(e.type)||e.type==="spring"||!RT(e.ease)}function lM(e,t){const n=new Xg({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&o<sM;)r=n.sample(o),i.push(r.value),o+=Wd;return{times:void 0,keyframes:i,duration:o-Wd,ease:"linear"}}const IT={anticipate:zE,backInOut:UE,circInOut:VE};function cM(e){return e in IT}class OT extends hT{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:o}=this.options;this.resolver=new fT(o,(a,s)=>this.onKeyframesResolved(a,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:o,ease:a,type:s,motionValue:u,name:l,startTime:c}=this.options;if(!(!((r=u.owner)===null||r===void 0)&&r.current))return!1;if(typeof a=="string"&&$d()&&cM(a)&&(a=IT[a]),uM(this.options)){const{onComplete:f,onUpdate:p,motionValue:m,element:y,...b}=this.options,g=lM(t,b);t=g.keyframes,t.length===1&&(t[1]=t[0]),i=g.duration,o=g.times,a=g.ease,s="keyframes"}const d=oM(u.owner.current,l,t,{...this.options,duration:i,times:o,ease:a});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(PT(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;u.set(Bd(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:o,type:s,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return fi(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return fi(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=di(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Zt;const{animation:r}=n;PT(r,t)}return Zt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:o,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:c,onComplete:d,element:f,...p}=this.options,m=new Xg({...p,keyframes:r,duration:i,type:o,ease:a,times:s,isGenerator:!0}),y=di(this.time);l.setWithVelocity(m.sample(y-Wd).value,m.sample(y).value,Wd)}const{onStop:u}=this.options;u&&u(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:a,type:s}=t;return aM()&&r&&kT.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&a!==0&&s!=="inertia"}}const dM=Qg(()=>window.ScrollTimeline!==void 0);class fM{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>dM()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,o)=>{i&&i(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function pM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const Jg=(e,t,n,r={},i,o)=>a=>{const s=Sg(r,e)||{},u=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-di(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};pM(s)||(c={...c,...OL(e,c)}),c.duration&&(c.duration=di(c.duration)),c.repeatDelay&&(c.repeatDelay=di(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!o&&t.get()!==void 0){const f=Bd(c.keyframes,s);if(f!==void 0)return Xe.update(()=>{c.onUpdate(f),c.onComplete()}),new fM([])}return!o&&OT.supports(c)?new OT(c):new Xg(c)},hM=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),mM=e=>Eg(e)?e[e.length-1]||0:e;function e0(e,t){e.indexOf(t)===-1&&e.push(t)}function t0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class n0{constructor(){this.subscriptions=[]}add(t){return e0(this.subscriptions,t),()=>t0(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const DT=30,gM=e=>!isNaN(parseFloat(e));class yM{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=Br.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Br.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=gM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new n0);const r=this.events[t].add(n);return t==="change"?()=>{r(),Xe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Br.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>DT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,DT);return mT(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function tl(e,t){return new yM(e,t)}function vM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,tl(n))}function xM(e,t){const n=Fd(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const s=mM(o[a]);vM(e,a,s)}}const Yd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),LT="data-"+Yd("framerAppearId");function MT(e){return e.props[LT]}const en=e=>!!(e&&e.getVelocity);function wM(e){return!!(en(e)&&e.add)}function r0(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(wM(n))return n.add(t)}function bM({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function FT(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...u}=t;r&&(a=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in u){const f=e.getValue(d,(o=e.latestValues[d])!==null&&o!==void 0?o:null),p=u[d];if(p===void 0||c&&bM(c,d))continue;const m={delay:n,...Sg(a||{},d)};let y=!1;if(window.MotionHandoffAnimation){const g=MT(e);if(g){const x=window.MotionHandoffAnimation(g,d,Xe);x!==null&&(m.startTime=x,y=!0)}}r0(e,d),f.start(Jg(d,f,p,e.shouldReduceMotion&&Zi.has(d)?{type:!1}:m,e,y));const b=f.animation;b&&l.push(b)}return s&&Promise.all(l).then(()=>{Xe.update(()=>{s&&xM(e,s)})}),l}function i0(e,t,n={}){var r;const i=Fd(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>Promise.all(FT(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=o;return EM(e,t,c+l,d,f,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[l,c]=u==="beforeChildren"?[a,s]:[s,a];return l().then(()=>c())}else return Promise.all([a(),s(n.delay)])}function EM(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,u=i===1?(l=0)=>l*r:(l=0)=>s-l*r;return Array.from(e.variantChildren).sort(TM).forEach((l,c)=>{l.notify("AnimationStart",t),a.push(i0(l,t,{...o,delay:n+u(c)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(a)}function TM(e,t){return e.sortNodePosition(t)}function _M(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>i0(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=i0(e,t,n);else{const i=typeof t=="function"?Fd(e,t,n.custom):t;r=Promise.all(FT(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const CM=Cg.length;function BT(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?BT(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<CM;n++){const r=Cg[n],i=e.props[r];(qu(i)||i===!1)&&(t[r]=i)}return t}const SM=[..._g].reverse(),AM=_g.length;function kM(e){return t=>Promise.all(t.map(({animation:n,options:r})=>_M(e,n,r)))}function RM(e){let t=kM(e),n=jT(),r=!0;const i=u=>(l,c)=>{var d;const f=Fd(e,c,u==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...y}=f;l={...l,...y,...m}}return l};function o(u){t=u(e)}function a(u){const{props:l}=e,c=BT(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let b=0;b<AM;b++){const g=SM[b],x=n[g],w=l[g]!==void 0?l[g]:c[g],T=qu(w),_=g===u?x.isActive:null;_===!1&&(m=b);let C=w===c[g]&&w!==l[g]&&T;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...p},!x.isActive&&_===null||!w&&!x.prevProp||Yu(w)||typeof w=="boolean")continue;const R=NM(x.prevProp,w);let O=R||g===u&&x.isActive&&!C&&T||b>m&&T,V=!1;const P=Array.isArray(w)?w:[w];let $=P.reduce(i(g),{});_===!1&&($={});const{prevResolvedValues:z={}}=x,X={...z,...$},Y=te=>{O=!0,f.has(te)&&(V=!0,f.delete(te)),x.needsAnimating[te]=!0;const F=e.getValue(te);F&&(F.liveStyle=!1)};for(const te in X){const F=$[te],B=z[te];if(p.hasOwnProperty(te))continue;let A=!1;Eg(F)&&Eg(B)?A=!OE(F,B):A=F!==B,A?F!=null?Y(te):f.add(te):F!==void 0&&f.has(te)?Y(te):x.protectedKeys[te]=!0}x.prevProp=w,x.prevResolvedValues=$,x.isActive&&(p={...p,...$}),r&&e.blockInitialAnimation&&(O=!1),O&&(!(C&&R)||V)&&d.push(...P.map(te=>({animation:te,options:{type:g}})))}if(f.size){const b={};f.forEach(g=>{const x=e.getBaseTarget(g),w=e.getValue(g);w&&(w.liveStyle=!0),b[g]=x??null}),d.push({animation:b})}let y=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function s(u,l){var c;if(n[u].isActive===l)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(u,l)}),n[u].isActive=l;const d=a(u);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n,reset:()=>{n=jT(),r=!0}}}function NM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!OE(t,e):!1}function ta(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function jT(){return{animate:ta(!0),whileInView:ta(),whileHover:ta(),whileTap:ta(),whileDrag:ta(),whileFocus:ta(),exit:ta()}}class ro{constructor(t){this.isMounted=!1,this.node=t}update(){}}class PM extends ro{constructor(t){super(t),t.animationState||(t.animationState=RM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Yu(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let IM=0;class OM extends ro{constructor(){super(...arguments),this.id=IM++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const DM={animation:{Feature:PM},exit:{Feature:OM}},UT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function qd(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const LM=e=>t=>UT(t)&&e(t,qd(t));function hi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function mi(e,t,n,r){return hi(e,t,LM(n),r)}const zT=(e,t)=>Math.abs(e-t);function MM(e,t){const n=zT(e.x,t.x),r=zT(e.y,t.y);return Math.sqrt(n**2+r**2)}class HT{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=a0(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=MM(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:y}=$t;this.history.push({...m,timestamp:y});const{onStart:b,onMove:g}=this.handlers;f||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=o0(f,this.transformPagePoint),Xe.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=a0(d.type==="pointercancel"?this.lastMoveEventInfo:o0(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,b),m&&m(d,b)},!UT(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const a=qd(t),s=o0(a,this.transformPagePoint),{point:u}=s,{timestamp:l}=$t;this.history=[{...u,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,a0(s,this.history)),this.removeListeners=pi(mi(this.contextWindow,"pointermove",this.handlePointerMove),mi(this.contextWindow,"pointerup",this.handlePointerUp),mi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ji(this.updatePoint)}}function o0(e,t){return t?{point:t(e.point)}:e}function VT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function a0({point:e},t){return{point:e,delta:VT(e,$T(t)),offset:VT(e,FM(t)),velocity:BM(t,.1)}}function FM(e){return e[0]}function $T(e){return e[e.length-1]}function BM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=$T(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>di(t)));)n--;if(!r)return{x:0,y:0};const o=fi(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function WT(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const YT=WT("dragHorizontal"),qT=WT("dragVertical");function GT(e){let t=!1;if(e==="y")t=qT();else if(e==="x")t=YT();else{const n=YT(),r=qT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function KT(){const e=GT(!0);return e?(e(),!1):!0}function os(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const XT=1e-4,jM=1-XT,UM=1+XT,QT=.01,zM=0-QT,HM=0+QT;function Bn(e){return e.max-e.min}function VM(e,t,n){return Math.abs(e-t)<=n}function ZT(e,t,n,r=.5){e.origin=r,e.originPoint=ft(t.min,t.max,e.origin),e.scale=Bn(n)/Bn(t),e.translate=ft(n.min,n.max,e.origin)-e.originPoint,(e.scale>=jM&&e.scale<=UM||isNaN(e.scale))&&(e.scale=1),(e.translate>=zM&&e.translate<=HM||isNaN(e.translate))&&(e.translate=0)}function nl(e,t,n,r){ZT(e.x,t.x,n.x,r?r.originX:void 0),ZT(e.y,t.y,n.y,r?r.originY:void 0)}function JT(e,t,n){e.min=n.min+t.min,e.max=e.min+Bn(t)}function $M(e,t,n){JT(e.x,t.x,n.x),JT(e.y,t.y,n.y)}function e2(e,t,n){e.min=t.min-n.min,e.max=e.min+Bn(t)}function rl(e,t,n){e2(e.x,t.x,n.x),e2(e.y,t.y,n.y)}function WM(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ft(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ft(n,e,r.max):Math.min(e,n)),e}function t2(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function YM(e,{top:t,left:n,bottom:r,right:i}){return{x:t2(e.x,n,i),y:t2(e.y,t,r)}}function n2(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function qM(e,t){return{x:n2(e.x,t.x),y:n2(e.y,t.y)}}function GM(e,t){let n=.5;const r=Bn(e),i=Bn(t);return i>r?n=is(t.min,t.max-r,e.min):r>i&&(n=is(e.min,e.max-i,t.min)),eo(0,1,n)}function KM(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const s0=.35;function XM(e=s0){return e===!1?e=0:e===!0&&(e=s0),{x:r2(e,"left","right"),y:r2(e,"top","bottom")}}function r2(e,t,n){return{min:i2(e,t),max:i2(e,n)}}function i2(e,t){return typeof e=="number"?e:e[t]||0}const o2=()=>({translate:0,scale:1,origin:0,originPoint:0}),as=()=>({x:o2(),y:o2()}),a2=()=>({min:0,max:0}),bt=()=>({x:a2(),y:a2()});function nr(e){return[e("x"),e("y")]}function s2({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function QM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ZM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function u0(e){return e===void 0||e===1}function l0({scale:e,scaleX:t,scaleY:n}){return!u0(e)||!u0(t)||!u0(n)}function na(e){return l0(e)||u2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function u2(e){return l2(e.x)||l2(e.y)}function l2(e){return e&&e!=="0%"}function Gd(e,t,n){const r=e-n,i=t*r;return n+i}function c2(e,t,n,r,i){return i!==void 0&&(e=Gd(e,i,r)),Gd(e,n,r)+t}function c0(e,t=0,n=1,r,i){e.min=c2(e.min,t,n,r,i),e.max=c2(e.max,t,n,r,i)}function d2(e,{x:t,y:n}){c0(e.x,t.translate,t.scale,t.originPoint),c0(e.y,n.translate,n.scale,n.originPoint)}const f2=.999999999999,p2=1.0000000000001;function JM(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s<i;s++){o=n[s],a=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&us(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,d2(e,a)),r&&na(o.latestValues)&&us(e,o.latestValues))}t.x<p2&&t.x>f2&&(t.x=1),t.y<p2&&t.y>f2&&(t.y=1)}function ss(e,t){e.min=e.min+t,e.max=e.max+t}function h2(e,t,n,r,i=.5){const o=ft(e.min,e.max,i);c0(e,t,n,o,r)}function us(e,t){h2(e.x,t.x,t.scaleX,t.scale,t.originX),h2(e.y,t.y,t.scaleY,t.scale,t.originY)}function m2(e,t){return s2(ZM(e.getBoundingClientRect(),t))}function e5(e,t,n){const r=m2(e,n),{scroll:i}=t;return i&&(ss(r.x,i.offset.x),ss(r.y,i.offset.y)),r}const g2=({current:e})=>e?e.ownerDocument.defaultView:null,t5=new WeakMap;class n5{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=bt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(qd(c,"page").point)},o=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=GT(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nr(b=>{let g=this.getAxisMotionValue(b).get()||0;if(Fr.test(g)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[b];w&&(g=Bn(w)*(parseFloat(g)/100))}}this.originPoint[b]=g}),m&&Xe.postRender(()=>m(c,d)),r0(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:b}=d;if(p&&this.currentDirection===null){this.currentDirection=r5(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),y&&y(c,d)},s=(c,d)=>this.stop(c,d),u=()=>nr(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new HT(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:g2(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Xe.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Kd(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=WM(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&os(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=YM(i.layoutBox,n):this.constraints=!1,this.elastic=XM(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&nr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=KM(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!os(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=e5(r,i.root,this.visualElement.getTransformPagePoint());let a=qM(i.layout.layoutBox,o);if(n){const s=n(QM(a));this.hasMutatedConstraints=!!s,s&&(a=s2(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),u=this.constraints||{},l=nr(c=>{if(!Kd(c,n,this.currentDirection))return;let d=u&&u[c]||{};a&&(d={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r0(this.visualElement,t),r.start(Jg(t,r,0,n,this.visualElement,!1))}stopAnimation(){nr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){nr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){nr(n=>{const{drag:r}=this.getProps();if(!Kd(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-ft(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!os(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};nr(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const u=s.get();i[a]=GM({min:u,max:u},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),nr(a=>{if(!Kd(a,t,null))return;const s=this.getAxisMotionValue(a),{min:u,max:l}=this.constraints[a];s.set(ft(u,l,i[a]))})}addListeners(){if(!this.visualElement.current)return;t5.set(this.visualElement,this);const t=this.visualElement.current,n=mi(t,"pointerdown",u=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();os(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Xe.read(r);const a=hi(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(nr(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=u[c].translate,d.set(d.get()+u[c].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=s0,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Kd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function r5(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class i5 extends ro{constructor(t){super(t),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new n5(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zt}unmount(){this.removeGroupControls(),this.removeListeners()}}const y2=e=>(t,n)=>{e&&Xe.postRender(()=>e(t,n))};class o5 extends ro{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(t){this.session=new HT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:g2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:y2(t),onStart:y2(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&Xe.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=mi(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Xd=v.createContext(null);function a5(){const e=v.useContext(Xd);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=v.useId();v.useEffect(()=>r(i),[]);const o=v.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,o]:[!0]}const d0=v.createContext({}),v2=v.createContext({}),Qd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function x2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const il={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=x2(e,t.target.x),r=x2(e,t.target.y);return`${n}% ${r}%`}},s5={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=no.parse(e);if(i.length>5)return r;const o=no.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,u=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=u;const l=ft(s,u,.5);return typeof i[2+a]=="number"&&(i[2+a]/=l),typeof i[3+a]=="number"&&(i[3+a]/=l),o(i)}},Zd={};function u5(e){Object.assign(Zd,e)}const{schedule:f0,cancel:Nie}=LE(queueMicrotask,!1);class l5 extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;u5(c5),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Qd.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Xe.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),f0.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function w2(e){const[t,n]=a5(),r=v.useContext(d0);return E.jsx(l5,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(v2),isPresent:t,safeToRemove:n})}const c5={borderRadius:{...il,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:il,borderTopRightRadius:il,borderBottomLeftRadius:il,borderBottomRightRadius:il,boxShadow:s5},b2=["TopLeft","TopRight","BottomLeft","BottomRight"],d5=b2.length,E2=e=>typeof e=="string"?parseFloat(e):e,T2=e=>typeof e=="number"||ye.test(e);function f5(e,t,n,r,i,o){i?(e.opacity=ft(0,n.opacity!==void 0?n.opacity:1,p5(r)),e.opacityExit=ft(t.opacity!==void 0?t.opacity:1,0,h5(r))):o&&(e.opacity=ft(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<d5;a++){const s=`border${b2[a]}Radius`;let u=_2(t,s),l=_2(n,s);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||T2(u)===T2(l)?(e[s]=Math.max(ft(E2(u),E2(l),r),0),(Fr.test(l)||Fr.test(u))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=ft(t.rotate||0,n.rotate||0,r))}function _2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const p5=C2(0,.5,HE),h5=C2(.5,.95,Zt);function C2(e,t,n){return r=>r<e?0:r>t?1:n(is(e,t,r))}function S2(e,t){e.min=t.min,e.max=t.max}function rr(e,t){S2(e.x,t.x),S2(e.y,t.y)}function A2(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function k2(e,t,n,r,i){return e-=t,e=Gd(e,1/n,r),i!==void 0&&(e=Gd(e,1/i,r)),e}function m5(e,t=0,n=1,r=.5,i,o=e,a=e){if(Fr.test(t)&&(t=parseFloat(t),t=ft(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=ft(o.min,o.max,r);e===o&&(s-=t),e.min=k2(e.min,t,n,s,i),e.max=k2(e.max,t,n,s,i)}function R2(e,t,[n,r,i],o,a){m5(e,t[n],t[r],t[i],t.scale,o,a)}const g5=["x","scaleX","originX"],y5=["y","scaleY","originY"];function N2(e,t,n,r){R2(e.x,t,g5,n?n.x:void 0,r?r.x:void 0),R2(e.y,t,y5,n?n.y:void 0,r?r.y:void 0)}function P2(e){return e.translate===0&&e.scale===1}function I2(e){return P2(e.x)&&P2(e.y)}function O2(e,t){return e.min===t.min&&e.max===t.max}function v5(e,t){return O2(e.x,t.x)&&O2(e.y,t.y)}function D2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function L2(e,t){return D2(e.x,t.x)&&D2(e.y,t.y)}function M2(e){return Bn(e.x)/Bn(e.y)}function F2(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class x5{constructor(){this.members=[]}add(t){e0(this.members,t),t.scheduleRender()}remove(t){if(t0(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function w5(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;l&&(r=`perspective(${l}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,u=e.y.scale*t.y;return(s!==1||u!==1)&&(r+=`scale(${s}, ${u})`),r||"none"}const b5=(e,t)=>e.depth-t.depth;class E5{constructor(){this.children=[],this.isDirty=!1}add(t){e0(this.children,t),this.isDirty=!0}remove(t){t0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(b5),this.isDirty=!1,this.children.forEach(t)}}function Jd(e){const t=en(e)?e.get():e;return hM(t)?t.toValue():t}function T5(e,t){const n=Br.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Ji(r),e(o-t))};return Xe.read(r,!0),()=>Ji(r)}function _5(e){return e instanceof SVGElement&&e.tagName!=="svg"}function C5(e,t,n){const r=en(e)?e:tl(e);return r.start(Jg("",r,t,n)),r.animation}const ra={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ol=typeof window<"u"&&window.MotionDebug!==void 0,p0=["","X","Y","Z"],S5={visibility:"hidden"},B2=1e3;let A5=0;function h0(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function j2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=MT(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Xe,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&j2(r)}function U2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t==null?void 0:t()){this.id=A5++,this.animationId=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,ol&&(ra.totalNodes=ra.resolvedTargetDeltas=ra.recalculatedProjection=0),this.nodes.forEach(N5),this.nodes.forEach(L5),this.nodes.forEach(M5),this.nodes.forEach(P5),ol&&window.MotionDebug.record(ra)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new E5)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new n0),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const u=this.eventHandlers.get(a);u&&u.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=_5(a),this.instance=a;const{layoutId:u,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(l||u)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=T5(f,250),Qd.hasAnimatedSinceResize&&(Qd.hasAnimatedSinceResize=!1,this.nodes.forEach(H2))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&c&&(u||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||z5,{onLayoutAnimationStart:b,onLayoutAnimationComplete:g}=c.getProps(),x=!this.targetLayout||!L2(this.targetLayout,m)||p,w=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const T={...Sg(y,"layout"),onPlay:b,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||H2(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ji(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(F5),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&j2(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:s,layout:u}=this.options;if(s===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(z2);return}this.isUpdating||this.nodes.forEach(O5),this.isUpdating=!1,this.nodes.forEach(D5),this.nodes.forEach(k5),this.nodes.forEach(R5),this.clearAllSnapshots();const s=Br.now();$t.delta=eo(0,1e3/60,s-$t.timestamp),$t.timestamp=s,$t.isProcessing=!0,Ag.update.process($t),Ag.preRender.process($t),Ag.render.process($t),$t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,f0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(I5),this.sharedNodes.forEach(B5)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=bt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!I2(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;a&&(s||na(this.latestValues)||c)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let u=this.removeElementScroll(s);return a&&(u=this.removeTransform(u)),H5(u),{animationId:this.root.animationId,measuredBox:s,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return bt();const u=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(V5))){const{scroll:c}=this.root;c&&(ss(u.x,c.offset.x),ss(u.y,c.offset.y))}return u}removeElementScroll(a){var s;const u=bt();if(rr(u,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return u;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&rr(u,a),ss(u.x,d.offset.x),ss(u.y,d.offset.y))}return u}applyTransform(a,s=!1){const u=bt();rr(u,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&us(u,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),na(c.latestValues)&&us(u,c.latestValues)}return na(this.latestValues)&&us(u,this.latestValues),u}removeTransform(a){const s=bt();rr(s,a);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!na(l.latestValues))continue;l0(l.latestValues)&&l.updateSnapshot();const c=bt(),d=l.measurePageBox();rr(c,d),N2(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,c)}return na(this.latestValues)&&N2(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==$t.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==u;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=$t.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=bt(),this.relativeTargetOrigin=bt(),rl(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),rr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=bt(),this.targetWithTransforms=bt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),$M(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rr(this.target,this.layout.layoutBox),d2(this.target,this.targetDelta)):rr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=bt(),this.relativeTargetOrigin=bt(),rl(this.relativeTargetOrigin,this.target,p.target),rr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ol&&ra.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||l0(this.parent.latestValues)||u2(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 a;const s=this.getLead(),u=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===$t.timestamp&&(l=!1),l)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;rr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;JM(this.layoutCorrected,this.treeScale,this.path,u),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=bt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(A2(this.prevProjectionDelta.x,this.projectionDelta.x),A2(this.prevProjectionDelta.y,this.projectionDelta.y)),nl(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!F2(this.projectionDelta.x,this.prevProjectionDelta.x)||!F2(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),ol&&ra.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=as(),this.projectionDelta=as(),this.projectionDeltaWithTransform=as()}setAnimationOrigin(a,s=!1){const u=this.snapshot,l=u?u.latestValues:{},c={...this.latestValues},d=as();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=bt(),p=u?u.source:void 0,m=this.layout?this.layout.source:void 0,y=p!==m,b=this.getStack(),g=!b||b.members.length<=1,x=!!(y&&!g&&this.options.crossfade===!0&&!this.path.some(U5));this.animationProgress=0;let w;this.mixTargetDelta=T=>{const _=T/1e3;V2(d.x,a.x,_),V2(d.y,a.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(rl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),j5(this.relativeTarget,this.relativeTargetOrigin,f,_),w&&v5(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=bt()),rr(w,this.relativeTarget)),y&&(this.animationValues=c,f5(c,l,this.latestValues,_,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ji(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xe.update(()=>{Qd.hasAnimatedSinceResize=!0,this.currentAnimation=C5(0,B2,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(B2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:u,layout:l,latestValues:c}=a;if(!(!s||!u||!l)){if(this!==a&&this.layout&&l&&G2(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||bt();const d=Bn(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+d;const f=Bn(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+f}rr(s,u),us(s,c),nl(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new x5),this.sharedNodes.get(a).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(s=!0),!s)return;const l={};u.z&&h0("z",a,l,this.animationValues);for(let c=0;c<p0.length;c++)h0(`rotate${p0[c]}`,a,l,this.animationValues),h0(`skew${p0[c]}`,a,l,this.animationValues);a.render();for(const c in l)a.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);a.scheduleRender()}getProjectionStyles(a){var s,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return S5;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Jd(a==null?void 0:a.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=Jd(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!na(this.latestValues)&&(y.transform=c?c({},""):"none",this.hasProjected=!1),y}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),l.transform=w5(this.projectionDeltaWithTransform,this.treeScale,f),c&&(l.transform=c(f,l.transform));const{x:p,y:m}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?l.opacity=d===this?(u=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:l.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const y in Zd){if(f[y]===void 0)continue;const{correct:b,applyTo:g}=Zd[y],x=l.transform==="none"?f[y]:b(f[y],d);if(g){const w=g.length;for(let T=0;T<w;T++)l[g[T]]=x}else l[y]=x}return this.options.layoutId&&(l.pointerEvents=d===this?Jd(a==null?void 0:a.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(z2),this.root.sharedNodes.clear()}}}function k5(e){e.updateLayout()}function R5(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?nr(d=>{const f=a?n.measuredBox[d]:n.layoutBox[d],p=Bn(f);f.min=r[d].min,f.max=f.min+p}):G2(o,n.layoutBox,r)&&nr(d=>{const f=a?n.measuredBox[d]:n.layoutBox[d],p=Bn(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const s=as();nl(s,r,n.layoutBox);const u=as();a?nl(u,e.applyTransform(i,!0),n.measuredBox):nl(u,r,n.layoutBox);const l=!I2(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=bt();rl(m,n.layoutBox,f.layoutBox);const y=bt();rl(y,r,p.layoutBox),L2(m,y)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function N5(e){ol&&ra.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function P5(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function I5(e){e.clearSnapshot()}function z2(e){e.clearMeasurements()}function O5(e){e.isLayoutDirty=!1}function D5(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function H2(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function L5(e){e.resolveTargetDelta()}function M5(e){e.calcProjection()}function F5(e){e.resetSkewAndRotation()}function B5(e){e.removeLeadSnapshot()}function V2(e,t,n){e.translate=ft(t.translate,0,n),e.scale=ft(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $2(e,t,n,r){e.min=ft(t.min,n.min,r),e.max=ft(t.max,n.max,r)}function j5(e,t,n,r){$2(e.x,t.x,n.x,r),$2(e.y,t.y,n.y,r)}function U5(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const z5={duration:.45,ease:[.4,0,.1,1]},W2=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Y2=W2("applewebkit/")&&!W2("chrome/")?Math.round:Zt;function q2(e){e.min=Y2(e.min),e.max=Y2(e.max)}function H5(e){q2(e.x),q2(e.y)}function G2(e,t,n){return e==="position"||e==="preserve-aspect"&&!VM(M2(t),M2(n),.2)}function V5(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const $5=U2({attachResizeListener:(e,t)=>hi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),m0={current:void 0},K2=U2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!m0.current){const e=new $5({});e.mount(window),e.setOptions({layoutScroll:!0}),m0.current=e}return m0.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),W5={pan:{Feature:o5},drag:{Feature:i5,ProjectionNode:K2,MeasureLayout:w2}};function X2(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(o,a)=>{if(o.pointerType==="touch"||KT())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const u=s[r];u&&Xe.postRender(()=>u(o,a))};return mi(e.current,n,i,{passive:!e.getProps()[r]})}class Y5 extends ro{mount(){this.unmount=pi(X2(this.node,!0),X2(this.node,!1))}unmount(){}}class q5 extends ro{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pi(hi(this.node.current,"focus",()=>this.onFocus()),hi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Q2=(e,t)=>t?e===t?!0:Q2(e,t.parentElement):!1;function g0(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,qd(n))}class G5 extends ro{constructor(){super(...arguments),this.removeStartListeners=Zt,this.removeEndListeners=Zt,this.removeAccessibleListeners=Zt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=mi(window,"pointerup",(s,u)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!Q2(this.node.current,s.target)?c:l;f&&Xe.update(()=>f(s,u))},{passive:!(r.onTap||r.onPointerUp)}),a=mi(window,"pointercancel",(s,u)=>this.cancelPress(s,u),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=pi(o,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=s=>{s.key!=="Enter"||!this.checkPressEnd()||g0("up",(u,l)=>{const{onTap:c}=this.node.getProps();c&&Xe.postRender(()=>c(u,l))})};this.removeEndListeners(),this.removeEndListeners=hi(this.node.current,"keyup",a),g0("down",(s,u)=>{this.startPress(s,u)})},n=hi(this.node.current,"keydown",t),r=()=>{this.isPressing&&g0("cancel",(o,a)=>this.cancelPress(o,a))},i=hi(this.node.current,"blur",r);this.removeAccessibleListeners=pi(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Xe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!KT()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Xe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=mi(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=hi(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pi(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const y0=new WeakMap,v0=new WeakMap,K5=e=>{const t=y0.get(e.target);t&&t(e)},X5=e=>{e.forEach(K5)};function Q5({root:e,...t}){const n=e||document;v0.has(n)||v0.set(n,{});const r=v0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(X5,{root:e,...t})),r[i]}function Z5(e,t,n){const r=Q5(t);return y0.set(e,n),r.observe(e),()=>{y0.delete(e),r.unobserve(e)}}const J5={some:0,all:1};class e8 extends ro{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:J5[i]},s=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=l?c:d;f&&f(u)};return Z5(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(t8(t,n))&&this.startObserver()}unmount(){}}function t8({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const n8={inView:{Feature:e8},tap:{Feature:G5},focus:{Feature:q5},hover:{Feature:Y5}},r8={layout:{ProjectionNode:K2,MeasureLayout:w2}},x0=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),ef=v.createContext({}),w0=typeof window<"u",Z2=w0?v.useLayoutEffect:v.useEffect,J2=v.createContext({strict:!1});function i8(e,t,n,r,i){var o,a;const{visualElement:s}=v.useContext(ef),u=v.useContext(J2),l=v.useContext(Xd),c=v.useContext(x0).reducedMotion,d=v.useRef();r=r||u.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,p=v.useContext(v2);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&o8(d.current,n,i,p),v.useInsertionEffect(()=>{f&&f.update(n,l)});const m=n[LT],y=v.useRef(!!m&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,m))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,m)));return Z2(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),f0.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),v.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),y.current=!1))}),f}function o8(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:u,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:e_(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&os(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:l})}function e_(e){if(e)return e.options.allowProjection!==!1?e.projection:e_(e.parent)}function a8(e,t,n){return v.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):os(n)&&(n.current=r))},[t])}function tf(e){return Yu(e.animate)||Cg.some(t=>qu(e[t]))}function t_(e){return!!(tf(e)||e.variants)}function s8(e,t){if(tf(e)){const{initial:n,animate:r}=e;return{initial:n===!1||qu(n)?n:void 0,animate:qu(r)?r:void 0}}return e.inherit!==!1?t:{}}function u8(e){const{initial:t,animate:n}=s8(e,v.useContext(ef));return v.useMemo(()=>({initial:t,animate:n}),[n_(t),n_(n)])}function n_(e){return Array.isArray(e)?e.join(" "):e}const r_={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"]},ls={};for(const e in r_)ls[e]={isEnabled:t=>r_[e].some(n=>!!t[n])};function l8(e){for(const t in e)ls[t]={...ls[t],...e[t]}}const c8=Symbol.for("motionComponentSymbol");function d8({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&l8(e);function o(s,u){let l;const c={...v.useContext(x0),...s,layoutId:f8(s)},{isStatic:d}=c,f=u8(s),p=r(s,d);if(!d&&w0){p8();const m=h8(c);l=m.MeasureLayout,f.visualElement=i8(i,p,c,t,m.ProjectionNode)}return E.jsxs(ef.Provider,{value:f,children:[l&&f.visualElement?E.jsx(l,{visualElement:f.visualElement,...c}):null,n(i,s,a8(p,f.visualElement,u),p,d,f.visualElement)]})}const a=v.forwardRef(o);return a[c8]=i,a}function f8({layoutId:e}){const t=v.useContext(d0).id;return t&&e!==void 0?t+"-"+e:e}function p8(e,t){v.useContext(J2).strict}function h8(e){const{drag:t,layout:n}=ls;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const m8=["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 b0(e){return typeof e!="string"||e.includes("-")?!1:!!(m8.indexOf(e)>-1||/[A-Z]/u.test(e))}function i_(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const o_=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 a_(e,t,n,r){i_(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(o_.has(i)?i:Yd(i),t.attrs[i])}function s_(e,{layout:t,layoutId:n}){return Zi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Zd[e]||e==="opacity")}function E0(e,t,n){var r;const{style:i}=e,o={};for(const a in i)(en(i[a])||t.style&&en(t.style[a])||s_(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),o}function u_(e,t,n){const r=E0(e,t,n);for(const i in e)if(en(e[i])||en(t[i])){const o=Gu.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function T0(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}function g8(e){if(Zi.has(e))return"transform";if(kT.has(e))return Yd(e)}function y8({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,o,a,s){const u={latestValues:v8(i,o,a,s?!1:e,t),renderState:n()};return r&&(u.mount=l=>r(i,l,u)),u}const l_=e=>(t,n)=>{const r=v.useContext(ef),i=v.useContext(Xd),o=()=>y8(e,t,r,i,n);return n?o():T0(o)};function c_(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const o=Tg(e,r[i]);if(o){const{transitionEnd:a,transition:s,...u}=o;n(u,a)}}}function v8(e,t,n,r,i){var o;const a={},s=new Set,u=r&&((o=e.style)===null||o===void 0?void 0:o.willChange)===void 0,l=i(e,{});for(const b in l)a[b]=Jd(l[b]);let{initial:c,animate:d}=e;const f=tf(e),p=t_(e);t&&p&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let m=n?n.initial===!1:!1;m=m||c===!1;const y=m?d:c;return y&&typeof y!="boolean"&&!Yu(y)&&c_(e,y,(b,g)=>{for(const x in b){let w=b[x];if(Array.isArray(w)){const T=m?w.length-1:0;w=w[T]}w!==null&&(a[x]=w)}for(const x in g)a[x]=g[x]}),u&&(d&&c!==!1&&!Yu(d)&&c_(e,d,b=>{for(const g in b){const x=g8(g);x&&s.add(x)}}),s.size&&(a.willChange=Array.from(s).join(","))),a}const _0=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),d_=()=>({..._0(),attrs:{}}),f_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,x8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},w8=Gu.length;function b8(e,t,n){let r="",i=!0;for(let o=0;o<w8;o++){const a=Gu[o],s=e[a];if(s===void 0)continue;let u=!0;if(typeof s=="number"?u=s===(a.startsWith("scale")?1:0):u=parseFloat(s)===0,!u||n){const l=f_(s,Ug[a]);if(!u){i=!1;const c=x8[a]||a;r+=`${c}(${l}) `}n&&(t[a]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function C0(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,s=!1;for(const u in t){const l=t[u];if(Zi.has(u)){a=!0;continue}else if(qE(u)){i[u]=l;continue}else{const c=f_(l,Ug[u]);u.startsWith("origin")?(s=!0,o[u]=c):r[u]=c}}if(t.transform||(a||n?r.transform=b8(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:u="50%",originY:l="50%",originZ:c=0}=o;r.transformOrigin=`${u} ${l} ${c}`}}function p_(e,t,n){return typeof e=="string"?e:ye.transform(t+n*e)}function E8(e,t,n){const r=p_(t,e.x,e.width),i=p_(n,e.y,e.height);return`${r} ${i}`}const T8={offset:"stroke-dashoffset",array:"stroke-dasharray"},_8={offset:"strokeDashoffset",array:"strokeDasharray"};function C8(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?T8:_8;e[o.offset]=ye.transform(-r);const a=ye.transform(t),s=ye.transform(n);e[o.array]=`${a} ${s}`}function S0(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:a,pathSpacing:s=1,pathOffset:u=0,...l},c,d){if(C0(e,l,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=E8(m,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),a!==void 0&&C8(f,a,s,u,!1)}const A0=e=>typeof e=="string"&&e.toLowerCase()==="svg",S8={useVisualState:l_({scrapeMotionValuesFromProps:u_,createRenderState:d_,onMount:(e,t,{renderState:n,latestValues:r})=>{Xe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Xe.render(()=>{S0(n,r,A0(t.tagName),e.transformTemplate),a_(t,n)})}})},A8={useVisualState:l_({applyWillChange:!0,scrapeMotionValuesFromProps:E0,createRenderState:_0})};function h_(e,t,n){for(const r in t)!en(t[r])&&!s_(r,n)&&(e[r]=t[r])}function k8({transformTemplate:e},t){return v.useMemo(()=>{const n=_0();return C0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function R8(e,t){const n=e.style||{},r={};return h_(r,n,e),Object.assign(r,k8(e,t)),r}function N8(e,t){const n={},r=R8(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const P8=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 nf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||P8.has(e)}let m_=e=>!nf(e);function I8(e){e&&(m_=t=>t.startsWith("on")?!nf(t):e(t))}try{I8(require("@emotion/is-prop-valid").default)}catch{}function O8(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(m_(i)||n===!0&&nf(i)||!t&&!nf(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function D8(e,t,n,r){const i=v.useMemo(()=>{const o=d_();return S0(o,t,A0(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};h_(o,e.style,e),i.style={...o,...i.style}}return i}function L8(e=!1){return(n,r,i,{latestValues:o},a)=>{const u=(b0(n)?D8:N8)(r,o,a,n),l=O8(r,typeof n=="string",e),c=n!==v.Fragment?{...l,...u,ref:i}:{},{children:d}=r,f=v.useMemo(()=>en(d)?d.get():d,[d]);return v.createElement(n,{...c,children:f})}}function M8(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const a={...b0(r)?S8:A8,preloadedFeatures:e,useRender:L8(i),createVisualElement:t,Component:r};return d8(a)}}const k0={current:null},g_={current:!1};function F8(){if(g_.current=!0,!!w0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>k0.current=e.matches;e.addListener(t),t()}else k0.current=!1}function B8(e,t,n){for(const r in t){const i=t[r],o=n[r];if(en(i))e.addValue(r,i);else if(en(o))e.addValue(r,tl(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,tl(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const y_=new WeakMap,j8=[...eT,Jt,no],U8=e=>j8.find(JE(e)),v_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class z8{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Dg,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=Br.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Xe.render(this.render,!1,!0))};const{latestValues:u,renderState:l}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=tf(n),this.isVariantNode=t_(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];u[f]!==void 0&&en(p)&&p.set(u[f],!1)}}mount(t){this.current=t,y_.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),g_.current||F8(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:k0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){y_.delete(this.current),this.projection&&this.projection.unmount(),Ji(this.notifyUpdate),Ji(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Zi.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Xe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ls){const n=ls[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):bt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<v_.length;r++){const i=v_[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,a=t[o];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=B8(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=tl(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(WE(i)||$E(i))?i=parseFloat(i):!U8(i)&&no.test(n)&&(i=dT(t,n)),this.setBaseTarget(t,en(i)?i.get():i)),en(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const a=Tg(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(i=a[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!en(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new n0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class x_ extends z8{constructor(){super(...arguments),this.KeyframeResolver=fT}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function H8(e){return window.getComputedStyle(e)}class V8 extends x_{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=i_}readValueFromInstance(t,n){if(Zi.has(n)){const r=zg(n);return r&&r.default||0}else{const r=H8(t),i=(qE(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return m2(t,n)}build(t,n,r){C0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return E0(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;en(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class $8 extends x_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=bt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Zi.has(n)){const r=zg(n);return r&&r.default||0}return n=o_.has(n)?n:Yd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return u_(t,n,r)}build(t,n,r){S0(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){a_(t,n,r,i)}mount(t){this.isSVGTag=A0(t.tagName),super.mount(t)}}const W8=(e,t)=>b0(e)?new $8(t):new V8(t,{allowProjection:e!==v.Fragment}),Y8=M8({...DM,...n8,...W5,...r8},W8),cs=kL(Y8);class q8 extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function G8({children:e,isPresent:t}){const n=v.useId(),r=v.useRef(null),i=v.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=v.useContext(x0);return v.useInsertionEffect(()=>{const{width:a,height:s,top:u,left:l}=i.current;if(t||!r.current||!a||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return o&&(c.nonce=o),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
|
|
40
|
+
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function $m(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Wm(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var I6=typeof WeakMap=="function"?WeakMap:Map;function Ab(e,t,n){n=si(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){bd||(bd=!0,ag=r),Wm(e,t)},n}function kb(e,t,n){n=si(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Wm(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Wm(e,t),typeof r!="function"&&(qi===null?qi=new Set([this]):qi.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Rb(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new I6;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Y6.bind(null,e,t,n),t.then(e,e))}function Nb(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Pb(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=si(-1,1),t.tag=2,Wi(n,t,1))),n.lanes|=1),e)}var O6=ti.ReactCurrentOwner,wn=!1;function dn(e,t,n,r){t.child=e===null?Qw(t,null,n,r):Ya(t,e.child,n,r)}function Ib(e,t,n,r,i){n=n.render;var o=t.ref;return Ga(t,i),r=Mm(e,t,n,r,o,i),n=Fm(),e!==null&&!wn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ui(e,t,i)):(ot&&n&&xm(t),t.flags|=1,dn(e,t,r,i),t.child)}function Ob(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!pg(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Db(e,t,o,r,i)):(e=Ad(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:_u,n(a,r)&&e.ref===t.ref)return ui(e,t,i)}return t.flags|=1,e=Qi(o,r),e.ref=t.ref,e.return=t,t.child=e}function Db(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(_u(o,r)&&e.ref===t.ref)if(wn=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(wn=!0);else return t.lanes=e.lanes,ui(e,t,i)}return Ym(e,t,n,r,i)}function Lb(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Je(Za,Mn),Mn|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Je(Za,Mn),Mn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Je(Za,Mn),Mn|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Je(Za,Mn),Mn|=r;return dn(e,t,i,n),t.child}function Mb(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ym(e,t,n,r,i){var o=xn(n)?zo:Gt.current;return o=Ha(t,o),Ga(t,i),n=Mm(e,t,n,r,o,i),r=Fm(),e!==null&&!wn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ui(e,t,i)):(ot&&r&&xm(t),t.flags|=1,dn(e,t,n,i),t.child)}function Fb(e,t,n,r,i){if(xn(n)){var o=!0;Zc(t)}else o=!1;if(Ga(t,i),t.stateNode===null)gd(e,t),Cb(t,n,r),Vm(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,l=n.contextType;typeof l=="object"&&l!==null?l=Zn(l):(l=xn(n)?zo:Gt.current,l=Ha(t,l));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||u!==l)&&Sb(t,a,r,l),$i=!1;var f=t.memoizedState;a.state=f,sd(t,r,a,i),u=t.memoizedState,s!==r||f!==u||vn.current||$i?(typeof c=="function"&&(Hm(t,n,c,r),u=t.memoizedState),(s=$i||_b(t,n,s,r,f,u,l))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Jw(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:gr(t.type,s),a.props=l,d=t.pendingProps,f=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=Zn(u):(u=xn(n)?zo:Gt.current,u=Ha(t,u));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||f!==u)&&Sb(t,a,r,u),$i=!1,f=t.memoizedState,a.state=f,sd(t,r,a,i);var m=t.memoizedState;s!==d||f!==m||vn.current||$i?(typeof p=="function"&&(Hm(t,n,p,r),m=t.memoizedState),(l=$i||_b(t,n,l,r,f,m,u)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,m,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,m,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=u,r=l):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return qm(e,t,n,r,o,i)}function qm(e,t,n,r,i,o){Mb(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Hw(t,n,!1),ui(e,t,o);r=t.stateNode,O6.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Ya(t,e.child,null,o),t.child=Ya(t,null,s,o)):dn(e,t,s,o),t.memoizedState=r.state,i&&Hw(t,n,!0),t.child}function Bb(e){var t=e.stateNode;t.pendingContext?Uw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Uw(e,t.context,!1),Nm(e,t.containerInfo)}function jb(e,t,n,r,i){return Wa(),Tm(i),t.flags|=256,dn(e,t,n,r),t.child}var Gm={dehydrated:null,treeContext:null,retryLane:0};function Km(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ub(e,t,n){var r=t.pendingProps,i=ct.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Je(ct,i&1),e===null)return Em(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=kd(a,r,0,null),e=Qo(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Km(n),t.memoizedState=Gm,e):Xm(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return D6(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Qi(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Qi(s,o):(o=Qo(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?Km(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=Gm,r}return o=e.child,e=o.sibling,r=Qi(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Xm(e,t){return t=kd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function md(e,t,n,r){return r!==null&&Tm(r),Ya(t,e.child,null,n),e=Xm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function D6(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=$m(Error(Z(422))),md(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=kd({mode:"visible",children:r.children},i,0,null),o=Qo(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Ya(t,e.child,null,a),t.child.memoizedState=Km(a),t.memoizedState=Gm,o);if(!(t.mode&1))return md(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Z(419)),r=$m(o,r,void 0),md(e,t,a,r)}if(s=(a&e.childLanes)!==0,wn||s){if(r=Lt,r!==null){switch(a&-a){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|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,ai(e,i),xr(r,e,i,-1))}return fg(),r=$m(Error(Z(421))),md(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=q6.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ln=Ui(i.nextSibling),Dn=t,ot=!0,mr=null,e!==null&&(Xn[Qn++]=ii,Xn[Qn++]=oi,Xn[Qn++]=Ho,ii=e.id,oi=e.overflow,Ho=t),t=Xm(t,r.children),t.flags|=4096,t)}function zb(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Am(e.return,t,n)}function Qm(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Hb(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(dn(e,t,r.children,n),r=ct.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zb(e,n,t);else if(e.tag===19)zb(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Je(ct,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ud(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Qm(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ud(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Qm(t,!0,n,null,o);break;case"together":Qm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function gd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ui(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qo|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Z(153));if(t.child!==null){for(e=t.child,n=Qi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function L6(e,t,n){switch(t.tag){case 3:Bb(t),Wa();break;case 5:nb(t);break;case 1:xn(t.type)&&Zc(t);break;case 4:Nm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Je(id,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Je(ct,ct.current&1),t.flags|=128,null):n&t.child.childLanes?Ub(e,t,n):(Je(ct,ct.current&1),e=ui(e,t,n),e!==null?e.sibling:null);Je(ct,ct.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Hb(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Je(ct,ct.current),r)break;return null;case 22:case 23:return t.lanes=0,Lb(e,t,n)}return ui(e,t,n)}var Vb,Zm,$b,Wb;Vb=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Zm=function(){},$b=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Wo(Dr.current);var o=null;switch(n){case"input":i=Ah(e,i),r=Ah(e,r),o=[];break;case"select":i=lt({},i,{value:void 0}),r=lt({},r,{value:void 0}),o=[];break;case"textarea":i=Nh(e,i),r=Nh(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Kc)}Ih(n,r);var a;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(ru.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var u=r[l];if(s=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&u!==s&&(u!=null||s!=null))if(l==="style")if(s){for(a in s)!s.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&s[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(o||(o=[]),o.push(l,n)),n=u;else l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(o=o||[]).push(l,u)):l==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(l,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(ru.hasOwnProperty(l)?(u!=null&&l==="onScroll"&&tt("scroll",e),o||s===u||(o=[])):(o=o||[]).push(l,u))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}},Wb=function(e,t,n,r){n!==r&&(t.flags|=4)};function ju(e,t){if(!ot)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function M6(e,t,n){var r=t.pendingProps;switch(wm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(t),null;case 1:return xn(t.type)&&Qc(),Xt(t),null;case 3:return r=t.stateNode,Ka(),nt(vn),nt(Gt),Om(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(nd(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,mr!==null&&(lg(mr),mr=null))),Zm(e,t),Xt(t),null;case 5:Pm(t);var i=Wo(Du.current);if(n=t.type,e!==null&&t.stateNode!=null)$b(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Z(166));return Xt(t),null}if(e=Wo(Dr.current),nd(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Or]=t,r[Ru]=o,e=(t.mode&1)!==0,n){case"dialog":tt("cancel",r),tt("close",r);break;case"iframe":case"object":case"embed":tt("load",r);break;case"video":case"audio":for(i=0;i<Su.length;i++)tt(Su[i],r);break;case"source":tt("error",r);break;case"img":case"image":case"link":tt("error",r),tt("load",r);break;case"details":tt("toggle",r);break;case"input":Cx(r,o),tt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},tt("invalid",r);break;case"textarea":kx(r,o),tt("invalid",r)}Ih(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&Gc(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&Gc(r.textContent,s,e),i=["children",""+s]):ru.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&tt("scroll",r)}switch(n){case"input":Cc(r),Ax(r,o,!0);break;case"textarea":Cc(r),Nx(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Kc)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Px(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Or]=t,e[Ru]=r,Vb(e,t,!1,!1),t.stateNode=e;e:{switch(a=Oh(n,r),n){case"dialog":tt("cancel",e),tt("close",e),i=r;break;case"iframe":case"object":case"embed":tt("load",e),i=r;break;case"video":case"audio":for(i=0;i<Su.length;i++)tt(Su[i],e);i=r;break;case"source":tt("error",e),i=r;break;case"img":case"image":case"link":tt("error",e),tt("load",e),i=r;break;case"details":tt("toggle",e),i=r;break;case"input":Cx(e,r),i=Ah(e,r),tt("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=lt({},r,{value:void 0}),tt("invalid",e);break;case"textarea":kx(e,r),i=Nh(e,r),tt("invalid",e);break;default:i=r}Ih(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var u=s[o];o==="style"?Dx(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Ix(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&su(e,u):typeof u=="number"&&su(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ru.hasOwnProperty(o)?u!=null&&o==="onScroll"&&tt("scroll",e):u!=null&&gh(e,o,u,a))}switch(n){case"input":Cc(e),Ax(e,r,!1);break;case"textarea":Cc(e),Nx(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Oi(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Na(e,!!r.multiple,o,!1):r.defaultValue!=null&&Na(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Kc)}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&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Xt(t),null;case 6:if(e&&t.stateNode!=null)Wb(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Z(166));if(n=Wo(Du.current),Wo(Dr.current),nd(t)){if(r=t.stateNode,n=t.memoizedProps,r[Or]=t,(o=r.nodeValue!==n)&&(e=Dn,e!==null))switch(e.tag){case 3:Gc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Gc(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Or]=t,t.stateNode=r}return Xt(t),null;case 13:if(nt(ct),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ot&&Ln!==null&&t.mode&1&&!(t.flags&128))Gw(),Wa(),t.flags|=98560,o=!1;else if(o=nd(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Z(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Z(317));o[Or]=t}else Wa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xt(t),o=!1}else mr!==null&&(lg(mr),mr=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ct.current&1?Nt===0&&(Nt=3):fg())),t.updateQueue!==null&&(t.flags|=4),Xt(t),null);case 4:return Ka(),Zm(e,t),e===null&&Au(t.stateNode.containerInfo),Xt(t),null;case 10:return Sm(t.type._context),Xt(t),null;case 17:return xn(t.type)&&Qc(),Xt(t),null;case 19:if(nt(ct),o=t.memoizedState,o===null)return Xt(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)ju(o,!1);else{if(Nt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=ud(e),a!==null){for(t.flags|=128,ju(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Je(ct,ct.current&1|2),t.child}e=e.sibling}o.tail!==null&&wt()>Ja&&(t.flags|=128,r=!0,ju(o,!1),t.lanes=4194304)}else{if(!r)if(e=ud(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ju(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ot)return Xt(t),null}else 2*wt()-o.renderingStartTime>Ja&&n!==1073741824&&(t.flags|=128,r=!0,ju(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=wt(),t.sibling=null,n=ct.current,Je(ct,r?n&1|2:n&1),t):(Xt(t),null);case 22:case 23:return dg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Mn&1073741824&&(Xt(t),t.subtreeFlags&6&&(t.flags|=8192)):Xt(t),null;case 24:return null;case 25:return null}throw Error(Z(156,t.tag))}function F6(e,t){switch(wm(t),t.tag){case 1:return xn(t.type)&&Qc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ka(),nt(vn),nt(Gt),Om(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Pm(t),null;case 13:if(nt(ct),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Z(340));Wa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return nt(ct),null;case 4:return Ka(),null;case 10:return Sm(t.type._context),null;case 22:case 23:return dg(),null;case 24:return null;default:return null}}var yd=!1,Qt=!1,B6=typeof WeakSet=="function"?WeakSet:Set,ue=null;function Qa(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){gt(e,t,r)}else n.current=null}function Jm(e,t,n){try{n()}catch(r){gt(e,t,r)}}var Yb=!1;function j6(e,t){if(dm=Fc,e=_w(),rm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,u=-1,l=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(u=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++l===i&&(s=a),f===o&&++c===r&&(u=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(fm={focusedElem:e,selectionRange:n},Fc=!1,ue=t;ue!==null;)if(t=ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ue=e;else for(;ue!==null;){t=ue;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,b=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:gr(t.type,y),b);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Z(163))}}catch(T){gt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,ue=e;break}ue=t.return}return m=Yb,Yb=!1,m}function Uu(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Jm(t,n,o)}i=i.next}while(i!==r)}}function vd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function eg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function qb(e){var t=e.alternate;t!==null&&(e.alternate=null,qb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Or],delete t[Ru],delete t[gm],delete t[b6],delete t[E6])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Gb(e){return e.tag===5||e.tag===3||e.tag===4}function Kb(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kc));else if(r!==4&&(e=e.child,e!==null))for(tg(e,t,n),e=e.sibling;e!==null;)tg(e,t,n),e=e.sibling}function ng(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ng(e,t,n),e=e.sibling;e!==null;)ng(e,t,n),e=e.sibling}var Ht=null,yr=!1;function Yi(e,t,n){for(n=n.child;n!==null;)Xb(e,t,n),n=n.sibling}function Xb(e,t,n){if(Ir&&typeof Ir.onCommitFiberUnmount=="function")try{Ir.onCommitFiberUnmount(Pc,n)}catch{}switch(n.tag){case 5:Qt||Qa(n,t);case 6:var r=Ht,i=yr;Ht=null,Yi(e,t,n),Ht=r,yr=i,Ht!==null&&(yr?(e=Ht,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ht.removeChild(n.stateNode));break;case 18:Ht!==null&&(yr?(e=Ht,n=n.stateNode,e.nodeType===8?mm(e.parentNode,n):e.nodeType===1&&mm(e,n),vu(e)):mm(Ht,n.stateNode));break;case 4:r=Ht,i=yr,Ht=n.stateNode.containerInfo,yr=!0,Yi(e,t,n),Ht=r,yr=i;break;case 0:case 11:case 14:case 15:if(!Qt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&Jm(n,t,a),i=i.next}while(i!==r)}Yi(e,t,n);break;case 1:if(!Qt&&(Qa(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){gt(n,t,s)}Yi(e,t,n);break;case 21:Yi(e,t,n);break;case 22:n.mode&1?(Qt=(r=Qt)||n.memoizedState!==null,Yi(e,t,n),Qt=r):Yi(e,t,n);break;default:Yi(e,t,n)}}function Qb(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new B6),t.forEach(function(r){var i=G6.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function vr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:Ht=s.stateNode,yr=!1;break e;case 3:Ht=s.stateNode.containerInfo,yr=!0;break e;case 4:Ht=s.stateNode.containerInfo,yr=!0;break e}s=s.return}if(Ht===null)throw Error(Z(160));Xb(o,a,i),Ht=null,yr=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(l){gt(i,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Zb(t,e),t=t.sibling}function Zb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vr(t,e),Mr(e),r&4){try{Uu(3,e,e.return),vd(3,e)}catch(y){gt(e,e.return,y)}try{Uu(5,e,e.return)}catch(y){gt(e,e.return,y)}}break;case 1:vr(t,e),Mr(e),r&512&&n!==null&&Qa(n,n.return);break;case 5:if(vr(t,e),Mr(e),r&512&&n!==null&&Qa(n,n.return),e.flags&32){var i=e.stateNode;try{su(i,"")}catch(y){gt(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,s=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&Sx(i,o),Oh(s,a);var l=Oh(s,o);for(a=0;a<u.length;a+=2){var c=u[a],d=u[a+1];c==="style"?Dx(i,d):c==="dangerouslySetInnerHTML"?Ix(i,d):c==="children"?su(i,d):gh(i,c,d,l)}switch(s){case"input":kh(i,o);break;case"textarea":Rx(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?Na(i,!!o.multiple,p,!1):f!==!!o.multiple&&(o.defaultValue!=null?Na(i,!!o.multiple,o.defaultValue,!0):Na(i,!!o.multiple,o.multiple?[]:"",!1))}i[Ru]=o}catch(y){gt(e,e.return,y)}}break;case 6:if(vr(t,e),Mr(e),r&4){if(e.stateNode===null)throw Error(Z(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(y){gt(e,e.return,y)}}break;case 3:if(vr(t,e),Mr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{vu(t.containerInfo)}catch(y){gt(e,e.return,y)}break;case 4:vr(t,e),Mr(e);break;case 13:vr(t,e),Mr(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(og=wt())),r&4&&Qb(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Qt=(l=Qt)||c,vr(t,e),Qt=l):vr(t,e),Mr(e),r&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!c&&e.mode&1)for(ue=e,c=e.child;c!==null;){for(d=ue=c;ue!==null;){switch(f=ue,p=f.child,f.tag){case 0:case 11:case 14:case 15:Uu(4,f,f.return);break;case 1:Qa(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(y){gt(r,n,y)}}break;case 5:Qa(f,f.return);break;case 22:if(f.memoizedState!==null){tE(d);continue}}p!==null?(p.return=f,ue=p):tE(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,l?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=d.stateNode,u=d.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=Ox("display",a))}catch(y){gt(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(y){gt(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:vr(t,e),Mr(e),r&4&&Qb(e);break;case 21:break;default:vr(t,e),Mr(e)}}function Mr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Gb(n)){var r=n;break e}n=n.return}throw Error(Z(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(su(i,""),r.flags&=-33);var o=Kb(e);ng(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=Kb(e);tg(e,s,a);break;default:throw Error(Z(161))}}catch(u){gt(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function U6(e,t,n){ue=e,Jb(e)}function Jb(e,t,n){for(var r=(e.mode&1)!==0;ue!==null;){var i=ue,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||yd;if(!a){var s=i.alternate,u=s!==null&&s.memoizedState!==null||Qt;s=yd;var l=Qt;if(yd=a,(Qt=u)&&!l)for(ue=i;ue!==null;)a=ue,u=a.child,a.tag===22&&a.memoizedState!==null?nE(i):u!==null?(u.return=a,ue=u):nE(i);for(;o!==null;)ue=o,Jb(o),o=o.sibling;ue=i,yd=s,Qt=l}eE(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,ue=o):eE(e)}}function eE(e){for(;ue!==null;){var t=ue;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Qt||vd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Qt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:gr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&tb(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}tb(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var c=l.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&vu(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Z(163))}Qt||t.flags&512&&eg(t)}catch(f){gt(t,t.return,f)}}if(t===e){ue=null;break}if(n=t.sibling,n!==null){n.return=t.return,ue=n;break}ue=t.return}}function tE(e){for(;ue!==null;){var t=ue;if(t===e){ue=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ue=n;break}ue=t.return}}function nE(e){for(;ue!==null;){var t=ue;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{vd(4,t)}catch(u){gt(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){gt(t,i,u)}}var o=t.return;try{eg(t)}catch(u){gt(t,o,u)}break;case 5:var a=t.return;try{eg(t)}catch(u){gt(t,a,u)}}}catch(u){gt(t,t.return,u)}if(t===e){ue=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ue=s;break}ue=t.return}}var z6=Math.ceil,xd=ti.ReactCurrentDispatcher,rg=ti.ReactCurrentOwner,er=ti.ReactCurrentBatchConfig,Ue=0,Lt=null,Ct=null,Vt=0,Mn=0,Za=zi(0),Nt=0,zu=null,qo=0,wd=0,ig=0,Hu=null,bn=null,og=0,Ja=1/0,li=null,bd=!1,ag=null,qi=null,Ed=!1,Gi=null,Td=0,Vu=0,sg=null,_d=-1,Cd=0;function fn(){return Ue&6?wt():_d!==-1?_d:_d=wt()}function Ki(e){return e.mode&1?Ue&2&&Vt!==0?Vt&-Vt:_6.transition!==null?(Cd===0&&(Cd=Kx()),Cd):(e=qe,e!==0||(e=window.event,e=e===void 0?16:iw(e.type)),e):1}function xr(e,t,n,r){if(50<Vu)throw Vu=0,sg=null,Error(Z(185));pu(e,n,r),(!(Ue&2)||e!==Lt)&&(e===Lt&&(!(Ue&2)&&(wd|=n),Nt===4&&Xi(e,Vt)),En(e,r),n===1&&Ue===0&&!(t.mode&1)&&(Ja=wt()+500,Jc&&Vi()))}function En(e,t){var n=e.callbackNode;_D(e,t);var r=Dc(e,e===Lt?Vt:0);if(r===0)n!==null&&Yx(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Yx(n),t===1)e.tag===0?T6(iE.bind(null,e)):Vw(iE.bind(null,e)),x6(function(){!(Ue&6)&&Vi()}),n=null;else{switch(Xx(r)){case 1:n=Uh;break;case 4:n=qx;break;case 16:n=Nc;break;case 536870912:n=Gx;break;default:n=Nc}n=fE(n,rE.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function rE(e,t){if(_d=-1,Cd=0,Ue&6)throw Error(Z(327));var n=e.callbackNode;if(es()&&e.callbackNode!==n)return null;var r=Dc(e,e===Lt?Vt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Sd(e,r);else{t=r;var i=Ue;Ue|=2;var o=aE();(Lt!==e||Vt!==t)&&(li=null,Ja=wt()+500,Ko(e,t));do try{$6();break}catch(s){oE(e,s)}while(!0);Cm(),xd.current=o,Ue=i,Ct!==null?t=0:(Lt=null,Vt=0,t=Nt)}if(t!==0){if(t===2&&(i=zh(e),i!==0&&(r=i,t=ug(e,i))),t===1)throw n=zu,Ko(e,0),Xi(e,r),En(e,wt()),n;if(t===6)Xi(e,r);else{if(i=e.current.alternate,!(r&30)&&!H6(i)&&(t=Sd(e,r),t===2&&(o=zh(e),o!==0&&(r=o,t=ug(e,o))),t===1))throw n=zu,Ko(e,0),Xi(e,r),En(e,wt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Z(345));case 2:Xo(e,bn,li);break;case 3:if(Xi(e,r),(r&130023424)===r&&(t=og+500-wt(),10<t)){if(Dc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){fn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=hm(Xo.bind(null,e,bn,li),t);break}Xo(e,bn,li);break;case 4:if(Xi(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-pr(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=wt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*z6(r/1960))-r,10<r){e.timeoutHandle=hm(Xo.bind(null,e,bn,li),r);break}Xo(e,bn,li);break;case 5:Xo(e,bn,li);break;default:throw Error(Z(329))}}}return En(e,wt()),e.callbackNode===n?rE.bind(null,e):null}function ug(e,t){var n=Hu;return e.current.memoizedState.isDehydrated&&(Ko(e,t).flags|=256),e=Sd(e,t),e!==2&&(t=bn,bn=n,t!==null&&lg(t)),e}function lg(e){bn===null?bn=e:bn.push.apply(bn,e)}function H6(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!hr(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Xi(e,t){for(t&=~ig,t&=~wd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pr(t),r=1<<n;e[n]=-1,t&=~r}}function iE(e){if(Ue&6)throw Error(Z(327));es();var t=Dc(e,0);if(!(t&1))return En(e,wt()),null;var n=Sd(e,t);if(e.tag!==0&&n===2){var r=zh(e);r!==0&&(t=r,n=ug(e,r))}if(n===1)throw n=zu,Ko(e,0),Xi(e,t),En(e,wt()),n;if(n===6)throw Error(Z(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xo(e,bn,li),En(e,wt()),null}function cg(e,t){var n=Ue;Ue|=1;try{return e(t)}finally{Ue=n,Ue===0&&(Ja=wt()+500,Jc&&Vi())}}function Go(e){Gi!==null&&Gi.tag===0&&!(Ue&6)&&es();var t=Ue;Ue|=1;var n=er.transition,r=qe;try{if(er.transition=null,qe=1,e)return e()}finally{qe=r,er.transition=n,Ue=t,!(Ue&6)&&Vi()}}function dg(){Mn=Za.current,nt(Za)}function Ko(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,v6(n)),Ct!==null)for(n=Ct.return;n!==null;){var r=n;switch(wm(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Qc();break;case 3:Ka(),nt(vn),nt(Gt),Om();break;case 5:Pm(r);break;case 4:Ka();break;case 13:nt(ct);break;case 19:nt(ct);break;case 10:Sm(r.type._context);break;case 22:case 23:dg()}n=n.return}if(Lt=e,Ct=e=Qi(e.current,null),Vt=Mn=t,Nt=0,zu=null,ig=wd=qo=0,bn=Hu=null,$o!==null){for(t=0;t<$o.length;t++)if(n=$o[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}$o=null}return e}function oE(e,t){do{var n=Ct;try{if(Cm(),ld.current=pd,cd){for(var r=dt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}cd=!1}if(Yo=0,Dt=Rt=dt=null,Lu=!1,Mu=0,rg.current=null,n===null||n.return===null){Nt=1,zu=t,Ct=null;break}e:{var o=e,a=n.return,s=n,u=t;if(t=Vt,s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var l=u,c=s,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 p=Nb(a);if(p!==null){p.flags&=-257,Pb(p,a,s,o,t),p.mode&1&&Rb(o,l,t),t=p,u=l;var m=t.updateQueue;if(m===null){var y=new Set;y.add(u),t.updateQueue=y}else m.add(u);break e}else{if(!(t&1)){Rb(o,l,t),fg();break e}u=Error(Z(426))}}else if(ot&&s.mode&1){var b=Nb(a);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Pb(b,a,s,o,t),Tm(Xa(u,s));break e}}o=u=Xa(u,s),Nt!==4&&(Nt=2),Hu===null?Hu=[o]:Hu.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=Ab(o,u,t);eb(o,g);break e;case 1:s=u;var x=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(qi===null||!qi.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var T=kb(o,s,t);eb(o,T);break e}}o=o.return}while(o!==null)}uE(n)}catch(_){t=_,Ct===n&&n!==null&&(Ct=n=n.return);continue}break}while(!0)}function aE(){var e=xd.current;return xd.current=pd,e===null?pd:e}function fg(){(Nt===0||Nt===3||Nt===2)&&(Nt=4),Lt===null||!(qo&268435455)&&!(wd&268435455)||Xi(Lt,Vt)}function Sd(e,t){var n=Ue;Ue|=2;var r=aE();(Lt!==e||Vt!==t)&&(li=null,Ko(e,t));do try{V6();break}catch(i){oE(e,i)}while(!0);if(Cm(),Ue=n,xd.current=r,Ct!==null)throw Error(Z(261));return Lt=null,Vt=0,Nt}function V6(){for(;Ct!==null;)sE(Ct)}function $6(){for(;Ct!==null&&!mD();)sE(Ct)}function sE(e){var t=dE(e.alternate,e,Mn);e.memoizedProps=e.pendingProps,t===null?uE(e):Ct=t,rg.current=null}function uE(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=F6(n,t),n!==null){n.flags&=32767,Ct=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Nt=6,Ct=null;return}}else if(n=M6(n,t,Mn),n!==null){Ct=n;return}if(t=t.sibling,t!==null){Ct=t;return}Ct=t=e}while(t!==null);Nt===0&&(Nt=5)}function Xo(e,t,n){var r=qe,i=er.transition;try{er.transition=null,qe=1,W6(e,t,n,r)}finally{er.transition=i,qe=r}return null}function W6(e,t,n,r){do es();while(Gi!==null);if(Ue&6)throw Error(Z(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Z(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(CD(e,o),e===Lt&&(Ct=Lt=null,Vt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ed||(Ed=!0,fE(Nc,function(){return es(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=er.transition,er.transition=null;var a=qe;qe=1;var s=Ue;Ue|=4,rg.current=null,j6(e,n),Zb(n,e),d6(fm),Fc=!!dm,fm=dm=null,e.current=n,U6(n),gD(),Ue=s,qe=a,er.transition=o}else e.current=n;if(Ed&&(Ed=!1,Gi=e,Td=i),o=e.pendingLanes,o===0&&(qi=null),xD(n.stateNode),En(e,wt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(bd)throw bd=!1,e=ag,ag=null,e;return Td&1&&e.tag!==0&&es(),o=e.pendingLanes,o&1?e===sg?Vu++:(Vu=0,sg=e):Vu=0,Vi(),null}function es(){if(Gi!==null){var e=Xx(Td),t=er.transition,n=qe;try{if(er.transition=null,qe=16>e?16:e,Gi===null)var r=!1;else{if(e=Gi,Gi=null,Td=0,Ue&6)throw Error(Z(331));var i=Ue;for(Ue|=4,ue=e.current;ue!==null;){var o=ue,a=o.child;if(ue.flags&16){var s=o.deletions;if(s!==null){for(var u=0;u<s.length;u++){var l=s[u];for(ue=l;ue!==null;){var c=ue;switch(c.tag){case 0:case 11:case 15:Uu(8,c,o)}var d=c.child;if(d!==null)d.return=c,ue=d;else for(;ue!==null;){c=ue;var f=c.sibling,p=c.return;if(qb(c),c===l){ue=null;break}if(f!==null){f.return=p,ue=f;break}ue=p}}}var m=o.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var b=y.sibling;y.sibling=null,y=b}while(y!==null)}}ue=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,ue=a;else e:for(;ue!==null;){if(o=ue,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Uu(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,ue=g;break e}ue=o.return}}var x=e.current;for(ue=x;ue!==null;){a=ue;var w=a.child;if(a.subtreeFlags&2064&&w!==null)w.return=a,ue=w;else e:for(a=x;ue!==null;){if(s=ue,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:vd(9,s)}}catch(_){gt(s,s.return,_)}if(s===a){ue=null;break e}var T=s.sibling;if(T!==null){T.return=s.return,ue=T;break e}ue=s.return}}if(Ue=i,Vi(),Ir&&typeof Ir.onPostCommitFiberRoot=="function")try{Ir.onPostCommitFiberRoot(Pc,e)}catch{}r=!0}return r}finally{qe=n,er.transition=t}}return!1}function lE(e,t,n){t=Xa(n,t),t=Ab(e,t,1),e=Wi(e,t,1),t=fn(),e!==null&&(pu(e,1,t),En(e,t))}function gt(e,t,n){if(e.tag===3)lE(e,e,n);else for(;t!==null;){if(t.tag===3){lE(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qi===null||!qi.has(r))){e=Xa(n,e),e=kb(t,e,1),t=Wi(t,e,1),e=fn(),t!==null&&(pu(t,1,e),En(t,e));break}}t=t.return}}function Y6(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=fn(),e.pingedLanes|=e.suspendedLanes&n,Lt===e&&(Vt&n)===n&&(Nt===4||Nt===3&&(Vt&130023424)===Vt&&500>wt()-og?Ko(e,0):ig|=n),En(e,t)}function cE(e,t){t===0&&(e.mode&1?(t=Oc,Oc<<=1,!(Oc&130023424)&&(Oc=4194304)):t=1);var n=fn();e=ai(e,t),e!==null&&(pu(e,t,n),En(e,n))}function q6(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cE(e,n)}function G6(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Z(314))}r!==null&&r.delete(t),cE(e,n)}var dE;dE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||vn.current)wn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return wn=!1,L6(e,t,n);wn=!!(e.flags&131072)}else wn=!1,ot&&t.flags&1048576&&$w(t,td,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;gd(e,t),e=t.pendingProps;var i=Ha(t,Gt.current);Ga(t,n),i=Mm(null,t,r,e,i,n);var o=Fm();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xn(r)?(o=!0,Zc(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Rm(t),i.updater=hd,t.stateNode=i,i._reactInternals=t,Vm(t,r,e,n),t=qm(null,t,r,!0,o,n)):(t.tag=0,ot&&o&&xm(t),dn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(gd(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=X6(r),e=gr(r,e),i){case 0:t=Ym(null,t,r,e,n);break e;case 1:t=Fb(null,t,r,e,n);break e;case 11:t=Ib(null,t,r,e,n);break e;case 14:t=Ob(null,t,r,gr(r.type,e),n);break e}throw Error(Z(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gr(r,i),Ym(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gr(r,i),Fb(e,t,r,i,n);case 3:e:{if(Bb(t),e===null)throw Error(Z(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Jw(e,t),sd(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Xa(Error(Z(423)),t),t=jb(e,t,r,n,i);break e}else if(r!==i){i=Xa(Error(Z(424)),t),t=jb(e,t,r,n,i);break e}else for(Ln=Ui(t.stateNode.containerInfo.firstChild),Dn=t,ot=!0,mr=null,n=Qw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wa(),r===i){t=ui(e,t,n);break e}dn(e,t,r,n)}t=t.child}return t;case 5:return nb(t),e===null&&Em(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,pm(r,i)?a=null:o!==null&&pm(r,o)&&(t.flags|=32),Mb(e,t),dn(e,t,a,n),t.child;case 6:return e===null&&Em(t),null;case 13:return Ub(e,t,n);case 4:return Nm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ya(t,null,r,n):dn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gr(r,i),Ib(e,t,r,i,n);case 7:return dn(e,t,t.pendingProps,n),t.child;case 8:return dn(e,t,t.pendingProps.children,n),t.child;case 12:return dn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Je(id,r._currentValue),r._currentValue=a,o!==null)if(hr(o.value,a)){if(o.children===i.children&&!vn.current){t=ui(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=si(-1,n&-n),u.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Am(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Z(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Am(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}dn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ga(t,n),i=Zn(i),r=r(i),t.flags|=1,dn(e,t,r,n),t.child;case 14:return r=t.type,i=gr(r,t.pendingProps),i=gr(r.type,i),Ob(e,t,r,i,n);case 15:return Db(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gr(r,i),gd(e,t),t.tag=1,xn(r)?(e=!0,Zc(t)):e=!1,Ga(t,n),Cb(t,r,i),Vm(t,r,i,n),qm(null,t,r,!0,e,n);case 19:return Hb(e,t,n);case 22:return Lb(e,t,n)}throw Error(Z(156,t.tag))};function fE(e,t){return Wx(e,t)}function K6(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tr(e,t,n,r){return new K6(e,t,n,r)}function pg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function X6(e){if(typeof e=="function")return pg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xh)return 11;if(e===Eh)return 14}return 2}function Qi(e,t){var n=e.alternate;return n===null?(n=tr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ad(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")pg(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ra:return Qo(n.children,i,o,t);case yh:a=8,i|=8;break;case vh:return e=tr(12,n,t,i|2),e.elementType=vh,e.lanes=o,e;case wh:return e=tr(13,n,t,i),e.elementType=wh,e.lanes=o,e;case bh:return e=tr(19,n,t,i),e.elementType=bh,e.lanes=o,e;case bx:return kd(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xx:a=10;break e;case wx:a=9;break e;case xh:a=11;break e;case Eh:a=14;break e;case Ii:a=16,r=null;break e}throw Error(Z(130,e==null?e:typeof e,""))}return t=tr(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Qo(e,t,n,r){return e=tr(7,e,r,t),e.lanes=n,e}function kd(e,t,n,r){return e=tr(22,e,r,t),e.elementType=bx,e.lanes=n,e.stateNode={isHidden:!1},e}function hg(e,t,n){return e=tr(6,e,null,t),e.lanes=n,e}function mg(e,t,n){return t=tr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Q6(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hh(0),this.expirationTimes=Hh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gg(e,t,n,r,i,o,a,s,u){return e=new Q6(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=tr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rm(o),e}function Z6(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ka,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function pE(e){if(!e)return Hi;e=e._reactInternals;e:{if(jo(e)!==e||e.tag!==1)throw Error(Z(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(xn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Z(171))}if(e.tag===1){var n=e.type;if(xn(n))return zw(e,n,t)}return t}function hE(e,t,n,r,i,o,a,s,u){return e=gg(n,r,!0,e,i,o,a,s,u),e.context=pE(null),n=e.current,r=fn(),i=Ki(n),o=si(r,i),o.callback=t??null,Wi(n,o,i),e.current.lanes=i,pu(e,i,r),En(e,r),e}function Rd(e,t,n,r){var i=t.current,o=fn(),a=Ki(i);return n=pE(n),t.context===null?t.context=n:t.pendingContext=n,t=si(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Wi(i,t,a),e!==null&&(xr(e,i,a,o),ad(e,i,a)),a}function Nd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function mE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function yg(e,t){mE(e,t),(e=e.alternate)&&mE(e,t)}function J6(){return null}var gE=typeof reportError=="function"?reportError:function(e){console.error(e)};function vg(e){this._internalRoot=e}Pd.prototype.render=vg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Z(409));Rd(e,t,null,null)},Pd.prototype.unmount=vg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Go(function(){Rd(null,e,null,null)}),t[ni]=null}};function Pd(e){this._internalRoot=e}Pd.prototype.unstable_scheduleHydration=function(e){if(e){var t=Jx();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Fi.length&&t!==0&&t<Fi[n].priority;n++);Fi.splice(n,0,e),n===0&&nw(e)}};function xg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Id(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function yE(){}function eL(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var l=Nd(a);o.call(l)}}var a=hE(t,r,e,0,null,!1,!1,"",yE);return e._reactRootContainer=a,e[ni]=a.current,Au(e.nodeType===8?e.parentNode:e),Go(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var l=Nd(u);s.call(l)}}var u=gg(e,0,!1,null,null,!1,!1,"",yE);return e._reactRootContainer=u,e[ni]=u.current,Au(e.nodeType===8?e.parentNode:e),Go(function(){Rd(t,u,n,r)}),u}function Od(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var u=Nd(a);s.call(u)}}Rd(t,a,e,i)}else a=eL(n,t,e,i,r);return Nd(a)}Qx=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=fu(t.pendingLanes);n!==0&&(Vh(t,n|1),En(t,wt()),!(Ue&6)&&(Ja=wt()+500,Vi()))}break;case 13:Go(function(){var r=ai(e,1);if(r!==null){var i=fn();xr(r,e,1,i)}}),yg(e,1)}},$h=function(e){if(e.tag===13){var t=ai(e,134217728);if(t!==null){var n=fn();xr(t,e,134217728,n)}yg(e,134217728)}},Zx=function(e){if(e.tag===13){var t=Ki(e),n=ai(e,t);if(n!==null){var r=fn();xr(n,e,t,r)}yg(e,t)}},Jx=function(){return qe},ew=function(e,t){var n=qe;try{return qe=e,t()}finally{qe=n}},Mh=function(e,t,n){switch(t){case"input":if(kh(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Xc(r);if(!i)throw Error(Z(90));_x(r),kh(r,i)}}}break;case"textarea":Rx(e,n);break;case"select":t=n.value,t!=null&&Na(e,!!n.multiple,t,!1)}},Bx=cg,jx=Go;var tL={usingClientEntryPoint:!1,Events:[Nu,Ua,Xc,Mx,Fx,cg]},$u={findFiberByHostInstance:Uo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nL={bundleType:$u.bundleType,version:$u.version,rendererPackageName:$u.rendererPackageName,rendererConfig:$u.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ti.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Vx(e),e===null?null:e.stateNode},findFiberByHostInstance:$u.findFiberByHostInstance||J6,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 Dd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dd.isDisabled&&Dd.supportsFiber)try{Pc=Dd.inject(nL),Ir=Dd}catch{}}Pn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tL,Pn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!xg(t))throw Error(Z(200));return Z6(e,t,null,n)},Pn.createRoot=function(e,t){if(!xg(e))throw Error(Z(299));var n=!1,r="",i=gE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=gg(e,1,!1,null,null,n,!1,r,i),e[ni]=t.current,Au(e.nodeType===8?e.parentNode:e),new vg(t)},Pn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Z(188)):(e=Object.keys(e).join(","),Error(Z(268,e)));return e=Vx(t),e=e===null?null:e.stateNode,e},Pn.flushSync=function(e){return Go(e)},Pn.hydrate=function(e,t,n){if(!Id(t))throw Error(Z(200));return Od(null,e,t,!0,n)},Pn.hydrateRoot=function(e,t,n){if(!xg(e))throw Error(Z(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=gE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=hE(t,null,e,1,n??null,i,!1,o,a),e[ni]=t.current,Au(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Pd(t)},Pn.render=function(e,t,n){if(!Id(t))throw Error(Z(200));return Od(null,e,t,!1,n)},Pn.unmountComponentAtNode=function(e){if(!Id(e))throw Error(Z(40));return e._reactRootContainer?(Go(function(){Od(null,null,e,!1,function(){e._reactRootContainer=null,e[ni]=null})}),!0):!1},Pn.unstable_batchedUpdates=cg,Pn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Id(n))throw Error(Z(200));if(e==null||e._reactInternals===void 0)throw Error(Z(38));return Od(e,t,n,!1,r)},Pn.version="18.3.1-next-f1338f8080-20240426";function vE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vE)}catch(e){console.error(e)}}vE(),px.exports=Pn;var Zo=px.exports,xE,wE=Zo;xE=wE.createRoot,wE.hydrateRoot;const bE="3.0.42";function Ld(e){"@babel/helpers - typeof";return Ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ld(e)}var rL=/^\s+/,iL=/\s+$/;function fe(e,t){if(e=e||"",t=t||{},e instanceof fe)return e;if(!(this instanceof fe))return new fe(e,t);var n=oL(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}fe.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,o,a,s;return n=t.r/255,r=t.g/255,i=t.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*a+.0722*s},setAlpha:function(t){return this._a=AE(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=TE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=TE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=EE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=EE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return _E(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return lL(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(at(this._r,255)*100)+"%",g:Math.round(at(this._g,255)*100)+"%",b:Math.round(at(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(at(this._r,255)*100)+"%, "+Math.round(at(this._g,255)*100)+"%, "+Math.round(at(this._b,255)*100)+"%)":"rgba("+Math.round(at(this._r,255)*100)+"%, "+Math.round(at(this._g,255)*100)+"%, "+Math.round(at(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:bL[_E(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+CE(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=fe(t);r="#"+CE(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return fe(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(pL,arguments)},brighten:function(){return this._applyModification(hL,arguments)},darken:function(){return this._applyModification(mL,arguments)},desaturate:function(){return this._applyModification(cL,arguments)},saturate:function(){return this._applyModification(dL,arguments)},greyscale:function(){return this._applyModification(fL,arguments)},spin:function(){return this._applyModification(gL,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(xL,arguments)},complement:function(){return this._applyCombination(yL,arguments)},monochromatic:function(){return this._applyCombination(wL,arguments)},splitcomplement:function(){return this._applyCombination(vL,arguments)},triad:function(){return this._applyCombination(SE,[3])},tetrad:function(){return this._applyCombination(SE,[4])}},fe.fromRatio=function(e,t){if(Ld(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Wu(e[r]));e=n}return fe(e,t)};function oL(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=CL(e)),Ld(e)=="object"&&(ci(e.r)&&ci(e.g)&&ci(e.b)?(t=aL(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ci(e.h)&&ci(e.s)&&ci(e.v)?(r=Wu(e.s),i=Wu(e.v),t=uL(e.h,r,i),a=!0,s="hsv"):ci(e.h)&&ci(e.s)&&ci(e.l)&&(r=Wu(e.s),o=Wu(e.l),t=sL(e.h,r,o),a=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=AE(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function aL(e,t,n){return{r:at(e,255)*255,g:at(t,255)*255,b:at(n,255)*255}}function EE(e,t,n){e=at(e,255),t=at(t,255),n=at(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,a,s=(r+i)/2;if(r==i)o=a=0;else{var u=r-i;switch(a=s>.5?u/(2-r-i):u/(r+i),r){case e:o=(t-n)/u+(t<n?6:0);break;case t:o=(n-e)/u+2;break;case n:o=(e-t)/u+4;break}o/=6}return{h:o,s:a,l:s}}function sL(e,t,n){var r,i,o;e=at(e,360),t=at(t,100),n=at(n,100);function a(l,c,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?l+(c-l)*6*d:d<1/2?c:d<2/3?l+(c-l)*(2/3-d)*6:l}if(t===0)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=a(u,s,e+1/3),i=a(u,s,e),o=a(u,s,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function TE(e,t,n){e=at(e,255),t=at(t,255),n=at(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,a,s=r,u=r-i;if(a=r===0?0:u/r,r==i)o=0;else{switch(r){case e:o=(t-n)/u+(t<n?6:0);break;case t:o=(n-e)/u+2;break;case n:o=(e-t)/u+4;break}o/=6}return{h:o,s:a,v:s}}function uL(e,t,n){e=at(e,360)*6,t=at(t,100),n=at(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),u=r%6,l=[n,a,o,o,s,n][u],c=[s,n,n,a,o,o][u],d=[o,o,s,n,n,a][u];return{r:l*255,g:c*255,b:d*255}}function _E(e,t,n,r){var i=[wr(Math.round(e).toString(16)),wr(Math.round(t).toString(16)),wr(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function lL(e,t,n,r,i){var o=[wr(Math.round(e).toString(16)),wr(Math.round(t).toString(16)),wr(Math.round(n).toString(16)),wr(kE(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function CE(e,t,n,r){var i=[wr(kE(r)),wr(Math.round(e).toString(16)),wr(Math.round(t).toString(16)),wr(Math.round(n).toString(16))];return i.join("")}fe.equals=function(e,t){return!e||!t?!1:fe(e).toRgbString()==fe(t).toRgbString()},fe.random=function(){return fe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function cL(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s-=t/100,n.s=Md(n.s),fe(n)}function dL(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s+=t/100,n.s=Md(n.s),fe(n)}function fL(e){return fe(e).desaturate(100)}function pL(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l+=t/100,n.l=Md(n.l),fe(n)}function hL(e,t){t=t===0?0:t||10;var n=fe(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),fe(n)}function mL(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l-=t/100,n.l=Md(n.l),fe(n)}function gL(e,t){var n=fe(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,fe(n)}function yL(e){var t=fe(e).toHsl();return t.h=(t.h+180)%360,fe(t)}function SE(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=fe(e).toHsl(),r=[fe(e)],i=360/t,o=1;o<t;o++)r.push(fe({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function vL(e){var t=fe(e).toHsl(),n=t.h;return[fe(e),fe({h:(n+72)%360,s:t.s,l:t.l}),fe({h:(n+216)%360,s:t.s,l:t.l})]}function xL(e,t,n){t=t||6,n=n||30;var r=fe(e).toHsl(),i=360/n,o=[fe(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(fe(r));return o}function wL(e,t){t=t||6;for(var n=fe(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(fe({h:r,s:i,v:o})),o=(o+s)%1;return a}fe.mix=function(e,t,n){n=n===0?0:n||50;var r=fe(e).toRgb(),i=fe(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return fe(a)},fe.readability=function(e,t){var n=fe(e),r=fe(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},fe.isReadable=function(e,t,n){var r=fe.readability(e,t),i,o;switch(o=!1,i=SL(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},fe.mostReadable=function(e,t,n){var r=null,i=0,o,a,s,u;n=n||{},a=n.includeFallbackColors,s=n.level,u=n.size;for(var l=0;l<t.length;l++)o=fe.readability(e,t[l]),o>i&&(i=o,r=fe(t[l]));return fe.isReadable(e,r,{level:s,size:u})||!a?r:(n.includeFallbackColors=!1,fe.mostReadable(e,["#fff","#000"],n))};var wg=fe.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},bL=fe.hexNames=EL(wg);function EL(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function AE(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function at(e,t){TL(e)&&(e="100%");var n=_L(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Md(e){return Math.min(1,Math.max(0,e))}function Fn(e){return parseInt(e,16)}function TL(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function _L(e){return typeof e=="string"&&e.indexOf("%")!=-1}function wr(e){return e.length==1?"0"+e:""+e}function Wu(e){return e<=1&&(e=e*100+"%"),e}function kE(e){return Math.round(parseFloat(e)*255).toString(16)}function RE(e){return Fn(e)/255}var br=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ci(e){return!!br.CSS_UNIT.exec(e)}function CL(e){e=e.replace(rL,"").replace(iL,"").toLowerCase();var t=!1;if(wg[e])e=wg[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=br.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=br.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=br.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=br.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=br.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=br.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=br.hex8.exec(e))?{r:Fn(n[1]),g:Fn(n[2]),b:Fn(n[3]),a:RE(n[4]),format:t?"name":"hex8"}:(n=br.hex6.exec(e))?{r:Fn(n[1]),g:Fn(n[2]),b:Fn(n[3]),format:t?"name":"hex"}:(n=br.hex4.exec(e))?{r:Fn(n[1]+""+n[1]),g:Fn(n[2]+""+n[2]),b:Fn(n[3]+""+n[3]),a:RE(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=br.hex3.exec(e))?{r:Fn(n[1]+""+n[1]),g:Fn(n[2]+""+n[2]),b:Fn(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function SL(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}const AL=350,NE=400,PE=600,bg={widgetMinHeight:"min-h-[400px]",widgetMaxHeight:"max-h-[600px]",widgetHeight:"h-[600px]"},IE=({primary:e="hsl(0, 0%, 0%)"})=>{const t=fe(e).toHsl(),n=fe(e).isLight()?"240 10% 3.9%":"0 0% 100%";return{"--opencx-primary":`${t.h} ${t.s*100}% ${t.l*100}%`,"--opencx-primary-foreground":n,"--opencx-background":"0 0% 100%","--opencx-foreground":"240 10% 3.9%","--opencx-accent":"240 4.8% 95.9%","--opencx-accent-foreground":"240 5.9% 10%","--opencx-destructive":"0 84.2% 60.2%","--opencx-destructive-foreground":"0 0% 98%","--opencx-secondary":"240 4.8% 95.9%","--opencx-secondary-foreground":"240 5.9% 10%","--opencx-muted":"240 4.8% 95.9%","--opencx-muted-foreground":"240 3.8% 46.1%","--opencx-input":"240 5.9% 90%","--opencx-border":"240 5.9% 90%","--opencx-ring":"240 5.9% 10%"}};function kL(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function Yu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Eg=e=>Array.isArray(e);function OE(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function qu(e){return typeof e=="string"||Array.isArray(e)}function DE(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Tg(e,t,n,r){if(typeof t=="function"){const[i,o]=DE(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=DE(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function Fd(e,t,n){const r=e.getProps();return Tg(r,t,n!==void 0?n:r.custom,e)}const _g=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Cg=["initial",..._g],Gu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Zi=new Set(Gu),di=e=>e*1e3,fi=e=>e/1e3,RL={type:"spring",stiffness:500,damping:25,restSpeed:10},NL=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),PL={type:"keyframes",duration:.8},IL={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},OL=(e,{keyframes:t})=>t.length>2?PL:Zi.has(e)?e.startsWith("scale")?NL(t[1]):RL:IL;function Sg(e,t){return e?e[t]||e.default||e:void 0}const DL={skipAnimations:!1,useManualTiming:!1},LL=e=>e!==null;function Bd(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(LL),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const Zt=e=>e;function ML(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(l){o.has(l)&&(u.schedule(l),e()),l(a)}const u={schedule:(l,c=!1,d=!1)=>{const p=d&&r?t:n;return c&&o.add(l),p.has(l)||p.add(l),l},cancel:l=>{n.delete(l),o.delete(l)},process:l=>{if(a=l,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,i&&(i=!1,u.process(l))}};return u}const jd=["read","resolveKeyframes","update","preRender","render","postRender"],FL=40;function LE(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=jd.reduce((g,x)=>(g[x]=ML(o),g),{}),{read:s,resolveKeyframes:u,update:l,preRender:c,render:d,postRender:f}=a,p=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,FL),1),i.timestamp=g,i.isProcessing=!0,s.process(i),u.process(i),l.process(i),c.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:jd.reduce((g,x)=>{const w=a[x];return g[x]=(T,_=!1,C=!1)=>(n||m(),w.schedule(T,_,C)),g},{}),cancel:g=>{for(let x=0;x<jd.length;x++)a[jd[x]].cancel(g)},state:i,steps:a}}const{schedule:Xe,cancel:Ji,state:$t,steps:Ag}=LE(typeof requestAnimationFrame<"u"?requestAnimationFrame:Zt,!0),ME=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,BL=1e-7,jL=12;function UL(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=ME(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>BL&&++s<jL);return a}function Ku(e,t,n,r){if(e===t&&n===r)return Zt;const i=o=>UL(o,0,1,e,n);return o=>o===0||o===1?o:ME(i(o),t,r)}const FE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,BE=e=>t=>1-e(1-t),jE=Ku(.33,1.53,.69,.99),kg=BE(jE),UE=FE(kg),zE=e=>(e*=2)<1?.5*kg(e):.5*(2-Math.pow(2,-10*(e-1))),Rg=e=>1-Math.sin(Math.acos(e)),HE=BE(Rg),VE=FE(Rg),$E=e=>/^0[^.\s]+$/u.test(e);function zL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$E(e):!0}let Ng=Zt;const WE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),YE=e=>t=>typeof t=="string"&&t.startsWith(e),qE=YE("--"),HL=YE("var(--"),Pg=e=>HL(e)?VL.test(e.split("/*")[0].trim()):!1,VL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$L=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function WL(e){const t=$L.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function GE(e,t,n=1){const[r,i]=WL(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return WE(a)?parseFloat(a):a}return Pg(i)?GE(i,t,n+1):i}const eo=(e,t,n)=>n>t?t:n<e?e:n,ts={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Xu={...ts,transform:e=>eo(0,1,e)},Ud={...ts,default:1},Qu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),to=Qu("deg"),Fr=Qu("%"),ye=Qu("px"),YL=Qu("vh"),qL=Qu("vw"),KE={...Fr,parse:e=>Fr.parse(e)/100,transform:e=>Fr.transform(e*100)},GL=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),XE=e=>e===ts||e===ye,QE=(e,t)=>parseFloat(e.split(", ")[t]),ZE=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return QE(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?QE(o[1],e):0}},KL=new Set(["x","y","z"]),XL=Gu.filter(e=>!KL.has(e));function QL(e){const t=[];return XL.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ns={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:ZE(4,13),y:ZE(5,14)};ns.translateX=ns.x,ns.translateY=ns.y;const JE=e=>t=>t.test(e),eT=[ts,ye,Fr,to,qL,YL,{test:e=>e==="auto",parse:e=>e}],tT=e=>eT.find(JE(e)),Jo=new Set;let Ig=!1,Og=!1;function nT(){if(Og){const e=Array.from(Jo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=QL(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{var s;(s=r.getValue(o))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Og=!1,Ig=!1,Jo.forEach(e=>e.complete()),Jo.clear()}function rT(){Jo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Og=!0)})}function ZL(){rT(),nT()}class Dg{constructor(t,n,r,i,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Jo.add(this),Ig||(Ig=!0,Xe.read(rT),Xe.resolveKeyframes(nT))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const a=i==null?void 0:i.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const u=r.readValue(n,s);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=s),i&&a===void 0&&i.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Jo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Jo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Zu=e=>Math.round(e*1e5)/1e5,Lg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function JL(e){return e==null}const e4=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Mg=(e,t)=>n=>!!(typeof n=="string"&&e4.test(n)&&n.startsWith(e)||t&&!JL(n)&&Object.prototype.hasOwnProperty.call(n,t)),iT=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,s]=r.match(Lg);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},t4=e=>eo(0,255,e),Fg={...ts,transform:e=>Math.round(t4(e))},ea={test:Mg("rgb","red"),parse:iT("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Fg.transform(e)+", "+Fg.transform(t)+", "+Fg.transform(n)+", "+Zu(Xu.transform(r))+")"};function n4(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Bg={test:Mg("#"),parse:n4,transform:ea.transform},rs={test:Mg("hsl","hue"),parse:iT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Fr.transform(Zu(t))+", "+Fr.transform(Zu(n))+", "+Zu(Xu.transform(r))+")"},Jt={test:e=>ea.test(e)||Bg.test(e)||rs.test(e),parse:e=>ea.test(e)?ea.parse(e):rs.test(e)?rs.parse(e):Bg.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ea.transform(e):rs.transform(e)},r4=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function i4(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Lg))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(r4))===null||n===void 0?void 0:n.length)||0)>0}const oT="number",aT="color",o4="var",a4="var(",sT="${}",s4=/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 Ju(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(s4,u=>(Jt.test(u)?(r.color.push(o),i.push(aT),n.push(Jt.parse(u))):u.startsWith(a4)?(r.var.push(o),i.push(o4),n.push(u)):(r.number.push(o),i.push(oT),n.push(parseFloat(u))),++o,sT)).split(sT);return{values:n,split:s,indexes:r,types:i}}function uT(e){return Ju(e).values}function lT(e){const{split:t,types:n}=Ju(e),r=t.length;return i=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],i[a]!==void 0){const s=n[a];s===oT?o+=Zu(i[a]):s===aT?o+=Jt.transform(i[a]):o+=i[a]}return o}}const u4=e=>typeof e=="number"?0:e;function l4(e){const t=uT(e);return lT(e)(t.map(u4))}const no={test:i4,parse:uT,createTransformer:lT,getAnimatableNone:l4},c4=new Set(["brightness","contrast","saturate","opacity"]);function d4(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Lg)||[];if(!r)return e;const i=n.replace(r,"");let o=c4.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const f4=/\b([a-z-]*)\(.*?\)/gu,jg={...no,getAnimatableNone:e=>{const t=e.match(f4);return t?t.map(d4).join(" "):e}},p4={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},h4={rotate:to,rotateX:to,rotateY:to,rotateZ:to,scale:Ud,scaleX:Ud,scaleY:Ud,scaleZ:Ud,skew:to,skewX:to,skewY:to,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Xu,originX:KE,originY:KE,originZ:ye},cT={...ts,transform:Math.round},Ug={...p4,...h4,zIndex:cT,size:ye,fillOpacity:Xu,strokeOpacity:Xu,numOctaves:cT},m4={...Ug,color:Jt,backgroundColor:Jt,outlineColor:Jt,fill:Jt,stroke:Jt,borderColor:Jt,borderTopColor:Jt,borderRightColor:Jt,borderBottomColor:Jt,borderLeftColor:Jt,filter:jg,WebkitFilter:jg},zg=e=>m4[e];function dT(e,t){let n=zg(e);return n!==jg&&(n=no),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const g4=new Set(["auto","none","0"]);function y4(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!g4.has(o)&&Ju(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=dT(n,i)}class fT extends Dg{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let l=t[u];if(typeof l=="string"&&(l=l.trim(),Pg(l))){const c=GE(l,n.current);c!==void 0&&(t[u]=c),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!GL.has(r)||t.length!==2)return;const[i,o]=t,a=tT(i),s=tT(o);if(a!==s)if(XE(a)&&XE(s))for(let u=0;u<t.length;u++){const l=t[u];typeof l=="string"&&(t[u]=parseFloat(l))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)zL(t[i])&&r.push(i);r.length&&y4(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ns[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const a=i.length-1,s=i[a];i[a]=ns[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([u,l])=>{n.getValue(u).set(l)}),this.resolveNoneKeyframes()}}function Hg(e){return typeof e=="function"}let zd;function v4(){zd=void 0}const Br={now:()=>(zd===void 0&&Br.set($t.isProcessing||DL.useManualTiming?$t.timestamp:performance.now()),zd),set:e=>{zd=e,queueMicrotask(v4)}},pT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(no.test(e)||e==="0")&&!e.startsWith("url("));function x4(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function w4(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=pT(i,t),s=pT(o,t);return!a||!s?!1:x4(e)||(n==="spring"||Hg(n))&&r}const b4=40;class hT{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Br.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>b4?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&ZL(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Br.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:a,onComplete:s,onUpdate:u,isGenerator:l}=this.options;if(!l&&!w4(t,r,i,o))if(a)this.options.duration=0;else{u==null||u(Bd(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function mT(e,t){return t?e*(1e3/t):0}const E4=5;function gT(e,t,n){const r=Math.max(t-E4,0);return mT(n-e(r),t-r)}const Vg=.001,T4=.01,_4=10,C4=.05,S4=1;function A4({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,a=1-t;a=eo(C4,S4,a),e=eo(T4,_4,fi(e)),a<1?(i=l=>{const c=l*a,d=c*e,f=c-n,p=$g(l,a),m=Math.exp(-d);return Vg-f/p*m},o=l=>{const d=l*a*e,f=d*n+n,p=Math.pow(a,2)*Math.pow(l,2)*e,m=Math.exp(-d),y=$g(Math.pow(l,2),a);return(-i(l)+Vg>0?-1:1)*((f-p)*m)/y}):(i=l=>{const c=Math.exp(-l*e),d=(l-n)*e+1;return-Vg+c*d},o=l=>{const c=Math.exp(-l*e),d=(n-l)*(e*e);return c*d});const s=5/e,u=R4(i,o,s);if(e=di(e),isNaN(u))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const k4=12;function R4(e,t,n){let r=n;for(let i=1;i<k4;i++)r=r-e(r)/t(r);return r}function $g(e,t){return e*Math.sqrt(1-t*t)}const N4=["duration","bounce"],P4=["stiffness","damping","mass"];function yT(e,t){return t.some(n=>e[n]!==void 0)}function I4(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!yT(e,P4)&&yT(e,N4)){const n=A4(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function vT({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:s,damping:u,mass:l,duration:c,velocity:d,isResolvedFromDuration:f}=I4({...r,velocity:-fi(r.velocity||0)}),p=d||0,m=u/(2*Math.sqrt(s*l)),y=o-i,b=fi(Math.sqrt(s/l)),g=Math.abs(y)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let x;if(m<1){const w=$g(b,m);x=T=>{const _=Math.exp(-m*b*T);return o-_*((p+m*b*y)/w*Math.sin(w*T)+y*Math.cos(w*T))}}else if(m===1)x=w=>o-Math.exp(-b*w)*(y+(p+b*y)*w);else{const w=b*Math.sqrt(m*m-1);x=T=>{const _=Math.exp(-m*b*T),C=Math.min(w*T,300);return o-_*((p+m*b*y)*Math.sinh(C)+w*y*Math.cosh(C))/w}}return{calculatedDuration:f&&c||null,next:w=>{const T=x(w);if(f)a.done=w>=c;else{let _=0;m<1&&(_=w===0?di(p):gT(x,w,T));const C=Math.abs(_)<=n,R=Math.abs(o-T)<=t;a.done=C&&R}return a.value=a.done?o:T,a}}}function xT({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:u,restDelta:l=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=O=>s!==void 0&&O<s||u!==void 0&&O>u,m=O=>s===void 0?u:u===void 0||Math.abs(s-O)<Math.abs(u-O)?s:u;let y=n*t;const b=d+y,g=a===void 0?b:a(b);g!==b&&(y=g-d);const x=O=>-y*Math.exp(-O/r),w=O=>g+x(O),T=O=>{const V=x(O),P=w(O);f.done=Math.abs(V)<=l,f.value=f.done?g:P};let _,C;const R=O=>{p(f.value)&&(_=O,C=vT({keyframes:[f.value,m(f.value)],velocity:gT(w,O,f.value),damping:i,stiffness:o,restDelta:l,restSpeed:c}))};return R(0),{calculatedDuration:null,next:O=>{let V=!1;return!C&&_===void 0&&(V=!0,T(O),R(O)),_!==void 0&&O>=_?C.next(O-_):(!V&&T(O),f)}}}const O4=Ku(.42,0,1,1),D4=Ku(0,0,.58,1),wT=Ku(.42,0,.58,1),L4=e=>Array.isArray(e)&&typeof e[0]!="number",Wg=e=>Array.isArray(e)&&typeof e[0]=="number",bT={linear:Zt,easeIn:O4,easeInOut:wT,easeOut:D4,circIn:Rg,circInOut:VE,circOut:HE,backIn:kg,backInOut:UE,backOut:jE,anticipate:zE},ET=e=>{if(Wg(e)){Ng(e.length===4);const[t,n,r,i]=e;return Ku(t,n,r,i)}else if(typeof e=="string")return Ng(bT[e]!==void 0),bT[e];return e},M4=(e,t)=>n=>t(e(n)),pi=(...e)=>e.reduce(M4),is=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ft=(e,t,n)=>e+(t-e)*n;function Yg(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function F4({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;i=Yg(u,s,e+1/3),o=Yg(u,s,e),a=Yg(u,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function Hd(e,t){return n=>n>0?t:e}const qg=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},B4=[Bg,ea,rs],j4=e=>B4.find(t=>t.test(e));function TT(e){const t=j4(e);if(!t)return!1;let n=t.parse(e);return t===rs&&(n=F4(n)),n}const _T=(e,t)=>{const n=TT(e),r=TT(t);if(!n||!r)return Hd(e,t);const i={...n};return o=>(i.red=qg(n.red,r.red,o),i.green=qg(n.green,r.green,o),i.blue=qg(n.blue,r.blue,o),i.alpha=ft(n.alpha,r.alpha,o),ea.transform(i))},Gg=new Set(["none","hidden"]);function U4(e,t){return Gg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function z4(e,t){return n=>ft(e,t,n)}function Kg(e){return typeof e=="number"?z4:typeof e=="string"?Pg(e)?Hd:Jt.test(e)?_T:$4:Array.isArray(e)?CT:typeof e=="object"?Jt.test(e)?_T:H4:Hd}function CT(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>Kg(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}}function H4(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Kg(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function V4(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],s=e.indexes[a][i[a]],u=(n=e.values[s])!==null&&n!==void 0?n:0;r[o]=u,i[a]++}return r}const $4=(e,t)=>{const n=no.createTransformer(t),r=Ju(e),i=Ju(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Gg.has(e)&&!i.values.length||Gg.has(t)&&!r.values.length?U4(e,t):pi(CT(V4(r,i),i.values),n):Hd(e,t)};function ST(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ft(e,t,n):Kg(e)(e,t)}function W4(e,t,n){const r=[],i=n||ST,o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]||Zt:t;s=pi(u,s)}r.push(s)}return r}function Y4(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Ng(o===t.length),o===1)return()=>t[0];if(o===2&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=W4(t,r,i),s=a.length,u=l=>{let c=0;if(s>1)for(;c<e.length-2&&!(l<e[c+1]);c++);const d=is(e[c],e[c+1],l);return a[c](d)};return n?l=>u(eo(e[0],e[o-1],l)):u}function q4(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=is(0,t,r);e.push(ft(n,1,i))}}function G4(e){const t=[0];return q4(t,e.length-1),t}function K4(e,t){return e.map(n=>n*t)}function X4(e,t){return e.map(()=>t||wT).splice(0,e.length-1)}function Vd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=L4(r)?r.map(ET):ET(r),o={done:!1,value:t[0]},a=K4(n&&n.length===t.length?n:G4(t),e),s=Y4(a,t,{ease:Array.isArray(i)?i:X4(t,i)});return{calculatedDuration:e,next:u=>(o.value=s(u),o.done=u>=e,o)}}const AT=2e4;function Q4(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<AT;)t+=n,r=e.next(t);return t>=AT?1/0:t}const Z4=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Xe.update(t,!0),stop:()=>Ji(t),now:()=>$t.isProcessing?$t.timestamp:Br.now()}},J4={decay:xT,inertia:xT,tween:Vd,keyframes:Vd,spring:vT},eM=e=>e/100;class Xg extends hT{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:u}=this.options;u&&u()};const{name:n,motionValue:r,element:i,keyframes:o}=this.options,a=(i==null?void 0:i.KeyframeResolver)||Dg,s=(u,l)=>this.onKeyframesResolved(u,l);this.resolver=new a(o,s,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=this.options,s=Hg(n)?n:J4[n]||Vd;let u,l;s!==Vd&&typeof t[0]!="number"&&(u=pi(eM,ST(t[0],t[1])),t=[0,100]);const c=s({...this.options,keyframes:t});o==="mirror"&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Q4(c));const{calculatedDuration:d}=c,f=d+i,p=f*(r+1)-i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:u,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:u,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return o.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:y,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let w=this.currentTime,T=o;if(p){const O=Math.min(this.currentTime,c)/d;let V=Math.floor(O),P=O%1;!P&&O>=1&&(P=1),P===1&&V--,V=Math.min(V,p+1),!!(V%2)&&(m==="reverse"?(P=1-P,y&&(P-=y/d)):m==="mirror"&&(T=a)),w=eo(0,1,P)*d}const _=x?{done:!1,value:u[0]}:T.next(w);s&&(_.value=s(_.value));let{done:C}=_;!x&&l!==null&&(C=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return R&&i!==void 0&&(_.value=Bd(u,this.options,i)),b&&b(_.value),R&&this.finish(),_}get duration(){const{resolved:t}=this;return t?fi(t.calculatedDuration):0}get time(){return fi(this.currentTime)}set time(t){t=di(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=fi(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Z4,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const kT=new Set(["opacity","clipPath","filter","transform"]),tM=10,nM=(e,t)=>{let n="";const r=Math.max(Math.round(t/tM),2);for(let i=0;i<r;i++)n+=e(is(0,r-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function Qg(e){let t;return()=>(t===void 0&&(t=e()),t)}const rM={linearEasing:void 0};function iM(e,t){const n=Qg(e);return()=>{var r;return(r=rM[t])!==null&&r!==void 0?r:n()}}const $d=iM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function RT(e){return!!(typeof e=="function"&&$d()||!e||typeof e=="string"&&(e in Zg||$d())||Wg(e)||Array.isArray(e)&&e.every(RT))}const el=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Zg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:el([0,.65,.55,1]),circOut:el([.55,0,1,.45]),backIn:el([.31,.01,.66,-.59]),backOut:el([.33,1.53,.69,.99])};function NT(e,t){if(e)return typeof e=="function"&&$d()?nM(e,t):Wg(e)?el(e):Array.isArray(e)?e.map(n=>NT(n,t)||Zg.easeOut):Zg[e]}function oM(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s,times:u}={}){const l={[t]:n};u&&(l.offset=u);const c=NT(s,i);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}function PT(e,t){e.timeline=t,e.onfinish=null}const aM=Qg(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Wd=10,sM=2e4;function uM(e){return Hg(e.type)||e.type==="spring"||!RT(e.ease)}function lM(e,t){const n=new Xg({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&o<sM;)r=n.sample(o),i.push(r.value),o+=Wd;return{times:void 0,keyframes:i,duration:o-Wd,ease:"linear"}}const IT={anticipate:zE,backInOut:UE,circInOut:VE};function cM(e){return e in IT}class OT extends hT{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:o}=this.options;this.resolver=new fT(o,(a,s)=>this.onKeyframesResolved(a,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:o,ease:a,type:s,motionValue:u,name:l,startTime:c}=this.options;if(!(!((r=u.owner)===null||r===void 0)&&r.current))return!1;if(typeof a=="string"&&$d()&&cM(a)&&(a=IT[a]),uM(this.options)){const{onComplete:f,onUpdate:p,motionValue:m,element:y,...b}=this.options,g=lM(t,b);t=g.keyframes,t.length===1&&(t[1]=t[0]),i=g.duration,o=g.times,a=g.ease,s="keyframes"}const d=oM(u.owner.current,l,t,{...this.options,duration:i,times:o,ease:a});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(PT(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;u.set(Bd(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:o,type:s,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return fi(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return fi(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=di(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Zt;const{animation:r}=n;PT(r,t)}return Zt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:o,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:c,onComplete:d,element:f,...p}=this.options,m=new Xg({...p,keyframes:r,duration:i,type:o,ease:a,times:s,isGenerator:!0}),y=di(this.time);l.setWithVelocity(m.sample(y-Wd).value,m.sample(y).value,Wd)}const{onStop:u}=this.options;u&&u(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:a,type:s}=t;return aM()&&r&&kT.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&a!==0&&s!=="inertia"}}const dM=Qg(()=>window.ScrollTimeline!==void 0);class fM{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>dM()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,o)=>{i&&i(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function pM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const Jg=(e,t,n,r={},i,o)=>a=>{const s=Sg(r,e)||{},u=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-di(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};pM(s)||(c={...c,...OL(e,c)}),c.duration&&(c.duration=di(c.duration)),c.repeatDelay&&(c.repeatDelay=di(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!o&&t.get()!==void 0){const f=Bd(c.keyframes,s);if(f!==void 0)return Xe.update(()=>{c.onUpdate(f),c.onComplete()}),new fM([])}return!o&&OT.supports(c)?new OT(c):new Xg(c)},hM=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),mM=e=>Eg(e)?e[e.length-1]||0:e;function e0(e,t){e.indexOf(t)===-1&&e.push(t)}function t0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class n0{constructor(){this.subscriptions=[]}add(t){return e0(this.subscriptions,t),()=>t0(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const DT=30,gM=e=>!isNaN(parseFloat(e));class yM{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=Br.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Br.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=gM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new n0);const r=this.events[t].add(n);return t==="change"?()=>{r(),Xe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Br.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>DT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,DT);return mT(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function tl(e,t){return new yM(e,t)}function vM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,tl(n))}function xM(e,t){const n=Fd(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const s=mM(o[a]);vM(e,a,s)}}const Yd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),LT="data-"+Yd("framerAppearId");function MT(e){return e.props[LT]}const en=e=>!!(e&&e.getVelocity);function wM(e){return!!(en(e)&&e.add)}function r0(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(wM(n))return n.add(t)}function bM({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function FT(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...u}=t;r&&(a=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in u){const f=e.getValue(d,(o=e.latestValues[d])!==null&&o!==void 0?o:null),p=u[d];if(p===void 0||c&&bM(c,d))continue;const m={delay:n,...Sg(a||{},d)};let y=!1;if(window.MotionHandoffAnimation){const g=MT(e);if(g){const x=window.MotionHandoffAnimation(g,d,Xe);x!==null&&(m.startTime=x,y=!0)}}r0(e,d),f.start(Jg(d,f,p,e.shouldReduceMotion&&Zi.has(d)?{type:!1}:m,e,y));const b=f.animation;b&&l.push(b)}return s&&Promise.all(l).then(()=>{Xe.update(()=>{s&&xM(e,s)})}),l}function i0(e,t,n={}){var r;const i=Fd(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>Promise.all(FT(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=o;return EM(e,t,c+l,d,f,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[l,c]=u==="beforeChildren"?[a,s]:[s,a];return l().then(()=>c())}else return Promise.all([a(),s(n.delay)])}function EM(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,u=i===1?(l=0)=>l*r:(l=0)=>s-l*r;return Array.from(e.variantChildren).sort(TM).forEach((l,c)=>{l.notify("AnimationStart",t),a.push(i0(l,t,{...o,delay:n+u(c)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(a)}function TM(e,t){return e.sortNodePosition(t)}function _M(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>i0(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=i0(e,t,n);else{const i=typeof t=="function"?Fd(e,t,n.custom):t;r=Promise.all(FT(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const CM=Cg.length;function BT(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?BT(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<CM;n++){const r=Cg[n],i=e.props[r];(qu(i)||i===!1)&&(t[r]=i)}return t}const SM=[..._g].reverse(),AM=_g.length;function kM(e){return t=>Promise.all(t.map(({animation:n,options:r})=>_M(e,n,r)))}function RM(e){let t=kM(e),n=jT(),r=!0;const i=u=>(l,c)=>{var d;const f=Fd(e,c,u==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...y}=f;l={...l,...y,...m}}return l};function o(u){t=u(e)}function a(u){const{props:l}=e,c=BT(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let b=0;b<AM;b++){const g=SM[b],x=n[g],w=l[g]!==void 0?l[g]:c[g],T=qu(w),_=g===u?x.isActive:null;_===!1&&(m=b);let C=w===c[g]&&w!==l[g]&&T;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...p},!x.isActive&&_===null||!w&&!x.prevProp||Yu(w)||typeof w=="boolean")continue;const R=NM(x.prevProp,w);let O=R||g===u&&x.isActive&&!C&&T||b>m&&T,V=!1;const P=Array.isArray(w)?w:[w];let $=P.reduce(i(g),{});_===!1&&($={});const{prevResolvedValues:z={}}=x,Q={...z,...$},Y=te=>{O=!0,f.has(te)&&(V=!0,f.delete(te)),x.needsAnimating[te]=!0;const F=e.getValue(te);F&&(F.liveStyle=!1)};for(const te in Q){const F=$[te],B=z[te];if(p.hasOwnProperty(te))continue;let A=!1;Eg(F)&&Eg(B)?A=!OE(F,B):A=F!==B,A?F!=null?Y(te):f.add(te):F!==void 0&&f.has(te)?Y(te):x.protectedKeys[te]=!0}x.prevProp=w,x.prevResolvedValues=$,x.isActive&&(p={...p,...$}),r&&e.blockInitialAnimation&&(O=!1),O&&(!(C&&R)||V)&&d.push(...P.map(te=>({animation:te,options:{type:g}})))}if(f.size){const b={};f.forEach(g=>{const x=e.getBaseTarget(g),w=e.getValue(g);w&&(w.liveStyle=!0),b[g]=x??null}),d.push({animation:b})}let y=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function s(u,l){var c;if(n[u].isActive===l)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(u,l)}),n[u].isActive=l;const d=a(u);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n,reset:()=>{n=jT(),r=!0}}}function NM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!OE(t,e):!1}function ta(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function jT(){return{animate:ta(!0),whileInView:ta(),whileHover:ta(),whileTap:ta(),whileDrag:ta(),whileFocus:ta(),exit:ta()}}class ro{constructor(t){this.isMounted=!1,this.node=t}update(){}}class PM extends ro{constructor(t){super(t),t.animationState||(t.animationState=RM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Yu(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let IM=0;class OM extends ro{constructor(){super(...arguments),this.id=IM++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const DM={animation:{Feature:PM},exit:{Feature:OM}},UT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function qd(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const LM=e=>t=>UT(t)&&e(t,qd(t));function hi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function mi(e,t,n,r){return hi(e,t,LM(n),r)}const zT=(e,t)=>Math.abs(e-t);function MM(e,t){const n=zT(e.x,t.x),r=zT(e.y,t.y);return Math.sqrt(n**2+r**2)}class HT{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=a0(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=MM(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:y}=$t;this.history.push({...m,timestamp:y});const{onStart:b,onMove:g}=this.handlers;f||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=o0(f,this.transformPagePoint),Xe.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=a0(d.type==="pointercancel"?this.lastMoveEventInfo:o0(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,b),m&&m(d,b)},!UT(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const a=qd(t),s=o0(a,this.transformPagePoint),{point:u}=s,{timestamp:l}=$t;this.history=[{...u,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,a0(s,this.history)),this.removeListeners=pi(mi(this.contextWindow,"pointermove",this.handlePointerMove),mi(this.contextWindow,"pointerup",this.handlePointerUp),mi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ji(this.updatePoint)}}function o0(e,t){return t?{point:t(e.point)}:e}function VT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function a0({point:e},t){return{point:e,delta:VT(e,$T(t)),offset:VT(e,FM(t)),velocity:BM(t,.1)}}function FM(e){return e[0]}function $T(e){return e[e.length-1]}function BM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=$T(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>di(t)));)n--;if(!r)return{x:0,y:0};const o=fi(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function WT(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const YT=WT("dragHorizontal"),qT=WT("dragVertical");function GT(e){let t=!1;if(e==="y")t=qT();else if(e==="x")t=YT();else{const n=YT(),r=qT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function KT(){const e=GT(!0);return e?(e(),!1):!0}function os(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const XT=1e-4,jM=1-XT,UM=1+XT,QT=.01,zM=0-QT,HM=0+QT;function Bn(e){return e.max-e.min}function VM(e,t,n){return Math.abs(e-t)<=n}function ZT(e,t,n,r=.5){e.origin=r,e.originPoint=ft(t.min,t.max,e.origin),e.scale=Bn(n)/Bn(t),e.translate=ft(n.min,n.max,e.origin)-e.originPoint,(e.scale>=jM&&e.scale<=UM||isNaN(e.scale))&&(e.scale=1),(e.translate>=zM&&e.translate<=HM||isNaN(e.translate))&&(e.translate=0)}function nl(e,t,n,r){ZT(e.x,t.x,n.x,r?r.originX:void 0),ZT(e.y,t.y,n.y,r?r.originY:void 0)}function JT(e,t,n){e.min=n.min+t.min,e.max=e.min+Bn(t)}function $M(e,t,n){JT(e.x,t.x,n.x),JT(e.y,t.y,n.y)}function e2(e,t,n){e.min=t.min-n.min,e.max=e.min+Bn(t)}function rl(e,t,n){e2(e.x,t.x,n.x),e2(e.y,t.y,n.y)}function WM(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ft(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ft(n,e,r.max):Math.min(e,n)),e}function t2(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function YM(e,{top:t,left:n,bottom:r,right:i}){return{x:t2(e.x,n,i),y:t2(e.y,t,r)}}function n2(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function qM(e,t){return{x:n2(e.x,t.x),y:n2(e.y,t.y)}}function GM(e,t){let n=.5;const r=Bn(e),i=Bn(t);return i>r?n=is(t.min,t.max-r,e.min):r>i&&(n=is(e.min,e.max-i,t.min)),eo(0,1,n)}function KM(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const s0=.35;function XM(e=s0){return e===!1?e=0:e===!0&&(e=s0),{x:r2(e,"left","right"),y:r2(e,"top","bottom")}}function r2(e,t,n){return{min:i2(e,t),max:i2(e,n)}}function i2(e,t){return typeof e=="number"?e:e[t]||0}const o2=()=>({translate:0,scale:1,origin:0,originPoint:0}),as=()=>({x:o2(),y:o2()}),a2=()=>({min:0,max:0}),bt=()=>({x:a2(),y:a2()});function nr(e){return[e("x"),e("y")]}function s2({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function QM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ZM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function u0(e){return e===void 0||e===1}function l0({scale:e,scaleX:t,scaleY:n}){return!u0(e)||!u0(t)||!u0(n)}function na(e){return l0(e)||u2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function u2(e){return l2(e.x)||l2(e.y)}function l2(e){return e&&e!=="0%"}function Gd(e,t,n){const r=e-n,i=t*r;return n+i}function c2(e,t,n,r,i){return i!==void 0&&(e=Gd(e,i,r)),Gd(e,n,r)+t}function c0(e,t=0,n=1,r,i){e.min=c2(e.min,t,n,r,i),e.max=c2(e.max,t,n,r,i)}function d2(e,{x:t,y:n}){c0(e.x,t.translate,t.scale,t.originPoint),c0(e.y,n.translate,n.scale,n.originPoint)}const f2=.999999999999,p2=1.0000000000001;function JM(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s<i;s++){o=n[s],a=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&us(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,d2(e,a)),r&&na(o.latestValues)&&us(e,o.latestValues))}t.x<p2&&t.x>f2&&(t.x=1),t.y<p2&&t.y>f2&&(t.y=1)}function ss(e,t){e.min=e.min+t,e.max=e.max+t}function h2(e,t,n,r,i=.5){const o=ft(e.min,e.max,i);c0(e,t,n,o,r)}function us(e,t){h2(e.x,t.x,t.scaleX,t.scale,t.originX),h2(e.y,t.y,t.scaleY,t.scale,t.originY)}function m2(e,t){return s2(ZM(e.getBoundingClientRect(),t))}function e5(e,t,n){const r=m2(e,n),{scroll:i}=t;return i&&(ss(r.x,i.offset.x),ss(r.y,i.offset.y)),r}const g2=({current:e})=>e?e.ownerDocument.defaultView:null,t5=new WeakMap;class n5{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=bt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(qd(c,"page").point)},o=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=GT(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nr(b=>{let g=this.getAxisMotionValue(b).get()||0;if(Fr.test(g)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[b];w&&(g=Bn(w)*(parseFloat(g)/100))}}this.originPoint[b]=g}),m&&Xe.postRender(()=>m(c,d)),r0(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:b}=d;if(p&&this.currentDirection===null){this.currentDirection=r5(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),y&&y(c,d)},s=(c,d)=>this.stop(c,d),u=()=>nr(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new HT(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:g2(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Xe.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Kd(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=WM(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&os(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=YM(i.layoutBox,n):this.constraints=!1,this.elastic=XM(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&nr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=KM(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!os(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=e5(r,i.root,this.visualElement.getTransformPagePoint());let a=qM(i.layout.layoutBox,o);if(n){const s=n(QM(a));this.hasMutatedConstraints=!!s,s&&(a=s2(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),u=this.constraints||{},l=nr(c=>{if(!Kd(c,n,this.currentDirection))return;let d=u&&u[c]||{};a&&(d={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r0(this.visualElement,t),r.start(Jg(t,r,0,n,this.visualElement,!1))}stopAnimation(){nr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){nr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){nr(n=>{const{drag:r}=this.getProps();if(!Kd(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-ft(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!os(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};nr(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const u=s.get();i[a]=GM({min:u,max:u},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),nr(a=>{if(!Kd(a,t,null))return;const s=this.getAxisMotionValue(a),{min:u,max:l}=this.constraints[a];s.set(ft(u,l,i[a]))})}addListeners(){if(!this.visualElement.current)return;t5.set(this.visualElement,this);const t=this.visualElement.current,n=mi(t,"pointerdown",u=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();os(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Xe.read(r);const a=hi(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(nr(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=u[c].translate,d.set(d.get()+u[c].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=s0,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Kd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function r5(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class i5 extends ro{constructor(t){super(t),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new n5(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zt}unmount(){this.removeGroupControls(),this.removeListeners()}}const y2=e=>(t,n)=>{e&&Xe.postRender(()=>e(t,n))};class o5 extends ro{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(t){this.session=new HT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:g2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:y2(t),onStart:y2(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&Xe.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=mi(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Xd=v.createContext(null);function a5(){const e=v.useContext(Xd);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=v.useId();v.useEffect(()=>r(i),[]);const o=v.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,o]:[!0]}const d0=v.createContext({}),v2=v.createContext({}),Qd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function x2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const il={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=x2(e,t.target.x),r=x2(e,t.target.y);return`${n}% ${r}%`}},s5={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=no.parse(e);if(i.length>5)return r;const o=no.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,u=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=u;const l=ft(s,u,.5);return typeof i[2+a]=="number"&&(i[2+a]/=l),typeof i[3+a]=="number"&&(i[3+a]/=l),o(i)}},Zd={};function u5(e){Object.assign(Zd,e)}const{schedule:f0,cancel:Nie}=LE(queueMicrotask,!1);class l5 extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;u5(c5),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Qd.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Xe.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),f0.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function w2(e){const[t,n]=a5(),r=v.useContext(d0);return E.jsx(l5,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(v2),isPresent:t,safeToRemove:n})}const c5={borderRadius:{...il,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:il,borderTopRightRadius:il,borderBottomLeftRadius:il,borderBottomRightRadius:il,boxShadow:s5},b2=["TopLeft","TopRight","BottomLeft","BottomRight"],d5=b2.length,E2=e=>typeof e=="string"?parseFloat(e):e,T2=e=>typeof e=="number"||ye.test(e);function f5(e,t,n,r,i,o){i?(e.opacity=ft(0,n.opacity!==void 0?n.opacity:1,p5(r)),e.opacityExit=ft(t.opacity!==void 0?t.opacity:1,0,h5(r))):o&&(e.opacity=ft(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<d5;a++){const s=`border${b2[a]}Radius`;let u=_2(t,s),l=_2(n,s);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||T2(u)===T2(l)?(e[s]=Math.max(ft(E2(u),E2(l),r),0),(Fr.test(l)||Fr.test(u))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=ft(t.rotate||0,n.rotate||0,r))}function _2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const p5=C2(0,.5,HE),h5=C2(.5,.95,Zt);function C2(e,t,n){return r=>r<e?0:r>t?1:n(is(e,t,r))}function S2(e,t){e.min=t.min,e.max=t.max}function rr(e,t){S2(e.x,t.x),S2(e.y,t.y)}function A2(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function k2(e,t,n,r,i){return e-=t,e=Gd(e,1/n,r),i!==void 0&&(e=Gd(e,1/i,r)),e}function m5(e,t=0,n=1,r=.5,i,o=e,a=e){if(Fr.test(t)&&(t=parseFloat(t),t=ft(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=ft(o.min,o.max,r);e===o&&(s-=t),e.min=k2(e.min,t,n,s,i),e.max=k2(e.max,t,n,s,i)}function R2(e,t,[n,r,i],o,a){m5(e,t[n],t[r],t[i],t.scale,o,a)}const g5=["x","scaleX","originX"],y5=["y","scaleY","originY"];function N2(e,t,n,r){R2(e.x,t,g5,n?n.x:void 0,r?r.x:void 0),R2(e.y,t,y5,n?n.y:void 0,r?r.y:void 0)}function P2(e){return e.translate===0&&e.scale===1}function I2(e){return P2(e.x)&&P2(e.y)}function O2(e,t){return e.min===t.min&&e.max===t.max}function v5(e,t){return O2(e.x,t.x)&&O2(e.y,t.y)}function D2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function L2(e,t){return D2(e.x,t.x)&&D2(e.y,t.y)}function M2(e){return Bn(e.x)/Bn(e.y)}function F2(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class x5{constructor(){this.members=[]}add(t){e0(this.members,t),t.scheduleRender()}remove(t){if(t0(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function w5(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;l&&(r=`perspective(${l}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,u=e.y.scale*t.y;return(s!==1||u!==1)&&(r+=`scale(${s}, ${u})`),r||"none"}const b5=(e,t)=>e.depth-t.depth;class E5{constructor(){this.children=[],this.isDirty=!1}add(t){e0(this.children,t),this.isDirty=!0}remove(t){t0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(b5),this.isDirty=!1,this.children.forEach(t)}}function Jd(e){const t=en(e)?e.get():e;return hM(t)?t.toValue():t}function T5(e,t){const n=Br.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Ji(r),e(o-t))};return Xe.read(r,!0),()=>Ji(r)}function _5(e){return e instanceof SVGElement&&e.tagName!=="svg"}function C5(e,t,n){const r=en(e)?e:tl(e);return r.start(Jg("",r,t,n)),r.animation}const ra={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ol=typeof window<"u"&&window.MotionDebug!==void 0,p0=["","X","Y","Z"],S5={visibility:"hidden"},B2=1e3;let A5=0;function h0(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function j2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=MT(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Xe,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&j2(r)}function U2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t==null?void 0:t()){this.id=A5++,this.animationId=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,ol&&(ra.totalNodes=ra.resolvedTargetDeltas=ra.recalculatedProjection=0),this.nodes.forEach(N5),this.nodes.forEach(L5),this.nodes.forEach(M5),this.nodes.forEach(P5),ol&&window.MotionDebug.record(ra)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new E5)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new n0),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const u=this.eventHandlers.get(a);u&&u.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=_5(a),this.instance=a;const{layoutId:u,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(l||u)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=T5(f,250),Qd.hasAnimatedSinceResize&&(Qd.hasAnimatedSinceResize=!1,this.nodes.forEach(H2))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&c&&(u||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||z5,{onLayoutAnimationStart:b,onLayoutAnimationComplete:g}=c.getProps(),x=!this.targetLayout||!L2(this.targetLayout,m)||p,w=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const T={...Sg(y,"layout"),onPlay:b,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||H2(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ji(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(F5),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&j2(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:s,layout:u}=this.options;if(s===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(z2);return}this.isUpdating||this.nodes.forEach(O5),this.isUpdating=!1,this.nodes.forEach(D5),this.nodes.forEach(k5),this.nodes.forEach(R5),this.clearAllSnapshots();const s=Br.now();$t.delta=eo(0,1e3/60,s-$t.timestamp),$t.timestamp=s,$t.isProcessing=!0,Ag.update.process($t),Ag.preRender.process($t),Ag.render.process($t),$t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,f0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(I5),this.sharedNodes.forEach(B5)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=bt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!I2(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;a&&(s||na(this.latestValues)||c)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let u=this.removeElementScroll(s);return a&&(u=this.removeTransform(u)),H5(u),{animationId:this.root.animationId,measuredBox:s,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return bt();const u=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(V5))){const{scroll:c}=this.root;c&&(ss(u.x,c.offset.x),ss(u.y,c.offset.y))}return u}removeElementScroll(a){var s;const u=bt();if(rr(u,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return u;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&rr(u,a),ss(u.x,d.offset.x),ss(u.y,d.offset.y))}return u}applyTransform(a,s=!1){const u=bt();rr(u,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&us(u,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),na(c.latestValues)&&us(u,c.latestValues)}return na(this.latestValues)&&us(u,this.latestValues),u}removeTransform(a){const s=bt();rr(s,a);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!na(l.latestValues))continue;l0(l.latestValues)&&l.updateSnapshot();const c=bt(),d=l.measurePageBox();rr(c,d),N2(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,c)}return na(this.latestValues)&&N2(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==$t.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==u;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=$t.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=bt(),this.relativeTargetOrigin=bt(),rl(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),rr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=bt(),this.targetWithTransforms=bt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),$M(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rr(this.target,this.layout.layoutBox),d2(this.target,this.targetDelta)):rr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=bt(),this.relativeTargetOrigin=bt(),rl(this.relativeTargetOrigin,this.target,p.target),rr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ol&&ra.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||l0(this.parent.latestValues)||u2(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 a;const s=this.getLead(),u=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===$t.timestamp&&(l=!1),l)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;rr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;JM(this.layoutCorrected,this.treeScale,this.path,u),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=bt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(A2(this.prevProjectionDelta.x,this.projectionDelta.x),A2(this.prevProjectionDelta.y,this.projectionDelta.y)),nl(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!F2(this.projectionDelta.x,this.prevProjectionDelta.x)||!F2(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),ol&&ra.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=as(),this.projectionDelta=as(),this.projectionDeltaWithTransform=as()}setAnimationOrigin(a,s=!1){const u=this.snapshot,l=u?u.latestValues:{},c={...this.latestValues},d=as();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=bt(),p=u?u.source:void 0,m=this.layout?this.layout.source:void 0,y=p!==m,b=this.getStack(),g=!b||b.members.length<=1,x=!!(y&&!g&&this.options.crossfade===!0&&!this.path.some(U5));this.animationProgress=0;let w;this.mixTargetDelta=T=>{const _=T/1e3;V2(d.x,a.x,_),V2(d.y,a.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(rl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),j5(this.relativeTarget,this.relativeTargetOrigin,f,_),w&&v5(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=bt()),rr(w,this.relativeTarget)),y&&(this.animationValues=c,f5(c,l,this.latestValues,_,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ji(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xe.update(()=>{Qd.hasAnimatedSinceResize=!0,this.currentAnimation=C5(0,B2,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(B2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:u,layout:l,latestValues:c}=a;if(!(!s||!u||!l)){if(this!==a&&this.layout&&l&&G2(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||bt();const d=Bn(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+d;const f=Bn(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+f}rr(s,u),us(s,c),nl(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new x5),this.sharedNodes.get(a).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(s=!0),!s)return;const l={};u.z&&h0("z",a,l,this.animationValues);for(let c=0;c<p0.length;c++)h0(`rotate${p0[c]}`,a,l,this.animationValues),h0(`skew${p0[c]}`,a,l,this.animationValues);a.render();for(const c in l)a.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);a.scheduleRender()}getProjectionStyles(a){var s,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return S5;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Jd(a==null?void 0:a.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=Jd(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!na(this.latestValues)&&(y.transform=c?c({},""):"none",this.hasProjected=!1),y}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),l.transform=w5(this.projectionDeltaWithTransform,this.treeScale,f),c&&(l.transform=c(f,l.transform));const{x:p,y:m}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?l.opacity=d===this?(u=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:l.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const y in Zd){if(f[y]===void 0)continue;const{correct:b,applyTo:g}=Zd[y],x=l.transform==="none"?f[y]:b(f[y],d);if(g){const w=g.length;for(let T=0;T<w;T++)l[g[T]]=x}else l[y]=x}return this.options.layoutId&&(l.pointerEvents=d===this?Jd(a==null?void 0:a.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(z2),this.root.sharedNodes.clear()}}}function k5(e){e.updateLayout()}function R5(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?nr(d=>{const f=a?n.measuredBox[d]:n.layoutBox[d],p=Bn(f);f.min=r[d].min,f.max=f.min+p}):G2(o,n.layoutBox,r)&&nr(d=>{const f=a?n.measuredBox[d]:n.layoutBox[d],p=Bn(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const s=as();nl(s,r,n.layoutBox);const u=as();a?nl(u,e.applyTransform(i,!0),n.measuredBox):nl(u,r,n.layoutBox);const l=!I2(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=bt();rl(m,n.layoutBox,f.layoutBox);const y=bt();rl(y,r,p.layoutBox),L2(m,y)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function N5(e){ol&&ra.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function P5(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function I5(e){e.clearSnapshot()}function z2(e){e.clearMeasurements()}function O5(e){e.isLayoutDirty=!1}function D5(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function H2(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function L5(e){e.resolveTargetDelta()}function M5(e){e.calcProjection()}function F5(e){e.resetSkewAndRotation()}function B5(e){e.removeLeadSnapshot()}function V2(e,t,n){e.translate=ft(t.translate,0,n),e.scale=ft(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $2(e,t,n,r){e.min=ft(t.min,n.min,r),e.max=ft(t.max,n.max,r)}function j5(e,t,n,r){$2(e.x,t.x,n.x,r),$2(e.y,t.y,n.y,r)}function U5(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const z5={duration:.45,ease:[.4,0,.1,1]},W2=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Y2=W2("applewebkit/")&&!W2("chrome/")?Math.round:Zt;function q2(e){e.min=Y2(e.min),e.max=Y2(e.max)}function H5(e){q2(e.x),q2(e.y)}function G2(e,t,n){return e==="position"||e==="preserve-aspect"&&!VM(M2(t),M2(n),.2)}function V5(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const $5=U2({attachResizeListener:(e,t)=>hi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),m0={current:void 0},K2=U2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!m0.current){const e=new $5({});e.mount(window),e.setOptions({layoutScroll:!0}),m0.current=e}return m0.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),W5={pan:{Feature:o5},drag:{Feature:i5,ProjectionNode:K2,MeasureLayout:w2}};function X2(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(o,a)=>{if(o.pointerType==="touch"||KT())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const u=s[r];u&&Xe.postRender(()=>u(o,a))};return mi(e.current,n,i,{passive:!e.getProps()[r]})}class Y5 extends ro{mount(){this.unmount=pi(X2(this.node,!0),X2(this.node,!1))}unmount(){}}class q5 extends ro{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pi(hi(this.node.current,"focus",()=>this.onFocus()),hi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Q2=(e,t)=>t?e===t?!0:Q2(e,t.parentElement):!1;function g0(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,qd(n))}class G5 extends ro{constructor(){super(...arguments),this.removeStartListeners=Zt,this.removeEndListeners=Zt,this.removeAccessibleListeners=Zt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=mi(window,"pointerup",(s,u)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!Q2(this.node.current,s.target)?c:l;f&&Xe.update(()=>f(s,u))},{passive:!(r.onTap||r.onPointerUp)}),a=mi(window,"pointercancel",(s,u)=>this.cancelPress(s,u),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=pi(o,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=s=>{s.key!=="Enter"||!this.checkPressEnd()||g0("up",(u,l)=>{const{onTap:c}=this.node.getProps();c&&Xe.postRender(()=>c(u,l))})};this.removeEndListeners(),this.removeEndListeners=hi(this.node.current,"keyup",a),g0("down",(s,u)=>{this.startPress(s,u)})},n=hi(this.node.current,"keydown",t),r=()=>{this.isPressing&&g0("cancel",(o,a)=>this.cancelPress(o,a))},i=hi(this.node.current,"blur",r);this.removeAccessibleListeners=pi(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Xe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!KT()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Xe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=mi(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=hi(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pi(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const y0=new WeakMap,v0=new WeakMap,K5=e=>{const t=y0.get(e.target);t&&t(e)},X5=e=>{e.forEach(K5)};function Q5({root:e,...t}){const n=e||document;v0.has(n)||v0.set(n,{});const r=v0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(X5,{root:e,...t})),r[i]}function Z5(e,t,n){const r=Q5(t);return y0.set(e,n),r.observe(e),()=>{y0.delete(e),r.unobserve(e)}}const J5={some:0,all:1};class e8 extends ro{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:J5[i]},s=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=l?c:d;f&&f(u)};return Z5(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(t8(t,n))&&this.startObserver()}unmount(){}}function t8({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const n8={inView:{Feature:e8},tap:{Feature:G5},focus:{Feature:q5},hover:{Feature:Y5}},r8={layout:{ProjectionNode:K2,MeasureLayout:w2}},x0=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),ef=v.createContext({}),w0=typeof window<"u",Z2=w0?v.useLayoutEffect:v.useEffect,J2=v.createContext({strict:!1});function i8(e,t,n,r,i){var o,a;const{visualElement:s}=v.useContext(ef),u=v.useContext(J2),l=v.useContext(Xd),c=v.useContext(x0).reducedMotion,d=v.useRef();r=r||u.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,p=v.useContext(v2);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&o8(d.current,n,i,p),v.useInsertionEffect(()=>{f&&f.update(n,l)});const m=n[LT],y=v.useRef(!!m&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,m))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,m)));return Z2(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),f0.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),v.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),y.current=!1))}),f}function o8(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:u,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:e_(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&os(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:l})}function e_(e){if(e)return e.options.allowProjection!==!1?e.projection:e_(e.parent)}function a8(e,t,n){return v.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):os(n)&&(n.current=r))},[t])}function tf(e){return Yu(e.animate)||Cg.some(t=>qu(e[t]))}function t_(e){return!!(tf(e)||e.variants)}function s8(e,t){if(tf(e)){const{initial:n,animate:r}=e;return{initial:n===!1||qu(n)?n:void 0,animate:qu(r)?r:void 0}}return e.inherit!==!1?t:{}}function u8(e){const{initial:t,animate:n}=s8(e,v.useContext(ef));return v.useMemo(()=>({initial:t,animate:n}),[n_(t),n_(n)])}function n_(e){return Array.isArray(e)?e.join(" "):e}const r_={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"]},ls={};for(const e in r_)ls[e]={isEnabled:t=>r_[e].some(n=>!!t[n])};function l8(e){for(const t in e)ls[t]={...ls[t],...e[t]}}const c8=Symbol.for("motionComponentSymbol");function d8({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&l8(e);function o(s,u){let l;const c={...v.useContext(x0),...s,layoutId:f8(s)},{isStatic:d}=c,f=u8(s),p=r(s,d);if(!d&&w0){p8();const m=h8(c);l=m.MeasureLayout,f.visualElement=i8(i,p,c,t,m.ProjectionNode)}return E.jsxs(ef.Provider,{value:f,children:[l&&f.visualElement?E.jsx(l,{visualElement:f.visualElement,...c}):null,n(i,s,a8(p,f.visualElement,u),p,d,f.visualElement)]})}const a=v.forwardRef(o);return a[c8]=i,a}function f8({layoutId:e}){const t=v.useContext(d0).id;return t&&e!==void 0?t+"-"+e:e}function p8(e,t){v.useContext(J2).strict}function h8(e){const{drag:t,layout:n}=ls;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const m8=["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 b0(e){return typeof e!="string"||e.includes("-")?!1:!!(m8.indexOf(e)>-1||/[A-Z]/u.test(e))}function i_(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const o_=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 a_(e,t,n,r){i_(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(o_.has(i)?i:Yd(i),t.attrs[i])}function s_(e,{layout:t,layoutId:n}){return Zi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Zd[e]||e==="opacity")}function E0(e,t,n){var r;const{style:i}=e,o={};for(const a in i)(en(i[a])||t.style&&en(t.style[a])||s_(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),o}function u_(e,t,n){const r=E0(e,t,n);for(const i in e)if(en(e[i])||en(t[i])){const o=Gu.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function T0(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}function g8(e){if(Zi.has(e))return"transform";if(kT.has(e))return Yd(e)}function y8({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,o,a,s){const u={latestValues:v8(i,o,a,s?!1:e,t),renderState:n()};return r&&(u.mount=l=>r(i,l,u)),u}const l_=e=>(t,n)=>{const r=v.useContext(ef),i=v.useContext(Xd),o=()=>y8(e,t,r,i,n);return n?o():T0(o)};function c_(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const o=Tg(e,r[i]);if(o){const{transitionEnd:a,transition:s,...u}=o;n(u,a)}}}function v8(e,t,n,r,i){var o;const a={},s=new Set,u=r&&((o=e.style)===null||o===void 0?void 0:o.willChange)===void 0,l=i(e,{});for(const b in l)a[b]=Jd(l[b]);let{initial:c,animate:d}=e;const f=tf(e),p=t_(e);t&&p&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let m=n?n.initial===!1:!1;m=m||c===!1;const y=m?d:c;return y&&typeof y!="boolean"&&!Yu(y)&&c_(e,y,(b,g)=>{for(const x in b){let w=b[x];if(Array.isArray(w)){const T=m?w.length-1:0;w=w[T]}w!==null&&(a[x]=w)}for(const x in g)a[x]=g[x]}),u&&(d&&c!==!1&&!Yu(d)&&c_(e,d,b=>{for(const g in b){const x=g8(g);x&&s.add(x)}}),s.size&&(a.willChange=Array.from(s).join(","))),a}const _0=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),d_=()=>({..._0(),attrs:{}}),f_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,x8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},w8=Gu.length;function b8(e,t,n){let r="",i=!0;for(let o=0;o<w8;o++){const a=Gu[o],s=e[a];if(s===void 0)continue;let u=!0;if(typeof s=="number"?u=s===(a.startsWith("scale")?1:0):u=parseFloat(s)===0,!u||n){const l=f_(s,Ug[a]);if(!u){i=!1;const c=x8[a]||a;r+=`${c}(${l}) `}n&&(t[a]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function C0(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,s=!1;for(const u in t){const l=t[u];if(Zi.has(u)){a=!0;continue}else if(qE(u)){i[u]=l;continue}else{const c=f_(l,Ug[u]);u.startsWith("origin")?(s=!0,o[u]=c):r[u]=c}}if(t.transform||(a||n?r.transform=b8(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:u="50%",originY:l="50%",originZ:c=0}=o;r.transformOrigin=`${u} ${l} ${c}`}}function p_(e,t,n){return typeof e=="string"?e:ye.transform(t+n*e)}function E8(e,t,n){const r=p_(t,e.x,e.width),i=p_(n,e.y,e.height);return`${r} ${i}`}const T8={offset:"stroke-dashoffset",array:"stroke-dasharray"},_8={offset:"strokeDashoffset",array:"strokeDasharray"};function C8(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?T8:_8;e[o.offset]=ye.transform(-r);const a=ye.transform(t),s=ye.transform(n);e[o.array]=`${a} ${s}`}function S0(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:a,pathSpacing:s=1,pathOffset:u=0,...l},c,d){if(C0(e,l,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=E8(m,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),a!==void 0&&C8(f,a,s,u,!1)}const A0=e=>typeof e=="string"&&e.toLowerCase()==="svg",S8={useVisualState:l_({scrapeMotionValuesFromProps:u_,createRenderState:d_,onMount:(e,t,{renderState:n,latestValues:r})=>{Xe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Xe.render(()=>{S0(n,r,A0(t.tagName),e.transformTemplate),a_(t,n)})}})},A8={useVisualState:l_({applyWillChange:!0,scrapeMotionValuesFromProps:E0,createRenderState:_0})};function h_(e,t,n){for(const r in t)!en(t[r])&&!s_(r,n)&&(e[r]=t[r])}function k8({transformTemplate:e},t){return v.useMemo(()=>{const n=_0();return C0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function R8(e,t){const n=e.style||{},r={};return h_(r,n,e),Object.assign(r,k8(e,t)),r}function N8(e,t){const n={},r=R8(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const P8=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 nf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||P8.has(e)}let m_=e=>!nf(e);function I8(e){e&&(m_=t=>t.startsWith("on")?!nf(t):e(t))}try{I8(require("@emotion/is-prop-valid").default)}catch{}function O8(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(m_(i)||n===!0&&nf(i)||!t&&!nf(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function D8(e,t,n,r){const i=v.useMemo(()=>{const o=d_();return S0(o,t,A0(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};h_(o,e.style,e),i.style={...o,...i.style}}return i}function L8(e=!1){return(n,r,i,{latestValues:o},a)=>{const u=(b0(n)?D8:N8)(r,o,a,n),l=O8(r,typeof n=="string",e),c=n!==v.Fragment?{...l,...u,ref:i}:{},{children:d}=r,f=v.useMemo(()=>en(d)?d.get():d,[d]);return v.createElement(n,{...c,children:f})}}function M8(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const a={...b0(r)?S8:A8,preloadedFeatures:e,useRender:L8(i),createVisualElement:t,Component:r};return d8(a)}}const k0={current:null},g_={current:!1};function F8(){if(g_.current=!0,!!w0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>k0.current=e.matches;e.addListener(t),t()}else k0.current=!1}function B8(e,t,n){for(const r in t){const i=t[r],o=n[r];if(en(i))e.addValue(r,i);else if(en(o))e.addValue(r,tl(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,tl(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const y_=new WeakMap,j8=[...eT,Jt,no],U8=e=>j8.find(JE(e)),v_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class z8{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Dg,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=Br.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Xe.render(this.render,!1,!0))};const{latestValues:u,renderState:l}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=tf(n),this.isVariantNode=t_(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];u[f]!==void 0&&en(p)&&p.set(u[f],!1)}}mount(t){this.current=t,y_.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),g_.current||F8(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:k0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){y_.delete(this.current),this.projection&&this.projection.unmount(),Ji(this.notifyUpdate),Ji(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Zi.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Xe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ls){const n=ls[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):bt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<v_.length;r++){const i=v_[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,a=t[o];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=B8(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=tl(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(WE(i)||$E(i))?i=parseFloat(i):!U8(i)&&no.test(n)&&(i=dT(t,n)),this.setBaseTarget(t,en(i)?i.get():i)),en(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const a=Tg(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(i=a[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!en(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new n0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class x_ extends z8{constructor(){super(...arguments),this.KeyframeResolver=fT}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function H8(e){return window.getComputedStyle(e)}class V8 extends x_{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=i_}readValueFromInstance(t,n){if(Zi.has(n)){const r=zg(n);return r&&r.default||0}else{const r=H8(t),i=(qE(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return m2(t,n)}build(t,n,r){C0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return E0(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;en(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class $8 extends x_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=bt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Zi.has(n)){const r=zg(n);return r&&r.default||0}return n=o_.has(n)?n:Yd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return u_(t,n,r)}build(t,n,r){S0(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){a_(t,n,r,i)}mount(t){this.isSVGTag=A0(t.tagName),super.mount(t)}}const W8=(e,t)=>b0(e)?new $8(t):new V8(t,{allowProjection:e!==v.Fragment}),Y8=M8({...DM,...n8,...W5,...r8},W8),cs=kL(Y8);class q8 extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function G8({children:e,isPresent:t}){const n=v.useId(),r=v.useRef(null),i=v.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=v.useContext(x0);return v.useInsertionEffect(()=>{const{width:a,height:s,top:u,left:l}=i.current;if(t||!r.current||!a||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return o&&(c.nonce=o),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
|
|
41
41
|
[data-motion-pop-id="${n}"] {
|
|
42
42
|
position: absolute !important;
|
|
43
43
|
width: ${a}px !important;
|
|
@@ -45,7 +45,7 @@ Error generating stack: `+o.message+`
|
|
|
45
45
|
top: ${u}px !important;
|
|
46
46
|
left: ${l}px !important;
|
|
47
47
|
}
|
|
48
|
-
`),()=>{document.head.removeChild(c)}},[t]),E.jsx(q8,{isPresent:t,childRef:r,sizeRef:i,children:v.cloneElement(e,{ref:r})})}const K8=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=T0(X8),u=v.useId(),l=v.useCallback(d=>{s.set(d,!0);for(const f of s.values())if(!f)return;r&&r()},[s,r]),c=v.useMemo(()=>({id:u,initial:t,isPresent:n,custom:i,onExitComplete:l,register:d=>(s.set(d,!1),()=>s.delete(d))}),o?[Math.random(),l]:[n,l]);return v.useMemo(()=>{s.forEach((d,f)=>s.set(f,!1))},[n]),v.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=E.jsx(G8,{isPresent:n,children:e})),E.jsx(Xd.Provider,{value:c,children:e})};function X8(){return new Map}const rf=e=>e.key||"";function w_(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const jn=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{const s=v.useMemo(()=>w_(e),[e]),u=s.map(rf),l=v.useRef(!0),c=v.useRef(s),d=T0(()=>new Map),[f,p]=v.useState(s),[m,y]=v.useState(s);Z2(()=>{l.current=!1,c.current=s;for(let x=0;x<m.length;x++){const w=rf(m[x]);u.includes(w)?d.delete(w):d.get(w)!==!0&&d.set(w,!1)}},[m,u.length,u.join("-")]);const b=[];if(s!==f){let x=[...s];for(let w=0;w<m.length;w++){const T=m[w],_=rf(T);u.includes(_)||(x.splice(w,0,T),b.push(T))}a==="wait"&&b.length&&(x=b),y(w_(x)),p(s);return}const{forceRender:g}=v.useContext(d0);return E.jsx(E.Fragment,{children:m.map(x=>{const w=rf(x),T=s===m||u.includes(w),_=()=>{if(d.has(w))d.set(w,!0);else return;let C=!0;d.forEach(R=>{R||(C=!1)}),C&&(g==null||g(),y(c.current),i&&i())};return E.jsx(K8,{isPresent:T,initial:!l.current||r?void 0:!1,custom:T?void 0:n,presenceAffectsLayout:o,mode:a,onExitComplete:T?void 0:_,children:x},w)})})};function b_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=b_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Q8(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=b_(e))&&(r&&(r+=" "),r+=t);return r}const R0="-",Z8=e=>{const t=eF(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(R0);return s[0]===""&&s.length!==1&&s.shift(),E_(s,t)||J8(a)},getConflictingClassGroupIds:(a,s)=>{const u=n[a]||[];return s&&r[a]?[...u,...r[a]]:u}}},E_=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?E_(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(R0);return(a=t.validators.find(({validator:s})=>s(o)))==null?void 0:a.classGroupId},T_=/^\[(.+)\]$/,J8=e=>{if(T_.test(e)){const t=T_.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},eF=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return nF(Object.entries(e.classGroups),n).forEach(([o,a])=>{N0(a,r,o,t)}),r},N0=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:__(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(tF(i)){N0(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{N0(a,__(t,o),n,r)})})},__=(e,t)=>{let n=e;return t.split(R0).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},tF=e=>e.isThemeGetter,nF=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[n,i]}):e,rF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},C_="!",iF=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=s=>{const u=[];let l=0,c=0,d;for(let b=0;b<s.length;b++){let g=s[b];if(l===0){if(g===i&&(r||s.slice(b,b+o)===t)){u.push(s.slice(c,b)),c=b+o;continue}if(g==="/"){d=b;continue}}g==="["?l++:g==="]"&&l--}const f=u.length===0?s:s.substring(c),p=f.startsWith(C_),m=p?f.substring(1):f,y=d&&d>c?d-c:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:y}};return n?s=>n({className:s,parseClassName:a}):a},oF=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},aF=e=>({cache:rF(e.cacheSize),parseClassName:iF(e),...Z8(e)}),sF=/\s+/,uF=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(sF);let s="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(l);let m=!!p,y=r(m?f.substring(0,p):f);if(!y){if(!m){s=l+(s.length>0?" "+s:s);continue}if(y=r(f),!y){s=l+(s.length>0?" "+s:s);continue}m=!1}const b=oF(c).join(":"),g=d?b+C_:b,x=g+y;if(o.includes(x))continue;o.push(x);const w=i(y,m);for(let T=0;T<w.length;++T){const _=w[T];o.push(g+_)}s=l+(s.length>0?" "+s:s)}return s};function lF(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=S_(t))&&(r&&(r+=" "),r+=n);return r}const S_=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=S_(e[r]))&&(n&&(n+=" "),n+=t);return n};function cF(e,...t){let n,r,i,o=a;function a(u){const l=t.reduce((c,d)=>d(c),e());return n=aF(l),r=n.cache.get,i=n.cache.set,o=s,s(u)}function s(u){const l=r(u);if(l)return l;const c=uF(u,n);return i(u,c),c}return function(){return o(lF.apply(null,arguments))}}const rt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},A_=/^\[(?:([a-z-]+):)?(.+)\]$/i,dF=/^\d+\/\d+$/,fF=new Set(["px","full","screen"]),pF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hF=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,mF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,gF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gi=e=>ds(e)||fF.has(e)||dF.test(e),io=e=>fs(e,"length",CF),ds=e=>!!e&&!Number.isNaN(Number(e)),P0=e=>fs(e,"number",ds),al=e=>!!e&&Number.isInteger(Number(e)),vF=e=>e.endsWith("%")&&ds(e.slice(0,-1)),Re=e=>A_.test(e),oo=e=>pF.test(e),xF=new Set(["length","size","percentage"]),wF=e=>fs(e,xF,k_),bF=e=>fs(e,"position",k_),EF=new Set(["image","url"]),TF=e=>fs(e,EF,AF),_F=e=>fs(e,"",SF),sl=()=>!0,fs=(e,t,n)=>{const r=A_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},CF=e=>hF.test(e)&&!mF.test(e),k_=()=>!1,SF=e=>gF.test(e),AF=e=>yF.test(e),kF=cF(()=>{const e=rt("colors"),t=rt("spacing"),n=rt("blur"),r=rt("brightness"),i=rt("borderColor"),o=rt("borderRadius"),a=rt("borderSpacing"),s=rt("borderWidth"),u=rt("contrast"),l=rt("grayscale"),c=rt("hueRotate"),d=rt("invert"),f=rt("gap"),p=rt("gradientColorStops"),m=rt("gradientColorStopPositions"),y=rt("inset"),b=rt("margin"),g=rt("opacity"),x=rt("padding"),w=rt("saturate"),T=rt("scale"),_=rt("sepia"),C=rt("skew"),R=rt("space"),O=rt("translate"),V=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",Re,t],z=()=>[Re,t],X=()=>["",gi,io],Y=()=>["auto",ds,Re],re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",Re],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[ds,Re];return{cacheSize:500,separator:":",theme:{colors:[sl],spacing:[gi,io],blur:["none","",oo,Re],brightness:oe(),borderColor:[e],borderRadius:["none","","full",oo,Re],borderSpacing:z(),borderWidth:X(),contrast:oe(),grayscale:B(),hueRotate:oe(),invert:B(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[vF,io],inset:$(),margin:$(),opacity:oe(),padding:z(),saturate:oe(),scale:oe(),sepia:B(),skew:oe(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",Re]}],container:["container"],columns:[{columns:[oo]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...re(),Re]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",al,Re]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Re]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",al,Re]}],"grid-cols":[{"grid-cols":[sl]}],"col-start-end":[{col:["auto",{span:["full",al,Re]},Re]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[sl]}],"row-start-end":[{row:["auto",{span:[al,Re]},Re]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Re]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Re,t]}],"min-w":[{"min-w":[Re,t,"min","max","fit"]}],"max-w":[{"max-w":[Re,t,"none","full","min","max","fit","prose",{screen:[oo]},oo]}],h:[{h:[Re,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Re,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Re,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Re,t,"auto","min","max","fit"]}],"font-size":[{text:["base",oo,io]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",P0]}],"font-family":[{font:[sl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Re]}],"line-clamp":[{"line-clamp":["none",ds,P0]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gi,Re]}],"list-image":[{"list-image":["none",Re]}],"list-style-type":[{list:["none","disc","decimal",Re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gi,io]}],"underline-offset":[{"underline-offset":["auto",gi,Re]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...re(),bF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},TF]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:ie()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[gi,Re]}],"outline-w":[{outline:[gi,io]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[gi,io]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",oo,_F]}],"shadow-color":[{shadow:[sl]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...te(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":te()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",oo,Re]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Re]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",Re]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",Re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[al,Re]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Re]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Re]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Re]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[gi,io,P0]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function Ne(...e){return kF(Q8(e))}const RF="[data-opencx-widget-content-root]";function I0({fallbackHeight:e}){const t=v.useRef(null);return v.useEffect(()=>{const n=document.querySelector(RF);if(n&&t.current){const r=t.current;let i;const o=new ResizeObserver(()=>{i=requestAnimationFrame(()=>{const a=Math.max(r.offsetHeight,e);n.style.setProperty("--opencx-widget-height",`${a.toFixed(1)}px`)})});return o.observe(r),()=>{cancelAnimationFrame(i),o.unobserve(r)}}},[e]),{observedElementRef:t}}/**
|
|
48
|
+
`),()=>{document.head.removeChild(c)}},[t]),E.jsx(q8,{isPresent:t,childRef:r,sizeRef:i,children:v.cloneElement(e,{ref:r})})}const K8=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=T0(X8),u=v.useId(),l=v.useCallback(d=>{s.set(d,!0);for(const f of s.values())if(!f)return;r&&r()},[s,r]),c=v.useMemo(()=>({id:u,initial:t,isPresent:n,custom:i,onExitComplete:l,register:d=>(s.set(d,!1),()=>s.delete(d))}),o?[Math.random(),l]:[n,l]);return v.useMemo(()=>{s.forEach((d,f)=>s.set(f,!1))},[n]),v.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=E.jsx(G8,{isPresent:n,children:e})),E.jsx(Xd.Provider,{value:c,children:e})};function X8(){return new Map}const rf=e=>e.key||"";function w_(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const jn=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{const s=v.useMemo(()=>w_(e),[e]),u=s.map(rf),l=v.useRef(!0),c=v.useRef(s),d=T0(()=>new Map),[f,p]=v.useState(s),[m,y]=v.useState(s);Z2(()=>{l.current=!1,c.current=s;for(let x=0;x<m.length;x++){const w=rf(m[x]);u.includes(w)?d.delete(w):d.get(w)!==!0&&d.set(w,!1)}},[m,u.length,u.join("-")]);const b=[];if(s!==f){let x=[...s];for(let w=0;w<m.length;w++){const T=m[w],_=rf(T);u.includes(_)||(x.splice(w,0,T),b.push(T))}a==="wait"&&b.length&&(x=b),y(w_(x)),p(s);return}const{forceRender:g}=v.useContext(d0);return E.jsx(E.Fragment,{children:m.map(x=>{const w=rf(x),T=s===m||u.includes(w),_=()=>{if(d.has(w))d.set(w,!0);else return;let C=!0;d.forEach(R=>{R||(C=!1)}),C&&(g==null||g(),y(c.current),i&&i())};return E.jsx(K8,{isPresent:T,initial:!l.current||r?void 0:!1,custom:T?void 0:n,presenceAffectsLayout:o,mode:a,onExitComplete:T?void 0:_,children:x},w)})})};function b_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=b_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Q8(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=b_(e))&&(r&&(r+=" "),r+=t);return r}const R0="-",Z8=e=>{const t=eF(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(R0);return s[0]===""&&s.length!==1&&s.shift(),E_(s,t)||J8(a)},getConflictingClassGroupIds:(a,s)=>{const u=n[a]||[];return s&&r[a]?[...u,...r[a]]:u}}},E_=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?E_(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(R0);return(a=t.validators.find(({validator:s})=>s(o)))==null?void 0:a.classGroupId},T_=/^\[(.+)\]$/,J8=e=>{if(T_.test(e)){const t=T_.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},eF=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return nF(Object.entries(e.classGroups),n).forEach(([o,a])=>{N0(a,r,o,t)}),r},N0=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:__(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(tF(i)){N0(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{N0(a,__(t,o),n,r)})})},__=(e,t)=>{let n=e;return t.split(R0).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},tF=e=>e.isThemeGetter,nF=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[n,i]}):e,rF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},C_="!",iF=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=s=>{const u=[];let l=0,c=0,d;for(let b=0;b<s.length;b++){let g=s[b];if(l===0){if(g===i&&(r||s.slice(b,b+o)===t)){u.push(s.slice(c,b)),c=b+o;continue}if(g==="/"){d=b;continue}}g==="["?l++:g==="]"&&l--}const f=u.length===0?s:s.substring(c),p=f.startsWith(C_),m=p?f.substring(1):f,y=d&&d>c?d-c:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:y}};return n?s=>n({className:s,parseClassName:a}):a},oF=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},aF=e=>({cache:rF(e.cacheSize),parseClassName:iF(e),...Z8(e)}),sF=/\s+/,uF=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(sF);let s="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(l);let m=!!p,y=r(m?f.substring(0,p):f);if(!y){if(!m){s=l+(s.length>0?" "+s:s);continue}if(y=r(f),!y){s=l+(s.length>0?" "+s:s);continue}m=!1}const b=oF(c).join(":"),g=d?b+C_:b,x=g+y;if(o.includes(x))continue;o.push(x);const w=i(y,m);for(let T=0;T<w.length;++T){const _=w[T];o.push(g+_)}s=l+(s.length>0?" "+s:s)}return s};function lF(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=S_(t))&&(r&&(r+=" "),r+=n);return r}const S_=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=S_(e[r]))&&(n&&(n+=" "),n+=t);return n};function cF(e,...t){let n,r,i,o=a;function a(u){const l=t.reduce((c,d)=>d(c),e());return n=aF(l),r=n.cache.get,i=n.cache.set,o=s,s(u)}function s(u){const l=r(u);if(l)return l;const c=uF(u,n);return i(u,c),c}return function(){return o(lF.apply(null,arguments))}}const rt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},A_=/^\[(?:([a-z-]+):)?(.+)\]$/i,dF=/^\d+\/\d+$/,fF=new Set(["px","full","screen"]),pF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hF=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,mF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,gF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gi=e=>ds(e)||fF.has(e)||dF.test(e),io=e=>fs(e,"length",CF),ds=e=>!!e&&!Number.isNaN(Number(e)),P0=e=>fs(e,"number",ds),al=e=>!!e&&Number.isInteger(Number(e)),vF=e=>e.endsWith("%")&&ds(e.slice(0,-1)),Re=e=>A_.test(e),oo=e=>pF.test(e),xF=new Set(["length","size","percentage"]),wF=e=>fs(e,xF,k_),bF=e=>fs(e,"position",k_),EF=new Set(["image","url"]),TF=e=>fs(e,EF,AF),_F=e=>fs(e,"",SF),sl=()=>!0,fs=(e,t,n)=>{const r=A_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},CF=e=>hF.test(e)&&!mF.test(e),k_=()=>!1,SF=e=>gF.test(e),AF=e=>yF.test(e),kF=cF(()=>{const e=rt("colors"),t=rt("spacing"),n=rt("blur"),r=rt("brightness"),i=rt("borderColor"),o=rt("borderRadius"),a=rt("borderSpacing"),s=rt("borderWidth"),u=rt("contrast"),l=rt("grayscale"),c=rt("hueRotate"),d=rt("invert"),f=rt("gap"),p=rt("gradientColorStops"),m=rt("gradientColorStopPositions"),y=rt("inset"),b=rt("margin"),g=rt("opacity"),x=rt("padding"),w=rt("saturate"),T=rt("scale"),_=rt("sepia"),C=rt("skew"),R=rt("space"),O=rt("translate"),V=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",Re,t],z=()=>[Re,t],Q=()=>["",gi,io],Y=()=>["auto",ds,Re],re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",Re],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[ds,Re];return{cacheSize:500,separator:":",theme:{colors:[sl],spacing:[gi,io],blur:["none","",oo,Re],brightness:oe(),borderColor:[e],borderRadius:["none","","full",oo,Re],borderSpacing:z(),borderWidth:Q(),contrast:oe(),grayscale:B(),hueRotate:oe(),invert:B(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[vF,io],inset:$(),margin:$(),opacity:oe(),padding:z(),saturate:oe(),scale:oe(),sepia:B(),skew:oe(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",Re]}],container:["container"],columns:[{columns:[oo]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...re(),Re]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",al,Re]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Re]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",al,Re]}],"grid-cols":[{"grid-cols":[sl]}],"col-start-end":[{col:["auto",{span:["full",al,Re]},Re]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[sl]}],"row-start-end":[{row:["auto",{span:[al,Re]},Re]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Re]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Re,t]}],"min-w":[{"min-w":[Re,t,"min","max","fit"]}],"max-w":[{"max-w":[Re,t,"none","full","min","max","fit","prose",{screen:[oo]},oo]}],h:[{h:[Re,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Re,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Re,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Re,t,"auto","min","max","fit"]}],"font-size":[{text:["base",oo,io]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",P0]}],"font-family":[{font:[sl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Re]}],"line-clamp":[{"line-clamp":["none",ds,P0]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gi,Re]}],"list-image":[{"list-image":["none",Re]}],"list-style-type":[{list:["none","disc","decimal",Re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gi,io]}],"underline-offset":[{"underline-offset":["auto",gi,Re]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...re(),bF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},TF]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:ie()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[gi,Re]}],"outline-w":[{outline:[gi,io]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[gi,io]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",oo,_F]}],"shadow-color":[{shadow:[sl]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...te(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":te()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",oo,Re]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Re]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",Re]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",Re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[al,Re]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Re]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Re]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Re]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[gi,io,P0]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function Ne(...e){return kF(Q8(e))}const RF="[data-opencx-widget-content-root]";function I0({fallbackHeight:e}){const t=v.useRef(null);return v.useEffect(()=>{const n=document.querySelector(RF);if(n&&t.current){const r=t.current;let i;const o=new ResizeObserver(()=>{i=requestAnimationFrame(()=>{const a=Math.max(r.offsetHeight,e);n.style.setProperty("--opencx-widget-height",`${a.toFixed(1)}px`)})});return o.observe(r),()=>{cancelAnimationFrame(i),o.unobserve(r)}}},[e]),{observedElementRef:t}}/**
|
|
49
49
|
* @license lucide-react v0.436.0 - ISC
|
|
50
50
|
*
|
|
51
51
|
* This source code is licensed under the ISC license.
|
|
@@ -154,7 +154,7 @@ Error generating stack: `+o.message+`
|
|
|
154
154
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function m9(e){if(Array.isArray(e))return B0(e)}function dC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dC(Object(n),!0).forEach(function(r){pC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ll(e,t){return v9(e)||y9(e,t)||hC(e,t)||g9()}function g9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
155
155
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hC(e,t){if(e){if(typeof e=="string")return B0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B0(e,t)}}function B0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y9(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(u){o=!0,s=u}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function v9(e){if(Array.isArray(e))return e}var x9=typeof F0=="function"?F0:F0.default,w9="file-invalid-type",b9="file-too-large",E9="file-too-small",T9="too-many-files",_9=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:w9,message:"File type must be ".concat(r)}},mC=function(t){return{code:b9,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},gC=function(t){return{code:E9,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},C9={code:T9,message:"Too many files"};function yC(e,t){var n=e.type==="application/x-moz-file"||x9(e,t);return[n,n?null:_9(t)]}function vC(e,t,n){if(ia(e.size))if(ia(t)&&ia(n)){if(e.size>n)return[!1,mC(n)];if(e.size<t)return[!1,gC(t)]}else{if(ia(t)&&e.size<t)return[!1,gC(t)];if(ia(n)&&e.size>n)return[!1,mC(n)]}return[!0,null]}function ia(e){return e!=null}function S9(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(u){var l=yC(u,n),c=ll(l,1),d=c[0],f=vC(u,r,i),p=ll(f,1),m=p[0],y=s?s(u):null;return d&&m&&!y})}function lf(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function cf(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function xC(e){e.preventDefault()}function A9(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function k9(e){return e.indexOf("Edge/")!==-1}function R9(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return A9(e)||k9(e)}function jr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return!lf(r)&&s&&s.apply(void 0,[r].concat(o)),lf(r)})}}function N9(){return"showOpenFilePicker"in window}function P9(e){if(ia(e)){var t=Object.entries(e).filter(function(n){var r=ll(n,2),i=r[0],o=r[1],a=!0;return wC(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(o)||!o.every(bC))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=ll(r,2),o=i[0],a=i[1];return fC(fC({},n),{},pC({},o,a))},{});return[{description:"Files",accept:t}]}return e}function I9(e){if(ia(e))return Object.entries(e).reduce(function(t,n){var r=ll(n,2),i=r[0],o=r[1];return[].concat(cC(t),[i],cC(o))},[]).filter(function(t){return wC(t)||bC(t)}).join(",")}function O9(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function D9(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function wC(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function bC(e){return/^.*\.[\w]+$/.test(e)}var L9=["children"],M9=["open"],F9=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],B9=["refKey","onChange","onClick"];function j9(e){return H9(e)||z9(e)||EC(e)||U9()}function U9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
156
156
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function H9(e){if(Array.isArray(e))return U0(e)}function j0(e,t){return W9(e)||$9(e,t)||EC(e,t)||V9()}function V9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
157
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EC(e,t){if(e){if(typeof e=="string")return U0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U0(e,t)}}function U0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $9(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(u){o=!0,s=u}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function W9(e){if(Array.isArray(e))return e}function TC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TC(Object(n),!0).forEach(function(r){z0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function z0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function df(e,t){if(e==null)return{};var n=Y9(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Y9(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var H0=v.forwardRef(function(e,t){var n=e.children,r=df(e,L9),i=CC(r),o=i.open,a=df(i,M9);return v.useImperativeHandle(t,function(){return{open:o}},[o]),ln.createElement(v.Fragment,null,n(pt(pt({},a),{},{open:o})))});H0.displayName="Dropzone";var _C={disabled:!1,getFilesFromEvent:i9,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};H0.defaultProps=_C,H0.propTypes={children:Qe.func,accept:Qe.objectOf(Qe.arrayOf(Qe.string)),multiple:Qe.bool,preventDropOnDocument:Qe.bool,noClick:Qe.bool,noKeyboard:Qe.bool,noDrag:Qe.bool,noDragEventsBubbling:Qe.bool,minSize:Qe.number,maxSize:Qe.number,maxFiles:Qe.number,disabled:Qe.bool,getFilesFromEvent:Qe.func,onFileDialogCancel:Qe.func,onFileDialogOpen:Qe.func,useFsAccessApi:Qe.bool,autoFocus:Qe.bool,onDragEnter:Qe.func,onDragLeave:Qe.func,onDragOver:Qe.func,onDrop:Qe.func,onDropAccepted:Qe.func,onDropRejected:Qe.func,onError:Qe.func,validator:Qe.func};var V0={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function CC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=pt(pt({},_C),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,u=t.maxFiles,l=t.onDragEnter,c=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,m=t.onDropRejected,y=t.onFileDialogCancel,b=t.onFileDialogOpen,g=t.useFsAccessApi,x=t.autoFocus,w=t.preventDropOnDocument,T=t.noClick,_=t.noKeyboard,C=t.noDrag,R=t.noDragEventsBubbling,O=t.onError,V=t.validator,P=v.useMemo(function(){return I9(n)},[n]),$=v.useMemo(function(){return P9(n)},[n]),z=v.useMemo(function(){return typeof b=="function"?b:SC},[b]),X=v.useMemo(function(){return typeof y=="function"?y:SC},[y]),Y=v.useRef(null),re=v.useRef(null),ie=v.useReducer(q9,V0),te=j0(ie,2),F=te[0],B=te[1],A=F.isFocused,oe=F.isFileDialogActive,he=v.useRef(typeof window<"u"&&window.isSecureContext&&g&&N9()),D=function(){!he.current&&oe&&setTimeout(function(){if(re.current){var de=re.current.files;de.length||(B({type:"closeDialog"}),X())}},300)};v.useEffect(function(){return window.addEventListener("focus",D,!1),function(){window.removeEventListener("focus",D,!1)}},[re,oe,X,he]);var Oe=v.useRef([]),ge=function(de){Y.current&&Y.current.contains(de.target)||(de.preventDefault(),Oe.current=[])};v.useEffect(function(){return w&&(document.addEventListener("dragover",xC,!1),document.addEventListener("drop",ge,!1)),function(){w&&(document.removeEventListener("dragover",xC),document.removeEventListener("drop",ge))}},[Y,w]),v.useEffect(function(){return!r&&x&&Y.current&&Y.current.focus(),function(){}},[Y,x,r]);var xe=v.useCallback(function(ne){O?O(ne):console.error(ne)},[O]),$e=v.useCallback(function(ne){ne.preventDefault(),ne.persist(),Ot(ne),Oe.current=[].concat(j9(Oe.current),[ne.target]),cf(ne)&&Promise.resolve(i(ne)).then(function(de){if(!(lf(ne)&&!R)){var j=de.length,q=j>0&&S9({files:de,accept:P,minSize:a,maxSize:o,multiple:s,maxFiles:u,validator:V}),ce=j>0&&!q;B({isDragAccept:q,isDragReject:ce,isDragActive:!0,type:"setDraggedFiles"}),l&&l(ne)}}).catch(function(de){return xe(de)})},[i,l,xe,R,P,a,o,s,u,V]),Ve=v.useCallback(function(ne){ne.preventDefault(),ne.persist(),Ot(ne);var de=cf(ne);if(de&&ne.dataTransfer)try{ne.dataTransfer.dropEffect="copy"}catch{}return de&&d&&d(ne),!1},[d,R]),We=v.useCallback(function(ne){ne.preventDefault(),ne.persist(),Ot(ne);var de=Oe.current.filter(function(q){return Y.current&&Y.current.contains(q)}),j=de.indexOf(ne.target);j!==-1&&de.splice(j,1),Oe.current=de,!(de.length>0)&&(B({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),cf(ne)&&c&&c(ne))},[Y,c,R]),Ge=v.useCallback(function(ne,de){var j=[],q=[];ne.forEach(function(ce){var _e=yC(ce,P),Ee=j0(_e,2),jt=Ee[0],Rn=Ee[1],mn=vC(ce,a,o),qn=j0(mn,2),Nn=qn[0],kt=qn[1],Gn=V?V(ce):null;if(jt&&Nn&&!Gn)j.push(ce);else{var gn=[Rn,kt];Gn&&(gn=gn.concat(Gn)),q.push({file:ce,errors:gn.filter(function(Ri){return Ri})})}}),(!s&&j.length>1||s&&u>=1&&j.length>u)&&(j.forEach(function(ce){q.push({file:ce,errors:[C9]})}),j.splice(0)),B({acceptedFiles:j,fileRejections:q,isDragReject:q.length>0,type:"setFiles"}),f&&f(j,q,de),q.length>0&&m&&m(q,de),j.length>0&&p&&p(j,de)},[B,s,P,a,o,u,f,p,m,V]),_t=v.useCallback(function(ne){ne.preventDefault(),ne.persist(),Ot(ne),Oe.current=[],cf(ne)&&Promise.resolve(i(ne)).then(function(de){lf(ne)&&!R||Ge(de,ne)}).catch(function(de){return xe(de)}),B({type:"reset"})},[i,Ge,xe,R]),Te=v.useCallback(function(){if(he.current){B({type:"openDialog"}),z();var ne={multiple:s,types:$};window.showOpenFilePicker(ne).then(function(de){return i(de)}).then(function(de){Ge(de,null),B({type:"closeDialog"})}).catch(function(de){O9(de)?(X(de),B({type:"closeDialog"})):D9(de)?(he.current=!1,re.current?(re.current.value=null,re.current.click()):xe(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):xe(de)});return}re.current&&(B({type:"openDialog"}),z(),re.current.value=null,re.current.click())},[B,z,X,g,Ge,xe,$,s]),be=v.useCallback(function(ne){!Y.current||!Y.current.isEqualNode(ne.target)||(ne.key===" "||ne.key==="Enter"||ne.keyCode===32||ne.keyCode===13)&&(ne.preventDefault(),Te())},[Y,Te]),Ye=v.useCallback(function(){B({type:"focus"})},[]),ze=v.useCallback(function(){B({type:"blur"})},[]),yt=v.useCallback(function(){T||(R9()?setTimeout(Te,0):Te())},[T,Te]),vt=function(de){return r?null:de},Ke=function(de){return _?null:vt(de)},Fe=function(de){return C?null:vt(de)},Ot=function(de){R&&de.stopPropagation()},Po=v.useMemo(function(){return function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},de=ne.refKey,j=de===void 0?"ref":de,q=ne.role,ce=ne.onKeyDown,_e=ne.onFocus,Ee=ne.onBlur,jt=ne.onClick,Rn=ne.onDragEnter,mn=ne.onDragOver,qn=ne.onDragLeave,Nn=ne.onDrop,kt=df(ne,F9);return pt(pt(z0({onKeyDown:Ke(jr(ce,be)),onFocus:Ke(jr(_e,Ye)),onBlur:Ke(jr(Ee,ze)),onClick:vt(jr(jt,yt)),onDragEnter:Fe(jr(Rn,$e)),onDragOver:Fe(jr(mn,Ve)),onDragLeave:Fe(jr(qn,We)),onDrop:Fe(jr(Nn,_t)),role:typeof q=="string"&&q!==""?q:"presentation"},j,Y),!r&&!_?{tabIndex:0}:{}),kt)}},[Y,be,Ye,ze,yt,$e,Ve,We,_t,_,C,r]),Io=v.useCallback(function(ne){ne.stopPropagation()},[]),Oo=v.useMemo(function(){return function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},de=ne.refKey,j=de===void 0?"ref":de,q=ne.onChange,ce=ne.onClick,_e=df(ne,B9),Ee=z0({accept:P,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:vt(jr(q,_t)),onClick:vt(jr(ce,Io)),tabIndex:-1},j,re);return pt(pt({},Ee),_e)}},[re,n,s,_t,r]);return pt(pt({},F),{},{isFocused:A&&!r,getRootProps:Po,getInputProps:Oo,rootRef:Y,inputRef:re,open:vt(Te)})}function q9(e,t){switch(t.type){case"focus":return pt(pt({},e),{},{isFocused:!0});case"blur":return pt(pt({},e),{},{isFocused:!1});case"openDialog":return pt(pt({},V0),{},{isFileDialogActive:!0});case"closeDialog":return pt(pt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return pt(pt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return pt(pt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return pt({},V0);default:return e}}function SC(){}let G9={data:""},K9=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||G9,X9=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Q9=/\/\*[^]*?\*\/| +/g,AC=/\n+/g,ao=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+a+";":r+=o[1]=="f"?ao(a,o):o+"{"+ao(a,o[1]=="k"?"":t)+"}":typeof a=="object"?r+=ao(a,t?t.replace(/([^,])+/g,s=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,s):s?s+" "+u:u)):o):a!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=ao.p?ao.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},vi={},kC=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+kC(e[n]);return t}return e},Z9=(e,t,n,r,i)=>{let o=kC(e),a=vi[o]||(vi[o]=(u=>{let l=0,c=11;for(;l<u.length;)c=101*c+u.charCodeAt(l++)>>>0;return"go"+c})(o));if(!vi[a]){let u=o!==e?e:(l=>{let c,d,f=[{}];for(;c=X9.exec(l.replace(Q9,""));)c[4]?f.shift():c[3]?(d=c[3].replace(AC," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][c[1]]=c[2].replace(AC," ").trim();return f[0]})(e);vi[a]=ao(i?{["@keyframes "+a]:u}:u,n?"":"."+a)}let s=n&&vi.g?vi.g:null;return n&&(vi.g=vi[a]),((u,l,c,d)=>{d?l.data=l.data.replace(d,u):l.data.indexOf(u)===-1&&(l.data=c?u+l.data:l.data+u)})(vi[a],t,r,s),a},J9=(e,t,n)=>e.reduce((r,i,o)=>{let a=t[o];if(a&&a.call){let s=a(n),u=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=u?"."+u:s&&typeof s=="object"?s.props?"":ao(s,""):s===!1?"":s}return r+i+(a??"")},"");function ff(e){let t=this||{},n=e.call?e(t.p):e;return Z9(n.unshift?n.raw?J9(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,K9(t.target),t.g,t.o,t.k)}let RC,$0,W0;ff.bind({g:1});let xi=ff.bind({k:1});function eB(e,t,n,r){ao.p=t,RC=e,$0=n,W0=r}function so(e,t){let n=this||{};return function(){let r=arguments;function i(o,a){let s=Object.assign({},o),u=s.className||i.className;n.p=Object.assign({theme:$0&&$0()},s),n.o=/ *go\d+/.test(u),s.className=ff.apply(n,r)+(u?" "+u:"");let l=e;return e[0]&&(l=s.as||e,delete s.as),W0&&l[0]&&W0(s),RC(l,s)}return i}}var tB=e=>typeof e=="function",Y0=(e,t)=>tB(e)?e(t):e,nB=(()=>{let e=0;return()=>(++e).toString()})(),rB=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),iB=20,pf=new Map,oB=1e3,NC=e=>{if(pf.has(e))return;let t=setTimeout(()=>{pf.delete(e),hf({type:4,toastId:e})},oB);pf.set(e,t)},aB=e=>{let t=pf.get(e);t&&clearTimeout(t)},q0=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,iB)};case 1:return t.toast.id&&aB(t.toast.id),{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:n}=t;return e.toasts.find(o=>o.id===n.id)?q0(e,{type:1,toast:n}):q0(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?NC(r):e.toasts.forEach(o=>{NC(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+i}))}}},sB=[],G0={toasts:[],pausedAt:void 0},hf=e=>{G0=q0(G0,e),sB.forEach(t=>{t(G0)})},uB=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||nB()}),cl=e=>(t,n)=>{let r=uB(t,e,n);return hf({type:2,toast:r}),r.id},Er=(e,t)=>cl("blank")(e,t);Er.error=cl("error"),Er.success=cl("success"),Er.loading=cl("loading"),Er.custom=cl("custom"),Er.dismiss=e=>{hf({type:3,toastId:e})},Er.remove=e=>hf({type:4,toastId:e}),Er.promise=(e,t,n)=>{let r=Er.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(Er.success(Y0(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Er.error(Y0(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var lB=xi`
|
|
157
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EC(e,t){if(e){if(typeof e=="string")return U0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U0(e,t)}}function U0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $9(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(u){o=!0,s=u}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function W9(e){if(Array.isArray(e))return e}function TC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TC(Object(n),!0).forEach(function(r){z0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function z0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function df(e,t){if(e==null)return{};var n=Y9(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Y9(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var H0=v.forwardRef(function(e,t){var n=e.children,r=df(e,L9),i=CC(r),o=i.open,a=df(i,M9);return v.useImperativeHandle(t,function(){return{open:o}},[o]),ln.createElement(v.Fragment,null,n(pt(pt({},a),{},{open:o})))});H0.displayName="Dropzone";var _C={disabled:!1,getFilesFromEvent:i9,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};H0.defaultProps=_C,H0.propTypes={children:Qe.func,accept:Qe.objectOf(Qe.arrayOf(Qe.string)),multiple:Qe.bool,preventDropOnDocument:Qe.bool,noClick:Qe.bool,noKeyboard:Qe.bool,noDrag:Qe.bool,noDragEventsBubbling:Qe.bool,minSize:Qe.number,maxSize:Qe.number,maxFiles:Qe.number,disabled:Qe.bool,getFilesFromEvent:Qe.func,onFileDialogCancel:Qe.func,onFileDialogOpen:Qe.func,useFsAccessApi:Qe.bool,autoFocus:Qe.bool,onDragEnter:Qe.func,onDragLeave:Qe.func,onDragOver:Qe.func,onDrop:Qe.func,onDropAccepted:Qe.func,onDropRejected:Qe.func,onError:Qe.func,validator:Qe.func};var V0={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function CC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=pt(pt({},_C),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,u=t.maxFiles,l=t.onDragEnter,c=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,m=t.onDropRejected,y=t.onFileDialogCancel,b=t.onFileDialogOpen,g=t.useFsAccessApi,x=t.autoFocus,w=t.preventDropOnDocument,T=t.noClick,_=t.noKeyboard,C=t.noDrag,R=t.noDragEventsBubbling,O=t.onError,V=t.validator,P=v.useMemo(function(){return I9(n)},[n]),$=v.useMemo(function(){return P9(n)},[n]),z=v.useMemo(function(){return typeof b=="function"?b:SC},[b]),Q=v.useMemo(function(){return typeof y=="function"?y:SC},[y]),Y=v.useRef(null),re=v.useRef(null),ie=v.useReducer(q9,V0),te=j0(ie,2),F=te[0],B=te[1],A=F.isFocused,oe=F.isFileDialogActive,he=v.useRef(typeof window<"u"&&window.isSecureContext&&g&&N9()),D=function(){!he.current&&oe&&setTimeout(function(){if(re.current){var de=re.current.files;de.length||(B({type:"closeDialog"}),Q())}},300)};v.useEffect(function(){return window.addEventListener("focus",D,!1),function(){window.removeEventListener("focus",D,!1)}},[re,oe,Q,he]);var Oe=v.useRef([]),ge=function(de){Y.current&&Y.current.contains(de.target)||(de.preventDefault(),Oe.current=[])};v.useEffect(function(){return w&&(document.addEventListener("dragover",xC,!1),document.addEventListener("drop",ge,!1)),function(){w&&(document.removeEventListener("dragover",xC),document.removeEventListener("drop",ge))}},[Y,w]),v.useEffect(function(){return!r&&x&&Y.current&&Y.current.focus(),function(){}},[Y,x,r]);var xe=v.useCallback(function(ne){O?O(ne):console.error(ne)},[O]),$e=v.useCallback(function(ne){ne.preventDefault(),ne.persist(),Ot(ne),Oe.current=[].concat(j9(Oe.current),[ne.target]),cf(ne)&&Promise.resolve(i(ne)).then(function(de){if(!(lf(ne)&&!R)){var j=de.length,q=j>0&&S9({files:de,accept:P,minSize:a,maxSize:o,multiple:s,maxFiles:u,validator:V}),ce=j>0&&!q;B({isDragAccept:q,isDragReject:ce,isDragActive:!0,type:"setDraggedFiles"}),l&&l(ne)}}).catch(function(de){return xe(de)})},[i,l,xe,R,P,a,o,s,u,V]),Ve=v.useCallback(function(ne){ne.preventDefault(),ne.persist(),Ot(ne);var de=cf(ne);if(de&&ne.dataTransfer)try{ne.dataTransfer.dropEffect="copy"}catch{}return de&&d&&d(ne),!1},[d,R]),We=v.useCallback(function(ne){ne.preventDefault(),ne.persist(),Ot(ne);var de=Oe.current.filter(function(q){return Y.current&&Y.current.contains(q)}),j=de.indexOf(ne.target);j!==-1&&de.splice(j,1),Oe.current=de,!(de.length>0)&&(B({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),cf(ne)&&c&&c(ne))},[Y,c,R]),Ge=v.useCallback(function(ne,de){var j=[],q=[];ne.forEach(function(ce){var _e=yC(ce,P),Ee=j0(_e,2),jt=Ee[0],Rn=Ee[1],mn=vC(ce,a,o),qn=j0(mn,2),Nn=qn[0],kt=qn[1],Gn=V?V(ce):null;if(jt&&Nn&&!Gn)j.push(ce);else{var gn=[Rn,kt];Gn&&(gn=gn.concat(Gn)),q.push({file:ce,errors:gn.filter(function(Ri){return Ri})})}}),(!s&&j.length>1||s&&u>=1&&j.length>u)&&(j.forEach(function(ce){q.push({file:ce,errors:[C9]})}),j.splice(0)),B({acceptedFiles:j,fileRejections:q,isDragReject:q.length>0,type:"setFiles"}),f&&f(j,q,de),q.length>0&&m&&m(q,de),j.length>0&&p&&p(j,de)},[B,s,P,a,o,u,f,p,m,V]),_t=v.useCallback(function(ne){ne.preventDefault(),ne.persist(),Ot(ne),Oe.current=[],cf(ne)&&Promise.resolve(i(ne)).then(function(de){lf(ne)&&!R||Ge(de,ne)}).catch(function(de){return xe(de)}),B({type:"reset"})},[i,Ge,xe,R]),Te=v.useCallback(function(){if(he.current){B({type:"openDialog"}),z();var ne={multiple:s,types:$};window.showOpenFilePicker(ne).then(function(de){return i(de)}).then(function(de){Ge(de,null),B({type:"closeDialog"})}).catch(function(de){O9(de)?(Q(de),B({type:"closeDialog"})):D9(de)?(he.current=!1,re.current?(re.current.value=null,re.current.click()):xe(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):xe(de)});return}re.current&&(B({type:"openDialog"}),z(),re.current.value=null,re.current.click())},[B,z,Q,g,Ge,xe,$,s]),be=v.useCallback(function(ne){!Y.current||!Y.current.isEqualNode(ne.target)||(ne.key===" "||ne.key==="Enter"||ne.keyCode===32||ne.keyCode===13)&&(ne.preventDefault(),Te())},[Y,Te]),Ye=v.useCallback(function(){B({type:"focus"})},[]),ze=v.useCallback(function(){B({type:"blur"})},[]),yt=v.useCallback(function(){T||(R9()?setTimeout(Te,0):Te())},[T,Te]),vt=function(de){return r?null:de},Ke=function(de){return _?null:vt(de)},Fe=function(de){return C?null:vt(de)},Ot=function(de){R&&de.stopPropagation()},Po=v.useMemo(function(){return function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},de=ne.refKey,j=de===void 0?"ref":de,q=ne.role,ce=ne.onKeyDown,_e=ne.onFocus,Ee=ne.onBlur,jt=ne.onClick,Rn=ne.onDragEnter,mn=ne.onDragOver,qn=ne.onDragLeave,Nn=ne.onDrop,kt=df(ne,F9);return pt(pt(z0({onKeyDown:Ke(jr(ce,be)),onFocus:Ke(jr(_e,Ye)),onBlur:Ke(jr(Ee,ze)),onClick:vt(jr(jt,yt)),onDragEnter:Fe(jr(Rn,$e)),onDragOver:Fe(jr(mn,Ve)),onDragLeave:Fe(jr(qn,We)),onDrop:Fe(jr(Nn,_t)),role:typeof q=="string"&&q!==""?q:"presentation"},j,Y),!r&&!_?{tabIndex:0}:{}),kt)}},[Y,be,Ye,ze,yt,$e,Ve,We,_t,_,C,r]),Io=v.useCallback(function(ne){ne.stopPropagation()},[]),Oo=v.useMemo(function(){return function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},de=ne.refKey,j=de===void 0?"ref":de,q=ne.onChange,ce=ne.onClick,_e=df(ne,B9),Ee=z0({accept:P,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:vt(jr(q,_t)),onClick:vt(jr(ce,Io)),tabIndex:-1},j,re);return pt(pt({},Ee),_e)}},[re,n,s,_t,r]);return pt(pt({},F),{},{isFocused:A&&!r,getRootProps:Po,getInputProps:Oo,rootRef:Y,inputRef:re,open:vt(Te)})}function q9(e,t){switch(t.type){case"focus":return pt(pt({},e),{},{isFocused:!0});case"blur":return pt(pt({},e),{},{isFocused:!1});case"openDialog":return pt(pt({},V0),{},{isFileDialogActive:!0});case"closeDialog":return pt(pt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return pt(pt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return pt(pt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return pt({},V0);default:return e}}function SC(){}let G9={data:""},K9=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||G9,X9=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Q9=/\/\*[^]*?\*\/| +/g,AC=/\n+/g,ao=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+a+";":r+=o[1]=="f"?ao(a,o):o+"{"+ao(a,o[1]=="k"?"":t)+"}":typeof a=="object"?r+=ao(a,t?t.replace(/([^,])+/g,s=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,s):s?s+" "+u:u)):o):a!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=ao.p?ao.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},vi={},kC=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+kC(e[n]);return t}return e},Z9=(e,t,n,r,i)=>{let o=kC(e),a=vi[o]||(vi[o]=(u=>{let l=0,c=11;for(;l<u.length;)c=101*c+u.charCodeAt(l++)>>>0;return"go"+c})(o));if(!vi[a]){let u=o!==e?e:(l=>{let c,d,f=[{}];for(;c=X9.exec(l.replace(Q9,""));)c[4]?f.shift():c[3]?(d=c[3].replace(AC," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][c[1]]=c[2].replace(AC," ").trim();return f[0]})(e);vi[a]=ao(i?{["@keyframes "+a]:u}:u,n?"":"."+a)}let s=n&&vi.g?vi.g:null;return n&&(vi.g=vi[a]),((u,l,c,d)=>{d?l.data=l.data.replace(d,u):l.data.indexOf(u)===-1&&(l.data=c?u+l.data:l.data+u)})(vi[a],t,r,s),a},J9=(e,t,n)=>e.reduce((r,i,o)=>{let a=t[o];if(a&&a.call){let s=a(n),u=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=u?"."+u:s&&typeof s=="object"?s.props?"":ao(s,""):s===!1?"":s}return r+i+(a??"")},"");function ff(e){let t=this||{},n=e.call?e(t.p):e;return Z9(n.unshift?n.raw?J9(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,K9(t.target),t.g,t.o,t.k)}let RC,$0,W0;ff.bind({g:1});let xi=ff.bind({k:1});function eB(e,t,n,r){ao.p=t,RC=e,$0=n,W0=r}function so(e,t){let n=this||{};return function(){let r=arguments;function i(o,a){let s=Object.assign({},o),u=s.className||i.className;n.p=Object.assign({theme:$0&&$0()},s),n.o=/ *go\d+/.test(u),s.className=ff.apply(n,r)+(u?" "+u:"");let l=e;return e[0]&&(l=s.as||e,delete s.as),W0&&l[0]&&W0(s),RC(l,s)}return i}}var tB=e=>typeof e=="function",Y0=(e,t)=>tB(e)?e(t):e,nB=(()=>{let e=0;return()=>(++e).toString()})(),rB=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),iB=20,pf=new Map,oB=1e3,NC=e=>{if(pf.has(e))return;let t=setTimeout(()=>{pf.delete(e),hf({type:4,toastId:e})},oB);pf.set(e,t)},aB=e=>{let t=pf.get(e);t&&clearTimeout(t)},q0=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,iB)};case 1:return t.toast.id&&aB(t.toast.id),{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:n}=t;return e.toasts.find(o=>o.id===n.id)?q0(e,{type:1,toast:n}):q0(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?NC(r):e.toasts.forEach(o=>{NC(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+i}))}}},sB=[],G0={toasts:[],pausedAt:void 0},hf=e=>{G0=q0(G0,e),sB.forEach(t=>{t(G0)})},uB=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||nB()}),cl=e=>(t,n)=>{let r=uB(t,e,n);return hf({type:2,toast:r}),r.id},Er=(e,t)=>cl("blank")(e,t);Er.error=cl("error"),Er.success=cl("success"),Er.loading=cl("loading"),Er.custom=cl("custom"),Er.dismiss=e=>{hf({type:3,toastId:e})},Er.remove=e=>hf({type:4,toastId:e}),Er.promise=(e,t,n)=>{let r=Er.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(Er.success(Y0(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Er.error(Y0(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var lB=xi`
|
|
158
158
|
from {
|
|
159
159
|
transform: scale(0) rotate(45deg);
|
|
160
160
|
opacity: 0;
|
|
@@ -330,12 +330,12 @@ to {
|
|
|
330
330
|
> * {
|
|
331
331
|
pointer-events: auto;
|
|
332
332
|
}
|
|
333
|
-
`;var PC=Er;class NB{constructor(t){Q(this,"components",[]);const{components:n}=t;if(n&&n.forEach(r=>this.register(r)),this.components.length===0)throw new Error("No components registered");if(!this.get("fallback"))throw new Error("No fallback component registered")}register(t){const n=this.components.findIndex(r=>r.key===t.key);return n!==-1?this.components[n]=t:this.components.push(t),this}get(t){const n=this.components.find(r=>r.key.toUpperCase()===t.toUpperCase());return n||null}getComponent(t){var n;return(n=this.get(t))==null?void 0:n.component}}function PB(e){const t=v.createContext({});return[()=>{const r=v.useContext(t);if(r===void 0)throw new Error("useSafeContext must be used within a Provider");return r},t.Provider]}function IC(e,t){return function(){return e.apply(t,arguments)}}const{toString:IB}=Object.prototype,{getPrototypeOf:K0}=Object,mf=(e=>t=>{const n=IB.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Tr=e=>(e=e.toLowerCase(),t=>mf(t)===e),gf=e=>t=>typeof t===e,{isArray:ms}=Array,dl=gf("undefined");function OB(e){return e!==null&&!dl(e)&&e.constructor!==null&&!dl(e.constructor)&&Un(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const OC=Tr("ArrayBuffer");function DB(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&OC(e.buffer),t}const LB=gf("string"),Un=gf("function"),DC=gf("number"),yf=e=>e!==null&&typeof e=="object",MB=e=>e===!0||e===!1,vf=e=>{if(mf(e)!=="object")return!1;const t=K0(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},FB=Tr("Date"),BB=Tr("File"),jB=Tr("Blob"),UB=Tr("FileList"),zB=e=>yf(e)&&Un(e.pipe),HB=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Un(e.append)&&((t=mf(e))==="formdata"||t==="object"&&Un(e.toString)&&e.toString()==="[object FormData]"))},VB=Tr("URLSearchParams"),[$B,WB,YB,qB]=["ReadableStream","Request","Response","Headers"].map(Tr),GB=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fl(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ms(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],t.call(null,e[s],s,e)}}function LC(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const oa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,MC=e=>!dl(e)&&e!==oa;function X0(){const{caseless:e}=MC(this)&&this||{},t={},n=(r,i)=>{const o=e&&LC(t,i)||i;vf(t[o])&&vf(r)?t[o]=X0(t[o],r):vf(r)?t[o]=X0({},r):ms(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&fl(arguments[r],n);return t}const KB=(e,t,n,{allOwnKeys:r}={})=>(fl(t,(i,o)=>{n&&Un(i)?e[o]=IC(i,n):e[o]=i},{allOwnKeys:r}),e),XB=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),QB=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ZB=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&K0(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},JB=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},ej=e=>{if(!e)return null;if(ms(e))return e;let t=e.length;if(!DC(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},tj=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&K0(Uint8Array)),nj=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},rj=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ij=Tr("HTMLFormElement"),oj=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),FC=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),aj=Tr("RegExp"),BC=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fl(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},sj=e=>{BC(e,(t,n)=>{if(Un(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Un(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},uj=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ms(e)?r(e):r(String(e).split(t)),n},lj=()=>{},cj=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Q0="abcdefghijklmnopqrstuvwxyz",jC="0123456789",UC={DIGIT:jC,ALPHA:Q0,ALPHA_DIGIT:Q0+Q0.toUpperCase()+jC},dj=(e=16,t=UC.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function fj(e){return!!(e&&Un(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const pj=e=>{const t=new Array(10),n=(r,i)=>{if(yf(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=ms(r)?[]:{};return fl(r,(a,s)=>{const u=n(a,i+1);!dl(u)&&(o[s]=u)}),t[i]=void 0,o}}return r};return n(e,0)},hj=Tr("AsyncFunction"),mj=e=>e&&(yf(e)||Un(e))&&Un(e.then)&&Un(e.catch),zC=((e,t)=>e?setImmediate:t?((n,r)=>(oa.addEventListener("message",({source:i,data:o})=>{i===oa&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),oa.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Un(oa.postMessage)),gj=typeof queueMicrotask<"u"?queueMicrotask.bind(oa):typeof process<"u"&&process.nextTick||zC,H={isArray:ms,isArrayBuffer:OC,isBuffer:OB,isFormData:HB,isArrayBufferView:DB,isString:LB,isNumber:DC,isBoolean:MB,isObject:yf,isPlainObject:vf,isReadableStream:$B,isRequest:WB,isResponse:YB,isHeaders:qB,isUndefined:dl,isDate:FB,isFile:BB,isBlob:jB,isRegExp:aj,isFunction:Un,isStream:zB,isURLSearchParams:VB,isTypedArray:tj,isFileList:UB,forEach:fl,merge:X0,extend:KB,trim:GB,stripBOM:XB,inherits:QB,toFlatObject:ZB,kindOf:mf,kindOfTest:Tr,endsWith:JB,toArray:ej,forEachEntry:nj,matchAll:rj,isHTMLForm:ij,hasOwnProperty:FC,hasOwnProp:FC,reduceDescriptors:BC,freezeMethods:sj,toObjectSet:uj,toCamelCase:oj,noop:lj,toFiniteNumber:cj,findKey:LC,global:oa,isContextDefined:MC,ALPHABET:UC,generateString:dj,isSpecCompliantForm:fj,toJSONObject:pj,isAsyncFn:hj,isThenable:mj,setImmediate:zC,asap:gj};function Ce(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}H.inherits(Ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const HC=Ce.prototype,VC={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{VC[e]={value:e}}),Object.defineProperties(Ce,VC),Object.defineProperty(HC,"isAxiosError",{value:!0}),Ce.from=(e,t,n,r,i,o)=>{const a=Object.create(HC);return H.toFlatObject(e,a,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),Ce.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const yj=null;function Z0(e){return H.isPlainObject(e)||H.isArray(e)}function $C(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function WC(e,t,n){return e?e.concat(t).map(function(i,o){return i=$C(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function vj(e){return H.isArray(e)&&!e.some(Z0)}const xj=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function xf(e,t,n){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=H.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,b){return!H.isUndefined(b[y])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(H.isDate(m))return m.toISOString();if(!u&&H.isBlob(m))throw new Ce("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(m)||H.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,y,b){let g=m;if(m&&!b&&typeof m=="object"){if(H.endsWith(y,"{}"))y=r?y:y.slice(0,-2),m=JSON.stringify(m);else if(H.isArray(m)&&vj(m)||(H.isFileList(m)||H.endsWith(y,"[]"))&&(g=H.toArray(m)))return y=$C(y),g.forEach(function(w,T){!(H.isUndefined(w)||w===null)&&t.append(a===!0?WC([y],T,o):a===null?y:y+"[]",l(w))}),!1}return Z0(m)?!0:(t.append(WC(b,y,o),l(m)),!1)}const d=[],f=Object.assign(xj,{defaultVisitor:c,convertValue:l,isVisitable:Z0});function p(m,y){if(!H.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(m),H.forEach(m,function(g,x){(!(H.isUndefined(g)||g===null)&&i.call(t,g,H.isString(x)?x.trim():x,y,f))===!0&&p(g,y?y.concat(x):[x])}),d.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return p(e),t}function YC(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function J0(e,t){this._pairs=[],e&&xf(e,this,t)}const qC=J0.prototype;qC.append=function(t,n){this._pairs.push([t,n])},qC.toString=function(t){const n=t?function(r){return t.call(this,r,YC)}:YC;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function wj(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function GC(e,t,n){if(!t)return e;const r=n&&n.encode||wj;H.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=H.isURLSearchParams(t)?t.toString():new J0(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class KC{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){H.forEach(this.handlers,function(r){r!==null&&t(r)})}}const XC={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bj={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:J0,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ey=typeof window<"u"&&typeof document<"u",ty=typeof navigator=="object"&&navigator||void 0,Ej=ey&&(!ty||["ReactNative","NativeScript","NS"].indexOf(ty.product)<0),Tj=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_j=ey&&window.location.href||"http://localhost",tn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ey,hasStandardBrowserEnv:Ej,hasStandardBrowserWebWorkerEnv:Tj,navigator:ty,origin:_j},Symbol.toStringTag,{value:"Module"})),...bj};function Cj(e,t){return xf(e,new tn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return tn.isNode&&H.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Sj(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Aj(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function QC(e){function t(n,r,i,o){let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),u=o>=n.length;return a=!a&&H.isArray(i)?i.length:a,u?(H.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!H.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&H.isArray(i[a])&&(i[a]=Aj(i[a])),!s)}if(H.isFormData(e)&&H.isFunction(e.entries)){const n={};return H.forEachEntry(e,(r,i)=>{t(Sj(r),i,n,0)}),n}return null}function kj(e,t,n){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const pl={transitional:XC,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=H.isObject(t);if(o&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return i?JSON.stringify(QC(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Cj(t,this.formSerializer).toString();if((s=H.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return xf(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),kj(t)):t}],transformResponse:[function(t){const n=this.transitional||pl.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Ce.from(s,Ce.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tn.classes.FormData,Blob:tn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{pl.headers[e]={}});const Rj=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Nj=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
333
|
+
`;var PC=Er;class NB{constructor(t){X(this,"components",[]);const{components:n}=t;if(n&&n.forEach(r=>this.register(r)),this.components.length===0)throw new Error("No components registered");if(!this.get("fallback"))throw new Error("No fallback component registered")}register(t){const n=this.components.findIndex(r=>r.key===t.key);return n!==-1?this.components[n]=t:this.components.push(t),this}get(t){const n=this.components.find(r=>r.key.toUpperCase()===t.toUpperCase());return n||null}getComponent(t){var n;return(n=this.get(t))==null?void 0:n.component}}function PB(e){const t=v.createContext({});return[()=>{const r=v.useContext(t);if(r===void 0)throw new Error("useSafeContext must be used within a Provider");return r},t.Provider]}function IC(e,t){return function(){return e.apply(t,arguments)}}const{toString:IB}=Object.prototype,{getPrototypeOf:K0}=Object,mf=(e=>t=>{const n=IB.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Tr=e=>(e=e.toLowerCase(),t=>mf(t)===e),gf=e=>t=>typeof t===e,{isArray:ms}=Array,dl=gf("undefined");function OB(e){return e!==null&&!dl(e)&&e.constructor!==null&&!dl(e.constructor)&&Un(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const OC=Tr("ArrayBuffer");function DB(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&OC(e.buffer),t}const LB=gf("string"),Un=gf("function"),DC=gf("number"),yf=e=>e!==null&&typeof e=="object",MB=e=>e===!0||e===!1,vf=e=>{if(mf(e)!=="object")return!1;const t=K0(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},FB=Tr("Date"),BB=Tr("File"),jB=Tr("Blob"),UB=Tr("FileList"),zB=e=>yf(e)&&Un(e.pipe),HB=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Un(e.append)&&((t=mf(e))==="formdata"||t==="object"&&Un(e.toString)&&e.toString()==="[object FormData]"))},VB=Tr("URLSearchParams"),[$B,WB,YB,qB]=["ReadableStream","Request","Response","Headers"].map(Tr),GB=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fl(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ms(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],t.call(null,e[s],s,e)}}function LC(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const oa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,MC=e=>!dl(e)&&e!==oa;function X0(){const{caseless:e}=MC(this)&&this||{},t={},n=(r,i)=>{const o=e&&LC(t,i)||i;vf(t[o])&&vf(r)?t[o]=X0(t[o],r):vf(r)?t[o]=X0({},r):ms(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&fl(arguments[r],n);return t}const KB=(e,t,n,{allOwnKeys:r}={})=>(fl(t,(i,o)=>{n&&Un(i)?e[o]=IC(i,n):e[o]=i},{allOwnKeys:r}),e),XB=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),QB=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ZB=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&K0(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},JB=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},ej=e=>{if(!e)return null;if(ms(e))return e;let t=e.length;if(!DC(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},tj=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&K0(Uint8Array)),nj=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},rj=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ij=Tr("HTMLFormElement"),oj=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),FC=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),aj=Tr("RegExp"),BC=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fl(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},sj=e=>{BC(e,(t,n)=>{if(Un(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Un(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},uj=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ms(e)?r(e):r(String(e).split(t)),n},lj=()=>{},cj=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Q0="abcdefghijklmnopqrstuvwxyz",jC="0123456789",UC={DIGIT:jC,ALPHA:Q0,ALPHA_DIGIT:Q0+Q0.toUpperCase()+jC},dj=(e=16,t=UC.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function fj(e){return!!(e&&Un(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const pj=e=>{const t=new Array(10),n=(r,i)=>{if(yf(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=ms(r)?[]:{};return fl(r,(a,s)=>{const u=n(a,i+1);!dl(u)&&(o[s]=u)}),t[i]=void 0,o}}return r};return n(e,0)},hj=Tr("AsyncFunction"),mj=e=>e&&(yf(e)||Un(e))&&Un(e.then)&&Un(e.catch),zC=((e,t)=>e?setImmediate:t?((n,r)=>(oa.addEventListener("message",({source:i,data:o})=>{i===oa&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),oa.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Un(oa.postMessage)),gj=typeof queueMicrotask<"u"?queueMicrotask.bind(oa):typeof process<"u"&&process.nextTick||zC,H={isArray:ms,isArrayBuffer:OC,isBuffer:OB,isFormData:HB,isArrayBufferView:DB,isString:LB,isNumber:DC,isBoolean:MB,isObject:yf,isPlainObject:vf,isReadableStream:$B,isRequest:WB,isResponse:YB,isHeaders:qB,isUndefined:dl,isDate:FB,isFile:BB,isBlob:jB,isRegExp:aj,isFunction:Un,isStream:zB,isURLSearchParams:VB,isTypedArray:tj,isFileList:UB,forEach:fl,merge:X0,extend:KB,trim:GB,stripBOM:XB,inherits:QB,toFlatObject:ZB,kindOf:mf,kindOfTest:Tr,endsWith:JB,toArray:ej,forEachEntry:nj,matchAll:rj,isHTMLForm:ij,hasOwnProperty:FC,hasOwnProp:FC,reduceDescriptors:BC,freezeMethods:sj,toObjectSet:uj,toCamelCase:oj,noop:lj,toFiniteNumber:cj,findKey:LC,global:oa,isContextDefined:MC,ALPHABET:UC,generateString:dj,isSpecCompliantForm:fj,toJSONObject:pj,isAsyncFn:hj,isThenable:mj,setImmediate:zC,asap:gj};function Ce(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}H.inherits(Ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const HC=Ce.prototype,VC={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{VC[e]={value:e}}),Object.defineProperties(Ce,VC),Object.defineProperty(HC,"isAxiosError",{value:!0}),Ce.from=(e,t,n,r,i,o)=>{const a=Object.create(HC);return H.toFlatObject(e,a,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),Ce.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const yj=null;function Z0(e){return H.isPlainObject(e)||H.isArray(e)}function $C(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function WC(e,t,n){return e?e.concat(t).map(function(i,o){return i=$C(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function vj(e){return H.isArray(e)&&!e.some(Z0)}const xj=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function xf(e,t,n){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=H.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,b){return!H.isUndefined(b[y])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(H.isDate(m))return m.toISOString();if(!u&&H.isBlob(m))throw new Ce("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(m)||H.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,y,b){let g=m;if(m&&!b&&typeof m=="object"){if(H.endsWith(y,"{}"))y=r?y:y.slice(0,-2),m=JSON.stringify(m);else if(H.isArray(m)&&vj(m)||(H.isFileList(m)||H.endsWith(y,"[]"))&&(g=H.toArray(m)))return y=$C(y),g.forEach(function(w,T){!(H.isUndefined(w)||w===null)&&t.append(a===!0?WC([y],T,o):a===null?y:y+"[]",l(w))}),!1}return Z0(m)?!0:(t.append(WC(b,y,o),l(m)),!1)}const d=[],f=Object.assign(xj,{defaultVisitor:c,convertValue:l,isVisitable:Z0});function p(m,y){if(!H.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(m),H.forEach(m,function(g,x){(!(H.isUndefined(g)||g===null)&&i.call(t,g,H.isString(x)?x.trim():x,y,f))===!0&&p(g,y?y.concat(x):[x])}),d.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return p(e),t}function YC(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function J0(e,t){this._pairs=[],e&&xf(e,this,t)}const qC=J0.prototype;qC.append=function(t,n){this._pairs.push([t,n])},qC.toString=function(t){const n=t?function(r){return t.call(this,r,YC)}:YC;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function wj(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function GC(e,t,n){if(!t)return e;const r=n&&n.encode||wj;H.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=H.isURLSearchParams(t)?t.toString():new J0(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class KC{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){H.forEach(this.handlers,function(r){r!==null&&t(r)})}}const XC={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bj={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:J0,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ey=typeof window<"u"&&typeof document<"u",ty=typeof navigator=="object"&&navigator||void 0,Ej=ey&&(!ty||["ReactNative","NativeScript","NS"].indexOf(ty.product)<0),Tj=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_j=ey&&window.location.href||"http://localhost",tn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ey,hasStandardBrowserEnv:Ej,hasStandardBrowserWebWorkerEnv:Tj,navigator:ty,origin:_j},Symbol.toStringTag,{value:"Module"})),...bj};function Cj(e,t){return xf(e,new tn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return tn.isNode&&H.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Sj(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Aj(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function QC(e){function t(n,r,i,o){let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),u=o>=n.length;return a=!a&&H.isArray(i)?i.length:a,u?(H.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!H.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&H.isArray(i[a])&&(i[a]=Aj(i[a])),!s)}if(H.isFormData(e)&&H.isFunction(e.entries)){const n={};return H.forEachEntry(e,(r,i)=>{t(Sj(r),i,n,0)}),n}return null}function kj(e,t,n){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const pl={transitional:XC,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=H.isObject(t);if(o&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return i?JSON.stringify(QC(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Cj(t,this.formSerializer).toString();if((s=H.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return xf(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),kj(t)):t}],transformResponse:[function(t){const n=this.transitional||pl.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Ce.from(s,Ce.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tn.classes.FormData,Blob:tn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{pl.headers[e]={}});const Rj=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Nj=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
334
334
|
`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&Rj[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ZC=Symbol("internals");function hl(e){return e&&String(e).trim().toLowerCase()}function wf(e){return e===!1||e==null?e:H.isArray(e)?e.map(wf):String(e)}function Pj(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Ij=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ny(e,t,n,r,i){if(H.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!H.isString(t)){if(H.isString(r))return t.indexOf(r)!==-1;if(H.isRegExp(r))return r.test(t)}}function Oj(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Dj(e,t){const n=H.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}class Tn{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,u,l){const c=hl(u);if(!c)throw new Error("header name must be a non-empty string");const d=H.findKey(i,c);(!d||i[d]===void 0||l===!0||l===void 0&&i[d]!==!1)&&(i[d||u]=wf(s))}const a=(s,u)=>H.forEach(s,(l,c)=>o(l,c,u));if(H.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(H.isString(t)&&(t=t.trim())&&!Ij(t))a(Nj(t),n);else if(H.isHeaders(t))for(const[s,u]of t.entries())o(u,s,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=hl(t),t){const r=H.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Pj(i);if(H.isFunction(n))return n.call(this,i,r);if(H.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=hl(t),t){const r=H.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ny(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=hl(a),a){const s=H.findKey(r,a);s&&(!n||ny(r,r[s],s,n))&&(delete r[s],i=!0)}}return H.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||ny(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return H.forEach(this,(i,o)=>{const a=H.findKey(r,o);if(a){n[a]=wf(i),delete n[o];return}const s=t?Oj(o):String(o).trim();s!==o&&delete n[o],n[s]=wf(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return H.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&H.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
335
335
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[ZC]=this[ZC]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=hl(a);r[s]||(Dj(i,a),r[s]=!0)}return H.isArray(t)?t.forEach(o):o(t),this}}Tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),H.reduceDescriptors(Tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),H.freezeMethods(Tn);function ry(e,t){const n=this||pl,r=t||n,i=Tn.from(r.headers);let o=r.data;return H.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function JC(e){return!!(e&&e.__CANCEL__)}function gs(e,t,n){Ce.call(this,e??"canceled",Ce.ERR_CANCELED,t,n),this.name="CanceledError"}H.inherits(gs,Ce,{__CANCEL__:!0});function eS(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ce("Request failed with status code "+n.status,[Ce.ERR_BAD_REQUEST,Ce.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Lj(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Mj(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[o];a||(a=l),n[i]=u,r[i]=l;let d=o,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),l-a<t)return;const p=c&&l-c;return p?Math.round(f*1e3/p):void 0}}function Fj(e,t){let n=0,r=1e3/t,i,o;const a=(l,c=Date.now())=>{n=c,i=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const c=Date.now(),d=c-n;d>=r?a(l,c):(i=l,o||(o=setTimeout(()=>{o=null,a(i)},r-d)))},()=>i&&a(i)]}const bf=(e,t,n=3)=>{let r=0;const i=Mj(50,250);return Fj(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,u=a-r,l=i(u),c=a<=s;r=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:l||void 0,estimated:l&&s&&c?(s-a)/l:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},tS=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},nS=e=>(...t)=>H.asap(()=>e(...t)),Bj=tn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,tn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(tn.origin),tn.navigator&&/(msie|trident)/i.test(tn.navigator.userAgent)):()=>!0,jj=tn.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];H.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),H.isString(r)&&a.push("path="+r),H.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Uj(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function zj(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function rS(e,t){return e&&!Uj(t)?zj(e,t):t}const iS=e=>e instanceof Tn?{...e}:e;function aa(e,t){t=t||{};const n={};function r(l,c,d,f){return H.isPlainObject(l)&&H.isPlainObject(c)?H.merge.call({caseless:f},l,c):H.isPlainObject(c)?H.merge({},c):H.isArray(c)?c.slice():c}function i(l,c,d,f){if(H.isUndefined(c)){if(!H.isUndefined(l))return r(void 0,l,d,f)}else return r(l,c,d,f)}function o(l,c){if(!H.isUndefined(c))return r(void 0,c)}function a(l,c){if(H.isUndefined(c)){if(!H.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,d){if(d in t)return r(l,c);if(d in e)return r(void 0,l)}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,c,d)=>i(iS(l),iS(c),d,!0)};return H.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=u[c]||i,f=d(e[c],t[c],c);H.isUndefined(f)&&d!==s||(n[c]=f)}),n}const oS=e=>{const t=aa({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=Tn.from(a),t.url=GC(rS(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(H.isFormData(n)){if(tn.hasStandardBrowserEnv||tn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[l,...c]=u?u.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...c].join("; "))}}if(tn.hasStandardBrowserEnv&&(r&&H.isFunction(r)&&(r=r(t)),r||r!==!1&&Bj(t.url))){const l=i&&o&&jj.read(o);l&&a.set(i,l)}return t},Hj=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=oS(e);let o=i.data;const a=Tn.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:l}=i,c,d,f,p,m;function y(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function g(){if(!b)return;const w=Tn.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),_={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:w,config:e,request:b};eS(function(R){n(R),y()},function(R){r(R),y()},_),b=null}"onloadend"in b?b.onloadend=g:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(g)},b.onabort=function(){b&&(r(new Ce("Request aborted",Ce.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new Ce("Network Error",Ce.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const _=i.transitional||XC;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),r(new Ce(T,_.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,e,b)),b=null},o===void 0&&a.setContentType(null),"setRequestHeader"in b&&H.forEach(a.toJSON(),function(T,_){b.setRequestHeader(_,T)}),H.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),s&&s!=="json"&&(b.responseType=i.responseType),l&&([f,m]=bf(l,!0),b.addEventListener("progress",f)),u&&b.upload&&([d,p]=bf(u),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=w=>{b&&(r(!w||w.type?new gs(null,e,b):w),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const x=Lj(i.url);if(x&&tn.protocols.indexOf(x)===-1){r(new Ce("Unsupported protocol "+x+":",Ce.ERR_BAD_REQUEST,e));return}b.send(o||null)})},Vj=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(l){if(!i){i=!0,s();const c=l instanceof Error?l:this.reason;r.abort(c instanceof Ce?c:new gs(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,o(new Ce(`timeout ${t} of ms exceeded`,Ce.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>H.asap(s),u}},$j=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Wj=async function*(e,t){for await(const n of Yj(e))yield*$j(n,t)},Yj=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},aS=(e,t,n,r)=>{const i=Wj(e,t);let o=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:c}=await i.next();if(l){s(),u.close();return}let d=c.byteLength;if(n){let f=o+=d;n(f)}u.enqueue(new Uint8Array(c))}catch(l){throw s(l),l}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},Ef=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",sS=Ef&&typeof ReadableStream=="function",qj=Ef&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),uS=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Gj=sS&&uS(()=>{let e=!1;const t=new Request(tn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),lS=64*1024,iy=sS&&uS(()=>H.isReadableStream(new Response("").body)),Tf={stream:iy&&(e=>e.body)};Ef&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Tf[t]&&(Tf[t]=H.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ce(`Response type '${t}' is not supported`,Ce.ERR_NOT_SUPPORT,r)})})})(new Response);const Kj=async e=>{if(e==null)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e))return(await new Request(tn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(H.isArrayBufferView(e)||H.isArrayBuffer(e))return e.byteLength;if(H.isURLSearchParams(e)&&(e=e+""),H.isString(e))return(await qj(e)).byteLength},Xj=async(e,t)=>{const n=H.toFiniteNumber(e.getContentLength());return n??Kj(t)},oy={http:yj,xhr:Hj,fetch:Ef&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:l,headers:c,withCredentials:d="same-origin",fetchOptions:f}=oS(e);l=l?(l+"").toLowerCase():"text";let p=Vj([i,o&&o.toAbortSignal()],a),m;const y=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(u&&Gj&&n!=="get"&&n!=="head"&&(b=await Xj(c,r))!==0){let _=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(H.isFormData(r)&&(C=_.headers.get("content-type"))&&c.setContentType(C),_.body){const[R,O]=tS(b,bf(nS(u)));r=aS(_.body,lS,R,O)}}H.isString(d)||(d=d?"include":"omit");const g="credentials"in Request.prototype;m=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:g?d:void 0});let x=await fetch(m);const w=iy&&(l==="stream"||l==="response");if(iy&&(s||w&&y)){const _={};["status","statusText","headers"].forEach(V=>{_[V]=x[V]});const C=H.toFiniteNumber(x.headers.get("content-length")),[R,O]=s&&tS(C,bf(nS(s),!0))||[];x=new Response(aS(x.body,lS,R,()=>{O&&O(),y&&y()}),_)}l=l||"text";let T=await Tf[H.findKey(Tf,l)||"text"](x,e);return!w&&y&&y(),await new Promise((_,C)=>{eS(_,C,{data:T,headers:Tn.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(g){throw y&&y(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new Ce("Network Error",Ce.ERR_NETWORK,e,m),{cause:g.cause||g}):Ce.from(g,g&&g.code,e,m)}})};H.forEach(oy,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const cS=e=>`- ${e}`,Qj=e=>H.isFunction(e)||e===null||e===!1,dS={getAdapter:e=>{e=H.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o<t;o++){n=e[o];let a;if(r=n,!Qj(n)&&(r=oy[(a=String(n)).toLowerCase()],r===void 0))throw new Ce(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+o]=r}if(!r){const o=Object.entries(i).map(([s,u])=>`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since :
|
|
336
336
|
`+o.map(cS).join(`
|
|
337
337
|
`):" "+cS(o[0]):"as no adapter specified";throw new Ce("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:oy};function ay(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gs(null,e)}function fS(e){return ay(e),e.headers=Tn.from(e.headers),e.data=ry.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),dS.getAdapter(e.adapter||pl.adapter)(e).then(function(r){return ay(e),r.data=ry.call(e,e.transformResponse,r),r.headers=Tn.from(r.headers),r},function(r){return JC(r)||(ay(e),r&&r.response&&(r.response.data=ry.call(e,e.transformResponse,r.response),r.response.headers=Tn.from(r.response.headers))),Promise.reject(r)})}const pS="1.7.9",_f={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{_f[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const hS={};_f.transitional=function(t,n,r){function i(o,a){return"[Axios v"+pS+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new Ce(i(a," has been removed"+(n?" in "+n:"")),Ce.ERR_DEPRECATED);return n&&!hS[a]&&(hS[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}},_f.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Zj(e,t,n){if(typeof e!="object")throw new Ce("options must be an object",Ce.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],u=s===void 0||a(s,o,e);if(u!==!0)throw new Ce("option "+o+" must be "+u,Ce.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ce("Unknown option "+o,Ce.ERR_BAD_OPTION)}}const Cf={assertOptions:Zj,validators:_f},Ur=Cf.validators;class sa{constructor(t){this.defaults=t,this.interceptors={request:new KC,response:new KC}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
338
|
-
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=aa(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Cf.assertOptions(r,{silentJSONParsing:Ur.transitional(Ur.boolean),forcedJSONParsing:Ur.transitional(Ur.boolean),clarifyTimeoutError:Ur.transitional(Ur.boolean)},!1),i!=null&&(H.isFunction(i)?n.paramsSerializer={serialize:i}:Cf.assertOptions(i,{encode:Ur.function,serialize:Ur.function},!0)),Cf.assertOptions(n,{baseUrl:Ur.spelling("baseURL"),withXsrfToken:Ur.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&H.merge(o.common,o[n.method]);o&&H.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=Tn.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let c,d=0,f;if(!u){const m=[fS.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),f=m.length,c=Promise.resolve(n);d<f;)c=c.then(m[d++],m[d++]);return c}f=s.length;let p=n;for(d=0;d<f;){const m=s[d++],y=s[d++];try{p=m(p)}catch(b){y.call(this,b);break}}try{c=fS.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,f=l.length;d<f;)c=c.then(l[d++],l[d++]);return c}getUri(t){t=aa(this.defaults,t);const n=rS(t.baseURL,t.url);return GC(n,t.params,t.paramsSerializer)}}H.forEach(["delete","get","head","options"],function(t){sa.prototype[t]=function(n,r){return this.request(aa(r||{},{method:t,url:n,data:(r||{}).data}))}}),H.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(aa(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}sa.prototype[t]=n(),sa.prototype[t+"Form"]=n(!0)});class sy{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new gs(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new sy(function(i){t=i}),cancel:t}}}function Jj(e){return function(n){return e.apply(null,n)}}function e7(e){return H.isObject(e)&&e.isAxiosError===!0}const uy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(uy).forEach(([e,t])=>{uy[t]=e});function mS(e){const t=new sa(e),n=IC(sa.prototype.request,t);return H.extend(n,sa.prototype,t,{allOwnKeys:!0}),H.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return mS(aa(e,i))},n}const St=mS(pl);St.Axios=sa,St.CanceledError=gs,St.CancelToken=sy,St.isCancel=JC,St.VERSION=pS,St.toFormData=xf,St.AxiosError=Ce,St.Cancel=St.CanceledError,St.all=function(t){return Promise.all(t)},St.spread=Jj,St.isAxiosError=e7,St.mergeConfig=aa,St.AxiosHeaders=Tn,St.formToJSON=e=>QC(H.isHTMLForm(e)?new FormData(e):e),St.getAdapter=dS.getAdapter,St.HttpStatusCode=uy,St.default=St;const t7=/\{[^{}]+\}/g,n7=()=>{var e,t;return typeof process=="object"&&Number.parseInt((t=(e=process==null?void 0:process.versions)==null?void 0:e.node)==null?void 0:t.substring(0,2))>=18&&process.versions.undici};function r7(){return Math.random().toString(36).slice(2,11)}function i7(e){let{baseUrl:t="",Request:n=globalThis.Request,fetch:r=globalThis.fetch,querySerializer:i,bodySerializer:o,headers:a,requestInitExt:s=void 0,...u}={...e};s=n7()?s:void 0,t=xS(t);const l=[];async function c(d,f){const{baseUrl:p,fetch:m=r,Request:y=n,headers:b,params:g={},parseAs:x="json",querySerializer:w,bodySerializer:T=o??a7,body:_,...C}=f||{};p&&(t=xS(p));let R=typeof i=="function"?i:vS(i);w&&(R=typeof w=="function"?w:vS({...typeof i=="object"?i:{},...w}));const O=_===void 0?void 0:T(_),V=O===void 0||O instanceof FormData?{}:{"Content-Type":"application/json"},P={redirect:"follow",...u,...C,body:O,headers:u7(V,a,b,g.header)};let $,z,X=new n(s7(d,{baseUrl:t,params:g,querySerializer:R}),P);for(const ie in C)ie in X||(X[ie]=C[ie]);if(l.length){$=r7(),z=Object.freeze({baseUrl:t,fetch:m,parseAs:x,querySerializer:R,bodySerializer:T});for(const ie of l)if(ie&&typeof ie=="object"&&typeof ie.onRequest=="function"){const te=await ie.onRequest({request:X,schemaPath:d,params:g,options:z,id:$});if(te){if(!(te instanceof n))throw new Error("onRequest: must return new Request() when modifying the request");X=te}}}let Y;try{Y=await m(X,s)}catch(ie){let te=ie;if(l.length)for(let F=l.length-1;F>=0;F--){const B=l[F];if(B&&typeof B=="object"&&typeof B.onError=="function"){const A=await B.onError({request:X,error:te,schemaPath:d,params:g,options:z,id:$});if(A){if(A instanceof Response){te=void 0,Y=A;break}if(A instanceof Error){te=A;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(te)throw te}if(l.length)for(let ie=l.length-1;ie>=0;ie--){const te=l[ie];if(te&&typeof te=="object"&&typeof te.onResponse=="function"){const F=await te.onResponse({request:X,response:Y,schemaPath:d,params:g,options:z,id:$});if(F){if(!(F instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");Y=F}}}if(Y.status===204||Y.headers.get("Content-Length")==="0")return Y.ok?{data:void 0,response:Y}:{error:void 0,response:Y};if(Y.ok)return x==="stream"?{data:Y.body,response:Y}:{data:await Y[x](),response:Y};let re=await Y.text();try{re=JSON.parse(re)}catch{}return{error:re,response:Y}}return{request(d,f,p){return c(f,{...p,method:d.toUpperCase()})},GET(d,f){return c(d,{...f,method:"GET"})},PUT(d,f){return c(d,{...f,method:"PUT"})},POST(d,f){return c(d,{...f,method:"POST"})},DELETE(d,f){return c(d,{...f,method:"DELETE"})},OPTIONS(d,f){return c(d,{...f,method:"OPTIONS"})},HEAD(d,f){return c(d,{...f,method:"HEAD"})},PATCH(d,f){return c(d,{...f,method:"PATCH"})},TRACE(d,f){return c(d,{...f,method:"TRACE"})},use(...d){for(const f of d)if(f){if(typeof f!="object"||!("onRequest"in f||"onResponse"in f||"onError"in f))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");l.push(f)}},eject(...d){for(const f of d){const p=l.indexOf(f);p!==-1&&l.splice(p,1)}}}}function Sf(e,t,n){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${(n==null?void 0:n.allowReserved)===!0?t:encodeURIComponent(t)}`}function gS(e,t,n){if(!t||typeof t!="object")return"";const r=[],i={simple:",",label:".",matrix:";"}[n.style]||"&";if(n.style!=="deepObject"&&n.explode===!1){for(const s in t)r.push(s,n.allowReserved===!0?t[s]:encodeURIComponent(t[s]));const a=r.join(",");switch(n.style){case"form":return`${e}=${a}`;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return a}}for(const a in t){const s=n.style==="deepObject"?`${e}[${a}]`:a;r.push(Sf(s,t[a],n))}const o=r.join(i);return n.style==="label"||n.style==="matrix"?`${i}${o}`:o}function yS(e,t,n){if(!Array.isArray(t))return"";if(n.explode===!1){const o={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",a=(n.allowReserved===!0?t:t.map(s=>encodeURIComponent(s))).join(o);switch(n.style){case"simple":return a;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return`${e}=${a}`}}const r={simple:",",label:".",matrix:";"}[n.style]||"&",i=[];for(const o of t)n.style==="simple"||n.style==="label"?i.push(n.allowReserved===!0?o:encodeURIComponent(o)):i.push(Sf(e,o,n));return n.style==="label"||n.style==="matrix"?`${r}${i.join(r)}`:i.join(r)}function vS(e){return function(n){const r=[];if(n&&typeof n=="object")for(const i in n){const o=n[i];if(o!=null){if(Array.isArray(o)){if(o.length===0)continue;r.push(yS(i,o,{style:"form",explode:!0,...e==null?void 0:e.array,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}if(typeof o=="object"){r.push(gS(i,o,{style:"deepObject",explode:!0,...e==null?void 0:e.object,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}r.push(Sf(i,o,e))}}return r.join("&")}}function o7(e,t){let n=e;for(const r of e.match(t7)??[]){let i=r.substring(1,r.length-1),o=!1,a="simple";if(i.endsWith("*")&&(o=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(a="label",i=i.substring(1)):i.startsWith(";")&&(a="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const s=t[i];if(Array.isArray(s)){n=n.replace(r,yS(i,s,{style:a,explode:o}));continue}if(typeof s=="object"){n=n.replace(r,gS(i,s,{style:a,explode:o}));continue}if(a==="matrix"){n=n.replace(r,`;${Sf(i,s)}`);continue}n=n.replace(r,a==="label"?`.${encodeURIComponent(s)}`:encodeURIComponent(s))}return n}function a7(e){return e instanceof FormData?e:JSON.stringify(e)}function s7(e,t){var i;let n=`${t.baseUrl}${e}`;(i=t.params)!=null&&i.path&&(n=o7(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function u7(...e){const t=new Headers;for(const n of e){if(!n||typeof n!="object")continue;const r=n instanceof Headers?n.entries():Object.entries(n);for(const[i,o]of r)if(o===null)t.delete(i);else if(Array.isArray(o))for(const a of o)t.append(i,a);else o!==void 0&&t.set(i,o)}return t}function xS(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const l7=e=>{console.log(e.error)},c7=e=>{const t=i7({baseUrl:e.baseUrl}),n={onRequest:e.onRequest,onResponse:e.onResponse,onError:e.onError||l7};return t.use(n),t};class wS{constructor({config:t}){Q(this,"client");Q(this,"uploadFileClient");Q(this,"config");Q(this,"constructClientOptions",t=>{const n=this.config.apiUrl||"https://api.open.cx",r={"X-Bot-Token":this.config.token,"Content-Type":"application/json",Accept:"application/json",Authorization:t?`Bearer ${t}`:void 0};return{baseUrl:n,headers:r}});Q(this,"createOpenAPIClient",({baseUrl:t,headers:n})=>c7({baseUrl:t,onRequest:({request:r})=>{Object.entries(n).forEach(([i,o])=>{o&&r.headers.set(i,o)})}}));Q(this,"createAxiosUploadClient",({baseUrl:t,headers:n})=>St.create({baseURL:`${t}/backend/widget/v2/upload`,headers:n}));Q(this,"setAuthToken",t=>{const{baseUrl:n,headers:r}=this.constructClientOptions(t);this.client=this.createOpenAPIClient({baseUrl:n,headers:r}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:n,headers:r})});Q(this,"getExternalWidgetConfig",async()=>await this.client.GET("/backend/widget/v2/config",{params:{header:{"X-Bot-Token":this.config.token}}}));Q(this,"widgetPrelude",async()=>await this.client.GET("/backend/widget/v2/prelude",{params:{header:{"X-Bot-Token":this.config.token}}}));Q(this,"sendMessage",async(t,n)=>await this.client.POST("/backend/widget/v2/chat/send",{body:t,signal:n}));Q(this,"createUnverifiedContact",async t=>await this.client.POST("/backend/widget/v2/contact/create-unverified",{params:{header:{"x-bot-token":this.config.token}},body:t}));Q(this,"createSession",async t=>await this.client.POST("/backend/widget/v2/create-session",{body:t}));Q(this,"pollSessionAndHistory",async({sessionId:t,lastMessageTimestamp:n,abortSignal:r})=>{const i=n?{lastMessageTimestamp:n}:void 0;return await this.client.GET("/backend/widget/v2/poll/{sessionId}",{params:{path:{sessionId:t},query:i},signal:r})});Q(this,"getSessions",async({cursor:t,filters:n,abortSignal:r})=>await this.client.GET("/backend/widget/v2/sessions",{params:{query:{cursor:t,filters:JSON.stringify(n)}},signal:r}));Q(this,"uploadFile",async(t,n={})=>{const r=new FormData;r.append("file",t.file);const{data:i}=await this.uploadFileClient.post("",r,{headers:{"Content-Type":"multipart/form-data"},...n});return i});Q(this,"vote",async t=>await this.client.POST("/backend/widget/v2/chat/vote",{body:t}));var i;this.config=t;const{baseUrl:n,headers:r}=this.constructClientOptions((i=t.user)==null?void 0:i.token);this.client=this.createOpenAPIClient({baseUrl:n,headers:r}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:n,headers:r})}}var Af={exports:{}};Af.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,s="[object Arguments]",u="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",y="[object Map]",b="[object Number]",g="[object Null]",x="[object Object]",w="[object Promise]",T="[object Proxy]",_="[object RegExp]",C="[object Set]",R="[object String]",O="[object Symbol]",V="[object Undefined]",P="[object WeakMap]",$="[object ArrayBuffer]",z="[object DataView]",X="[object Float32Array]",Y="[object Float64Array]",re="[object Int8Array]",ie="[object Int16Array]",te="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",A="[object Uint16Array]",oe="[object Uint32Array]",he=/[\\^$.*+?()[\]{}|]/g,D=/^\[object .+?Constructor\]$/,Oe=/^(?:0|[1-9]\d*)$/,ge={};ge[X]=ge[Y]=ge[re]=ge[ie]=ge[te]=ge[F]=ge[B]=ge[A]=ge[oe]=!0,ge[s]=ge[u]=ge[$]=ge[c]=ge[z]=ge[d]=ge[f]=ge[p]=ge[y]=ge[b]=ge[x]=ge[_]=ge[C]=ge[R]=ge[P]=!1;var xe=typeof yn=="object"&&yn&&yn.Object===Object&&yn,$e=typeof self=="object"&&self&&self.Object===Object&&self,Ve=xe||$e||Function("return this")(),We=t&&!t.nodeType&&t,Ge=We&&!0&&e&&!e.nodeType&&e,_t=Ge&&Ge.exports===We,Te=_t&&xe.process,be=function(){try{return Te&&Te.binding&&Te.binding("util")}catch{}}(),Ye=be&&be.isTypedArray;function ze(k,L){for(var W=-1,le=k==null?0:k.length,it=0,Pe=[];++W<le;){var xt=k[W];L(xt,W,k)&&(Pe[it++]=xt)}return Pe}function yt(k,L){for(var W=-1,le=L.length,it=k.length;++W<le;)k[it+W]=L[W];return k}function vt(k,L){for(var W=-1,le=k==null?0:k.length;++W<le;)if(L(k[W],W,k))return!0;return!1}function Ke(k,L){for(var W=-1,le=Array(k);++W<k;)le[W]=L(W);return le}function Fe(k){return function(L){return k(L)}}function Ot(k,L){return k.has(L)}function Po(k,L){return k==null?void 0:k[L]}function Io(k){var L=-1,W=Array(k.size);return k.forEach(function(le,it){W[++L]=[it,le]}),W}function Oo(k,L){return function(W){return k(L(W))}}function ne(k){var L=-1,W=Array(k.size);return k.forEach(function(le){W[++L]=le}),W}var de=Array.prototype,j=Function.prototype,q=Object.prototype,ce=Ve["__core-js_shared__"],_e=j.toString,Ee=q.hasOwnProperty,jt=function(){var k=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""}(),Rn=q.toString,mn=RegExp("^"+_e.call(Ee).replace(he,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qn=_t?Ve.Buffer:void 0,Nn=Ve.Symbol,kt=Ve.Uint8Array,Gn=q.propertyIsEnumerable,gn=de.splice,Ri=Nn?Nn.toStringTag:void 0,vO=Object.getOwnPropertySymbols,Nre=qn?qn.isBuffer:void 0,Pre=Oo(Object.keys,Object),qv=tu(Ve,"DataView"),gc=tu(Ve,"Map"),Gv=tu(Ve,"Promise"),Kv=tu(Ve,"Set"),Xv=tu(Ve,"WeakMap"),yc=tu(Object,"create"),Ire=_a(qv),Ore=_a(gc),Dre=_a(Gv),Lre=_a(Kv),Mre=_a(Xv),xO=Nn?Nn.prototype:void 0,Qv=xO?xO.valueOf:void 0;function Ea(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function Fre(){this.__data__=yc?yc(null):{},this.size=0}function Bre(k){var L=this.has(k)&&delete this.__data__[k];return this.size-=L?1:0,L}function jre(k){var L=this.__data__;if(yc){var W=L[k];return W===r?void 0:W}return Ee.call(L,k)?L[k]:void 0}function Ure(k){var L=this.__data__;return yc?L[k]!==void 0:Ee.call(L,k)}function zre(k,L){var W=this.__data__;return this.size+=this.has(k)?0:1,W[k]=yc&&L===void 0?r:L,this}Ea.prototype.clear=Fre,Ea.prototype.delete=Bre,Ea.prototype.get=jre,Ea.prototype.has=Ure,Ea.prototype.set=zre;function Ni(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function Hre(){this.__data__=[],this.size=0}function Vre(k){var L=this.__data__,W=rh(L,k);if(W<0)return!1;var le=L.length-1;return W==le?L.pop():gn.call(L,W,1),--this.size,!0}function $re(k){var L=this.__data__,W=rh(L,k);return W<0?void 0:L[W][1]}function Wre(k){return rh(this.__data__,k)>-1}function Yre(k,L){var W=this.__data__,le=rh(W,k);return le<0?(++this.size,W.push([k,L])):W[le][1]=L,this}Ni.prototype.clear=Hre,Ni.prototype.delete=Vre,Ni.prototype.get=$re,Ni.prototype.has=Wre,Ni.prototype.set=Yre;function Ta(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function qre(){this.size=0,this.__data__={hash:new Ea,map:new(gc||Ni),string:new Ea}}function Gre(k){var L=ih(this,k).delete(k);return this.size-=L?1:0,L}function Kre(k){return ih(this,k).get(k)}function Xre(k){return ih(this,k).has(k)}function Qre(k,L){var W=ih(this,k),le=W.size;return W.set(k,L),this.size+=W.size==le?0:1,this}Ta.prototype.clear=qre,Ta.prototype.delete=Gre,Ta.prototype.get=Kre,Ta.prototype.has=Xre,Ta.prototype.set=Qre;function nh(k){var L=-1,W=k==null?0:k.length;for(this.__data__=new Ta;++L<W;)this.add(k[L])}function Zre(k){return this.__data__.set(k,r),this}function Jre(k){return this.__data__.has(k)}nh.prototype.add=nh.prototype.push=Zre,nh.prototype.has=Jre;function Do(k){var L=this.__data__=new Ni(k);this.size=L.size}function eie(){this.__data__=new Ni,this.size=0}function tie(k){var L=this.__data__,W=L.delete(k);return this.size=L.size,W}function nie(k){return this.__data__.get(k)}function rie(k){return this.__data__.has(k)}function iie(k,L){var W=this.__data__;if(W instanceof Ni){var le=W.__data__;if(!gc||le.length<n-1)return le.push([k,L]),this.size=++W.size,this;W=this.__data__=new Ta(le)}return W.set(k,L),this.size=W.size,this}Do.prototype.clear=eie,Do.prototype.delete=tie,Do.prototype.get=nie,Do.prototype.has=rie,Do.prototype.set=iie;function oie(k,L){var W=oh(k),le=!W&&wie(k),it=!W&&!le&&Zv(k),Pe=!W&&!le&&!it&&kO(k),xt=W||le||it||Pe,Ut=xt?Ke(k.length,String):[],qt=Ut.length;for(var mt in k)Ee.call(k,mt)&&!(xt&&(mt=="length"||it&&(mt=="offset"||mt=="parent")||Pe&&(mt=="buffer"||mt=="byteLength"||mt=="byteOffset")||mie(mt,qt)))&&Ut.push(mt);return Ut}function rh(k,L){for(var W=k.length;W--;)if(_O(k[W][0],L))return W;return-1}function aie(k,L,W){var le=L(k);return oh(k)?le:yt(le,W(k))}function vc(k){return k==null?k===void 0?V:g:Ri&&Ri in Object(k)?pie(k):xie(k)}function wO(k){return xc(k)&&vc(k)==s}function bO(k,L,W,le,it){return k===L?!0:k==null||L==null||!xc(k)&&!xc(L)?k!==k&&L!==L:sie(k,L,W,le,bO,it)}function sie(k,L,W,le,it,Pe){var xt=oh(k),Ut=oh(L),qt=xt?u:Lo(k),mt=Ut?u:Lo(L);qt=qt==s?x:qt,mt=mt==s?x:mt;var Kn=qt==x,Pr=mt==x,sn=qt==mt;if(sn&&Zv(k)){if(!Zv(L))return!1;xt=!0,Kn=!1}if(sn&&!Kn)return Pe||(Pe=new Do),xt||kO(k)?EO(k,L,W,le,it,Pe):die(k,L,qt,W,le,it,Pe);if(!(W&i)){var dr=Kn&&Ee.call(k,"__wrapped__"),fr=Pr&&Ee.call(L,"__wrapped__");if(dr||fr){var Mo=dr?k.value():k,Pi=fr?L.value():L;return Pe||(Pe=new Do),it(Mo,Pi,W,le,Pe)}}return sn?(Pe||(Pe=new Do),fie(k,L,W,le,it,Pe)):!1}function uie(k){if(!AO(k)||yie(k))return!1;var L=CO(k)?mn:D;return L.test(_a(k))}function lie(k){return xc(k)&&SO(k.length)&&!!ge[vc(k)]}function cie(k){if(!vie(k))return Pre(k);var L=[];for(var W in Object(k))Ee.call(k,W)&&W!="constructor"&&L.push(W);return L}function EO(k,L,W,le,it,Pe){var xt=W&i,Ut=k.length,qt=L.length;if(Ut!=qt&&!(xt&&qt>Ut))return!1;var mt=Pe.get(k);if(mt&&Pe.get(L))return mt==L;var Kn=-1,Pr=!0,sn=W&o?new nh:void 0;for(Pe.set(k,L),Pe.set(L,k);++Kn<Ut;){var dr=k[Kn],fr=L[Kn];if(le)var Mo=xt?le(fr,dr,Kn,L,k,Pe):le(dr,fr,Kn,k,L,Pe);if(Mo!==void 0){if(Mo)continue;Pr=!1;break}if(sn){if(!vt(L,function(Pi,Ca){if(!Ot(sn,Ca)&&(dr===Pi||it(dr,Pi,W,le,Pe)))return sn.push(Ca)})){Pr=!1;break}}else if(!(dr===fr||it(dr,fr,W,le,Pe))){Pr=!1;break}}return Pe.delete(k),Pe.delete(L),Pr}function die(k,L,W,le,it,Pe,xt){switch(W){case z:if(k.byteLength!=L.byteLength||k.byteOffset!=L.byteOffset)return!1;k=k.buffer,L=L.buffer;case $:return!(k.byteLength!=L.byteLength||!Pe(new kt(k),new kt(L)));case c:case d:case b:return _O(+k,+L);case f:return k.name==L.name&&k.message==L.message;case _:case R:return k==L+"";case y:var Ut=Io;case C:var qt=le&i;if(Ut||(Ut=ne),k.size!=L.size&&!qt)return!1;var mt=xt.get(k);if(mt)return mt==L;le|=o,xt.set(k,L);var Kn=EO(Ut(k),Ut(L),le,it,Pe,xt);return xt.delete(k),Kn;case O:if(Qv)return Qv.call(k)==Qv.call(L)}return!1}function fie(k,L,W,le,it,Pe){var xt=W&i,Ut=TO(k),qt=Ut.length,mt=TO(L),Kn=mt.length;if(qt!=Kn&&!xt)return!1;for(var Pr=qt;Pr--;){var sn=Ut[Pr];if(!(xt?sn in L:Ee.call(L,sn)))return!1}var dr=Pe.get(k);if(dr&&Pe.get(L))return dr==L;var fr=!0;Pe.set(k,L),Pe.set(L,k);for(var Mo=xt;++Pr<qt;){sn=Ut[Pr];var Pi=k[sn],Ca=L[sn];if(le)var RO=xt?le(Ca,Pi,sn,L,k,Pe):le(Pi,Ca,sn,k,L,Pe);if(!(RO===void 0?Pi===Ca||it(Pi,Ca,W,le,Pe):RO)){fr=!1;break}Mo||(Mo=sn=="constructor")}if(fr&&!Mo){var ah=k.constructor,sh=L.constructor;ah!=sh&&"constructor"in k&&"constructor"in L&&!(typeof ah=="function"&&ah instanceof ah&&typeof sh=="function"&&sh instanceof sh)&&(fr=!1)}return Pe.delete(k),Pe.delete(L),fr}function TO(k){return aie(k,Tie,hie)}function ih(k,L){var W=k.__data__;return gie(L)?W[typeof L=="string"?"string":"hash"]:W.map}function tu(k,L){var W=Po(k,L);return uie(W)?W:void 0}function pie(k){var L=Ee.call(k,Ri),W=k[Ri];try{k[Ri]=void 0;var le=!0}catch{}var it=Rn.call(k);return le&&(L?k[Ri]=W:delete k[Ri]),it}var hie=vO?function(k){return k==null?[]:(k=Object(k),ze(vO(k),function(L){return Gn.call(k,L)}))}:_ie,Lo=vc;(qv&&Lo(new qv(new ArrayBuffer(1)))!=z||gc&&Lo(new gc)!=y||Gv&&Lo(Gv.resolve())!=w||Kv&&Lo(new Kv)!=C||Xv&&Lo(new Xv)!=P)&&(Lo=function(k){var L=vc(k),W=L==x?k.constructor:void 0,le=W?_a(W):"";if(le)switch(le){case Ire:return z;case Ore:return y;case Dre:return w;case Lre:return C;case Mre:return P}return L});function mie(k,L){return L=L??a,!!L&&(typeof k=="number"||Oe.test(k))&&k>-1&&k%1==0&&k<L}function gie(k){var L=typeof k;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?k!=="__proto__":k===null}function yie(k){return!!jt&&jt in k}function vie(k){var L=k&&k.constructor,W=typeof L=="function"&&L.prototype||q;return k===W}function xie(k){return Rn.call(k)}function _a(k){if(k!=null){try{return _e.call(k)}catch{}try{return k+""}catch{}}return""}function _O(k,L){return k===L||k!==k&&L!==L}var wie=wO(function(){return arguments}())?wO:function(k){return xc(k)&&Ee.call(k,"callee")&&!Gn.call(k,"callee")},oh=Array.isArray;function bie(k){return k!=null&&SO(k.length)&&!CO(k)}var Zv=Nre||Cie;function Eie(k,L){return bO(k,L)}function CO(k){if(!AO(k))return!1;var L=vc(k);return L==p||L==m||L==l||L==T}function SO(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=a}function AO(k){var L=typeof k;return k!=null&&(L=="object"||L=="function")}function xc(k){return k!=null&&typeof k=="object"}var kO=Ye?Fe(Ye):lie;function Tie(k){return bie(k)?oie(k):cie(k)}function _ie(){return[]}function Cie(){return!1}e.exports=Eie}(Af,Af.exports);var d7=Af.exports;const f7=Jr(d7);class ys{constructor(t){Q(this,"subscribers",new Set);Q(this,"state");Q(this,"initialState");Q(this,"get",()=>this.state);Q(this,"set",t=>{f7(this.state,t)||(this.state=t,this.notifySubscribers(t))});Q(this,"setPartial",t=>{if(t==null)return;const n={...this.state,...t};this.set(n)});Q(this,"reset",()=>{this.set(this.initialState)});Q(this,"notifySubscribers",t=>{Array.from(this.subscribers).forEach(r=>{try{r(t)}catch(i){console.error(i)}})});Q(this,"subscribe",t=>(this.subscribers.add(t),()=>{this.subscribers.delete(t)}));this.state=t,this.initialState=t}}class bS{constructor(){Q(this,"state",new ys({isPolling:!1,isError:!1}));Q(this,"abortController",new AbortController);Q(this,"reset",()=>{var t;this.abortController.abort("Resetting poller"),(t=this.stopPolling)==null||t.call(this),this.stopPolling=null});Q(this,"stopPolling",null);Q(this,"startPolling",(t,n)=>{if(this.stopPolling)return;const r=[],i=async()=>{this.abortController=new AbortController,this.state.setPartial({isPolling:!0});try{await t(this.abortController.signal)}catch(o){if(this.abortController.signal.aborted)return;console.error("Failed to poll:",o),this.state.setPartial({isError:!0})}finally{this.state.setPartial({isPolling:!1})}this.abortController.signal.aborted?console.log("Poller aborted, not scheduling anymore"):r.push(setTimeout(i,n))};i(),this.stopPolling=()=>{r.forEach(clearTimeout),this.state.reset()}})}}class p7{constructor({api:t,config:n,sessionCtx:r,messageCtx:i,sessionPollingIntervalSeconds:o}){Q(this,"api");Q(this,"config");Q(this,"sessionCtx");Q(this,"messageCtx");Q(this,"sessionPollingIntervalSeconds");Q(this,"poller",new bS);Q(this,"registerPolling",()=>{this.sessionCtx.sessionState.subscribe(({session:t})=>{t!=null&&t.id?this.poller.startPolling(async n=>{this.hackAndSlash(t.id,n)},this.sessionPollingIntervalSeconds*1e3):this.poller.reset()})});Q(this,"hackAndSlash",async(t,n)=>{var o;this.messageCtx.state.get().messages.length===0&&this.messageCtx.state.setPartial({isInitialFetchLoading:!0});const r=(o=this.messageCtx.state.get().messages.at(-1))==null?void 0:o.timestamp,{data:i}=await this.api.pollSessionAndHistory({sessionId:t,abortSignal:n,lastMessageTimestamp:r});if(i!=null&&i.session&&this.sessionCtx.sessionState.setPartial({session:i.session}),i!=null&&i.history&&i.history.length>0){const a=this.messageCtx.state.get().messages,s=i.history.map(this.mapHistoryToMessage).filter(u=>!a.some(l=>l.id===u.id));this.messageCtx.state.setPartial({messages:[...a,...s]})}this.messageCtx.state.get().isInitialFetchLoading&&this.messageCtx.state.setPartial({isInitialFetchLoading:!1})});Q(this,"mapHistoryToMessage",t=>{var i,o,a;const n={id:t.publicId,timestamp:t.sentAt||"",attachments:t.attachments||void 0};if(t.sender.kind==="user")return{...n,type:"FROM_USER",content:t.content.text||"",deliveredAt:t.sentAt||""};if(t.sender.kind==="agent")return{...n,type:"FROM_AGENT",component:"agent_message",data:{message:t.content.text||""},agent:{name:t.sender.name||"",avatar:t.sender.avatar||"",id:null,isAi:!1}};const r=(i=t.actionCalls)==null?void 0:i.at(-1);return{...n,type:"FROM_BOT",component:"bot_message",agent:{id:null,name:((o=this.config.bot)==null?void 0:o.name)||"",isAi:!0,avatar:((a=this.config.bot)==null?void 0:a.avatar)||""},data:{message:t.content.text||"",action:r?{name:r.actionName,data:r.result}:void 0}}});this.api=t,this.config=n,this.sessionCtx=r,this.messageCtx=i,this.sessionPollingIntervalSeconds=o,this.registerPolling()}}const Yt=[];for(let e=0;e<256;++e)Yt.push((e+256).toString(16).slice(1));function h7(e,t=0){return(Yt[e[t+0]]+Yt[e[t+1]]+Yt[e[t+2]]+Yt[e[t+3]]+"-"+Yt[e[t+4]]+Yt[e[t+5]]+"-"+Yt[e[t+6]]+Yt[e[t+7]]+"-"+Yt[e[t+8]]+Yt[e[t+9]]+"-"+Yt[e[t+10]]+Yt[e[t+11]]+Yt[e[t+12]]+Yt[e[t+13]]+Yt[e[t+14]]+Yt[e[t+15]]).toLowerCase()}let ly;const m7=new Uint8Array(16);function g7(){if(!ly){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ly=crypto.getRandomValues.bind(crypto)}return ly(m7)}const ES={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function cy(e,t,n){var i;if(ES.randomUUID&&!t&&!e)return ES.randomUUID();e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??g7();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,h7(r)}class y7{constructor({config:t,api:n,storageCtx:r}){Q(this,"config");Q(this,"storageCtx");Q(this,"api");Q(this,"state");Q(this,"shouldCollectData",()=>{var t;return!!(!((t=this.state.get().contact)!=null&&t.token)&&this.config.collectUserData)});Q(this,"autoCreateUnverifiedUserIfNotExists",async()=>{var t,n,r,i,o,a,s,u,l,c,d;if(!((t=this.config.user)!=null&&t.token)){if(this.config.collectUserData&&!((r=(n=this.config.user)==null?void 0:n.data)!=null&&r.email)){const f=await((i=this.storageCtx)==null?void 0:i.getContactToken());f&&await this.setUnverifiedContact(f);return}if(!((a=(o=this.config.user)==null?void 0:o.data)!=null&&a.email)){const f=await((s=this.storageCtx)==null?void 0:s.getContactToken());if(f){await this.setUnverifiedContact(f);return}}await this.createUnverifiedContact({name:((l=(u=this.config.user)==null?void 0:u.data)==null?void 0:l.name)||"Anonymous",email:(d=(c=this.config.user)==null?void 0:c.data)==null?void 0:d.email})}});Q(this,"createUnverifiedContact",async t=>{try{this.state.setPartial({isCreatingUnverifiedContact:!0,isErrorCreatingUnverifiedContact:!1});const{data:n}=await this.api.createUnverifiedContact(t);n!=null&&n.token?await this.setUnverifiedContact(n.token):this.state.setPartial({isErrorCreatingUnverifiedContact:!0})}finally{this.state.setPartial({isCreatingUnverifiedContact:!1})}});Q(this,"setUnverifiedContact",async t=>{var i,o,a,s;const n=await((i=this.storageCtx)==null?void 0:i.getExternalContactId()),r=((o=this.config.user)==null?void 0:o.externalId)||n||cy();this.api.setAuthToken(t),await((a=this.storageCtx)==null?void 0:a.setContactToken(t)),await((s=this.storageCtx)==null?void 0:s.setExternalContactId(r)),this.state.setPartial({contact:{token:t,externalId:r}})});var i;this.config=t,this.storageCtx=r,this.api=n,this.state=new ys({contact:(i=t.user)!=null&&i.token?{token:t.user.token,externalId:t.user.externalId}:null,isCreatingUnverifiedContact:!1,isErrorCreatingUnverifiedContact:!1}),this.autoCreateUnverifiedUserIfNotExists()}}function dy(){return cy()}class v7{constructor({api:t,contactCtx:n,sessionsPollingIntervalSeconds:r}){Q(this,"api");Q(this,"contactCtx");Q(this,"sessionsPollingIntervalSeconds");Q(this,"sessionsRefresher",new bS);Q(this,"sessionState",new ys({session:null,isCreatingSession:!1}));Q(this,"sessionsState",new ys({data:[],cursor:void 0,isLastPage:!1,didStartInitialFetch:!1,isInitialFetchLoading:!0}));Q(this,"reset",async()=>{this.sessionState.reset()});Q(this,"registerSessionsRefresherWrapper",()=>{var t;(t=this.contactCtx.state.get().contact)!=null&&t.token&&!this.sessionsState.get().didStartInitialFetch?this.registerSessionsRefresher():this.contactCtx.state.subscribe(({contact:n})=>{n!=null&&n.token&&!this.sessionsState.get().didStartInitialFetch&&this.registerSessionsRefresher()})});Q(this,"registerSessionsRefresher",()=>{this.sessionsRefresher.startPolling(async()=>{this.sessionsState.get().didStartInitialFetch===!1&&this.sessionsState.setPartial({didStartInitialFetch:!0});const{data:t}=await this.getSessions({cursor:void 0});if(!t)return;const n=[...t.items,...this.sessionsState.get().data].filter((r,i,o)=>i===o.findIndex(a=>r.id===a.id));this.sessionsState.setPartial({data:n}),this.sessionsState.get().isInitialFetchLoading===!0&&this.sessionsState.setPartial({isInitialFetchLoading:!1})},this.sessionsPollingIntervalSeconds*1e3)});Q(this,"createSession",async()=>{var i;this.sessionState.setPartial({session:null,isCreatingSession:!0});const t=(i=this.contactCtx.state.get().contact)==null?void 0:i.externalId,{data:n,error:r}=await this.api.createSession({customData:t?{external_id:t}:void 0});return n?(this.sessionState.setPartial({session:n,isCreatingSession:!1}),n):(console.error("Failed to create session:",r),null)});Q(this,"loadMoreSessions",async()=>{if(this.sessionsState.get().isLastPage)return;const{data:t}=await this.getSessions({cursor:this.sessionsState.get().cursor});if(t){const r=[...this.sessionsState.get().data,...t.items].filter((i,o,a)=>o===a.findIndex(s=>i.id===s.id));this.sessionsState.setPartial({data:r,cursor:t.next||void 0,isLastPage:t.next===null})}});Q(this,"getSessions",async({cursor:t})=>{var r,i;if(!((r=this.contactCtx.state.get().contact)!=null&&r.token))return{data:null};const n=(i=this.contactCtx.state.get().contact)==null?void 0:i.externalId;return await this.api.getSessions({cursor:t,filters:n?{external_id:n}:{}})});this.api=t,this.contactCtx=n,this.sessionsPollingIntervalSeconds=r,this.registerSessionsRefresherWrapper()}}class x7{constructor({config:t,api:n,sessionCtx:r}){Q(this,"config");Q(this,"api");Q(this,"sessionCtx");Q(this,"state",new ys({messages:[],isSendingMessage:!1,lastAIResMightSolveUserIssue:!1,isInitialFetchLoading:!1}));Q(this,"sendMessageAbortController",new AbortController);Q(this,"reset",()=>{this.sendMessageAbortController.abort("Resetting chat"),this.state.reset()});Q(this,"sendMessage",async t=>{var o,a,s,u,l,c,d,f,p;if(!t.content.trim()&&(!t.attachments||t.attachments.length===0)){console.warn("Cannot send an empty message of no content or attachments");return}const n=this.state.get().isSendingMessage,r=((o=this.sessionCtx.sessionState.get().session)==null?void 0:o.assignee.kind)==="ai",i=this.state.get().messages.at(-1);if(r&&n||r&&(i==null?void 0:i.type)==="FROM_USER"){console.warn("Cannot send messages while awaiting AI response");return}this.sendMessageAbortController=new AbortController,this.state.setPartial({lastAIResMightSolveUserIssue:!1});try{this.state.setPartial({isSendingMessage:!0});const m=this.toUserMessage(t.content.trim(),t.attachments||void 0),y=this.state.get().messages;if(this.state.setPartial({messages:[...y,m]}),!((a=this.sessionCtx.sessionState.get().session)!=null&&a.id)&&!await this.sessionCtx.createSession()){console.error("Failed to create session");return}const b=(s=this.sessionCtx.sessionState.get().session)==null?void 0:s.id;if(!b)return;const{data:g}=await this.api.sendMessage({uuid:m.id,bot_token:this.config.token,headers:this.config.headers,query_params:this.config.queryParams,session_id:b,user:(u=this.config.user)==null?void 0:u.data,...t},this.sendMessageAbortController.signal);if(g!=null&&g.success){const x=this.toBotMessage(g);if(x){const w=this.state.get().messages;if(!!w.some(_=>_.id===x.id)){this.state.setPartial({lastAIResMightSolveUserIssue:((l=g.autopilotResponse)==null?void 0:l.mightSolveUserIssue)||((c=g.uiResponse)==null?void 0:c.mightSolveUserIssue)});return}this.state.setPartial({messages:[...w,x],lastAIResMightSolveUserIssue:((d=g.autopilotResponse)==null?void 0:d.mightSolveUserIssue)||((f=g.uiResponse)==null?void 0:f.mightSolveUserIssue)})}}else{const x=this.toBotErrorMessage(((p=g==null?void 0:g.error)==null?void 0:p.message)||"Unknown error occurred"),w=this.state.get().messages;this.state.setPartial({messages:[...w,x]})}}catch(m){this.sendMessageAbortController.signal.aborted||console.error("Failed to send message:",m)}finally{this.state.setPartial({isSendingMessage:!1})}});Q(this,"toUserMessage",(t,n)=>({id:dy(),type:"FROM_USER",content:t,deliveredAt:new Date().toISOString(),attachments:n,timestamp:new Date().toISOString()}));Q(this,"toBotMessage",t=>{var n;return t.success&&t.autopilotResponse?{type:"FROM_BOT",id:t.autopilotResponse.id||dy(),timestamp:new Date().toISOString(),component:"bot_message",agent:this.config.bot?{name:this.config.bot.name||"",isAi:!0,avatar:this.config.bot.avatar||"",id:null}:void 0,data:{message:t.autopilotResponse.value.content,action:(n=t.uiResponse)!=null&&n.value.name?{name:t.uiResponse.value.name,data:t.uiResponse.value.request_response}:void 0}}:null});Q(this,"toBotErrorMessage",t=>({type:"FROM_BOT",id:dy(),timestamp:new Date().toISOString(),component:"TEXT",data:{message:t,variant:"error",action:void 0}}));this.config=t,this.api=n,this.sessionCtx=r}}class w7{constructor({contactCtx:t,sessionCtx:n,resetChat:r}){Q(this,"state");Q(this,"contactCtx");Q(this,"sessionCtx");Q(this,"resetChat");Q(this,"registerRoutingListener",()=>{this.contactCtx.state.subscribe(({contact:t})=>{t!=null&&t.token&&this.state.get().screen==="welcome"&&this.state.setPartial({screen:"sessions"})})});Q(this,"toSessionsScreen",()=>{this.resetChat(),this.state.setPartial({screen:"sessions"})});Q(this,"toChatScreen",t=>{if(this.resetChat(),t){const n=this.sessionCtx.sessionsState.get().data.find(r=>r.id===t);if(!n)return;this.sessionCtx.sessionState.setPartial({session:n})}this.state.setPartial({screen:"chat"})});this.state=new ys({screen:t.shouldCollectData()?"welcome":"sessions"}),this.contactCtx=t,this.sessionCtx=n,this.resetChat=r,this.registerRoutingListener()}}class b7{constructor({storage:t}){Q(this,"storage");Q(this,"KEYS",{contactToken:"opencx__widget__contactToken",externalContactId:"opencx__widget__externalContactId"});Q(this,"setContactToken",async t=>{await this.storage.set(this.KEYS.contactToken,t)});Q(this,"getContactToken",async()=>this.storage.get(this.KEYS.contactToken));Q(this,"setExternalContactId",async t=>{await this.storage.set(this.KEYS.externalContactId,t)});Q(this,"getExternalContactId",async()=>this.storage.get(this.KEYS.externalContactId));this.storage=t}}const ki=class ki{constructor({config:t,storage:n}){Q(this,"config");Q(this,"api");Q(this,"contactCtx");Q(this,"sessionCtx");Q(this,"messageCtx");Q(this,"routerCtx");Q(this,"storageCtx");Q(this,"activeSessionPollingCtx");Q(this,"resetChat",()=>{this.sessionCtx.reset(),this.messageCtx.reset()});if(!ki.pollingIntervalsSeconds)throw Error("Widget polling values are not defined, did you call WidgetCtx.initialize()");this.config=t,this.api=new wS({config:t}),this.storageCtx=n?new b7({storage:n}):void 0,this.contactCtx=new y7({api:this.api,config:this.config,storageCtx:this.storageCtx}),this.sessionCtx=new v7({api:this.api,contactCtx:this.contactCtx,sessionsPollingIntervalSeconds:ki.pollingIntervalsSeconds.sessions}),this.messageCtx=new x7({config:this.config,api:this.api,sessionCtx:this.sessionCtx}),this.activeSessionPollingCtx=new p7({api:this.api,config:this.config,sessionCtx:this.sessionCtx,messageCtx:this.messageCtx,sessionPollingIntervalSeconds:ki.pollingIntervalsSeconds.session}),this.routerCtx=new w7({contactCtx:this.contactCtx,sessionCtx:this.sessionCtx,resetChat:this.resetChat})}};Q(ki,"pollingIntervalsSeconds",null),Q(ki,"initialize",async({config:t,storage:n})=>{var i,o;const r=await new wS({config:t}).getExternalWidgetConfig();return ki.pollingIntervalsSeconds={session:((i=r.data)==null?void 0:i.sessionPollingIntervalSeconds)||10,sessions:((o=r.data)==null?void 0:o.sessionsPollingIntervalSeconds)||60},new ki({config:t,storage:n})});let fy=ki;const[ir,E7]=PB();function T7({options:e,children:t,components:n,storage:r}){const i=v.useRef(!1),[o,a]=v.useState(null),s=v.useMemo(()=>new NB({components:n}),[n]);return v.useEffect(()=>{i.current||(i.current=!0,fy.initialize({config:e,storage:r}).then(a))},[]),o?E.jsx(E7,{value:{widgetCtx:o,components:n,componentStore:s,version:bE},children:t}):null}function vs(){const{widgetCtx:e}=ir();return e.config}function ml(e){return v.useSyncExternalStore(e.subscribe,e.get,e.get)}function _7(){const{widgetCtx:e}=ir();return{contactState:ml(e.contactCtx.state),createUnverifiedContact:e.contactCtx.createUnverifiedContact}}function xs(){const{widgetCtx:e}=ir();return{messagesState:ml(e.messageCtx.state),sendMessage:e.messageCtx.sendMessage}}function gl(){const{widgetCtx:e}=ir(),t=ml(e.sessionCtx.sessionState),n=ml(e.sessionCtx.sessionsState);return{sessionState:t,sessionsState:n,loadMoreSessions:e.sessionCtx.loadMoreSessions}}function TS(){var o,a;const{sessionState:e}=gl(),{messagesState:t}=xs(),n=((o=e.session)==null?void 0:o.assignee.kind)==="ai",r=((a=t.messages.at(-1))==null?void 0:a.type)==="FROM_USER";return{isAwaitingBotReply:(n||e.isCreatingSession)&&(t.isSendingMessage||r)}}var _S={exports:{}},CS={};/**
|
|
338
|
+
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=aa(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Cf.assertOptions(r,{silentJSONParsing:Ur.transitional(Ur.boolean),forcedJSONParsing:Ur.transitional(Ur.boolean),clarifyTimeoutError:Ur.transitional(Ur.boolean)},!1),i!=null&&(H.isFunction(i)?n.paramsSerializer={serialize:i}:Cf.assertOptions(i,{encode:Ur.function,serialize:Ur.function},!0)),Cf.assertOptions(n,{baseUrl:Ur.spelling("baseURL"),withXsrfToken:Ur.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&H.merge(o.common,o[n.method]);o&&H.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=Tn.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let c,d=0,f;if(!u){const m=[fS.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),f=m.length,c=Promise.resolve(n);d<f;)c=c.then(m[d++],m[d++]);return c}f=s.length;let p=n;for(d=0;d<f;){const m=s[d++],y=s[d++];try{p=m(p)}catch(b){y.call(this,b);break}}try{c=fS.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,f=l.length;d<f;)c=c.then(l[d++],l[d++]);return c}getUri(t){t=aa(this.defaults,t);const n=rS(t.baseURL,t.url);return GC(n,t.params,t.paramsSerializer)}}H.forEach(["delete","get","head","options"],function(t){sa.prototype[t]=function(n,r){return this.request(aa(r||{},{method:t,url:n,data:(r||{}).data}))}}),H.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(aa(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}sa.prototype[t]=n(),sa.prototype[t+"Form"]=n(!0)});class sy{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new gs(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new sy(function(i){t=i}),cancel:t}}}function Jj(e){return function(n){return e.apply(null,n)}}function e7(e){return H.isObject(e)&&e.isAxiosError===!0}const uy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(uy).forEach(([e,t])=>{uy[t]=e});function mS(e){const t=new sa(e),n=IC(sa.prototype.request,t);return H.extend(n,sa.prototype,t,{allOwnKeys:!0}),H.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return mS(aa(e,i))},n}const St=mS(pl);St.Axios=sa,St.CanceledError=gs,St.CancelToken=sy,St.isCancel=JC,St.VERSION=pS,St.toFormData=xf,St.AxiosError=Ce,St.Cancel=St.CanceledError,St.all=function(t){return Promise.all(t)},St.spread=Jj,St.isAxiosError=e7,St.mergeConfig=aa,St.AxiosHeaders=Tn,St.formToJSON=e=>QC(H.isHTMLForm(e)?new FormData(e):e),St.getAdapter=dS.getAdapter,St.HttpStatusCode=uy,St.default=St;const t7=/\{[^{}]+\}/g,n7=()=>{var e,t;return typeof process=="object"&&Number.parseInt((t=(e=process==null?void 0:process.versions)==null?void 0:e.node)==null?void 0:t.substring(0,2))>=18&&process.versions.undici};function r7(){return Math.random().toString(36).slice(2,11)}function i7(e){let{baseUrl:t="",Request:n=globalThis.Request,fetch:r=globalThis.fetch,querySerializer:i,bodySerializer:o,headers:a,requestInitExt:s=void 0,...u}={...e};s=n7()?s:void 0,t=xS(t);const l=[];async function c(d,f){const{baseUrl:p,fetch:m=r,Request:y=n,headers:b,params:g={},parseAs:x="json",querySerializer:w,bodySerializer:T=o??a7,body:_,...C}=f||{};p&&(t=xS(p));let R=typeof i=="function"?i:vS(i);w&&(R=typeof w=="function"?w:vS({...typeof i=="object"?i:{},...w}));const O=_===void 0?void 0:T(_),V=O===void 0||O instanceof FormData?{}:{"Content-Type":"application/json"},P={redirect:"follow",...u,...C,body:O,headers:u7(V,a,b,g.header)};let $,z,Q=new n(s7(d,{baseUrl:t,params:g,querySerializer:R}),P);for(const ie in C)ie in Q||(Q[ie]=C[ie]);if(l.length){$=r7(),z=Object.freeze({baseUrl:t,fetch:m,parseAs:x,querySerializer:R,bodySerializer:T});for(const ie of l)if(ie&&typeof ie=="object"&&typeof ie.onRequest=="function"){const te=await ie.onRequest({request:Q,schemaPath:d,params:g,options:z,id:$});if(te){if(!(te instanceof n))throw new Error("onRequest: must return new Request() when modifying the request");Q=te}}}let Y;try{Y=await m(Q,s)}catch(ie){let te=ie;if(l.length)for(let F=l.length-1;F>=0;F--){const B=l[F];if(B&&typeof B=="object"&&typeof B.onError=="function"){const A=await B.onError({request:Q,error:te,schemaPath:d,params:g,options:z,id:$});if(A){if(A instanceof Response){te=void 0,Y=A;break}if(A instanceof Error){te=A;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(te)throw te}if(l.length)for(let ie=l.length-1;ie>=0;ie--){const te=l[ie];if(te&&typeof te=="object"&&typeof te.onResponse=="function"){const F=await te.onResponse({request:Q,response:Y,schemaPath:d,params:g,options:z,id:$});if(F){if(!(F instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");Y=F}}}if(Y.status===204||Y.headers.get("Content-Length")==="0")return Y.ok?{data:void 0,response:Y}:{error:void 0,response:Y};if(Y.ok)return x==="stream"?{data:Y.body,response:Y}:{data:await Y[x](),response:Y};let re=await Y.text();try{re=JSON.parse(re)}catch{}return{error:re,response:Y}}return{request(d,f,p){return c(f,{...p,method:d.toUpperCase()})},GET(d,f){return c(d,{...f,method:"GET"})},PUT(d,f){return c(d,{...f,method:"PUT"})},POST(d,f){return c(d,{...f,method:"POST"})},DELETE(d,f){return c(d,{...f,method:"DELETE"})},OPTIONS(d,f){return c(d,{...f,method:"OPTIONS"})},HEAD(d,f){return c(d,{...f,method:"HEAD"})},PATCH(d,f){return c(d,{...f,method:"PATCH"})},TRACE(d,f){return c(d,{...f,method:"TRACE"})},use(...d){for(const f of d)if(f){if(typeof f!="object"||!("onRequest"in f||"onResponse"in f||"onError"in f))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");l.push(f)}},eject(...d){for(const f of d){const p=l.indexOf(f);p!==-1&&l.splice(p,1)}}}}function Sf(e,t,n){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${(n==null?void 0:n.allowReserved)===!0?t:encodeURIComponent(t)}`}function gS(e,t,n){if(!t||typeof t!="object")return"";const r=[],i={simple:",",label:".",matrix:";"}[n.style]||"&";if(n.style!=="deepObject"&&n.explode===!1){for(const s in t)r.push(s,n.allowReserved===!0?t[s]:encodeURIComponent(t[s]));const a=r.join(",");switch(n.style){case"form":return`${e}=${a}`;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return a}}for(const a in t){const s=n.style==="deepObject"?`${e}[${a}]`:a;r.push(Sf(s,t[a],n))}const o=r.join(i);return n.style==="label"||n.style==="matrix"?`${i}${o}`:o}function yS(e,t,n){if(!Array.isArray(t))return"";if(n.explode===!1){const o={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",a=(n.allowReserved===!0?t:t.map(s=>encodeURIComponent(s))).join(o);switch(n.style){case"simple":return a;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return`${e}=${a}`}}const r={simple:",",label:".",matrix:";"}[n.style]||"&",i=[];for(const o of t)n.style==="simple"||n.style==="label"?i.push(n.allowReserved===!0?o:encodeURIComponent(o)):i.push(Sf(e,o,n));return n.style==="label"||n.style==="matrix"?`${r}${i.join(r)}`:i.join(r)}function vS(e){return function(n){const r=[];if(n&&typeof n=="object")for(const i in n){const o=n[i];if(o!=null){if(Array.isArray(o)){if(o.length===0)continue;r.push(yS(i,o,{style:"form",explode:!0,...e==null?void 0:e.array,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}if(typeof o=="object"){r.push(gS(i,o,{style:"deepObject",explode:!0,...e==null?void 0:e.object,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}r.push(Sf(i,o,e))}}return r.join("&")}}function o7(e,t){let n=e;for(const r of e.match(t7)??[]){let i=r.substring(1,r.length-1),o=!1,a="simple";if(i.endsWith("*")&&(o=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(a="label",i=i.substring(1)):i.startsWith(";")&&(a="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const s=t[i];if(Array.isArray(s)){n=n.replace(r,yS(i,s,{style:a,explode:o}));continue}if(typeof s=="object"){n=n.replace(r,gS(i,s,{style:a,explode:o}));continue}if(a==="matrix"){n=n.replace(r,`;${Sf(i,s)}`);continue}n=n.replace(r,a==="label"?`.${encodeURIComponent(s)}`:encodeURIComponent(s))}return n}function a7(e){return e instanceof FormData?e:JSON.stringify(e)}function s7(e,t){var i;let n=`${t.baseUrl}${e}`;(i=t.params)!=null&&i.path&&(n=o7(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function u7(...e){const t=new Headers;for(const n of e){if(!n||typeof n!="object")continue;const r=n instanceof Headers?n.entries():Object.entries(n);for(const[i,o]of r)if(o===null)t.delete(i);else if(Array.isArray(o))for(const a of o)t.append(i,a);else o!==void 0&&t.set(i,o)}return t}function xS(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const l7=e=>{console.log(e.error)},c7=e=>{const t=i7({baseUrl:e.baseUrl}),n={onRequest:e.onRequest,onResponse:e.onResponse,onError:e.onError||l7};return t.use(n),t};class wS{constructor({config:t}){X(this,"client");X(this,"uploadFileClient");X(this,"config");X(this,"constructClientOptions",t=>{const n=this.config.apiUrl||"https://api.open.cx",r={"X-Bot-Token":this.config.token,"Content-Type":"application/json",Accept:"application/json",Authorization:t?`Bearer ${t}`:void 0};return{baseUrl:n,headers:r}});X(this,"createOpenAPIClient",({baseUrl:t,headers:n})=>c7({baseUrl:t,onRequest:({request:r})=>{Object.entries(n).forEach(([i,o])=>{o&&r.headers.set(i,o)})}}));X(this,"createAxiosUploadClient",({baseUrl:t,headers:n})=>St.create({baseURL:`${t}/backend/widget/v2/upload`,headers:n}));X(this,"setAuthToken",t=>{const{baseUrl:n,headers:r}=this.constructClientOptions(t);this.client=this.createOpenAPIClient({baseUrl:n,headers:r}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:n,headers:r})});X(this,"getExternalWidgetConfig",async()=>await this.client.GET("/backend/widget/v2/config",{params:{header:{"X-Bot-Token":this.config.token}}}));X(this,"widgetPrelude",async()=>await this.client.GET("/backend/widget/v2/prelude",{params:{header:{"X-Bot-Token":this.config.token}}}));X(this,"sendMessage",async(t,n)=>await this.client.POST("/backend/widget/v2/chat/send",{body:t,signal:n}));X(this,"createUnverifiedContact",async t=>await this.client.POST("/backend/widget/v2/contact/create-unverified",{params:{header:{"x-bot-token":this.config.token}},body:t}));X(this,"createSession",async t=>await this.client.POST("/backend/widget/v2/create-session",{body:t}));X(this,"pollSessionAndHistory",async({sessionId:t,lastMessageTimestamp:n,abortSignal:r})=>{const i=n?{lastMessageTimestamp:n}:void 0;return await this.client.GET("/backend/widget/v2/poll/{sessionId}",{params:{path:{sessionId:t},query:i},signal:r})});X(this,"getSessions",async({cursor:t,filters:n,abortSignal:r})=>await this.client.GET("/backend/widget/v2/sessions",{params:{query:{cursor:t,filters:JSON.stringify(n)}},signal:r}));X(this,"uploadFile",async(t,n={})=>{const r=new FormData;r.append("file",t.file);const{data:i}=await this.uploadFileClient.post("",r,{headers:{"Content-Type":"multipart/form-data"},...n});return i});X(this,"vote",async t=>await this.client.POST("/backend/widget/v2/chat/vote",{body:t}));var i;this.config=t;const{baseUrl:n,headers:r}=this.constructClientOptions((i=t.user)==null?void 0:i.token);this.client=this.createOpenAPIClient({baseUrl:n,headers:r}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:n,headers:r})}}var Af={exports:{}};Af.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,s="[object Arguments]",u="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",y="[object Map]",b="[object Number]",g="[object Null]",x="[object Object]",w="[object Promise]",T="[object Proxy]",_="[object RegExp]",C="[object Set]",R="[object String]",O="[object Symbol]",V="[object Undefined]",P="[object WeakMap]",$="[object ArrayBuffer]",z="[object DataView]",Q="[object Float32Array]",Y="[object Float64Array]",re="[object Int8Array]",ie="[object Int16Array]",te="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",A="[object Uint16Array]",oe="[object Uint32Array]",he=/[\\^$.*+?()[\]{}|]/g,D=/^\[object .+?Constructor\]$/,Oe=/^(?:0|[1-9]\d*)$/,ge={};ge[Q]=ge[Y]=ge[re]=ge[ie]=ge[te]=ge[F]=ge[B]=ge[A]=ge[oe]=!0,ge[s]=ge[u]=ge[$]=ge[c]=ge[z]=ge[d]=ge[f]=ge[p]=ge[y]=ge[b]=ge[x]=ge[_]=ge[C]=ge[R]=ge[P]=!1;var xe=typeof yn=="object"&&yn&&yn.Object===Object&&yn,$e=typeof self=="object"&&self&&self.Object===Object&&self,Ve=xe||$e||Function("return this")(),We=t&&!t.nodeType&&t,Ge=We&&!0&&e&&!e.nodeType&&e,_t=Ge&&Ge.exports===We,Te=_t&&xe.process,be=function(){try{return Te&&Te.binding&&Te.binding("util")}catch{}}(),Ye=be&&be.isTypedArray;function ze(k,L){for(var W=-1,le=k==null?0:k.length,it=0,Pe=[];++W<le;){var xt=k[W];L(xt,W,k)&&(Pe[it++]=xt)}return Pe}function yt(k,L){for(var W=-1,le=L.length,it=k.length;++W<le;)k[it+W]=L[W];return k}function vt(k,L){for(var W=-1,le=k==null?0:k.length;++W<le;)if(L(k[W],W,k))return!0;return!1}function Ke(k,L){for(var W=-1,le=Array(k);++W<k;)le[W]=L(W);return le}function Fe(k){return function(L){return k(L)}}function Ot(k,L){return k.has(L)}function Po(k,L){return k==null?void 0:k[L]}function Io(k){var L=-1,W=Array(k.size);return k.forEach(function(le,it){W[++L]=[it,le]}),W}function Oo(k,L){return function(W){return k(L(W))}}function ne(k){var L=-1,W=Array(k.size);return k.forEach(function(le){W[++L]=le}),W}var de=Array.prototype,j=Function.prototype,q=Object.prototype,ce=Ve["__core-js_shared__"],_e=j.toString,Ee=q.hasOwnProperty,jt=function(){var k=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""}(),Rn=q.toString,mn=RegExp("^"+_e.call(Ee).replace(he,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qn=_t?Ve.Buffer:void 0,Nn=Ve.Symbol,kt=Ve.Uint8Array,Gn=q.propertyIsEnumerable,gn=de.splice,Ri=Nn?Nn.toStringTag:void 0,vO=Object.getOwnPropertySymbols,Nre=qn?qn.isBuffer:void 0,Pre=Oo(Object.keys,Object),qv=tu(Ve,"DataView"),gc=tu(Ve,"Map"),Gv=tu(Ve,"Promise"),Kv=tu(Ve,"Set"),Xv=tu(Ve,"WeakMap"),yc=tu(Object,"create"),Ire=_a(qv),Ore=_a(gc),Dre=_a(Gv),Lre=_a(Kv),Mre=_a(Xv),xO=Nn?Nn.prototype:void 0,Qv=xO?xO.valueOf:void 0;function Ea(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function Fre(){this.__data__=yc?yc(null):{},this.size=0}function Bre(k){var L=this.has(k)&&delete this.__data__[k];return this.size-=L?1:0,L}function jre(k){var L=this.__data__;if(yc){var W=L[k];return W===r?void 0:W}return Ee.call(L,k)?L[k]:void 0}function Ure(k){var L=this.__data__;return yc?L[k]!==void 0:Ee.call(L,k)}function zre(k,L){var W=this.__data__;return this.size+=this.has(k)?0:1,W[k]=yc&&L===void 0?r:L,this}Ea.prototype.clear=Fre,Ea.prototype.delete=Bre,Ea.prototype.get=jre,Ea.prototype.has=Ure,Ea.prototype.set=zre;function Ni(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function Hre(){this.__data__=[],this.size=0}function Vre(k){var L=this.__data__,W=rh(L,k);if(W<0)return!1;var le=L.length-1;return W==le?L.pop():gn.call(L,W,1),--this.size,!0}function $re(k){var L=this.__data__,W=rh(L,k);return W<0?void 0:L[W][1]}function Wre(k){return rh(this.__data__,k)>-1}function Yre(k,L){var W=this.__data__,le=rh(W,k);return le<0?(++this.size,W.push([k,L])):W[le][1]=L,this}Ni.prototype.clear=Hre,Ni.prototype.delete=Vre,Ni.prototype.get=$re,Ni.prototype.has=Wre,Ni.prototype.set=Yre;function Ta(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function qre(){this.size=0,this.__data__={hash:new Ea,map:new(gc||Ni),string:new Ea}}function Gre(k){var L=ih(this,k).delete(k);return this.size-=L?1:0,L}function Kre(k){return ih(this,k).get(k)}function Xre(k){return ih(this,k).has(k)}function Qre(k,L){var W=ih(this,k),le=W.size;return W.set(k,L),this.size+=W.size==le?0:1,this}Ta.prototype.clear=qre,Ta.prototype.delete=Gre,Ta.prototype.get=Kre,Ta.prototype.has=Xre,Ta.prototype.set=Qre;function nh(k){var L=-1,W=k==null?0:k.length;for(this.__data__=new Ta;++L<W;)this.add(k[L])}function Zre(k){return this.__data__.set(k,r),this}function Jre(k){return this.__data__.has(k)}nh.prototype.add=nh.prototype.push=Zre,nh.prototype.has=Jre;function Do(k){var L=this.__data__=new Ni(k);this.size=L.size}function eie(){this.__data__=new Ni,this.size=0}function tie(k){var L=this.__data__,W=L.delete(k);return this.size=L.size,W}function nie(k){return this.__data__.get(k)}function rie(k){return this.__data__.has(k)}function iie(k,L){var W=this.__data__;if(W instanceof Ni){var le=W.__data__;if(!gc||le.length<n-1)return le.push([k,L]),this.size=++W.size,this;W=this.__data__=new Ta(le)}return W.set(k,L),this.size=W.size,this}Do.prototype.clear=eie,Do.prototype.delete=tie,Do.prototype.get=nie,Do.prototype.has=rie,Do.prototype.set=iie;function oie(k,L){var W=oh(k),le=!W&&wie(k),it=!W&&!le&&Zv(k),Pe=!W&&!le&&!it&&kO(k),xt=W||le||it||Pe,Ut=xt?Ke(k.length,String):[],qt=Ut.length;for(var mt in k)Ee.call(k,mt)&&!(xt&&(mt=="length"||it&&(mt=="offset"||mt=="parent")||Pe&&(mt=="buffer"||mt=="byteLength"||mt=="byteOffset")||mie(mt,qt)))&&Ut.push(mt);return Ut}function rh(k,L){for(var W=k.length;W--;)if(_O(k[W][0],L))return W;return-1}function aie(k,L,W){var le=L(k);return oh(k)?le:yt(le,W(k))}function vc(k){return k==null?k===void 0?V:g:Ri&&Ri in Object(k)?pie(k):xie(k)}function wO(k){return xc(k)&&vc(k)==s}function bO(k,L,W,le,it){return k===L?!0:k==null||L==null||!xc(k)&&!xc(L)?k!==k&&L!==L:sie(k,L,W,le,bO,it)}function sie(k,L,W,le,it,Pe){var xt=oh(k),Ut=oh(L),qt=xt?u:Lo(k),mt=Ut?u:Lo(L);qt=qt==s?x:qt,mt=mt==s?x:mt;var Kn=qt==x,Pr=mt==x,sn=qt==mt;if(sn&&Zv(k)){if(!Zv(L))return!1;xt=!0,Kn=!1}if(sn&&!Kn)return Pe||(Pe=new Do),xt||kO(k)?EO(k,L,W,le,it,Pe):die(k,L,qt,W,le,it,Pe);if(!(W&i)){var dr=Kn&&Ee.call(k,"__wrapped__"),fr=Pr&&Ee.call(L,"__wrapped__");if(dr||fr){var Mo=dr?k.value():k,Pi=fr?L.value():L;return Pe||(Pe=new Do),it(Mo,Pi,W,le,Pe)}}return sn?(Pe||(Pe=new Do),fie(k,L,W,le,it,Pe)):!1}function uie(k){if(!AO(k)||yie(k))return!1;var L=CO(k)?mn:D;return L.test(_a(k))}function lie(k){return xc(k)&&SO(k.length)&&!!ge[vc(k)]}function cie(k){if(!vie(k))return Pre(k);var L=[];for(var W in Object(k))Ee.call(k,W)&&W!="constructor"&&L.push(W);return L}function EO(k,L,W,le,it,Pe){var xt=W&i,Ut=k.length,qt=L.length;if(Ut!=qt&&!(xt&&qt>Ut))return!1;var mt=Pe.get(k);if(mt&&Pe.get(L))return mt==L;var Kn=-1,Pr=!0,sn=W&o?new nh:void 0;for(Pe.set(k,L),Pe.set(L,k);++Kn<Ut;){var dr=k[Kn],fr=L[Kn];if(le)var Mo=xt?le(fr,dr,Kn,L,k,Pe):le(dr,fr,Kn,k,L,Pe);if(Mo!==void 0){if(Mo)continue;Pr=!1;break}if(sn){if(!vt(L,function(Pi,Ca){if(!Ot(sn,Ca)&&(dr===Pi||it(dr,Pi,W,le,Pe)))return sn.push(Ca)})){Pr=!1;break}}else if(!(dr===fr||it(dr,fr,W,le,Pe))){Pr=!1;break}}return Pe.delete(k),Pe.delete(L),Pr}function die(k,L,W,le,it,Pe,xt){switch(W){case z:if(k.byteLength!=L.byteLength||k.byteOffset!=L.byteOffset)return!1;k=k.buffer,L=L.buffer;case $:return!(k.byteLength!=L.byteLength||!Pe(new kt(k),new kt(L)));case c:case d:case b:return _O(+k,+L);case f:return k.name==L.name&&k.message==L.message;case _:case R:return k==L+"";case y:var Ut=Io;case C:var qt=le&i;if(Ut||(Ut=ne),k.size!=L.size&&!qt)return!1;var mt=xt.get(k);if(mt)return mt==L;le|=o,xt.set(k,L);var Kn=EO(Ut(k),Ut(L),le,it,Pe,xt);return xt.delete(k),Kn;case O:if(Qv)return Qv.call(k)==Qv.call(L)}return!1}function fie(k,L,W,le,it,Pe){var xt=W&i,Ut=TO(k),qt=Ut.length,mt=TO(L),Kn=mt.length;if(qt!=Kn&&!xt)return!1;for(var Pr=qt;Pr--;){var sn=Ut[Pr];if(!(xt?sn in L:Ee.call(L,sn)))return!1}var dr=Pe.get(k);if(dr&&Pe.get(L))return dr==L;var fr=!0;Pe.set(k,L),Pe.set(L,k);for(var Mo=xt;++Pr<qt;){sn=Ut[Pr];var Pi=k[sn],Ca=L[sn];if(le)var RO=xt?le(Ca,Pi,sn,L,k,Pe):le(Pi,Ca,sn,k,L,Pe);if(!(RO===void 0?Pi===Ca||it(Pi,Ca,W,le,Pe):RO)){fr=!1;break}Mo||(Mo=sn=="constructor")}if(fr&&!Mo){var ah=k.constructor,sh=L.constructor;ah!=sh&&"constructor"in k&&"constructor"in L&&!(typeof ah=="function"&&ah instanceof ah&&typeof sh=="function"&&sh instanceof sh)&&(fr=!1)}return Pe.delete(k),Pe.delete(L),fr}function TO(k){return aie(k,Tie,hie)}function ih(k,L){var W=k.__data__;return gie(L)?W[typeof L=="string"?"string":"hash"]:W.map}function tu(k,L){var W=Po(k,L);return uie(W)?W:void 0}function pie(k){var L=Ee.call(k,Ri),W=k[Ri];try{k[Ri]=void 0;var le=!0}catch{}var it=Rn.call(k);return le&&(L?k[Ri]=W:delete k[Ri]),it}var hie=vO?function(k){return k==null?[]:(k=Object(k),ze(vO(k),function(L){return Gn.call(k,L)}))}:_ie,Lo=vc;(qv&&Lo(new qv(new ArrayBuffer(1)))!=z||gc&&Lo(new gc)!=y||Gv&&Lo(Gv.resolve())!=w||Kv&&Lo(new Kv)!=C||Xv&&Lo(new Xv)!=P)&&(Lo=function(k){var L=vc(k),W=L==x?k.constructor:void 0,le=W?_a(W):"";if(le)switch(le){case Ire:return z;case Ore:return y;case Dre:return w;case Lre:return C;case Mre:return P}return L});function mie(k,L){return L=L??a,!!L&&(typeof k=="number"||Oe.test(k))&&k>-1&&k%1==0&&k<L}function gie(k){var L=typeof k;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?k!=="__proto__":k===null}function yie(k){return!!jt&&jt in k}function vie(k){var L=k&&k.constructor,W=typeof L=="function"&&L.prototype||q;return k===W}function xie(k){return Rn.call(k)}function _a(k){if(k!=null){try{return _e.call(k)}catch{}try{return k+""}catch{}}return""}function _O(k,L){return k===L||k!==k&&L!==L}var wie=wO(function(){return arguments}())?wO:function(k){return xc(k)&&Ee.call(k,"callee")&&!Gn.call(k,"callee")},oh=Array.isArray;function bie(k){return k!=null&&SO(k.length)&&!CO(k)}var Zv=Nre||Cie;function Eie(k,L){return bO(k,L)}function CO(k){if(!AO(k))return!1;var L=vc(k);return L==p||L==m||L==l||L==T}function SO(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=a}function AO(k){var L=typeof k;return k!=null&&(L=="object"||L=="function")}function xc(k){return k!=null&&typeof k=="object"}var kO=Ye?Fe(Ye):lie;function Tie(k){return bie(k)?oie(k):cie(k)}function _ie(){return[]}function Cie(){return!1}e.exports=Eie}(Af,Af.exports);var d7=Af.exports;const f7=Jr(d7);class ys{constructor(t){X(this,"subscribers",new Set);X(this,"state");X(this,"initialState");X(this,"get",()=>this.state);X(this,"set",t=>{f7(this.state,t)||(this.state=t,this.notifySubscribers(t))});X(this,"setPartial",t=>{if(t==null)return;const n={...this.state,...t};this.set(n)});X(this,"reset",()=>{this.set(this.initialState)});X(this,"notifySubscribers",t=>{Array.from(this.subscribers).forEach(r=>{try{r(t)}catch(i){console.error(i)}})});X(this,"subscribe",t=>(this.subscribers.add(t),()=>{this.subscribers.delete(t)}));this.state=t,this.initialState=t}}class bS{constructor(){X(this,"state",new ys({isPolling:!1,isError:!1}));X(this,"abortController",new AbortController);X(this,"reset",()=>{var t;this.abortController.abort("Resetting poller"),(t=this.stopPolling)==null||t.call(this),this.stopPolling=null});X(this,"stopPolling",null);X(this,"startPolling",(t,n)=>{if(this.stopPolling)return;const r=[],i=async()=>{this.abortController=new AbortController,this.state.setPartial({isPolling:!0});try{await t(this.abortController.signal)}catch(o){if(this.abortController.signal.aborted)return;console.error("Failed to poll:",o),this.state.setPartial({isError:!0})}finally{this.state.setPartial({isPolling:!1})}this.abortController.signal.aborted?console.log("Poller aborted, not scheduling anymore"):r.push(setTimeout(i,n))};i(),this.stopPolling=()=>{r.forEach(clearTimeout),this.state.reset()}})}}class p7{constructor({api:t,config:n,sessionCtx:r,messageCtx:i,sessionPollingIntervalSeconds:o}){X(this,"api");X(this,"config");X(this,"sessionCtx");X(this,"messageCtx");X(this,"sessionPollingIntervalSeconds");X(this,"poller",new bS);X(this,"registerPolling",()=>{this.sessionCtx.sessionState.subscribe(({session:t})=>{t!=null&&t.id?this.poller.startPolling(async n=>{this.hackAndSlash(t.id,n)},this.sessionPollingIntervalSeconds*1e3):this.poller.reset()})});X(this,"hackAndSlash",async(t,n)=>{var o;this.messageCtx.state.get().messages.length===0&&this.messageCtx.state.setPartial({isInitialFetchLoading:!0});const r=(o=this.messageCtx.state.get().messages.at(-1))==null?void 0:o.timestamp,{data:i}=await this.api.pollSessionAndHistory({sessionId:t,abortSignal:n,lastMessageTimestamp:r});if(i!=null&&i.session&&this.sessionCtx.sessionState.setPartial({session:i.session}),i!=null&&i.history&&i.history.length>0){const a=this.messageCtx.state.get().messages,s=i.history.map(this.mapHistoryToMessage).filter(u=>!a.some(l=>l.id===u.id));this.messageCtx.state.setPartial({messages:[...a,...s]})}this.messageCtx.state.get().isInitialFetchLoading&&this.messageCtx.state.setPartial({isInitialFetchLoading:!1})});X(this,"mapHistoryToMessage",t=>{var i,o,a;const n={id:t.publicId,timestamp:t.sentAt||"",attachments:t.attachments||void 0};if(t.sender.kind==="user")return{...n,type:"FROM_USER",content:t.content.text||"",deliveredAt:t.sentAt||""};if(t.sender.kind==="agent")return{...n,type:"FROM_AGENT",component:"agent_message",data:{message:t.content.text||""},agent:{name:t.sender.name||"",avatar:t.sender.avatar||"",id:null,isAi:!1}};const r=(i=t.actionCalls)==null?void 0:i.at(-1);return{...n,type:"FROM_BOT",component:"bot_message",agent:{id:null,name:((o=this.config.bot)==null?void 0:o.name)||"",isAi:!0,avatar:((a=this.config.bot)==null?void 0:a.avatar)||""},data:{message:t.content.text||"",action:r?{name:r.actionName,data:r.result}:void 0}}});this.api=t,this.config=n,this.sessionCtx=r,this.messageCtx=i,this.sessionPollingIntervalSeconds=o,this.registerPolling()}}const Yt=[];for(let e=0;e<256;++e)Yt.push((e+256).toString(16).slice(1));function h7(e,t=0){return(Yt[e[t+0]]+Yt[e[t+1]]+Yt[e[t+2]]+Yt[e[t+3]]+"-"+Yt[e[t+4]]+Yt[e[t+5]]+"-"+Yt[e[t+6]]+Yt[e[t+7]]+"-"+Yt[e[t+8]]+Yt[e[t+9]]+"-"+Yt[e[t+10]]+Yt[e[t+11]]+Yt[e[t+12]]+Yt[e[t+13]]+Yt[e[t+14]]+Yt[e[t+15]]).toLowerCase()}let ly;const m7=new Uint8Array(16);function g7(){if(!ly){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ly=crypto.getRandomValues.bind(crypto)}return ly(m7)}const ES={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function cy(e,t,n){var i;if(ES.randomUUID&&!t&&!e)return ES.randomUUID();e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??g7();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,h7(r)}class y7{constructor({config:t,api:n,storageCtx:r}){X(this,"config");X(this,"storageCtx");X(this,"api");X(this,"state");X(this,"shouldCollectData",()=>{var t;return!!(!((t=this.state.get().contact)!=null&&t.token)&&this.config.collectUserData)});X(this,"autoCreateUnverifiedUserIfNotExists",async()=>{var t,n,r,i,o,a,s,u,l,c,d;if(!((t=this.config.user)!=null&&t.token)){if(this.config.collectUserData&&!((r=(n=this.config.user)==null?void 0:n.data)!=null&&r.email)){const f=await((i=this.storageCtx)==null?void 0:i.getContactToken());f&&await this.setUnverifiedContact(f);return}if(!((a=(o=this.config.user)==null?void 0:o.data)!=null&&a.email)){const f=await((s=this.storageCtx)==null?void 0:s.getContactToken());if(f){await this.setUnverifiedContact(f);return}}await this.createUnverifiedContact({name:((l=(u=this.config.user)==null?void 0:u.data)==null?void 0:l.name)||"Anonymous",email:(d=(c=this.config.user)==null?void 0:c.data)==null?void 0:d.email})}});X(this,"createUnverifiedContact",async t=>{try{this.state.setPartial({isCreatingUnverifiedContact:!0,isErrorCreatingUnverifiedContact:!1});const{data:n}=await this.api.createUnverifiedContact(t);n!=null&&n.token?await this.setUnverifiedContact(n.token):this.state.setPartial({isErrorCreatingUnverifiedContact:!0})}finally{this.state.setPartial({isCreatingUnverifiedContact:!1})}});X(this,"setUnverifiedContact",async t=>{var i,o,a,s;const n=await((i=this.storageCtx)==null?void 0:i.getExternalContactId()),r=((o=this.config.user)==null?void 0:o.externalId)||n||cy();this.api.setAuthToken(t),await((a=this.storageCtx)==null?void 0:a.setContactToken(t)),await((s=this.storageCtx)==null?void 0:s.setExternalContactId(r)),this.state.setPartial({contact:{token:t,externalId:r}})});var i;this.config=t,this.storageCtx=r,this.api=n,this.state=new ys({contact:(i=t.user)!=null&&i.token?{token:t.user.token,externalId:t.user.externalId}:null,isCreatingUnverifiedContact:!1,isErrorCreatingUnverifiedContact:!1}),this.autoCreateUnverifiedUserIfNotExists()}}function dy(){return cy()}class v7{constructor({api:t,contactCtx:n,sessionsPollingIntervalSeconds:r}){X(this,"api");X(this,"contactCtx");X(this,"sessionsPollingIntervalSeconds");X(this,"sessionsRefresher",new bS);X(this,"sessionState",new ys({session:null,isCreatingSession:!1}));X(this,"sessionsState",new ys({data:[],cursor:void 0,isLastPage:!1,didStartInitialFetch:!1,isInitialFetchLoading:!0}));X(this,"reset",async()=>{this.sessionState.reset()});X(this,"registerSessionsRefresherWrapper",()=>{var t;(t=this.contactCtx.state.get().contact)!=null&&t.token&&!this.sessionsState.get().didStartInitialFetch?this.registerSessionsRefresher():this.contactCtx.state.subscribe(({contact:n})=>{n!=null&&n.token&&!this.sessionsState.get().didStartInitialFetch&&this.registerSessionsRefresher()})});X(this,"registerSessionsRefresher",()=>{this.sessionsRefresher.startPolling(async()=>{this.sessionsState.get().didStartInitialFetch===!1&&this.sessionsState.setPartial({didStartInitialFetch:!0}),await this.refreshSessions(),this.sessionsState.get().isInitialFetchLoading===!0&&this.sessionsState.setPartial({isInitialFetchLoading:!1})},this.sessionsPollingIntervalSeconds*1e3)});X(this,"createSession",async()=>{var i;this.sessionState.setPartial({session:null,isCreatingSession:!0});const t=(i=this.contactCtx.state.get().contact)==null?void 0:i.externalId,{data:n,error:r}=await this.api.createSession({customData:t?{external_id:t}:void 0});return n?(this.sessionState.setPartial({session:n,isCreatingSession:!1}),n):(console.error("Failed to create session:",r),null)});X(this,"loadMoreSessions",async()=>{if(this.sessionsState.get().isLastPage)return;const{data:t}=await this.getSessions({cursor:this.sessionsState.get().cursor});if(t){const r=[...this.sessionsState.get().data,...t.items].filter((i,o,a)=>o===a.findIndex(s=>i.id===s.id));this.sessionsState.setPartial({data:r,cursor:t.next||void 0,isLastPage:t.next===null})}});X(this,"getSessions",async({cursor:t})=>{var r,i;if(!((r=this.contactCtx.state.get().contact)!=null&&r.token))return{data:null};const n=(i=this.contactCtx.state.get().contact)==null?void 0:i.externalId;return await this.api.getSessions({cursor:t,filters:n?{external_id:n}:{}})});X(this,"refreshSessions",async()=>{const{data:t}=await this.getSessions({cursor:void 0});if(!t)return;const n=[...t.items,...this.sessionsState.get().data].filter((r,i,o)=>i===o.findIndex(a=>r.id===a.id));this.sessionsState.setPartial({data:n})});this.api=t,this.contactCtx=n,this.sessionsPollingIntervalSeconds=r,this.registerSessionsRefresherWrapper()}}class x7{constructor({config:t,api:n,sessionCtx:r}){X(this,"config");X(this,"api");X(this,"sessionCtx");X(this,"state",new ys({messages:[],isSendingMessage:!1,lastAIResMightSolveUserIssue:!1,isInitialFetchLoading:!1}));X(this,"sendMessageAbortController",new AbortController);X(this,"reset",()=>{this.sendMessageAbortController.abort("Resetting chat"),this.state.reset()});X(this,"sendMessage",async t=>{var o,a,s,u,l,c,d,f,p;if(!t.content.trim()&&(!t.attachments||t.attachments.length===0)){console.warn("Cannot send an empty message of no content or attachments");return}const n=this.state.get().isSendingMessage,r=((o=this.sessionCtx.sessionState.get().session)==null?void 0:o.assignee.kind)==="ai",i=this.state.get().messages.at(-1);if(r&&n||r&&(i==null?void 0:i.type)==="FROM_USER"){console.warn("Cannot send messages while awaiting AI response");return}this.sendMessageAbortController=new AbortController,this.state.setPartial({lastAIResMightSolveUserIssue:!1});try{this.state.setPartial({isSendingMessage:!0});const m=this.toUserMessage(t.content.trim(),t.attachments||void 0),y=this.state.get().messages;if(this.state.setPartial({messages:[...y,m]}),!((a=this.sessionCtx.sessionState.get().session)!=null&&a.id)){if(!await this.sessionCtx.createSession()){console.error("Failed to create session");return}this.sessionCtx.refreshSessions()}const b=(s=this.sessionCtx.sessionState.get().session)==null?void 0:s.id;if(!b)return;const{data:g}=await this.api.sendMessage({uuid:m.id,bot_token:this.config.token,headers:this.config.headers,query_params:this.config.queryParams,session_id:b,user:(u=this.config.user)==null?void 0:u.data,...t},this.sendMessageAbortController.signal);if(g!=null&&g.success){const x=this.toBotMessage(g);if(x){const w=this.state.get().messages;if(!!w.some(_=>_.id===x.id)){this.state.setPartial({lastAIResMightSolveUserIssue:((l=g.autopilotResponse)==null?void 0:l.mightSolveUserIssue)||((c=g.uiResponse)==null?void 0:c.mightSolveUserIssue)});return}this.state.setPartial({messages:[...w,x],lastAIResMightSolveUserIssue:((d=g.autopilotResponse)==null?void 0:d.mightSolveUserIssue)||((f=g.uiResponse)==null?void 0:f.mightSolveUserIssue)})}}else{const x=this.toBotErrorMessage(((p=g==null?void 0:g.error)==null?void 0:p.message)||"Unknown error occurred"),w=this.state.get().messages;this.state.setPartial({messages:[...w,x]})}}catch(m){this.sendMessageAbortController.signal.aborted||console.error("Failed to send message:",m)}finally{this.state.setPartial({isSendingMessage:!1})}});X(this,"toUserMessage",(t,n)=>({id:dy(),type:"FROM_USER",content:t,deliveredAt:new Date().toISOString(),attachments:n,timestamp:new Date().toISOString()}));X(this,"toBotMessage",t=>{var n;return t.success&&t.autopilotResponse?{type:"FROM_BOT",id:t.autopilotResponse.id||dy(),timestamp:new Date().toISOString(),component:"bot_message",agent:this.config.bot?{name:this.config.bot.name||"",isAi:!0,avatar:this.config.bot.avatar||"",id:null}:void 0,data:{message:t.autopilotResponse.value.content,action:(n=t.uiResponse)!=null&&n.value.name?{name:t.uiResponse.value.name,data:t.uiResponse.value.request_response}:void 0}}:null});X(this,"toBotErrorMessage",t=>({type:"FROM_BOT",id:dy(),timestamp:new Date().toISOString(),component:"TEXT",data:{message:t,variant:"error",action:void 0}}));this.config=t,this.api=n,this.sessionCtx=r}}class w7{constructor({contactCtx:t,sessionCtx:n,resetChat:r}){X(this,"state");X(this,"contactCtx");X(this,"sessionCtx");X(this,"resetChat");X(this,"registerRoutingListener",()=>{this.contactCtx.state.subscribe(({contact:t})=>{t!=null&&t.token&&this.state.get().screen==="welcome"&&this.state.setPartial({screen:"sessions"})})});X(this,"toSessionsScreen",()=>{this.resetChat(),this.state.setPartial({screen:"sessions"})});X(this,"toChatScreen",t=>{if(this.resetChat(),t){const n=this.sessionCtx.sessionsState.get().data.find(r=>r.id===t);if(!n)return;this.sessionCtx.sessionState.setPartial({session:n})}this.state.setPartial({screen:"chat"})});this.state=new ys({screen:t.shouldCollectData()?"welcome":"sessions"}),this.contactCtx=t,this.sessionCtx=n,this.resetChat=r,this.registerRoutingListener()}}class b7{constructor({storage:t}){X(this,"storage");X(this,"KEYS",{contactToken:"opencx__widget__contactToken",externalContactId:"opencx__widget__externalContactId"});X(this,"setContactToken",async t=>{await this.storage.set(this.KEYS.contactToken,t)});X(this,"getContactToken",async()=>this.storage.get(this.KEYS.contactToken));X(this,"setExternalContactId",async t=>{await this.storage.set(this.KEYS.externalContactId,t)});X(this,"getExternalContactId",async()=>this.storage.get(this.KEYS.externalContactId));this.storage=t}}const ki=class ki{constructor({config:t,storage:n}){X(this,"config");X(this,"api");X(this,"contactCtx");X(this,"sessionCtx");X(this,"messageCtx");X(this,"routerCtx");X(this,"storageCtx");X(this,"activeSessionPollingCtx");X(this,"resetChat",()=>{this.sessionCtx.reset(),this.messageCtx.reset()});if(!ki.pollingIntervalsSeconds)throw Error("Widget polling values are not defined, did you call WidgetCtx.initialize()");this.config=t,this.api=new wS({config:t}),this.storageCtx=n?new b7({storage:n}):void 0,this.contactCtx=new y7({api:this.api,config:this.config,storageCtx:this.storageCtx}),this.sessionCtx=new v7({api:this.api,contactCtx:this.contactCtx,sessionsPollingIntervalSeconds:ki.pollingIntervalsSeconds.sessions}),this.messageCtx=new x7({config:this.config,api:this.api,sessionCtx:this.sessionCtx}),this.activeSessionPollingCtx=new p7({api:this.api,config:this.config,sessionCtx:this.sessionCtx,messageCtx:this.messageCtx,sessionPollingIntervalSeconds:ki.pollingIntervalsSeconds.session}),this.routerCtx=new w7({contactCtx:this.contactCtx,sessionCtx:this.sessionCtx,resetChat:this.resetChat})}};X(ki,"pollingIntervalsSeconds",null),X(ki,"initialize",async({config:t,storage:n})=>{var i,o;const r=await new wS({config:t}).getExternalWidgetConfig();return ki.pollingIntervalsSeconds={session:((i=r.data)==null?void 0:i.sessionPollingIntervalSeconds)||10,sessions:((o=r.data)==null?void 0:o.sessionsPollingIntervalSeconds)||60},new ki({config:t,storage:n})});let fy=ki;const[ir,E7]=PB();function T7({options:e,children:t,components:n,storage:r}){const i=v.useRef(!1),[o,a]=v.useState(null),s=v.useMemo(()=>new NB({components:n}),[n]);return v.useEffect(()=>{i.current||(i.current=!0,fy.initialize({config:e,storage:r}).then(a))},[]),o?E.jsx(E7,{value:{widgetCtx:o,components:n,componentStore:s,version:bE},children:t}):null}function vs(){const{widgetCtx:e}=ir();return e.config}function ml(e){return v.useSyncExternalStore(e.subscribe,e.get,e.get)}function _7(){const{widgetCtx:e}=ir();return{contactState:ml(e.contactCtx.state),createUnverifiedContact:e.contactCtx.createUnverifiedContact}}function xs(){const{widgetCtx:e}=ir();return{messagesState:ml(e.messageCtx.state),sendMessage:e.messageCtx.sendMessage}}function gl(){const{widgetCtx:e}=ir(),t=ml(e.sessionCtx.sessionState),n=ml(e.sessionCtx.sessionsState);return{sessionState:t,sessionsState:n,loadMoreSessions:e.sessionCtx.loadMoreSessions}}function TS(){var o,a;const{sessionState:e}=gl(),{messagesState:t}=xs(),n=((o=e.session)==null?void 0:o.assignee.kind)==="ai",r=((a=t.messages.at(-1))==null?void 0:a.type)==="FROM_USER";return{isAwaitingBotReply:(n||e.isCreatingSession)&&(t.isSendingMessage||r)}}var _S={exports:{}},CS={};/**
|
|
339
339
|
* @license React
|
|
340
340
|
* use-sync-external-store-shim.production.min.js
|
|
341
341
|
*
|
|
@@ -343,7 +343,7 @@ to {
|
|
|
343
343
|
*
|
|
344
344
|
* This source code is licensed under the MIT license found in the
|
|
345
345
|
* LICENSE file in the root directory of this source tree.
|
|
346
|
-
*/var ws=v;function C7(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var S7=typeof Object.is=="function"?Object.is:C7,A7=ws.useState,k7=ws.useEffect,R7=ws.useLayoutEffect,N7=ws.useDebugValue;function P7(e,t){var n=t(),r=A7({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return R7(function(){i.value=n,i.getSnapshot=t,py(i)&&o({inst:i})},[e,n,t]),k7(function(){return py(i)&&o({inst:i}),e(function(){py(i)&&o({inst:i})})},[e]),N7(n),n}function py(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!S7(e,n)}catch{return!0}}function I7(e,t){return t()}var O7=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?I7:P7;CS.useSyncExternalStore=ws.useSyncExternalStore!==void 0?ws.useSyncExternalStore:O7,_S.exports=CS;var D7=_S.exports;const uo=()=>{},_n=uo(),hy=Object,He=e=>e===_n,zr=e=>typeof e=="function",lo=(e,t)=>({...e,...t}),L7=e=>zr(e.then),kf=new WeakMap;let M7=0;const yl=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let i,o;if(hy(e)===e&&!r&&n!=RegExp){if(i=kf.get(e),i)return i;if(i=++M7+"~",kf.set(e,i),n==Array){for(i="@",o=0;o<e.length;o++)i+=yl(e[o])+",";kf.set(e,i)}if(n==hy){i="#";const a=hy.keys(e).sort();for(;!He(o=a.pop());)He(e[o])||(i+=o+":"+yl(e[o])+",");kf.set(e,i)}}else i=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return i},wi=new WeakMap,my={},Rf={},gy="undefined",Nf=typeof window!=gy,yy=typeof document!=gy,F7=()=>Nf&&typeof window.requestAnimationFrame!=gy,SS=(e,t)=>{const n=wi.get(e);return[()=>!He(t)&&e.get(t)||my,r=>{if(!He(t)){const i=e.get(t);t in Rf||(Rf[t]=i),n[5](t,lo(i,r),i||my)}},n[6],()=>!He(t)&&t in Rf?Rf[t]:!He(t)&&e.get(t)||my]};let vy=!0;const B7=()=>vy,[xy,wy]=Nf&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[uo,uo],j7=()=>{const e=yy&&document.visibilityState;return He(e)||e!=="hidden"},U7=e=>(yy&&document.addEventListener("visibilitychange",e),xy("focus",e),()=>{yy&&document.removeEventListener("visibilitychange",e),wy("focus",e)}),z7=e=>{const t=()=>{vy=!0,e()},n=()=>{vy=!1};return xy("online",t),xy("offline",n),()=>{wy("online",t),wy("offline",n)}},H7={isOnline:B7,isVisible:j7},V7={initFocus:U7,initReconnect:z7},AS=!ln.useId,vl=!Nf||"Deno"in window,$7=e=>F7()?window.requestAnimationFrame(e):setTimeout(e,1),by=vl?v.useEffect:v.useLayoutEffect,Ey=typeof navigator<"u"&&navigator.connection,kS=!vl&&Ey&&(["slow-2g","2g"].includes(Ey.effectiveType)||Ey.saveData),Ty=e=>{if(zr(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?yl(e):"",[e,t]};let W7=0;const _y=()=>++W7,RS=0,NS=1,PS=2;var xl={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:RS,MUTATE_EVENT:PS,RECONNECT_EVENT:NS};async function IS(...e){const[t,n,r,i]=e,o=lo({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let a=o.populateCache;const s=o.rollbackOnError;let u=o.optimisticData;const l=f=>typeof s=="function"?s(f):s!==!1,c=o.throwOnError;if(zr(n)){const f=n,p=[],m=t.keys();for(const y of m)!/^\$(inf|sub)\$/.test(y)&&f(t.get(y)._k)&&p.push(y);return Promise.all(p.map(d))}return d(n);async function d(f){const[p]=Ty(f);if(!p)return;const[m,y]=SS(t,p),[b,g,x,w]=wi.get(t),T=()=>{const X=b[p];return(zr(o.revalidate)?o.revalidate(m().data,f):o.revalidate!==!1)&&(delete x[p],delete w[p],X&&X[0])?X[0](PS).then(()=>m().data):m().data};if(e.length<3)return T();let _=r,C;const R=_y();g[p]=[R,0];const O=!He(u),V=m(),P=V.data,$=V._c,z=He($)?P:$;if(O&&(u=zr(u)?u(z,P):u,y({data:u,_c:z})),zr(_))try{_=_(z)}catch(X){C=X}if(_&&L7(_))if(_=await _.catch(X=>{C=X}),R!==g[p][0]){if(C)throw C;return _}else C&&O&&l(C)&&(a=!0,y({data:z,_c:_n}));if(a&&!C)if(zr(a)){const X=a(_,z);y({data:X,error:_n,_c:_n})}else y({data:_,error:_n,_c:_n});if(g[p][1]=_y(),Promise.resolve(T()).then(()=>{y({_c:_n})}),C){if(c)throw C;return}return _}}const OS=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Y7=(e,t)=>{if(!wi.has(e)){const n=lo(V7,t),r={},i=IS.bind(_n,e);let o=uo;const a={},s=(c,d)=>{const f=a[c]||[];return a[c]=f,f.push(d),()=>f.splice(f.indexOf(d),1)},u=(c,d,f)=>{e.set(c,d);const p=a[c];if(p)for(const m of p)m(d,f)},l=()=>{if(!wi.has(e)&&(wi.set(e,[r,{},{},{},i,u,s]),!vl)){const c=n.initFocus(setTimeout.bind(_n,OS.bind(_n,r,RS))),d=n.initReconnect(setTimeout.bind(_n,OS.bind(_n,r,NS)));o=()=>{c&&c(),d&&d(),wi.delete(e)}}};return l(),[e,i,l,o]}return[e,wi.get(e)[4]]},q7=(e,t,n,r,i)=>{const o=n.errorRetryCount,a=i.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!He(o)&&a>o||setTimeout(r,s,i)},G7=(e,t)=>yl(e)==yl(t),[DS,K7]=Y7(new Map),X7=lo({onLoadingSlow:uo,onSuccess:uo,onError:uo,onErrorRetry:q7,onDiscarded:uo,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:kS?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:kS?5e3:3e3,compare:G7,isPaused:()=>!1,cache:DS,mutate:K7,fallback:{}},H7),Q7=(e,t)=>{const n=lo(e,t);if(t){const{use:r,fallback:i}=e,{use:o,fallback:a}=t;r&&o&&(n.use=r.concat(o)),i&&a&&(n.fallback=lo(i,a))}return n},Z7=v.createContext({}),J7="$inf$",LS=Nf&&window.__SWR_DEVTOOLS_USE__,eU=LS?window.__SWR_DEVTOOLS_USE__:[],tU=()=>{LS&&(window.__SWR_DEVTOOLS_REACT__=ln)},nU=e=>zr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],rU=()=>lo(X7,v.useContext(Z7)),iU=e=>(t,n,r)=>e(t,n&&((...o)=>{const[a]=Ty(t),[,,,s]=wi.get(DS);if(a.startsWith(J7))return n(...o);const u=s[a];return He(u)?n(...o):(delete s[a],u)}),r),oU=eU.concat(iU),aU=e=>function(...n){const r=rU(),[i,o,a]=nU(n),s=Q7(r,a);let u=e;const{use:l}=s,c=(l||[]).concat(oU);for(let d=c.length;d--;)u=c[d](u);return u(i,o||s.fetcher||null,s)},sU=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i>=0&&(r[i]=r[r.length-1],r.pop())}};tU();const MS=ln.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),Cy={dedupe:!0},uU=aU((e,t,n)=>{const{cache:r,compare:i,suspense:o,fallbackData:a,revalidateOnMount:s,revalidateIfStale:u,refreshInterval:l,refreshWhenHidden:c,refreshWhenOffline:d,keepPreviousData:f}=n,[p,m,y,b]=wi.get(r),[g,x]=Ty(e),w=v.useRef(!1),T=v.useRef(!1),_=v.useRef(g),C=v.useRef(t),R=v.useRef(n),O=()=>R.current,V=()=>O().isVisible()&&O().isOnline(),[P,$,z,X]=SS(r,g),Y=v.useRef({}).current,re=He(a)?n.fallback[g]:a,ie=(Te,be)=>{for(const Ye in Y){const ze=Ye;if(ze==="data"){if(!i(Te[ze],be[ze])&&(!He(Te[ze])||!i(ge,be[ze])))return!1}else if(be[ze]!==Te[ze])return!1}return!0},te=v.useMemo(()=>{const Te=!g||!t?!1:He(s)?O().isPaused()||o?!1:He(u)?!0:u:s,be=Fe=>{const Ot=lo(Fe);return delete Ot._k,Te?{isValidating:!0,isLoading:!0,...Ot}:Ot},Ye=P(),ze=X(),yt=be(Ye),vt=Ye===ze?yt:be(ze);let Ke=yt;return[()=>{const Fe=be(P());return ie(Fe,Ke)?(Ke.data=Fe.data,Ke.isLoading=Fe.isLoading,Ke.isValidating=Fe.isValidating,Ke.error=Fe.error,Ke):(Ke=Fe,Fe)},()=>vt]},[r,g]),F=D7.useSyncExternalStore(v.useCallback(Te=>z(g,(be,Ye)=>{ie(Ye,be)||Te()}),[r,g]),te[0],te[1]),B=!w.current,A=p[g]&&p[g].length>0,oe=F.data,he=He(oe)?re:oe,D=F.error,Oe=v.useRef(he),ge=f?He(oe)?Oe.current:oe:he,xe=A&&!He(D)?!1:B&&!He(s)?s:O().isPaused()?!1:o?He(he)?!1:u:He(he)||u,$e=!!(g&&t&&B&&xe),Ve=He(F.isValidating)?$e:F.isValidating,We=He(F.isLoading)?$e:F.isLoading,Ge=v.useCallback(async Te=>{const be=C.current;if(!g||!be||T.current||O().isPaused())return!1;let Ye,ze,yt=!0;const vt=Te||{},Ke=!y[g]||!vt.dedupe,Fe=()=>AS?!T.current&&g===_.current&&w.current:g===_.current,Ot={isValidating:!1,isLoading:!1},Po=()=>{$(Ot)},Io=()=>{const ne=y[g];ne&&ne[1]===ze&&delete y[g]},Oo={isValidating:!0};He(P().data)&&(Oo.isLoading=!0);try{if(Ke&&($(Oo),n.loadingTimeout&&He(P().data)&&setTimeout(()=>{yt&&Fe()&&O().onLoadingSlow(g,n)},n.loadingTimeout),y[g]=[be(x),_y()]),[Ye,ze]=y[g],Ye=await Ye,Ke&&setTimeout(Io,n.dedupingInterval),!y[g]||y[g][1]!==ze)return Ke&&Fe()&&O().onDiscarded(g),!1;Ot.error=_n;const ne=m[g];if(!He(ne)&&(ze<=ne[0]||ze<=ne[1]||ne[1]===0))return Po(),Ke&&Fe()&&O().onDiscarded(g),!1;const de=P().data;Ot.data=i(de,Ye)?de:Ye,Ke&&Fe()&&O().onSuccess(Ye,g,n)}catch(ne){Io();const de=O(),{shouldRetryOnError:j}=de;de.isPaused()||(Ot.error=ne,Ke&&Fe()&&(de.onError(ne,g,de),(j===!0||zr(j)&&j(ne))&&(!O().revalidateOnFocus||!O().revalidateOnReconnect||V())&&de.onErrorRetry(ne,g,de,q=>{const ce=p[g];ce&&ce[0]&&ce[0](xl.ERROR_REVALIDATE_EVENT,q)},{retryCount:(vt.retryCount||0)+1,dedupe:!0})))}return yt=!1,Po(),!0},[g,r]),_t=v.useCallback((...Te)=>IS(r,_.current,...Te),[]);if(by(()=>{C.current=t,R.current=n,He(oe)||(Oe.current=oe)}),by(()=>{if(!g)return;const Te=Ge.bind(_n,Cy);let be=0;const ze=sU(g,p,(yt,vt={})=>{if(yt==xl.FOCUS_EVENT){const Ke=Date.now();O().revalidateOnFocus&&Ke>be&&V()&&(be=Ke+O().focusThrottleInterval,Te())}else if(yt==xl.RECONNECT_EVENT)O().revalidateOnReconnect&&V()&&Te();else{if(yt==xl.MUTATE_EVENT)return Ge();if(yt==xl.ERROR_REVALIDATE_EVENT)return Ge(vt)}});return T.current=!1,_.current=g,w.current=!0,$({_k:x}),xe&&(He(he)||vl?Te():$7(Te)),()=>{T.current=!0,ze()}},[g]),by(()=>{let Te;function be(){const ze=zr(l)?l(P().data):l;ze&&Te!==-1&&(Te=setTimeout(Ye,ze))}function Ye(){!P().error&&(c||O().isVisible())&&(d||O().isOnline())?Ge(Cy).then(be):be()}return be(),()=>{Te&&(clearTimeout(Te),Te=-1)}},[l,c,d,g]),v.useDebugValue(ge),o&&He(he)&&g){if(!AS&&vl)throw new Error("Fallback data is required when using suspense in SSR.");C.current=t,R.current=n,T.current=!1;const Te=b[g];if(!He(Te)){const be=_t(Te);MS(be)}if(He(D)){const be=Ge(Cy);He(ge)||(be.status="fulfilled",be.value=!0),MS(be)}else throw D}return{mutate:_t,get data(){return Y.data=!0,ge},get error(){return Y.error=!0,D},get isValidating(){return Y.isValidating=!0,Ve},get isLoading(){return Y.isLoading=!0,We}}});function Pf(){const{widgetCtx:e}=ir();return uU([e.config.token],e.api.widgetPrelude,{revalidateOnFocus:!1})}function wl(){const{widgetCtx:e}=ir();return{routerState:ml(e.routerCtx.state),toSessionsScreen:e.routerCtx.toSessionsScreen,toChatScreen:e.routerCtx.toChatScreen}}var FS={};const lU=NO(e9);var If={},BS;function cU(){if(BS)return If;BS=1,Object.defineProperty(If,"__esModule",{value:!0});var e=v;function t(){var n=e.useRef(!1),r=e.useCallback(function(){return n.current},[]);return e.useEffect(function(){return n.current=!0,function(){n.current=!1}},[]),r}return If.default=t,If}Object.defineProperty(FS,"__esModule",{value:!0});var Sy=lU,Ay=v,dU=Sy.__importDefault(cU());function fU(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=Ay.useRef(0),i=dU.default(),o=Ay.useState(n),a=o[0],s=o[1],u=Ay.useCallback(function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var d=++r.current;return a.loading||s(function(f){return Sy.__assign(Sy.__assign({},f),{loading:!0})}),e.apply(void 0,l).then(function(f){return i()&&d===r.current&&s({value:f,loading:!1}),f},function(f){return i()&&d===r.current&&s({error:f,loading:!1}),f})},t);return[a,u]}var pU=FS.default=fU;const co=new Map;function hU(){const[e,t]=v.useState([]),{widgetCtx:{api:n}}=ir();function r(c){const d=c.map(f=>({file:f,id:cy(),status:"pending",progress:0}));t(f=>[...f,...d]),d.forEach(a)}function i(c,d){t(f=>f.map(p=>p.id===c?{...p,...d}:p))}function o(c){t(d=>d.filter(f=>f.id!==c))}const a=async c=>{const d=new AbortController;co.set(c.id,d);try{t(p=>p.map(m=>m.id===c.id?{...m,status:"uploading",progress:0}:m));const f=await n.uploadFile(c,{signal:d.signal,onUploadProgress:p=>{if(!p.total)return;const m=Math.round(p.loaded*100/p.total);i(c.id,{progress:m})}});i(c.id,{status:"success",fileUrl:f.fileUrl,progress:100})}catch(f){d.signal.aborted||i(c.id,{status:"error",error:f instanceof Error?f.message:"Upload failed",progress:0})}finally{co.delete(c.id)}},s=c=>{const d=co.get(c);d&&(d.abort(),co.delete(c)),o(c)},u=v.useMemo(()=>e.filter(c=>c.status==="success"&&c.fileUrl),[e]);function l(){co.forEach(c=>c.abort()),co.clear(),t([])}return v.useEffect(()=>()=>{co.forEach(c=>c.abort()),co.clear()},[]),{allFiles:e,appendFiles:r,handleCancelUpload:s,successFiles:u,emptyTheFiles:l,getFileById:c=>e.find(d=>d.id===c),getUploadProgress:c=>{var d;return((d=e.find(f=>f.id===c))==null?void 0:d.progress)??0},getUploadStatus:c=>{var d;return(d=e.find(f=>f.id===c))==null?void 0:d.status},hasErrors:e.some(c=>c.status==="error"),isUploading:e.some(c=>c.status==="uploading")}}function Cn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function mU(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function jS(...e){return t=>e.forEach(n=>mU(n,t))}function Hr(...e){return v.useCallback(jS(...e),e)}function gU(e,t){const n=v.createContext(t),r=o=>{const{children:a,...s}=o,u=v.useMemo(()=>s,Object.values(s));return E.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function i(o){const a=v.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function bi(e,t=[]){let n=[];function r(o,a){const s=v.createContext(a),u=n.length;n=[...n,a];const l=d=>{var g;const{scope:f,children:p,...m}=d,y=((g=f==null?void 0:f[e])==null?void 0:g[u])||s,b=v.useMemo(()=>m,Object.values(m));return E.jsx(y.Provider,{value:b,children:p})};l.displayName=o+"Provider";function c(d,f){var y;const p=((y=f==null?void 0:f[e])==null?void 0:y[u])||s,m=v.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[l,c]}const i=()=>{const o=n.map(a=>v.createContext(a));return function(s){const u=(s==null?void 0:s[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,yU(i,...t)]}function yU(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const d=u(o)[`__scope${l}`];return{...s,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Of=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),o=i.find(vU);if(o){const a=o.props.children,s=i.map(u=>u===o?v.Children.count(a)>1?v.Children.only(null):v.isValidElement(a)?a.props.children:null:u);return E.jsx(ky,{...r,ref:t,children:v.isValidElement(a)?v.cloneElement(a,void 0,s):null})}return E.jsx(ky,{...r,ref:t,children:n})});Of.displayName="Slot";var ky=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=wU(n);return v.cloneElement(n,{...xU(r,n.props),ref:t?jS(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});ky.displayName="SlotClone";var US=({children:e})=>E.jsx(E.Fragment,{children:e});function vU(e){return v.isValidElement(e)&&e.type===US}function xU(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function wU(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],zn=bU.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Of:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function EU(e,t){e&&Zo.flushSync(()=>e.dispatchEvent(t))}function Pt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ry(e,t=globalThis==null?void 0:globalThis.document){const n=Pt(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var TU="DismissableLayer",Ny="dismissableLayer.update",_U="dismissableLayer.pointerDownOutside",CU="dismissableLayer.focusOutside",zS,HS=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Py=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=v.useContext(HS),[c,d]=v.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),m=Hr(t,R=>d(R)),y=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(b),x=c?y.indexOf(c):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,T=x>=g,_=kU(R=>{const O=R.target,V=[...l.branches].some(P=>P.contains(O));!T||V||(i==null||i(R),a==null||a(R),R.defaultPrevented||s==null||s())},f),C=RU(R=>{const O=R.target;[...l.branches].some(P=>P.contains(O))||(o==null||o(R),a==null||a(R),R.defaultPrevented||s==null||s())},f);return Ry(R=>{x===l.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&s&&(R.preventDefault(),s()))},f),v.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(zS=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),VS(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=zS)}},[c,f,n,l]),v.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),VS())},[c,l]),v.useEffect(()=>{const R=()=>p({});return document.addEventListener(Ny,R),()=>document.removeEventListener(Ny,R)},[]),E.jsx(zn.div,{...u,ref:m,style:{pointerEvents:w?T?"auto":"none":void 0,...e.style},onFocusCapture:Cn(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Cn(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Cn(e.onPointerDownCapture,_.onPointerDownCapture)})});Py.displayName=TU;var SU="DismissableLayerBranch",AU=v.forwardRef((e,t)=>{const n=v.useContext(HS),r=v.useRef(null),i=Hr(t,r);return v.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),E.jsx(zn.div,{...e,ref:i})});AU.displayName=SU;function kU(e,t=globalThis==null?void 0:globalThis.document){const n=Pt(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){$S(_U,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function RU(e,t=globalThis==null?void 0:globalThis.document){const n=Pt(e),r=v.useRef(!1);return v.useEffect(()=>{const i=o=>{o.target&&!r.current&&$S(CU,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VS(){const e=new CustomEvent(Ny);document.dispatchEvent(e)}function $S(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?EU(i,o):i.dispatchEvent(o)}var or=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},NU=YO.useId||(()=>{}),PU=0;function fo(e){const[t,n]=v.useState(NU());return or(()=>{e||n(r=>r??String(PU++))},[e]),e||(t?`radix-${t}`:"")}const IU=["top","right","bottom","left"],po=Math.min,Hn=Math.max,Df=Math.round,Lf=Math.floor,ho=e=>({x:e,y:e}),OU={left:"right",right:"left",bottom:"top",top:"bottom"},DU={start:"end",end:"start"};function Iy(e,t,n){return Hn(e,po(t,n))}function Ei(e,t){return typeof e=="function"?e(t):e}function Ti(e){return e.split("-")[0]}function bs(e){return e.split("-")[1]}function Oy(e){return e==="x"?"y":"x"}function Dy(e){return e==="y"?"height":"width"}function mo(e){return["top","bottom"].includes(Ti(e))?"y":"x"}function Ly(e){return Oy(mo(e))}function LU(e,t,n){n===void 0&&(n=!1);const r=bs(e),i=Ly(e),o=Dy(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Mf(a)),[a,Mf(a)]}function MU(e){const t=Mf(e);return[My(e),t,My(t)]}function My(e){return e.replace(/start|end/g,t=>DU[t])}function FU(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function BU(e,t,n,r){const i=bs(e);let o=FU(Ti(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(My)))),o}function Mf(e){return e.replace(/left|right|bottom|top/g,t=>OU[t])}function jU(e){return{top:0,right:0,bottom:0,left:0,...e}}function WS(e){return typeof e!="number"?jU(e):{top:e,right:e,bottom:e,left:e}}function Ff(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function YS(e,t,n){let{reference:r,floating:i}=e;const o=mo(t),a=Ly(t),s=Dy(a),u=Ti(t),l=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(bs(t)){case"start":p[a]-=f*(n&&l?-1:1);break;case"end":p[a]+=f*(n&&l?-1:1);break}return p}const UU=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=YS(l,r,u),f=r,p={},m=0;for(let y=0;y<s.length;y++){const{name:b,fn:g}=s[y],{x,y:w,data:T,reset:_}=await g({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});c=x??c,d=w??d,p={...p,[b]:{...p[b],...T}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(l=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:c,y:d}=YS(l,f,u)),y=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}};async function bl(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ei(t,e),m=WS(p),b=s[f?d==="floating"?"reference":"floating":d],g=Ff(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),x=d==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),T=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},_=Ff(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:w,strategy:u}):x);return{top:(g.top-_.top+m.top)/T.y,bottom:(_.bottom-g.bottom+m.bottom)/T.y,left:(g.left-_.left+m.left)/T.x,right:(_.right-g.right+m.right)/T.x}}const zU=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:u}=t,{element:l,padding:c=0}=Ei(e,t)||{};if(l==null)return{};const d=WS(c),f={x:n,y:r},p=Ly(i),m=Dy(p),y=await a.getDimensions(l),b=p==="y",g=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",T=o.reference[m]+o.reference[p]-f[p]-o.floating[m],_=f[p]-o.reference[p],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let R=C?C[w]:0;(!R||!await(a.isElement==null?void 0:a.isElement(C)))&&(R=s.floating[w]||o.floating[m]);const O=T/2-_/2,V=R/2-y[m]/2-1,P=po(d[g],V),$=po(d[x],V),z=P,X=R-y[m]-$,Y=R/2-y[m]/2+O,re=Iy(z,Y,X),ie=!u.arrow&&bs(i)!=null&&Y!==re&&o.reference[m]/2-(Y<z?P:$)-y[m]/2<0,te=ie?Y<z?Y-z:Y-X:0;return{[p]:f[p]+te,data:{[p]:re,centerOffset:Y-re-te,...ie&&{alignmentOffset:te}},reset:ie}}}),HU=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:u,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...b}=Ei(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const g=Ti(i),x=mo(s),w=Ti(s)===s,T=await(u.isRTL==null?void 0:u.isRTL(l.floating)),_=f||(w||!y?[Mf(s)]:MU(s)),C=m!=="none";!f&&C&&_.push(...BU(s,y,m,T));const R=[s,..._],O=await bl(t,b),V=[];let P=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&V.push(O[g]),d){const Y=LU(i,a,T);V.push(O[Y[0]],O[Y[1]])}if(P=[...P,{placement:i,overflows:V}],!V.every(Y=>Y<=0)){var $,z;const Y=((($=o.flip)==null?void 0:$.index)||0)+1,re=R[Y];if(re)return{data:{index:Y,overflows:P},reset:{placement:re}};let ie=(z=P.filter(te=>te.overflows[0]<=0).sort((te,F)=>te.overflows[1]-F.overflows[1])[0])==null?void 0:z.placement;if(!ie)switch(p){case"bestFit":{var X;const te=(X=P.filter(F=>{if(C){const B=mo(F.placement);return B===x||B==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(B=>B>0).reduce((B,A)=>B+A,0)]).sort((F,B)=>F[1]-B[1])[0])==null?void 0:X[0];te&&(ie=te);break}case"initialPlacement":ie=s;break}if(i!==ie)return{reset:{placement:ie}}}return{}}}};function qS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function GS(e){return IU.some(t=>e[t]>=0)}const VU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Ei(e,t);switch(r){case"referenceHidden":{const o=await bl(t,{...i,elementContext:"reference"}),a=qS(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:GS(a)}}}case"escaped":{const o=await bl(t,{...i,altBoundary:!0}),a=qS(o,n.floating);return{data:{escapedOffsets:a,escaped:GS(a)}}}default:return{}}}}};async function $U(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Ti(n),s=bs(n),u=mo(n)==="y",l=["left","top"].includes(a)?-1:1,c=o&&u?-1:1,d=Ei(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),u?{x:p*c,y:f*l}:{x:f*l,y:p*c}}const WU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,u=await $U(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:a}}}}},YU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:g,y:x}=b;return{x:g,y:x}}},...u}=Ei(e,t),l={x:n,y:r},c=await bl(t,u),d=mo(Ti(i)),f=Oy(d);let p=l[f],m=l[d];if(o){const b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",x=p+c[b],w=p-c[g];p=Iy(x,p,w)}if(a){const b=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=m+c[b],w=m-c[g];m=Iy(x,m,w)}const y=s.fn({...t,[f]:p,[d]:m});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[f]:o,[d]:a}}}}}},qU=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=Ei(e,t),c={x:n,y:r},d=mo(i),f=Oy(d);let p=c[f],m=c[d];const y=Ei(s,t),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(u){const w=f==="y"?"height":"width",T=o.reference[f]-o.floating[w]+b.mainAxis,_=o.reference[f]+o.reference[w]-b.mainAxis;p<T?p=T:p>_&&(p=_)}if(l){var g,x;const w=f==="y"?"width":"height",T=["top","left"].includes(Ti(i)),_=o.reference[d]-o.floating[w]+(T&&((g=a.offset)==null?void 0:g[d])||0)+(T?0:b.crossAxis),C=o.reference[d]+o.reference[w]+(T?0:((x=a.offset)==null?void 0:x[d])||0)-(T?b.crossAxis:0);m<_?m=_:m>C&&(m=C)}return{[f]:p,[d]:m}}}},GU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:u=()=>{},...l}=Ei(e,t),c=await bl(t,l),d=Ti(i),f=bs(i),p=mo(i)==="y",{width:m,height:y}=o.floating;let b,g;d==="top"||d==="bottom"?(b=d,g=f===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,b=f==="end"?"top":"bottom");const x=y-c.top-c.bottom,w=m-c.left-c.right,T=po(y-c[b],x),_=po(m-c[g],w),C=!t.middlewareData.shift;let R=T,O=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=x),C&&!f){const P=Hn(c.left,0),$=Hn(c.right,0),z=Hn(c.top,0),X=Hn(c.bottom,0);p?O=m-2*(P!==0||$!==0?P+$:Hn(c.left,c.right)):R=y-2*(z!==0||X!==0?z+X:Hn(c.top,c.bottom))}await u({...t,availableWidth:O,availableHeight:R});const V=await a.getDimensions(s.floating);return m!==V.width||y!==V.height?{reset:{rects:!0}}:{}}}};function Bf(){return typeof window<"u"}function Es(e){return KS(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vr(e){var t;return(t=(KS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function KS(e){return Bf()?e instanceof Node||e instanceof Vn(e).Node:!1}function _r(e){return Bf()?e instanceof Element||e instanceof Vn(e).Element:!1}function $r(e){return Bf()?e instanceof HTMLElement||e instanceof Vn(e).HTMLElement:!1}function XS(e){return!Bf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}function El(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function KU(e){return["table","td","th"].includes(Es(e))}function jf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Fy(e){const t=By(),n=_r(e)?Cr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function XU(e){let t=go(e);for(;$r(t)&&!Ts(t);){if(Fy(t))return t;if(jf(t))return null;t=go(t)}return null}function By(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ts(e){return["html","body","#document"].includes(Es(e))}function Cr(e){return Vn(e).getComputedStyle(e)}function Uf(e){return _r(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function go(e){if(Es(e)==="html")return e;const t=e.assignedSlot||e.parentNode||XS(e)&&e.host||Vr(e);return XS(t)?t.host:t}function QS(e){const t=go(e);return Ts(t)?e.ownerDocument?e.ownerDocument.body:e.body:$r(t)&&El(t)?t:QS(t)}function Tl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=QS(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Vn(i);if(o){const s=jy(a);return t.concat(a,a.visualViewport||[],El(i)?i:[],s&&n?Tl(s):[])}return t.concat(i,Tl(i,[],n))}function jy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ZS(e){const t=Cr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=$r(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Df(n)!==o||Df(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Uy(e){return _r(e)?e:e.contextElement}function _s(e){const t=Uy(e);if(!$r(t))return ho(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=ZS(t);let a=(o?Df(n.width):n.width)/r,s=(o?Df(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const QU=ho(0);function JS(e){const t=Vn(e);return!By()||!t.visualViewport?QU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ZU(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vn(e)?!1:t}function ua(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Uy(e);let a=ho(1);t&&(r?_r(r)&&(a=_s(r)):a=_s(e));const s=ZU(o,n,r)?JS(o):ho(0);let u=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){const f=Vn(o),p=r&&_r(r)?Vn(r):r;let m=f,y=jy(m);for(;y&&r&&p!==m;){const b=_s(y),g=y.getBoundingClientRect(),x=Cr(y),w=g.left+(y.clientLeft+parseFloat(x.paddingLeft))*b.x,T=g.top+(y.clientTop+parseFloat(x.paddingTop))*b.y;u*=b.x,l*=b.y,c*=b.x,d*=b.y,u+=w,l+=T,m=Vn(y),y=jy(m)}}return Ff({width:c,height:d,x:u,y:l})}function JU(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Vr(r),s=t?jf(t.floating):!1;if(r===a||s&&o)return n;let u={scrollLeft:0,scrollTop:0},l=ho(1);const c=ho(0),d=$r(r);if((d||!d&&!o)&&((Es(r)!=="body"||El(a))&&(u=Uf(r)),$r(r))){const f=ua(r);l=_s(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function ez(e){return Array.from(e.getClientRects())}function zy(e,t){const n=Uf(e).scrollLeft;return t?t.left+n:ua(Vr(e)).left+n}function tz(e){const t=Vr(e),n=Uf(e),r=e.ownerDocument.body,i=Hn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Hn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+zy(e);const s=-n.scrollTop;return Cr(r).direction==="rtl"&&(a+=Hn(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function nz(e,t){const n=Vn(e),r=Vr(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;const l=By();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:a,x:s,y:u}}function rz(e,t){const n=ua(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=$r(e)?_s(e):ho(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,u=i*o.x,l=r*o.y;return{width:a,height:s,x:u,y:l}}function eA(e,t,n){let r;if(t==="viewport")r=nz(e,n);else if(t==="document")r=tz(Vr(e));else if(_r(t))r=rz(t,n);else{const i=JS(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Ff(r)}function tA(e,t){const n=go(e);return n===t||!_r(n)||Ts(n)?!1:Cr(n).position==="fixed"||tA(n,t)}function iz(e,t){const n=t.get(e);if(n)return n;let r=Tl(e,[],!1).filter(s=>_r(s)&&Es(s)!=="body"),i=null;const o=Cr(e).position==="fixed";let a=o?go(e):e;for(;_r(a)&&!Ts(a);){const s=Cr(a),u=Fy(a);!u&&s.position==="fixed"&&(i=null),(o?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||El(a)&&!u&&tA(e,a))?r=r.filter(c=>c!==a):i=s,a=go(a)}return t.set(e,r),r}function oz(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?jf(t)?[]:iz(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((l,c)=>{const d=eA(t,c,i);return l.top=Hn(d.top,l.top),l.right=po(d.right,l.right),l.bottom=po(d.bottom,l.bottom),l.left=Hn(d.left,l.left),l},eA(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function az(e){const{width:t,height:n}=ZS(e);return{width:t,height:n}}function sz(e,t,n){const r=$r(t),i=Vr(t),o=n==="fixed",a=ua(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const u=ho(0);if(r||!r&&!o)if((Es(t)!=="body"||El(i))&&(s=Uf(t)),r){const p=ua(t,!0,o,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else i&&(u.x=zy(i));let l=0,c=0;if(i&&!r&&!o){const p=i.getBoundingClientRect();c=p.top+s.scrollTop,l=p.left+s.scrollLeft-zy(i,p)}const d=a.left+s.scrollLeft-u.x-l,f=a.top+s.scrollTop-u.y-c;return{x:d,y:f,width:a.width,height:a.height}}function Hy(e){return Cr(e).position==="static"}function nA(e,t){if(!$r(e)||Cr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vr(e)===n&&(n=n.ownerDocument.body),n}function rA(e,t){const n=Vn(e);if(jf(e))return n;if(!$r(e)){let i=go(e);for(;i&&!Ts(i);){if(_r(i)&&!Hy(i))return i;i=go(i)}return n}let r=nA(e,t);for(;r&&KU(r)&&Hy(r);)r=nA(r,t);return r&&Ts(r)&&Hy(r)&&!Fy(r)?n:r||XU(e)||n}const uz=async function(e){const t=this.getOffsetParent||rA,n=this.getDimensions,r=await n(e.floating);return{reference:sz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lz(e){return Cr(e).direction==="rtl"}const cz={convertOffsetParentRelativeRectToViewportRelativeRect:JU,getDocumentElement:Vr,getClippingRect:oz,getOffsetParent:rA,getElementRects:uz,getClientRects:ez,getDimensions:az,getScale:_s,isElement:_r,isRTL:lz};function dz(e,t){let n=null,r;const i=Vr(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),o();const{left:l,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p=Lf(c),m=Lf(i.clientWidth-(l+d)),y=Lf(i.clientHeight-(c+f)),b=Lf(l),x={rootMargin:-p+"px "+-m+"px "+-y+"px "+-b+"px",threshold:Hn(0,po(1,u))||1};let w=!0;function T(_){const C=_[0].intersectionRatio;if(C!==u){if(!w)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(T,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,x)}n.observe(e)}return a(!0),o}function iA(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Uy(e),c=i||o?[...l?Tl(l):[],...Tl(t)]:[];c.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const d=l&&s?dz(l,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(g=>{let[x]=g;x&&x.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let m,y=u?ua(e):null;u&&b();function b(){const g=ua(e);y&&(g.x!==y.x||g.y!==y.y||g.width!==y.width||g.height!==y.height)&&n(),y=g,m=requestAnimationFrame(b)}return n(),()=>{var g;c.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),d==null||d(),(g=p)==null||g.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const fz=WU,pz=YU,hz=HU,mz=GU,gz=VU,oA=zU,yz=qU,vz=(e,t,n)=>{const r=new Map,i={platform:cz,...n},o={...i.platform,_c:r};return UU(e,t,{...i,platform:o})};var zf=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Hf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Hf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Hf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function aA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sA(e,t){const n=aA(e);return Math.round(t*n)/n}function Vy(e){const t=v.useRef(e);return zf(()=>{t.current=e}),t}function uA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);Hf(f,r)||p(r);const[m,y]=v.useState(null),[b,g]=v.useState(null),x=v.useCallback(F=>{F!==C.current&&(C.current=F,y(F))},[]),w=v.useCallback(F=>{F!==R.current&&(R.current=F,g(F))},[]),T=o||m,_=a||b,C=v.useRef(null),R=v.useRef(null),O=v.useRef(c),V=u!=null,P=Vy(u),$=Vy(i),z=Vy(l),X=v.useCallback(()=>{if(!C.current||!R.current)return;const F={placement:t,strategy:n,middleware:f};$.current&&(F.platform=$.current),vz(C.current,R.current,F).then(B=>{const A={...B,isPositioned:z.current!==!1};Y.current&&!Hf(O.current,A)&&(O.current=A,Zo.flushSync(()=>{d(A)}))})},[f,t,n,$,z]);zf(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[l]);const Y=v.useRef(!1);zf(()=>(Y.current=!0,()=>{Y.current=!1}),[]),zf(()=>{if(T&&(C.current=T),_&&(R.current=_),T&&_){if(P.current)return P.current(T,_,X);X()}},[T,_,X,P,V]);const re=v.useMemo(()=>({reference:C,floating:R,setReference:x,setFloating:w}),[x,w]),ie=v.useMemo(()=>({reference:T,floating:_}),[T,_]),te=v.useMemo(()=>{const F={position:n,left:0,top:0};if(!ie.floating)return F;const B=sA(ie.floating,c.x),A=sA(ie.floating,c.y);return s?{...F,transform:"translate("+B+"px, "+A+"px)",...aA(ie.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:A}},[n,s,ie.floating,c.x,c.y]);return v.useMemo(()=>({...c,update:X,refs:re,elements:ie,floatingStyles:te}),[c,X,re,ie,te])}const xz=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?oA({element:r.current,padding:i}).fn(n):{}:r?oA({element:r,padding:i}).fn(n):{}}}},lA=(e,t)=>({...fz(e),options:[e,t]}),cA=(e,t)=>({...pz(e),options:[e,t]}),dA=(e,t)=>({...yz(e),options:[e,t]}),fA=(e,t)=>({...hz(e),options:[e,t]}),pA=(e,t)=>({...mz(e),options:[e,t]}),hA=(e,t)=>({...gz(e),options:[e,t]}),mA=(e,t)=>({...xz(e),options:[e,t]});var wz="Arrow",gA=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return E.jsx(zn.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});gA.displayName=wz;var bz=gA;function Ez(e,t=[]){let n=[];function r(o,a){const s=v.createContext(a),u=n.length;n=[...n,a];function l(d){const{scope:f,children:p,...m}=d,y=(f==null?void 0:f[e][u])||s,b=v.useMemo(()=>m,Object.values(m));return E.jsx(y.Provider,{value:b,children:p})}function c(d,f){const p=(f==null?void 0:f[e][u])||s,m=v.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,c]}const i=()=>{const o=n.map(a=>v.createContext(a));return function(s){const u=(s==null?void 0:s[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,Tz(i,...t)]}function Tz(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const d=u(o)[`__scope${l}`];return{...s,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function yA(e){const[t,n]=v.useState(void 0);return or(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const u=o.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var $y="Popper",[vA,Vf]=Ez($y),[_z,xA]=vA($y),wA=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return E.jsx(_z,{scope:t,anchor:r,onAnchorChange:i,children:n})};wA.displayName=$y;var bA="PopperAnchor",EA=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=xA(bA,n),a=v.useRef(null),s=Hr(t,a);return v.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:E.jsx(zn.div,{...i,ref:s})});EA.displayName=bA;var Wy="PopperContent",[Cz,Sz]=vA(Wy),TA=v.forwardRef((e,t)=>{var $e,Ve,We,Ge,_t,Te;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...y}=e,b=xA(Wy,n),[g,x]=v.useState(null),w=Hr(t,be=>x(be)),[T,_]=v.useState(null),C=yA(T),R=(C==null?void 0:C.width)??0,O=(C==null?void 0:C.height)??0,V=r+(o!=="center"?"-"+o:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},$=Array.isArray(l)?l:[l],z=$.length>0,X={padding:P,boundary:$.filter(kz),altBoundary:z},{refs:Y,floatingStyles:re,placement:ie,isPositioned:te,middlewareData:F}=uA({strategy:"fixed",placement:V,whileElementsMounted:(...be)=>iA(...be,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[lA({mainAxis:i+O,alignmentAxis:a}),u&&cA({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?dA():void 0,...X}),u&&fA({...X}),pA({...X,apply:({elements:be,rects:Ye,availableWidth:ze,availableHeight:yt})=>{const{width:vt,height:Ke}=Ye.reference,Fe=be.floating.style;Fe.setProperty("--radix-popper-available-width",`${ze}px`),Fe.setProperty("--radix-popper-available-height",`${yt}px`),Fe.setProperty("--radix-popper-anchor-width",`${vt}px`),Fe.setProperty("--radix-popper-anchor-height",`${Ke}px`)}}),T&&mA({element:T,padding:s}),Rz({arrowWidth:R,arrowHeight:O}),f&&hA({strategy:"referenceHidden",...X})]}),[B,A]=SA(ie),oe=Pt(m);or(()=>{te&&(oe==null||oe())},[te,oe]);const he=($e=F.arrow)==null?void 0:$e.x,D=(Ve=F.arrow)==null?void 0:Ve.y,Oe=((We=F.arrow)==null?void 0:We.centerOffset)!==0,[ge,xe]=v.useState();return or(()=>{g&&xe(window.getComputedStyle(g).zIndex)},[g]),E.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:te?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(Ge=F.transformOrigin)==null?void 0:Ge.x,(_t=F.transformOrigin)==null?void 0:_t.y].join(" "),...((Te=F.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(Cz,{scope:n,placedSide:B,onArrowChange:_,arrowX:he,arrowY:D,shouldHideArrow:Oe,children:E.jsx(zn.div,{"data-side":B,"data-align":A,...y,ref:w,style:{...y.style,animation:te?void 0:"none"}})})})});TA.displayName=Wy;var _A="PopperArrow",Az={top:"bottom",right:"left",bottom:"top",left:"right"},CA=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Sz(_A,r),a=Az[o.placedSide];return E.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:E.jsx(bz,{...i,ref:n,style:{...i.style,display:"block"}})})});CA.displayName=_A;function kz(e){return e!==null}var Rz=e=>({name:"transformOrigin",options:e,fn(t){var b,g,x;const{placement:n,rects:r,middlewareData:i}=t,a=((b=i.arrow)==null?void 0:b.centerOffset)!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,c]=SA(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((g=i.arrow)==null?void 0:g.x)??0)+s/2,p=(((x=i.arrow)==null?void 0:x.y)??0)+u/2;let m="",y="";return l==="bottom"?(m=a?d:`${f}px`,y=`${-u}px`):l==="top"?(m=a?d:`${f}px`,y=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,y=a?d:`${p}px`):l==="left"&&(m=`${r.floating.width+u}px`,y=a?d:`${p}px`),{data:{x:m,y}}}});function SA(e){const[t,n="center"]=e.split("-");return[t,n]}var AA=wA,Yy=EA,kA=TA,RA=CA;function Nz(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var qy=e=>{const{present:t,children:n}=e,r=Pz(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=Hr(r.ref,Iz(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:o}):null};qy.displayName="Presence";function Pz(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),o=v.useRef("none"),a=e?"mounted":"unmounted",[s,u]=Nz(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=$f(r.current);o.current=s==="mounted"?l:"none"},[s]),or(()=>{const l=r.current,c=i.current;if(c!==e){const f=o.current,p=$f(l);e?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),or(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=p=>{const y=$f(r.current).includes(p.animationName);if(p.target===t&&y&&(u("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=p=>{p.target===t&&(o.current=$f(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function $f(e){return(e==null?void 0:e.animationName)||"none"}function Iz(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function _l({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Oz({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Pt(n),u=v.useCallback(l=>{if(o){const d=typeof l=="function"?l(e):l;d!==e&&s(d)}else i(l)},[o,e,i,s]);return[a,u]}function Oz({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,i=v.useRef(r),o=Pt(t);return v.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var Dz="VisuallyHidden",NA=v.forwardRef((e,t)=>E.jsx(zn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));NA.displayName=Dz;var Lz=NA,[Wf,Hie]=bi("Tooltip",[Vf]),Yf=Vf(),PA="TooltipProvider",Mz=700,Gy="tooltip.open",[Fz,Ky]=Wf(PA),IA=e=>{const{__scopeTooltip:t,delayDuration:n=Mz,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,s]=v.useState(!0),u=v.useRef(!1),l=v.useRef(0);return v.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),E.jsx(Fz,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(l.current),s(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:v.useCallback(c=>{u.current=c},[]),disableHoverableContent:i,children:o})};IA.displayName=PA;var qf="Tooltip",[Bz,Gf]=Wf(qf),OA=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,u=Ky(qf,e.__scopeTooltip),l=Yf(t),[c,d]=v.useState(null),f=fo(),p=v.useRef(0),m=a??u.disableHoverableContent,y=s??u.delayDuration,b=v.useRef(!1),[g=!1,x]=_l({prop:r,defaultProp:i,onChange:R=>{R?(u.onOpen(),document.dispatchEvent(new CustomEvent(Gy))):u.onClose(),o==null||o(R)}}),w=v.useMemo(()=>g?b.current?"delayed-open":"instant-open":"closed",[g]),T=v.useCallback(()=>{window.clearTimeout(p.current),b.current=!1,x(!0)},[x]),_=v.useCallback(()=>{window.clearTimeout(p.current),x(!1)},[x]),C=v.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,x(!0)},y)},[y,x]);return v.useEffect(()=>()=>window.clearTimeout(p.current),[]),E.jsx(AA,{...l,children:E.jsx(Bz,{scope:t,contentId:f,open:g,stateAttribute:w,trigger:c,onTriggerChange:d,onTriggerEnter:v.useCallback(()=>{u.isOpenDelayed?C():T()},[u.isOpenDelayed,C,T]),onTriggerLeave:v.useCallback(()=>{m?_():window.clearTimeout(p.current)},[_,m]),onOpen:T,onClose:_,disableHoverableContent:m,children:n})})};OA.displayName=qf;var Xy="TooltipTrigger",DA=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Gf(Xy,n),o=Ky(Xy,n),a=Yf(n),s=v.useRef(null),u=Hr(t,s,i.onTriggerChange),l=v.useRef(!1),c=v.useRef(!1),d=v.useCallback(()=>l.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),E.jsx(Yy,{asChild:!0,...a,children:E.jsx(zn.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Cn(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Cn(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Cn(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Cn(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Cn(e.onBlur,i.onClose),onClick:Cn(e.onClick,i.onClose)})})});DA.displayName=Xy;var jz="TooltipPortal",[Vie,Uz]=Wf(jz,{forceMount:void 0}),Cs="TooltipContent",LA=v.forwardRef((e,t)=>{const n=Uz(Cs,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=Gf(Cs,e.__scopeTooltip);return E.jsx(qy,{present:r||a.open,children:a.disableHoverableContent?E.jsx(MA,{side:i,...o,ref:t}):E.jsx(zz,{side:i,...o,ref:t})})}),zz=v.forwardRef((e,t)=>{const n=Gf(Cs,e.__scopeTooltip),r=Ky(Cs,e.__scopeTooltip),i=v.useRef(null),o=Hr(t,i),[a,s]=v.useState(null),{trigger:u,onClose:l}=n,c=i.current,{onPointerInTransitChange:d}=r,f=v.useCallback(()=>{s(null),d(!1)},[d]),p=v.useCallback((m,y)=>{const b=m.currentTarget,g={x:m.clientX,y:m.clientY},x=Wz(g,b.getBoundingClientRect()),w=Yz(g,x),T=qz(y.getBoundingClientRect()),_=Kz([...w,...T]);s(_),d(!0)},[d]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(u&&c){const m=b=>p(b,c),y=b=>p(b,u);return u.addEventListener("pointerleave",m),c.addEventListener("pointerleave",y),()=>{u.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",y)}}},[u,c,p,f]),v.useEffect(()=>{if(a){const m=y=>{const b=y.target,g={x:y.clientX,y:y.clientY},x=(u==null?void 0:u.contains(b))||(c==null?void 0:c.contains(b)),w=!Gz(g,a);x?f():w&&(f(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[u,c,a,l,f]),E.jsx(MA,{...e,ref:o})}),[Hz,Vz]=Wf(qf,{isInside:!1}),MA=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,u=Gf(Cs,n),l=Yf(n),{onClose:c}=u;return v.useEffect(()=>(document.addEventListener(Gy,c),()=>document.removeEventListener(Gy,c)),[c]),v.useEffect(()=>{if(u.trigger){const d=f=>{const p=f.target;p!=null&&p.contains(u.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[u.trigger,c]),E.jsx(Py,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:E.jsxs(kA,{"data-state":u.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[E.jsx(US,{children:r}),E.jsx(Hz,{scope:n,isInside:!0,children:E.jsx(Lz,{id:u.contentId,role:"tooltip",children:i||r})})]})})});LA.displayName=Cs;var FA="TooltipArrow",$z=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Yf(n);return Vz(FA,n).isInside?null:E.jsx(RA,{...i,...r,ref:t})});$z.displayName=FA;function Wz(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Yz(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function qz(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Gz(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o].x,u=t[o].y,l=t[a].x,c=t[a].y;u>r!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function Kz(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Xz(t)}function Xz(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Qz=IA,Zz=OA,Jz=DA,BA=LA;const eH=Qz,tH=Zz,nH=Jz,jA=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>E.jsx(BA,{ref:r,sideOffset:t,className:Ne("z-50 overflow-hidden max-w-xs rounded-xl bg-primary border text-primary-foreground p-2 text-center align-middle text-xs shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));jA.displayName=BA.displayName;function Kf({children:e,content:t,side:n,align:r}){return t?E.jsxs(tH,{children:[E.jsx(nH,{asChild:!0,children:e}),E.jsx(jA,{side:n,align:r,collisionPadding:8,avoidCollisions:!0,children:t})]}):e}const UA={en:{ok:"OK",yes:"Yes",no:"No",agree:"Agree",cancel:"Cancel","yes-exit":"Yes, exit","yes-reset":"Yes, reset","no-cancel":"No, cancel","are-you-sure":"Are you sure?",recording:"Recording...","thank-you":"Thank you","sorry-try-again":"Sorry, please try again","error-occurred":"An error occurred","please-try-again":"Please try again","write-a-message":"Write a message...","send-message":"Send message",connected:"Connected",connecting:"Connecting",reconnecting:"Reconnecting",reconnected:"Reconnected",disconnecting:"Disconnecting",disconnected:"Disconnected",error:"Error","persist-session":"Persist session",settings:"Settings",close:"Close",help:"Help",chat:"Chat",send:"Send",copy:"Copy",copied:"Copied","sound-effects":"Sound effects",language:"Language",select:"Select",agent:"Agent",user:"User",bot:"Bot","close-widget":"Close widget","got-any-questions":"Got any questions? Chat with us!","typical-response-time":"Typically respond in less than 1 minute","session-closed-lead":"Your issue has been resolved!","create-new-ticket":"Create new ticket",exit:"Exit","reset-conversation":"Reset conversation","new-conversation":"New conversation","welcome-title":"Welcome to our support chat","welcome-description":"We're here to help! Start a conversation and we'll get back to you as soon as possible.","your-name":"Your name","your-email":"Your email address","start-chat":"Talk to support","starting-chat":"Connecting...","hello-greeting":"Hi there!","i-need-more-help":"I need more help","this-was-helpful":"This was helpful"},ar:{ok:"حسنا",yes:"نعم",no:"لا",agree:"موافق",cancel:"إلغاء","yes-exit":"نعم، اخرج","yes-reset":"نعم، إعادة تعيين","no-cancel":"لا، إلغاء","are-you-sure":"هل أنت متأكد؟",recording:"تسجيل","thank-you":"شكرا","sorry-try-again":"عذرا، حاول مرة أخرى","error-occurred":"حدث خطأ","please-try-again":"يرجى المحاولة مرة أخرى","write-a-message":"اكتب رسالة...","send-message":"إرسال رسالة",connected:"متصل",connecting:"جاري الاتصال",reconnecting:"جاري إعادة الاتصال",reconnected:"تم إعادة الاتصال",disconnecting:"جاري قطع الاتصال",disconnected:"قطع الاتصال",error:"خطأ","persist-session":"حفظ الجلسة",settings:"إعدادات",close:"إغلاق",help:"مساعدة",chat:"محادثة",send:"إرسال",copy:"نسخ",copied:"تم النسخ","sound-effects":"التاثيرات الصوتية",language:"اللغة",select:"اختر",agent:"الوكيل",user:"المستخدم",bot:"البوت","close-widget":"إغلاق الودجة","got-any-questions":"هل لديك أي أسئلة؟ تحدث معنا!","typical-response-time":"عادة ما نرد في أقل من دقيقة واحدة","session-closed-lead":"تم حل مشكلتك!",exit:"خروج","create-new-ticket":"إنشاء تذكرة جديدة","reset-conversation":"إعادة تعيين المحادثة","new-conversation":"محادثة جديدة","welcome-title":"مرحبًا بك في دردشة الدعم الخاصة بنا","welcome-description":"نحن هنا للمساعدة! ابدأ محادثة وسنرد عليك في أقرب وقت ممكن.","your-name":"اسمك","your-email":"عنوان بريدك الإلكتروني","start-chat":"تحدث إلى الدعم","starting-chat":"جاري الاتصال...","hello-greeting":"مرحبًا! كيف يمكننا مساعدتك اليوم؟","i-need-more-help":"أحتاج المزيد من المساعدة","this-was-helpful":"كان هذا مفيدًا"},nl:{ok:"OK",yes:"Ja",no:"Nee",agree:"Akkoord",cancel:"Annuleren","yes-exit":"Ja, afsluiten","yes-reset":"Ja, resetten","no-cancel":"Nee, annuleren","are-you-sure":"Weet u het zeker?",recording:"Opname...","thank-you":"Dank u","sorry-try-again":"Sorry, probeer het opnieuw","error-occurred":"Er is een fout opgetreden","please-try-again":"Probeer het opnieuw","write-a-message":"Schrijf een bericht...","send-message":"Bericht verzenden",connected:"Verbonden",connecting:"Verbinding maken",reconnecting:"Opnieuw verbinding maken",reconnected:"Opnieuw verbonden",disconnecting:"Verbinding verbreken",disconnected:"Verbinding verbroken",error:"Fout","persist-session":"Sessie behouden",settings:"Instellingen",close:"Sluiten",help:"Help",chat:"Chat",send:"Verzenden",copy:"Kopiëren",copied:"Gekopieerd","sound-effects":"Geluidseffecten",language:"Taal",select:"Selecteren",agent:"Agent",user:"Gebruiker",bot:"Bot","close-widget":"Widget sluiten","got-any-questions":"Heeft u vragen? Chat met ons!","typical-response-time":"We reageren doorgaans binnen 1 minuut","session-closed-lead":"Uw probleem is opgelost!","create-new-ticket":"Nieuw ticket aanmaken",exit:"Afsluiten","reset-conversation":"Gesprek resetten","new-conversation":"Nieuw gesprek","welcome-title":"Welkom bij onze supportchat","welcome-description":"We zijn hier om te helpen! Begin een gesprek en we nemen zo snel mogelijk contact met u op.","your-name":"Uw naam","your-email":"Uw e-mailadres","start-chat":"Praat met ondersteuning","starting-chat":"Verbinding maken...","hello-greeting":"Hallo! Hoe kunnen we u vandaag helpen?","i-need-more-help":"Ik heb nog meer help nodig","this-was-helpful":"Dit was handig"},fr:{ok:"D'accord",yes:"Oui",no:"Non",agree:"Accepter",cancel:"Annuler","yes-exit":"Oui, quitter","yes-reset":"Oui, réinitialiser","no-cancel":"Non, annuler","are-you-sure":"Êtes-vous sûr ?",recording:"Enregistrement...","thank-you":"Merci","sorry-try-again":"Désolé, veuillez réessayer","error-occurred":"Une erreur s'est produite","please-try-again":"Veuillez réessayer","write-a-message":"Écrivez un message...","send-message":"Envoyer le message",connected:"Connecté",connecting:"Connexion en cours",reconnecting:"Reconnexion en cours",reconnected:"Reconnecté",disconnecting:"Déconnexion en cours",disconnected:"Déconnecté",error:"Erreur","persist-session":"Conserver la session",settings:"Paramètres",close:"Fermer",help:"Aide",chat:"Chat",send:"Envoyer",copy:"Copier",copied:"Copié","sound-effects":"Effets sonores",language:"Langue",select:"Sélectionner",agent:"Agent",user:"Utilisateur",bot:"Bot","close-widget":"Fermer le widget","got-any-questions":"Vous avez des questions ? Chattez avec nous !","typical-response-time":"Nous répondons généralement en moins d'une minute","session-closed-lead":"Votre problème a été résolu !","create-new-ticket":"Créer un nouveau ticket",exit:"Sortie","reset-conversation":"Réinitialiser la conversation","new-conversation":"Nouvelle conversation","welcome-title":"Bienvenue dans notre chat de support","welcome-description":"Nous sommes là pour vous aider ! Commencez une conversation et nous vous répondrons dès que possible.","your-name":"Votre nom","your-email":"Votre adresse e-mail","start-chat":"Parler au support","starting-chat":"Connexion...","hello-greeting":"Bonjour ! Comment pouvons-nous vous aider aujourd'hui ?","i-need-more-help":"Je besoin d'aide plus","this-was-helpful":"C'était utile"},de:{ok:"OK",yes:"Ja",no:"Nein",agree:"Zustimmen",cancel:"Stornieren","yes-exit":"Ja, beenden","yes-reset":"Ja, zurücksetzen","no-cancel":"Nein, abbrechen","are-you-sure":"Sind Sie sicher?",recording:"Aufnahme läuft","thank-you":"Vielen Dank","sorry-try-again":"Entschuldigung, bitte versuchen Sie es erneut","error-occurred":"Ein Fehler ist aufgetreten","please-try-again":"Bitte versuchen Sie es erneut","write-a-message":"Nachricht schreiben...","send-message":"Nachricht senden",connected:"Verbunden",connecting:"Verbindung wird hergestellt",reconnecting:"Verbindung wird wiederhergestellt",reconnected:"Wieder verbunden",disconnecting:"Verbindung wird getrennt",disconnected:"Verbindung getrennt",error:"Fehler","persist-session":"Sitzung beibehalten",settings:"Einstellungen",close:"Schließen",help:"Hilfe",chat:"Chat",send:"Senden",copy:"Kopieren",copied:"Kopiert","sound-effects":"Soundeffekte",language:"Sprache",select:"Auswählen",agent:"Agent",user:"Benutzer",bot:"Bot","got-any-questions":"Haben Sie Fragen? Chatten Sie mit uns!","typical-response-time":"Üblicherweise antworten wir in weniger als 1 Minute","close-widget":"Widget schließen","session-closed-lead":"Ihr Problem wurde gelöst!","create-new-ticket":"Neues Ticket erstellen",exit:"Beenden","reset-conversation":"Konversation zurücksetzen","new-conversation":"Neue Konversation","welcome-title":"Willkommen in unserem Support-Chat","welcome-description":"Wir sind hier, um zu helfen! Beginnen Sie ein Gesprách und wir werden so schnell wie mogelijk antworten.","your-name":"Ihr Name","your-email":"Ihre E-Mail-Adresse","start-chat":"Mit dem Support sprechen","starting-chat":"Verbindung wird hergestellt...","hello-greeting":"Hallo! Wie können wir Ihnen heute helfen?","i-need-more-help":"Ich brauche weitere Hilfe","this-was-helpful":"Dies war hilfreich"},pt:{ok:"OK",yes:"Sim",no:"Não",agree:"Concordo",cancel:"Cancelar","yes-exit":"Sim, sair","yes-reset":"Sim, redefinir","no-cancel":"Não, cancelar","are-you-sure":"Você tem certeza?",recording:"Gravando...","thank-you":"Obrigado","sorry-try-again":"Desculpe, tente novamente","error-occurred":"Ocorreu um erro","please-try-again":"Por favor, tente novamente","write-a-message":"Escreva uma mensagem...","send-message":"Enviar mensagem",connected:"Conectado",connecting:"Conectando",reconnecting:"Reconectando",reconnected:"Reconectado",disconnecting:"Desconectando",disconnected:"Desconectado",error:"Erro","persist-session":"Persistir sessão",settings:"Configurações",close:"Fechar",help:"Ajuda",chat:"Bate-papo",send:"Enviar",copy:"Copiar",copied:"Copiado","sound-effects":"Efeitos sonoros",language:"Idioma",select:"Selecionar",agent:"Agente",user:"Usuário",bot:"Bot","close-widget":"Fechar widget","got-any-questions":"Tem alguma dúvida? Converse conosco!","typical-response-time":"Geralmente respondemos em menos de 1 minuto","session-closed-lead":"Seu problema foi resolvido!","create-new-ticket":"Criar novo ticket",exit:"Sair","reset-conversation":"Redefinir conversa","new-conversation":"Nova conversa","welcome-title":"Bem-vindo ao nosso chat de suporte","welcome-description":"Estamos aqui para ajudar! Inicie uma conversa e responderemos o mais rápido possível.","your-name":"Seu nome","your-email":"Seu endereço de email","start-chat":"Falar com o suporte","starting-chat":"Conectando...","hello-greeting":"Olá! Como podemos ajudar você hoje?","i-need-more-help":"preciso de mais ajuda","this-was-helpful":"Isso foi útil"}},rH=Object.keys(UA),iH=e=>rH.includes(e);function oH(e,t){const n=UA[t];return n&&n[e]||""}function Ss(){const{widgetCtx:{config:e}}=ir();return v.useMemo(()=>{const n=iH(e.language)?e.language:"en";return{get:r=>oH(r,n),lang:n}},[e.language])}const aH=10,sH={right:(e,t)=>({initial:{opacity:0,x:-e,...t.initial},animate:{opacity:1,x:0,...t.animate},exit:{opacity:0,x:e,...t.exit}}),left:(e,t)=>({initial:{opacity:0,x:e,...t.initial},animate:{opacity:1,x:0,...t.animate},exit:{opacity:0,x:-e,...t.exit}}),up:(e,t)=>({initial:{opacity:0,y:e,...t.initial},animate:{opacity:1,y:0,...t.animate},exit:{opacity:0,y:-e,...t.exit}}),down:(e,t)=>({initial:{opacity:0,y:-e,...t.initial},animate:{opacity:1,y:0,...t.animate},exit:{opacity:0,y:e,...t.exit}})},st=v.forwardRef(({fadeIn:e="down",distance:t=aH,children:n,snapExit:r=!1,overrides:i={},...o},a)=>{const s=e?sH[e](t,i):{};return r&&s.exit&&typeof s.exit=="object"&&!Array.isArray(s.exit)&&(s.exit.transition={duration:0}),E.jsx(cs.div,{ref:a,...o,...s,children:n})});st.displayName="MotionDiv";function zA(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=zA(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function uH(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=zA(e))&&(r&&(r+=" "),r+=t);return r}const HA=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,VA=uH,lH=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return VA(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(l=>{const c=n==null?void 0:n[l],d=o==null?void 0:o[l];if(c===null)return null;const f=HA(c)||HA(d);return i[l][f]}),s=n&&Object.entries(n).reduce((l,c)=>{let[d,f]=c;return f===void 0||(l[d]=f),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:d,className:f,...p}=c;return Object.entries(p).every(m=>{let[y,b]=m;return Array.isArray(b)?b.includes({...o,...s}[y]):{...o,...s}[y]===b})?[...l,d,f]:l},[]);return VA(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},$A={x:2,y:2},cH={1:"scale-[1]","1.01":"scale-[1.01]","1.02":"scale-[1.02]","1.1":"scale-[1.1]"},yo=v.memo(v.forwardRef(({children:e,className:t,scale:n="1.02",off:r=!1},i)=>{const[o,a]=v.useState(!1),[s,u]=v.useState({x:0,y:0});if(r||/translate/.test(e.props.className||""))return e;const c=m=>{var O,V;const{clientX:y,clientY:b}=m,g=m.currentTarget.getBoundingClientRect(),x=y-(g.left+g.width/2),w=b-(g.top+g.height/2),T=Math.max(-1,Math.min(1,x/(g.width/2))),_=Math.max(-1,Math.min(1,w/(g.height/2))),C=T*$A.x,R=_*$A.y;u({x:C,y:R}),(V=(O=e.props).onMouseMove)==null||V.call(O,m)},d=()=>{var m,y;a(!0),(y=(m=e.props).onMouseEnter)==null||y.call(m)},f=()=>{var m,y;a(!1),u({x:0,y:0}),(y=(m=e.props).onMouseLeave)==null||y.call(m)},p={"--opencx-wobble-x":o?`${s.x}px`:"0px","--opencx-wobble-y":o?`${s.y}px`:"0px"};return v.cloneElement(e,{ref:i,onMouseMove:c,onMouseEnter:d,onMouseLeave:f,style:{...p,...e.props.style},className:Ne("translate-x-[var(--opencx-wobble-x)]","translate-y-[var(--opencx-wobble-y)]",`hover:${cH[n]}`,t,e.props.className,"transition-all ease-out")})}));yo.displayName="Wobble";const dH=lH(Ne("inline-flex shrink-0 items-center justify-center gap-2","text-sm font-medium whitespace-nowrap","ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","shadow-sm active:shadow-none active:scale-95 hover:active:scale-95","rounded-xl","border","transition"),{variants:{variant:{default:"border-primary bg-primary text-primary-foreground",destructive:"border-destructive bg-destructive text-destructive-foreground",outline:"bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground",ghost:"border-transparent shadow-none hover:bg-accent hover:text-accent-foreground",link:"border-transparent shadow-none text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-xs",lg:"min-h-12 px-4",icon:"h-10 w-10",fit:"size-fit p-2",free:"p-2"}},defaultVariants:{variant:"default",size:"default"}}),$n=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const a=r?Of:"button";return E.jsx(yo,{ref:o,children:E.jsx(a,{className:Ne(dH({variant:t,size:n,className:e})),...i})})});$n.displayName="Button";const Xf=()=>{const[e,t]=v.useState("ltr");return v.useEffect(()=>{const n=()=>{typeof document>"u"||t(window.getComputedStyle(document.body).direction)};n();const r=new MutationObserver(n);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),r.observe(document.body,{attributes:!0,attributeFilter:["dir"]}),window.addEventListener("languagechange",n),()=>{r.disconnect(),window.removeEventListener("languagechange",n)}},[]),e};function fH(){const{sendMessage:e}=xs(),t=Ss(),n=[t.get("i-need-more-help"),t.get("this-was-helpful")],r=i=>{const o=i.trim();o&&e({content:o})};return E.jsx("div",{className:"flex items-center gap-2 p-2 pb-0 flex-wrap",children:n.map(i=>E.jsx($n,{onClick:()=>r(i),className:"flex-1 rounded-full",size:"sm",children:i},i))})}function pH({file:{status:e,file:t,error:n},onCancel:r}){const[i,o]=v.useState(null);v.useEffect(()=>{if(!t.type.startsWith("image/"))return;const u=new FileReader;return u.onload=()=>o(u.result),u.onerror=()=>console.error("Error reading file"),u.readAsDataURL(t),()=>u.abort()},[t]);const a=()=>{switch(e){case"uploading":return E.jsx(VF,{className:"size-4 animate-spin"});case"error":return E.jsx(MF,{className:"size-4 text-destructive"});default:return null}},s=()=>{const u=t.type.split("/")[0];return u==="image"&&i?E.jsx("img",{src:typeof i=="string"?i:"",className:"object-cover bg-secondary size-full",alt:t.name}):u==="audio"?E.jsx(UF,{}):u==="video"?E.jsx(zF,{}):E.jsx(HF,{})};return E.jsx(Kf,{side:"bottom",content:e==="error"?E.jsxs("span",{className:"text-destructive",children:["Failed to upload: ",n]}):t.name,children:E.jsxs("div",{className:Ne(e==="uploading"&&"opacity-50","group","size-12 border rounded-2xl overflow-hidden relative","flex items-center justify-center shrink-0"),children:[E.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:a()}),E.jsx("button",{type:"button",className:Ne("absolute bg-black/50 inset-0 size-full z-10 opacity-0","flex items-center justify-center","opacity-0 group-hover:opacity-100 transition"),onClick:r,children:E.jsx(O0,{className:"size-4 text-primary-foreground"})}),E.jsx(s,{})]})})}const WA=Ne("rounded-3xl");function hH(){var C;const e=v.useRef(null),{sendMessage:t}=xs(),{sessionState:n}=gl(),r=Ss(),i=Xf(),[o,a]=v.useState(""),{allFiles:s,emptyTheFiles:u,handleCancelUpload:l,appendFiles:c,isUploading:d,successFiles:f}=hU(),p=!!((C=n.session)!=null&&C.isHandedOff),{isAwaitingBotReply:m}=TS(),y=R=>{p&&c(R)},b=!o.trim()&&f.length===0,g=async()=>{if(m||b)return;if(d){const O="please wait for the file(s) to upload";PC.error(O),console.info(O)}const R=o.trim();t({content:R,attachments:f.flatMap(O=>O.fileUrl?[{url:O.fileUrl,type:O.file.type,name:O.file.name,id:O.id,size:O.file.size}]:[])}),a(""),u()},{getRootProps:x,getInputProps:w,open:T}=CC({onDrop:y,noClick:!0,onDropRejected(){if(p){const R="unsupported file type, or the file is too large";PC.error(R),console.error(R)}},maxSize:5*1024*1024,accept:{"text/*":[".txt"],"image/*":[".png",".jpg",".jpeg",".gif"],"application/pdf":[".pdf"]}}),_=R=>{const O=R.clipboardData;O&&O.files.length>0&&y(Array.from(O.files))};return E.jsxs("div",{className:"p-2 relative space-y-1",...x(),children:[E.jsx("input",{...w()}),E.jsxs("div",{className:Ne(WA,"relative space-y-2 border transition-all shadow py-2"),children:[E.jsx("div",{className:"flex items-center gap-1 px-2",children:E.jsx(jn,{mode:"popLayout",children:s.map(R=>E.jsx(st,{snapExit:!0,children:E.jsx(pH,{onCancel:()=>l(R.id),file:R})},R.id))})}),E.jsx("textarea",{onPaste:_,ref:e,id:"chat-input",dir:i,value:o,rows:3,className:Ne(WA,"w-full resize-none px-3","text-sm rtl:placeholder:text-right bg-transparent outline-none"),onChange:R=>a(R.target.value),onKeyDown:async R=>{R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),g())},placeholder:r.get("write-a-message")}),E.jsxs("div",{dir:i,className:"px-2 flex justify-between rtl:text-right",children:[E.jsx(Kf,{side:"top",align:"start",content:"attach files, (maximum size 5mb)",children:E.jsx($n,{onClick:()=>{p&&T()},size:"fit",variant:"outline",className:Ne("disabled:opacity-0","rounded-full size-8 flex items-center justify-center p-0"),disabled:!p,children:E.jsx(YF,{className:"size-4"})})}),E.jsx(Kf,{content:"send message",side:"top",align:"end",children:E.jsx($n,{size:"fit",onClick:g,disabled:m||d||b,className:"rounded-full size-8 flex items-center justify-center p-0",children:E.jsx(jn,{mode:"wait",children:m||d?E.jsx(st,{snapExit:!0,children:E.jsx(FF,{className:"size-4 animate-spin animate-iteration-infinite"})},"loading"):E.jsx(st,{snapExit:!0,children:E.jsx(P_,{className:"size-4 rtl:-scale-100"})},"send")})})})]})]})]})}function mH(){const{widgetCtx:e}=ir(),t=Ss();return E.jsx("div",{className:"p-2",children:E.jsxs("div",{className:"p-2 bg-background rounded-3xl border shadow-2xl space-y-2",children:[E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(OF,{className:"size-4 text-emerald-500"}),E.jsx("h2",{className:"text-sm font-medium",dir:"auto",children:t.get("session-closed-lead")})]}),E.jsx("div",{children:E.jsx($n,{onClick:e.resetChat,className:"rounded-2xl w-full",children:t.get("new-conversation")})})]})})}function gH(){var a,s,u;const{sessionState:e}=gl(),{messagesState:t,sendMessage:n}=xs(),i=(s=(a=Pf().data)==null?void 0:a.data)==null?void 0:s.initialQuestions,o=t.messages.length===0;return E.jsx("footer",{children:E.jsx("div",{children:E.jsx(jn,{mode:"wait",children:e.session&&!((u=e.session)!=null&&u.isOpened)?E.jsx(st,{className:"overflow-hidden",overrides:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},children:E.jsx(mH,{})},"session-closed"):E.jsxs(st,{className:"overflow-hidden",overrides:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},children:[t.lastAIResMightSolveUserIssue&&E.jsx(fH,{}),o&&i&&E.jsx("div",{className:"flex items-center flex-row justify-end gap-2 flex-wrap px-2",children:i==null?void 0:i.map(l=>E.jsx($n,{dir:"auto",variant:"outline",size:"sm",onClick:()=>{n({content:l})},children:l},l))}),E.jsx(hH,{})]},"chat-input")})})})}function Se(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function YA(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qf(...e){return t=>{let n=!1;const r=e.map(i=>{const o=YA(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():YA(e[i],null)}}}}function It(...e){return v.useCallback(Qf(...e),e)}var As=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),o=i.find(vH);if(o){const a=o.props.children,s=i.map(u=>u===o?v.Children.count(a)>1?v.Children.only(null):v.isValidElement(a)?a.props.children:null:u);return E.jsx(Qy,{...r,ref:t,children:v.isValidElement(a)?v.cloneElement(a,void 0,s):null})}return E.jsx(Qy,{...r,ref:t,children:n})});As.displayName="Slot";var Qy=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=wH(n);return v.cloneElement(n,{...xH(r,n.props),ref:t?Qf(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});Qy.displayName="SlotClone";var yH=({children:e})=>E.jsx(E.Fragment,{children:e});function vH(e){return v.isValidElement(e)&&e.type===yH}function xH(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function wH(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Et=bH.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?As:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Zy(e,t){e&&Zo.flushSync(()=>e.dispatchEvent(t))}function qA(e){const t=e+"CollectionProvider",[n,r]=bi(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:m,children:y}=p,b=ln.useRef(null),g=ln.useRef(new Map).current;return E.jsx(i,{scope:m,itemMap:g,collectionRef:b,children:y})};a.displayName=t;const s=e+"CollectionSlot",u=ln.forwardRef((p,m)=>{const{scope:y,children:b}=p,g=o(s,y),x=It(m,g.collectionRef);return E.jsx(As,{ref:x,children:b})});u.displayName=s;const l=e+"CollectionItemSlot",c="data-radix-collection-item",d=ln.forwardRef((p,m)=>{const{scope:y,children:b,...g}=p,x=ln.useRef(null),w=It(m,x),T=o(l,y);return ln.useEffect(()=>(T.itemMap.set(x,{ref:x,...g}),()=>void T.itemMap.delete(x))),E.jsx(As,{[c]:"",ref:w,children:b})});d.displayName=l;function f(p){const m=o(e+"CollectionConsumer",p);return ln.useCallback(()=>{const b=m.collectionRef.current;if(!b)return[];const g=Array.from(b.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((T,_)=>g.indexOf(T.ref.current)-g.indexOf(_.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:u,ItemSlot:d},f,r]}var EH=v.createContext(void 0);function GA(e){const t=v.useContext(EH);return e||t||"ltr"}var TH="DismissableLayer",Jy="dismissableLayer.update",_H="dismissableLayer.pointerDownOutside",CH="dismissableLayer.focusOutside",KA,XA=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),QA=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=v.useContext(XA),[c,d]=v.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),m=It(t,R=>d(R)),y=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(b),x=c?y.indexOf(c):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,T=x>=g,_=kH(R=>{const O=R.target,V=[...l.branches].some(P=>P.contains(O));!T||V||(i==null||i(R),a==null||a(R),R.defaultPrevented||s==null||s())},f),C=RH(R=>{const O=R.target;[...l.branches].some(P=>P.contains(O))||(o==null||o(R),a==null||a(R),R.defaultPrevented||s==null||s())},f);return Ry(R=>{x===l.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&s&&(R.preventDefault(),s()))},f),v.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(KA=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),ZA(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=KA)}},[c,f,n,l]),v.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),ZA())},[c,l]),v.useEffect(()=>{const R=()=>p({});return document.addEventListener(Jy,R),()=>document.removeEventListener(Jy,R)},[]),E.jsx(Et.div,{...u,ref:m,style:{pointerEvents:w?T?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,_.onPointerDownCapture)})});QA.displayName=TH;var SH="DismissableLayerBranch",AH=v.forwardRef((e,t)=>{const n=v.useContext(XA),r=v.useRef(null),i=It(t,r);return v.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),E.jsx(Et.div,{...e,ref:i})});AH.displayName=SH;function kH(e,t=globalThis==null?void 0:globalThis.document){const n=Pt(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){JA(_H,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function RH(e,t=globalThis==null?void 0:globalThis.document){const n=Pt(e),r=v.useRef(!1);return v.useEffect(()=>{const i=o=>{o.target&&!r.current&&JA(CH,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ZA(){const e=new CustomEvent(Jy);document.dispatchEvent(e)}function JA(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Zy(i,o):i.dispatchEvent(o)}var e1=0;function t1(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ek()),document.body.insertAdjacentElement("beforeend",e[1]??ek()),e1++,()=>{e1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),e1--}},[])}function ek(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var n1="focusScope.autoFocusOnMount",r1="focusScope.autoFocusOnUnmount",tk={bubbles:!1,cancelable:!0},NH="FocusScope",i1=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=v.useState(null),l=Pt(i),c=Pt(o),d=v.useRef(null),f=It(t,y=>u(y)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let y=function(w){if(p.paused||!s)return;const T=w.target;s.contains(T)?d.current=T:vo(d.current,{select:!0})},b=function(w){if(p.paused||!s)return;const T=w.relatedTarget;T!==null&&(s.contains(T)||vo(d.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const _ of w)_.removedNodes.length>0&&vo(s)};document.addEventListener("focusin",y),document.addEventListener("focusout",b);const x=new MutationObserver(g);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),x.disconnect()}}},[r,s,p.paused]),v.useEffect(()=>{if(s){ik.add(p);const y=document.activeElement;if(!s.contains(y)){const g=new CustomEvent(n1,tk);s.addEventListener(n1,l),s.dispatchEvent(g),g.defaultPrevented||(PH(MH(nk(s)),{select:!0}),document.activeElement===y&&vo(s))}return()=>{s.removeEventListener(n1,l),setTimeout(()=>{const g=new CustomEvent(r1,tk);s.addEventListener(r1,c),s.dispatchEvent(g),g.defaultPrevented||vo(y??document.body,{select:!0}),s.removeEventListener(r1,c),ik.remove(p)},0)}}},[s,l,c,p]);const m=v.useCallback(y=>{if(!n&&!r||p.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,g=document.activeElement;if(b&&g){const x=y.currentTarget,[w,T]=IH(x);w&&T?!y.shiftKey&&g===T?(y.preventDefault(),n&&vo(w,{select:!0})):y.shiftKey&&g===w&&(y.preventDefault(),n&&vo(T,{select:!0})):g===x&&y.preventDefault()}},[n,r,p.paused]);return E.jsx(Et.div,{tabIndex:-1,...a,ref:f,onKeyDown:m})});i1.displayName=NH;function PH(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(vo(r,{select:t}),document.activeElement!==n)return}function IH(e){const t=nk(e),n=rk(t,e),r=rk(t.reverse(),e);return[n,r]}function nk(e){const t=[],n=document.createTreeWalker(e,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();)t.push(n.currentNode);return t}function rk(e,t){for(const n of e)if(!OH(n,{upTo:t}))return n}function OH(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function DH(e){return e instanceof HTMLInputElement&&"select"in e}function vo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&DH(e)&&t&&e.select()}}var ik=LH();function LH(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ok(e,t),e.unshift(t)},remove(t){var n;e=ok(e,t),(n=e[0])==null||n.resume()}}}function ok(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function MH(e){return e.filter(t=>t.tagName!=="A")}var FH="Arrow",ak=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return E.jsx(Et.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});ak.displayName=FH;var BH=ak,o1="Popper",[sk,uk]=bi(o1),[jH,lk]=sk(o1),ck=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return E.jsx(jH,{scope:t,anchor:r,onAnchorChange:i,children:n})};ck.displayName=o1;var dk="PopperAnchor",fk=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=lk(dk,n),a=v.useRef(null),s=It(t,a);return v.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:E.jsx(Et.div,{...i,ref:s})});fk.displayName=dk;var a1="PopperContent",[UH,zH]=sk(a1),pk=v.forwardRef((e,t)=>{var $e,Ve,We,Ge,_t,Te;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...y}=e,b=lk(a1,n),[g,x]=v.useState(null),w=It(t,be=>x(be)),[T,_]=v.useState(null),C=yA(T),R=(C==null?void 0:C.width)??0,O=(C==null?void 0:C.height)??0,V=r+(o!=="center"?"-"+o:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},$=Array.isArray(l)?l:[l],z=$.length>0,X={padding:P,boundary:$.filter(VH),altBoundary:z},{refs:Y,floatingStyles:re,placement:ie,isPositioned:te,middlewareData:F}=uA({strategy:"fixed",placement:V,whileElementsMounted:(...be)=>iA(...be,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[lA({mainAxis:i+O,alignmentAxis:a}),u&&cA({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?dA():void 0,...X}),u&&fA({...X}),pA({...X,apply:({elements:be,rects:Ye,availableWidth:ze,availableHeight:yt})=>{const{width:vt,height:Ke}=Ye.reference,Fe=be.floating.style;Fe.setProperty("--radix-popper-available-width",`${ze}px`),Fe.setProperty("--radix-popper-available-height",`${yt}px`),Fe.setProperty("--radix-popper-anchor-width",`${vt}px`),Fe.setProperty("--radix-popper-anchor-height",`${Ke}px`)}}),T&&mA({element:T,padding:s}),$H({arrowWidth:R,arrowHeight:O}),f&&hA({strategy:"referenceHidden",...X})]}),[B,A]=gk(ie),oe=Pt(m);or(()=>{te&&(oe==null||oe())},[te,oe]);const he=($e=F.arrow)==null?void 0:$e.x,D=(Ve=F.arrow)==null?void 0:Ve.y,Oe=((We=F.arrow)==null?void 0:We.centerOffset)!==0,[ge,xe]=v.useState();return or(()=>{g&&xe(window.getComputedStyle(g).zIndex)},[g]),E.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:te?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(Ge=F.transformOrigin)==null?void 0:Ge.x,(_t=F.transformOrigin)==null?void 0:_t.y].join(" "),...((Te=F.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(UH,{scope:n,placedSide:B,onArrowChange:_,arrowX:he,arrowY:D,shouldHideArrow:Oe,children:E.jsx(Et.div,{"data-side":B,"data-align":A,...y,ref:w,style:{...y.style,animation:te?void 0:"none"}})})})});pk.displayName=a1;var hk="PopperArrow",HH={top:"bottom",right:"left",bottom:"top",left:"right"},mk=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=zH(hk,r),a=HH[o.placedSide];return E.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:E.jsx(BH,{...i,ref:n,style:{...i.style,display:"block"}})})});mk.displayName=hk;function VH(e){return e!==null}var $H=e=>({name:"transformOrigin",options:e,fn(t){var b,g,x;const{placement:n,rects:r,middlewareData:i}=t,a=((b=i.arrow)==null?void 0:b.centerOffset)!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,c]=gk(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((g=i.arrow)==null?void 0:g.x)??0)+s/2,p=(((x=i.arrow)==null?void 0:x.y)??0)+u/2;let m="",y="";return l==="bottom"?(m=a?d:`${f}px`,y=`${-u}px`):l==="top"?(m=a?d:`${f}px`,y=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,y=a?d:`${p}px`):l==="left"&&(m=`${r.floating.width+u}px`,y=a?d:`${p}px`),{data:{x:m,y}}}});function gk(e){const[t,n="center"]=e.split("-");return[t,n]}var WH=ck,YH=fk,qH=pk,GH=mk;function KH(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var ks=e=>{const{present:t,children:n}=e,r=XH(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=It(r.ref,QH(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:o}):null};ks.displayName="Presence";function XH(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),o=v.useRef("none"),a=e?"mounted":"unmounted",[s,u]=KH(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=Zf(r.current);o.current=s==="mounted"?l:"none"},[s]),or(()=>{const l=r.current,c=i.current;if(c!==e){const f=o.current,p=Zf(l);e?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),or(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=p=>{const y=Zf(r.current).includes(p.animationName);if(p.target===t&&y&&(u("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=p=>{p.target===t&&(o.current=Zf(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Zf(e){return(e==null?void 0:e.animationName)||"none"}function QH(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var s1="rovingFocusGroup.onEntryFocus",ZH={bubbles:!1,cancelable:!0},Jf="RovingFocusGroup",[u1,yk,JH]=qA(Jf),[eV,vk]=bi(Jf,[JH]),[tV,nV]=eV(Jf),xk=v.forwardRef((e,t)=>E.jsx(u1.Provider,{scope:e.__scopeRovingFocusGroup,children:E.jsx(u1.Slot,{scope:e.__scopeRovingFocusGroup,children:E.jsx(rV,{...e,ref:t})})}));xk.displayName=Jf;var rV=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...d}=e,f=v.useRef(null),p=It(t,f),m=GA(o),[y=null,b]=_l({prop:a,defaultProp:s,onChange:u}),[g,x]=v.useState(!1),w=Pt(l),T=yk(n),_=v.useRef(!1),[C,R]=v.useState(0);return v.useEffect(()=>{const O=f.current;if(O)return O.addEventListener(s1,w),()=>O.removeEventListener(s1,w)},[w]),E.jsx(tV,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:y,onItemFocus:v.useCallback(O=>b(O),[b]),onItemShiftTab:v.useCallback(()=>x(!0),[]),onFocusableItemAdd:v.useCallback(()=>R(O=>O+1),[]),onFocusableItemRemove:v.useCallback(()=>R(O=>O-1),[]),children:E.jsx(Et.div,{tabIndex:g||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:Se(e.onMouseDown,()=>{_.current=!0}),onFocus:Se(e.onFocus,O=>{const V=!_.current;if(O.target===O.currentTarget&&V&&!g){const P=new CustomEvent(s1,ZH);if(O.currentTarget.dispatchEvent(P),!P.defaultPrevented){const $=T().filter(ie=>ie.focusable),z=$.find(ie=>ie.active),X=$.find(ie=>ie.id===y),re=[z,X,...$].filter(Boolean).map(ie=>ie.ref.current);Ek(re,c)}}_.current=!1}),onBlur:Se(e.onBlur,()=>x(!1))})})}),wk="RovingFocusGroupItem",bk=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,s=fo(),u=o||s,l=nV(wk,n),c=l.currentTabStopId===u,d=yk(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=l;return v.useEffect(()=>{if(r)return f(),()=>p()},[r,f,p]),E.jsx(u1.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:E.jsx(Et.span,{tabIndex:c?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Se(e.onMouseDown,m=>{r?l.onItemFocus(u):m.preventDefault()}),onFocus:Se(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Se(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){l.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const y=aV(m,l.orientation,l.dir);if(y!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let g=d().filter(x=>x.focusable).map(x=>x.ref.current);if(y==="last")g.reverse();else if(y==="prev"||y==="next"){y==="prev"&&g.reverse();const x=g.indexOf(m.currentTarget);g=l.loop?sV(g,x+1):g.slice(x+1)}setTimeout(()=>Ek(g))}})})})});bk.displayName=wk;var iV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function oV(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function aV(e,t,n){const r=oV(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return iV[r]}function Ek(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function sV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var uV=xk,lV=bk,cV=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Rs=new WeakMap,ep=new WeakMap,tp={},l1=0,Tk=function(e){return e&&(e.host||Tk(e.parentNode))},dV=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Tk(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},fV=function(e,t,n,r){var i=dV(t,Array.isArray(e)?e:[e]);tp[n]||(tp[n]=new WeakMap);var o=tp[n],a=[],s=new Set,u=new Set(i),l=function(d){!d||s.has(d)||(s.add(d),l(d.parentNode))};i.forEach(l);var c=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else try{var p=f.getAttribute(r),m=p!==null&&p!=="false",y=(Rs.get(f)||0)+1,b=(o.get(f)||0)+1;Rs.set(f,y),o.set(f,b),a.push(f),y===1&&m&&ep.set(f,!0),b===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return c(t),s.clear(),l1++,function(){a.forEach(function(d){var f=Rs.get(d)-1,p=o.get(d)-1;Rs.set(d,f),o.set(d,p),f||(ep.has(d)||d.removeAttribute(r),ep.delete(d)),p||d.removeAttribute(n)}),l1--,l1||(Rs=new WeakMap,Rs=new WeakMap,ep=new WeakMap,tp={})}},c1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=cV(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),fV(r,i,n,"aria-hidden")):function(){return null}},np="right-scroll-bar-position",rp="width-before-scroll-bar",pV="with-scroll-bars-hidden",hV="--removed-body-scroll-bar-size";function d1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function mV(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var gV=typeof window<"u"?v.useLayoutEffect:v.useEffect,_k=new WeakMap;function yV(e,t){var n=mV(null,function(r){return e.forEach(function(i){return d1(i,r)})});return gV(function(){var r=_k.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||d1(s,null)}),o.forEach(function(s){i.has(s)||d1(s,a)})}_k.set(n,e)},[e]),n}function vV(e){return e}function xV(e,t){t===void 0&&(t=vV);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var u=function(){var c=a;a=[],c.forEach(o)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(c){a.push(c),l()},filter:function(c){return a=a.filter(c),n}}}};return i}function Ck(e){e===void 0&&(e={});var t=xV(null);return t.options=Mt({async:!0,ssr:!1},e),t}var Sk=function(e){var t=e.sideCar,n=ul(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Mt({},n))};Sk.isSideCarExport=!0;function Ak(e,t){return e.useMedium(t),Sk}var kk=Ck(),f1=function(){},ip=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:f1,onWheelCapture:f1,onTouchMoveCapture:f1}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,y=e.allowPinchZoom,b=e.as,g=b===void 0?"div":b,x=e.gapMode,w=ul(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=f,_=yV([n,t]),C=Mt(Mt({},w),i);return v.createElement(v.Fragment,null,c&&v.createElement(T,{sideCar:kk,removeScrollBar:l,shards:d,noIsolation:p,inert:m,setCallbacks:o,allowPinchZoom:!!y,lockRef:n,gapMode:x}),a?v.cloneElement(v.Children.only(s),Mt(Mt({},C),{ref:_})):v.createElement(g,Mt({},C,{className:u,ref:_}),s))});ip.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ip.classNames={fullWidth:rp,zeroRight:np};var Rk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Rk();return t&&e.setAttribute("nonce",t),e}function bV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function EV(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var TV=function(){var e=0,t=null;return{add:function(n){e==0&&(t=wV())&&(bV(t,n),EV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},_V=function(){var e=TV();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},CV=function(){var e=_V(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},SV={left:0,top:0,right:0,gap:0},p1=function(e){return parseInt(e||"",10)||0},AV=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[p1(n),p1(r),p1(i)]},kV=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return SV;var t=AV(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},RV=CV(),Ns="data-scroll-locked",NV=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
346
|
+
*/var ws=v;function C7(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var S7=typeof Object.is=="function"?Object.is:C7,A7=ws.useState,k7=ws.useEffect,R7=ws.useLayoutEffect,N7=ws.useDebugValue;function P7(e,t){var n=t(),r=A7({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return R7(function(){i.value=n,i.getSnapshot=t,py(i)&&o({inst:i})},[e,n,t]),k7(function(){return py(i)&&o({inst:i}),e(function(){py(i)&&o({inst:i})})},[e]),N7(n),n}function py(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!S7(e,n)}catch{return!0}}function I7(e,t){return t()}var O7=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?I7:P7;CS.useSyncExternalStore=ws.useSyncExternalStore!==void 0?ws.useSyncExternalStore:O7,_S.exports=CS;var D7=_S.exports;const uo=()=>{},_n=uo(),hy=Object,He=e=>e===_n,zr=e=>typeof e=="function",lo=(e,t)=>({...e,...t}),L7=e=>zr(e.then),kf=new WeakMap;let M7=0;const yl=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let i,o;if(hy(e)===e&&!r&&n!=RegExp){if(i=kf.get(e),i)return i;if(i=++M7+"~",kf.set(e,i),n==Array){for(i="@",o=0;o<e.length;o++)i+=yl(e[o])+",";kf.set(e,i)}if(n==hy){i="#";const a=hy.keys(e).sort();for(;!He(o=a.pop());)He(e[o])||(i+=o+":"+yl(e[o])+",");kf.set(e,i)}}else i=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return i},wi=new WeakMap,my={},Rf={},gy="undefined",Nf=typeof window!=gy,yy=typeof document!=gy,F7=()=>Nf&&typeof window.requestAnimationFrame!=gy,SS=(e,t)=>{const n=wi.get(e);return[()=>!He(t)&&e.get(t)||my,r=>{if(!He(t)){const i=e.get(t);t in Rf||(Rf[t]=i),n[5](t,lo(i,r),i||my)}},n[6],()=>!He(t)&&t in Rf?Rf[t]:!He(t)&&e.get(t)||my]};let vy=!0;const B7=()=>vy,[xy,wy]=Nf&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[uo,uo],j7=()=>{const e=yy&&document.visibilityState;return He(e)||e!=="hidden"},U7=e=>(yy&&document.addEventListener("visibilitychange",e),xy("focus",e),()=>{yy&&document.removeEventListener("visibilitychange",e),wy("focus",e)}),z7=e=>{const t=()=>{vy=!0,e()},n=()=>{vy=!1};return xy("online",t),xy("offline",n),()=>{wy("online",t),wy("offline",n)}},H7={isOnline:B7,isVisible:j7},V7={initFocus:U7,initReconnect:z7},AS=!ln.useId,vl=!Nf||"Deno"in window,$7=e=>F7()?window.requestAnimationFrame(e):setTimeout(e,1),by=vl?v.useEffect:v.useLayoutEffect,Ey=typeof navigator<"u"&&navigator.connection,kS=!vl&&Ey&&(["slow-2g","2g"].includes(Ey.effectiveType)||Ey.saveData),Ty=e=>{if(zr(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?yl(e):"",[e,t]};let W7=0;const _y=()=>++W7,RS=0,NS=1,PS=2;var xl={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:RS,MUTATE_EVENT:PS,RECONNECT_EVENT:NS};async function IS(...e){const[t,n,r,i]=e,o=lo({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let a=o.populateCache;const s=o.rollbackOnError;let u=o.optimisticData;const l=f=>typeof s=="function"?s(f):s!==!1,c=o.throwOnError;if(zr(n)){const f=n,p=[],m=t.keys();for(const y of m)!/^\$(inf|sub)\$/.test(y)&&f(t.get(y)._k)&&p.push(y);return Promise.all(p.map(d))}return d(n);async function d(f){const[p]=Ty(f);if(!p)return;const[m,y]=SS(t,p),[b,g,x,w]=wi.get(t),T=()=>{const Q=b[p];return(zr(o.revalidate)?o.revalidate(m().data,f):o.revalidate!==!1)&&(delete x[p],delete w[p],Q&&Q[0])?Q[0](PS).then(()=>m().data):m().data};if(e.length<3)return T();let _=r,C;const R=_y();g[p]=[R,0];const O=!He(u),V=m(),P=V.data,$=V._c,z=He($)?P:$;if(O&&(u=zr(u)?u(z,P):u,y({data:u,_c:z})),zr(_))try{_=_(z)}catch(Q){C=Q}if(_&&L7(_))if(_=await _.catch(Q=>{C=Q}),R!==g[p][0]){if(C)throw C;return _}else C&&O&&l(C)&&(a=!0,y({data:z,_c:_n}));if(a&&!C)if(zr(a)){const Q=a(_,z);y({data:Q,error:_n,_c:_n})}else y({data:_,error:_n,_c:_n});if(g[p][1]=_y(),Promise.resolve(T()).then(()=>{y({_c:_n})}),C){if(c)throw C;return}return _}}const OS=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Y7=(e,t)=>{if(!wi.has(e)){const n=lo(V7,t),r={},i=IS.bind(_n,e);let o=uo;const a={},s=(c,d)=>{const f=a[c]||[];return a[c]=f,f.push(d),()=>f.splice(f.indexOf(d),1)},u=(c,d,f)=>{e.set(c,d);const p=a[c];if(p)for(const m of p)m(d,f)},l=()=>{if(!wi.has(e)&&(wi.set(e,[r,{},{},{},i,u,s]),!vl)){const c=n.initFocus(setTimeout.bind(_n,OS.bind(_n,r,RS))),d=n.initReconnect(setTimeout.bind(_n,OS.bind(_n,r,NS)));o=()=>{c&&c(),d&&d(),wi.delete(e)}}};return l(),[e,i,l,o]}return[e,wi.get(e)[4]]},q7=(e,t,n,r,i)=>{const o=n.errorRetryCount,a=i.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!He(o)&&a>o||setTimeout(r,s,i)},G7=(e,t)=>yl(e)==yl(t),[DS,K7]=Y7(new Map),X7=lo({onLoadingSlow:uo,onSuccess:uo,onError:uo,onErrorRetry:q7,onDiscarded:uo,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:kS?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:kS?5e3:3e3,compare:G7,isPaused:()=>!1,cache:DS,mutate:K7,fallback:{}},H7),Q7=(e,t)=>{const n=lo(e,t);if(t){const{use:r,fallback:i}=e,{use:o,fallback:a}=t;r&&o&&(n.use=r.concat(o)),i&&a&&(n.fallback=lo(i,a))}return n},Z7=v.createContext({}),J7="$inf$",LS=Nf&&window.__SWR_DEVTOOLS_USE__,eU=LS?window.__SWR_DEVTOOLS_USE__:[],tU=()=>{LS&&(window.__SWR_DEVTOOLS_REACT__=ln)},nU=e=>zr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],rU=()=>lo(X7,v.useContext(Z7)),iU=e=>(t,n,r)=>e(t,n&&((...o)=>{const[a]=Ty(t),[,,,s]=wi.get(DS);if(a.startsWith(J7))return n(...o);const u=s[a];return He(u)?n(...o):(delete s[a],u)}),r),oU=eU.concat(iU),aU=e=>function(...n){const r=rU(),[i,o,a]=nU(n),s=Q7(r,a);let u=e;const{use:l}=s,c=(l||[]).concat(oU);for(let d=c.length;d--;)u=c[d](u);return u(i,o||s.fetcher||null,s)},sU=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i>=0&&(r[i]=r[r.length-1],r.pop())}};tU();const MS=ln.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),Cy={dedupe:!0},uU=aU((e,t,n)=>{const{cache:r,compare:i,suspense:o,fallbackData:a,revalidateOnMount:s,revalidateIfStale:u,refreshInterval:l,refreshWhenHidden:c,refreshWhenOffline:d,keepPreviousData:f}=n,[p,m,y,b]=wi.get(r),[g,x]=Ty(e),w=v.useRef(!1),T=v.useRef(!1),_=v.useRef(g),C=v.useRef(t),R=v.useRef(n),O=()=>R.current,V=()=>O().isVisible()&&O().isOnline(),[P,$,z,Q]=SS(r,g),Y=v.useRef({}).current,re=He(a)?n.fallback[g]:a,ie=(Te,be)=>{for(const Ye in Y){const ze=Ye;if(ze==="data"){if(!i(Te[ze],be[ze])&&(!He(Te[ze])||!i(ge,be[ze])))return!1}else if(be[ze]!==Te[ze])return!1}return!0},te=v.useMemo(()=>{const Te=!g||!t?!1:He(s)?O().isPaused()||o?!1:He(u)?!0:u:s,be=Fe=>{const Ot=lo(Fe);return delete Ot._k,Te?{isValidating:!0,isLoading:!0,...Ot}:Ot},Ye=P(),ze=Q(),yt=be(Ye),vt=Ye===ze?yt:be(ze);let Ke=yt;return[()=>{const Fe=be(P());return ie(Fe,Ke)?(Ke.data=Fe.data,Ke.isLoading=Fe.isLoading,Ke.isValidating=Fe.isValidating,Ke.error=Fe.error,Ke):(Ke=Fe,Fe)},()=>vt]},[r,g]),F=D7.useSyncExternalStore(v.useCallback(Te=>z(g,(be,Ye)=>{ie(Ye,be)||Te()}),[r,g]),te[0],te[1]),B=!w.current,A=p[g]&&p[g].length>0,oe=F.data,he=He(oe)?re:oe,D=F.error,Oe=v.useRef(he),ge=f?He(oe)?Oe.current:oe:he,xe=A&&!He(D)?!1:B&&!He(s)?s:O().isPaused()?!1:o?He(he)?!1:u:He(he)||u,$e=!!(g&&t&&B&&xe),Ve=He(F.isValidating)?$e:F.isValidating,We=He(F.isLoading)?$e:F.isLoading,Ge=v.useCallback(async Te=>{const be=C.current;if(!g||!be||T.current||O().isPaused())return!1;let Ye,ze,yt=!0;const vt=Te||{},Ke=!y[g]||!vt.dedupe,Fe=()=>AS?!T.current&&g===_.current&&w.current:g===_.current,Ot={isValidating:!1,isLoading:!1},Po=()=>{$(Ot)},Io=()=>{const ne=y[g];ne&&ne[1]===ze&&delete y[g]},Oo={isValidating:!0};He(P().data)&&(Oo.isLoading=!0);try{if(Ke&&($(Oo),n.loadingTimeout&&He(P().data)&&setTimeout(()=>{yt&&Fe()&&O().onLoadingSlow(g,n)},n.loadingTimeout),y[g]=[be(x),_y()]),[Ye,ze]=y[g],Ye=await Ye,Ke&&setTimeout(Io,n.dedupingInterval),!y[g]||y[g][1]!==ze)return Ke&&Fe()&&O().onDiscarded(g),!1;Ot.error=_n;const ne=m[g];if(!He(ne)&&(ze<=ne[0]||ze<=ne[1]||ne[1]===0))return Po(),Ke&&Fe()&&O().onDiscarded(g),!1;const de=P().data;Ot.data=i(de,Ye)?de:Ye,Ke&&Fe()&&O().onSuccess(Ye,g,n)}catch(ne){Io();const de=O(),{shouldRetryOnError:j}=de;de.isPaused()||(Ot.error=ne,Ke&&Fe()&&(de.onError(ne,g,de),(j===!0||zr(j)&&j(ne))&&(!O().revalidateOnFocus||!O().revalidateOnReconnect||V())&&de.onErrorRetry(ne,g,de,q=>{const ce=p[g];ce&&ce[0]&&ce[0](xl.ERROR_REVALIDATE_EVENT,q)},{retryCount:(vt.retryCount||0)+1,dedupe:!0})))}return yt=!1,Po(),!0},[g,r]),_t=v.useCallback((...Te)=>IS(r,_.current,...Te),[]);if(by(()=>{C.current=t,R.current=n,He(oe)||(Oe.current=oe)}),by(()=>{if(!g)return;const Te=Ge.bind(_n,Cy);let be=0;const ze=sU(g,p,(yt,vt={})=>{if(yt==xl.FOCUS_EVENT){const Ke=Date.now();O().revalidateOnFocus&&Ke>be&&V()&&(be=Ke+O().focusThrottleInterval,Te())}else if(yt==xl.RECONNECT_EVENT)O().revalidateOnReconnect&&V()&&Te();else{if(yt==xl.MUTATE_EVENT)return Ge();if(yt==xl.ERROR_REVALIDATE_EVENT)return Ge(vt)}});return T.current=!1,_.current=g,w.current=!0,$({_k:x}),xe&&(He(he)||vl?Te():$7(Te)),()=>{T.current=!0,ze()}},[g]),by(()=>{let Te;function be(){const ze=zr(l)?l(P().data):l;ze&&Te!==-1&&(Te=setTimeout(Ye,ze))}function Ye(){!P().error&&(c||O().isVisible())&&(d||O().isOnline())?Ge(Cy).then(be):be()}return be(),()=>{Te&&(clearTimeout(Te),Te=-1)}},[l,c,d,g]),v.useDebugValue(ge),o&&He(he)&&g){if(!AS&&vl)throw new Error("Fallback data is required when using suspense in SSR.");C.current=t,R.current=n,T.current=!1;const Te=b[g];if(!He(Te)){const be=_t(Te);MS(be)}if(He(D)){const be=Ge(Cy);He(ge)||(be.status="fulfilled",be.value=!0),MS(be)}else throw D}return{mutate:_t,get data(){return Y.data=!0,ge},get error(){return Y.error=!0,D},get isValidating(){return Y.isValidating=!0,Ve},get isLoading(){return Y.isLoading=!0,We}}});function Pf(){const{widgetCtx:e}=ir();return uU([e.config.token],e.api.widgetPrelude,{revalidateOnFocus:!1})}function wl(){const{widgetCtx:e}=ir();return{routerState:ml(e.routerCtx.state),toSessionsScreen:e.routerCtx.toSessionsScreen,toChatScreen:e.routerCtx.toChatScreen}}var FS={};const lU=NO(e9);var If={},BS;function cU(){if(BS)return If;BS=1,Object.defineProperty(If,"__esModule",{value:!0});var e=v;function t(){var n=e.useRef(!1),r=e.useCallback(function(){return n.current},[]);return e.useEffect(function(){return n.current=!0,function(){n.current=!1}},[]),r}return If.default=t,If}Object.defineProperty(FS,"__esModule",{value:!0});var Sy=lU,Ay=v,dU=Sy.__importDefault(cU());function fU(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=Ay.useRef(0),i=dU.default(),o=Ay.useState(n),a=o[0],s=o[1],u=Ay.useCallback(function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var d=++r.current;return a.loading||s(function(f){return Sy.__assign(Sy.__assign({},f),{loading:!0})}),e.apply(void 0,l).then(function(f){return i()&&d===r.current&&s({value:f,loading:!1}),f},function(f){return i()&&d===r.current&&s({error:f,loading:!1}),f})},t);return[a,u]}var pU=FS.default=fU;const co=new Map;function hU(){const[e,t]=v.useState([]),{widgetCtx:{api:n}}=ir();function r(c){const d=c.map(f=>({file:f,id:cy(),status:"pending",progress:0}));t(f=>[...f,...d]),d.forEach(a)}function i(c,d){t(f=>f.map(p=>p.id===c?{...p,...d}:p))}function o(c){t(d=>d.filter(f=>f.id!==c))}const a=async c=>{const d=new AbortController;co.set(c.id,d);try{t(p=>p.map(m=>m.id===c.id?{...m,status:"uploading",progress:0}:m));const f=await n.uploadFile(c,{signal:d.signal,onUploadProgress:p=>{if(!p.total)return;const m=Math.round(p.loaded*100/p.total);i(c.id,{progress:m})}});i(c.id,{status:"success",fileUrl:f.fileUrl,progress:100})}catch(f){d.signal.aborted||i(c.id,{status:"error",error:f instanceof Error?f.message:"Upload failed",progress:0})}finally{co.delete(c.id)}},s=c=>{const d=co.get(c);d&&(d.abort(),co.delete(c)),o(c)},u=v.useMemo(()=>e.filter(c=>c.status==="success"&&c.fileUrl),[e]);function l(){co.forEach(c=>c.abort()),co.clear(),t([])}return v.useEffect(()=>()=>{co.forEach(c=>c.abort()),co.clear()},[]),{allFiles:e,appendFiles:r,handleCancelUpload:s,successFiles:u,emptyTheFiles:l,getFileById:c=>e.find(d=>d.id===c),getUploadProgress:c=>{var d;return((d=e.find(f=>f.id===c))==null?void 0:d.progress)??0},getUploadStatus:c=>{var d;return(d=e.find(f=>f.id===c))==null?void 0:d.status},hasErrors:e.some(c=>c.status==="error"),isUploading:e.some(c=>c.status==="uploading")}}function Cn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function mU(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function jS(...e){return t=>e.forEach(n=>mU(n,t))}function Hr(...e){return v.useCallback(jS(...e),e)}function gU(e,t){const n=v.createContext(t),r=o=>{const{children:a,...s}=o,u=v.useMemo(()=>s,Object.values(s));return E.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function i(o){const a=v.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function bi(e,t=[]){let n=[];function r(o,a){const s=v.createContext(a),u=n.length;n=[...n,a];const l=d=>{var g;const{scope:f,children:p,...m}=d,y=((g=f==null?void 0:f[e])==null?void 0:g[u])||s,b=v.useMemo(()=>m,Object.values(m));return E.jsx(y.Provider,{value:b,children:p})};l.displayName=o+"Provider";function c(d,f){var y;const p=((y=f==null?void 0:f[e])==null?void 0:y[u])||s,m=v.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[l,c]}const i=()=>{const o=n.map(a=>v.createContext(a));return function(s){const u=(s==null?void 0:s[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,yU(i,...t)]}function yU(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const d=u(o)[`__scope${l}`];return{...s,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Of=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),o=i.find(vU);if(o){const a=o.props.children,s=i.map(u=>u===o?v.Children.count(a)>1?v.Children.only(null):v.isValidElement(a)?a.props.children:null:u);return E.jsx(ky,{...r,ref:t,children:v.isValidElement(a)?v.cloneElement(a,void 0,s):null})}return E.jsx(ky,{...r,ref:t,children:n})});Of.displayName="Slot";var ky=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=wU(n);return v.cloneElement(n,{...xU(r,n.props),ref:t?jS(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});ky.displayName="SlotClone";var US=({children:e})=>E.jsx(E.Fragment,{children:e});function vU(e){return v.isValidElement(e)&&e.type===US}function xU(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function wU(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],zn=bU.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Of:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function EU(e,t){e&&Zo.flushSync(()=>e.dispatchEvent(t))}function Pt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ry(e,t=globalThis==null?void 0:globalThis.document){const n=Pt(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var TU="DismissableLayer",Ny="dismissableLayer.update",_U="dismissableLayer.pointerDownOutside",CU="dismissableLayer.focusOutside",zS,HS=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Py=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=v.useContext(HS),[c,d]=v.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),m=Hr(t,R=>d(R)),y=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(b),x=c?y.indexOf(c):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,T=x>=g,_=kU(R=>{const O=R.target,V=[...l.branches].some(P=>P.contains(O));!T||V||(i==null||i(R),a==null||a(R),R.defaultPrevented||s==null||s())},f),C=RU(R=>{const O=R.target;[...l.branches].some(P=>P.contains(O))||(o==null||o(R),a==null||a(R),R.defaultPrevented||s==null||s())},f);return Ry(R=>{x===l.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&s&&(R.preventDefault(),s()))},f),v.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(zS=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),VS(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=zS)}},[c,f,n,l]),v.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),VS())},[c,l]),v.useEffect(()=>{const R=()=>p({});return document.addEventListener(Ny,R),()=>document.removeEventListener(Ny,R)},[]),E.jsx(zn.div,{...u,ref:m,style:{pointerEvents:w?T?"auto":"none":void 0,...e.style},onFocusCapture:Cn(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Cn(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Cn(e.onPointerDownCapture,_.onPointerDownCapture)})});Py.displayName=TU;var SU="DismissableLayerBranch",AU=v.forwardRef((e,t)=>{const n=v.useContext(HS),r=v.useRef(null),i=Hr(t,r);return v.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),E.jsx(zn.div,{...e,ref:i})});AU.displayName=SU;function kU(e,t=globalThis==null?void 0:globalThis.document){const n=Pt(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){$S(_U,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function RU(e,t=globalThis==null?void 0:globalThis.document){const n=Pt(e),r=v.useRef(!1);return v.useEffect(()=>{const i=o=>{o.target&&!r.current&&$S(CU,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VS(){const e=new CustomEvent(Ny);document.dispatchEvent(e)}function $S(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?EU(i,o):i.dispatchEvent(o)}var or=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},NU=YO.useId||(()=>{}),PU=0;function fo(e){const[t,n]=v.useState(NU());return or(()=>{e||n(r=>r??String(PU++))},[e]),e||(t?`radix-${t}`:"")}const IU=["top","right","bottom","left"],po=Math.min,Hn=Math.max,Df=Math.round,Lf=Math.floor,ho=e=>({x:e,y:e}),OU={left:"right",right:"left",bottom:"top",top:"bottom"},DU={start:"end",end:"start"};function Iy(e,t,n){return Hn(e,po(t,n))}function Ei(e,t){return typeof e=="function"?e(t):e}function Ti(e){return e.split("-")[0]}function bs(e){return e.split("-")[1]}function Oy(e){return e==="x"?"y":"x"}function Dy(e){return e==="y"?"height":"width"}function mo(e){return["top","bottom"].includes(Ti(e))?"y":"x"}function Ly(e){return Oy(mo(e))}function LU(e,t,n){n===void 0&&(n=!1);const r=bs(e),i=Ly(e),o=Dy(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Mf(a)),[a,Mf(a)]}function MU(e){const t=Mf(e);return[My(e),t,My(t)]}function My(e){return e.replace(/start|end/g,t=>DU[t])}function FU(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function BU(e,t,n,r){const i=bs(e);let o=FU(Ti(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(My)))),o}function Mf(e){return e.replace(/left|right|bottom|top/g,t=>OU[t])}function jU(e){return{top:0,right:0,bottom:0,left:0,...e}}function WS(e){return typeof e!="number"?jU(e):{top:e,right:e,bottom:e,left:e}}function Ff(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function YS(e,t,n){let{reference:r,floating:i}=e;const o=mo(t),a=Ly(t),s=Dy(a),u=Ti(t),l=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(bs(t)){case"start":p[a]-=f*(n&&l?-1:1);break;case"end":p[a]+=f*(n&&l?-1:1);break}return p}const UU=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=YS(l,r,u),f=r,p={},m=0;for(let y=0;y<s.length;y++){const{name:b,fn:g}=s[y],{x,y:w,data:T,reset:_}=await g({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});c=x??c,d=w??d,p={...p,[b]:{...p[b],...T}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(l=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:c,y:d}=YS(l,f,u)),y=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}};async function bl(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ei(t,e),m=WS(p),b=s[f?d==="floating"?"reference":"floating":d],g=Ff(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),x=d==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),T=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},_=Ff(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:w,strategy:u}):x);return{top:(g.top-_.top+m.top)/T.y,bottom:(_.bottom-g.bottom+m.bottom)/T.y,left:(g.left-_.left+m.left)/T.x,right:(_.right-g.right+m.right)/T.x}}const zU=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:u}=t,{element:l,padding:c=0}=Ei(e,t)||{};if(l==null)return{};const d=WS(c),f={x:n,y:r},p=Ly(i),m=Dy(p),y=await a.getDimensions(l),b=p==="y",g=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",T=o.reference[m]+o.reference[p]-f[p]-o.floating[m],_=f[p]-o.reference[p],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let R=C?C[w]:0;(!R||!await(a.isElement==null?void 0:a.isElement(C)))&&(R=s.floating[w]||o.floating[m]);const O=T/2-_/2,V=R/2-y[m]/2-1,P=po(d[g],V),$=po(d[x],V),z=P,Q=R-y[m]-$,Y=R/2-y[m]/2+O,re=Iy(z,Y,Q),ie=!u.arrow&&bs(i)!=null&&Y!==re&&o.reference[m]/2-(Y<z?P:$)-y[m]/2<0,te=ie?Y<z?Y-z:Y-Q:0;return{[p]:f[p]+te,data:{[p]:re,centerOffset:Y-re-te,...ie&&{alignmentOffset:te}},reset:ie}}}),HU=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:u,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...b}=Ei(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const g=Ti(i),x=mo(s),w=Ti(s)===s,T=await(u.isRTL==null?void 0:u.isRTL(l.floating)),_=f||(w||!y?[Mf(s)]:MU(s)),C=m!=="none";!f&&C&&_.push(...BU(s,y,m,T));const R=[s,..._],O=await bl(t,b),V=[];let P=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&V.push(O[g]),d){const Y=LU(i,a,T);V.push(O[Y[0]],O[Y[1]])}if(P=[...P,{placement:i,overflows:V}],!V.every(Y=>Y<=0)){var $,z;const Y=((($=o.flip)==null?void 0:$.index)||0)+1,re=R[Y];if(re)return{data:{index:Y,overflows:P},reset:{placement:re}};let ie=(z=P.filter(te=>te.overflows[0]<=0).sort((te,F)=>te.overflows[1]-F.overflows[1])[0])==null?void 0:z.placement;if(!ie)switch(p){case"bestFit":{var Q;const te=(Q=P.filter(F=>{if(C){const B=mo(F.placement);return B===x||B==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(B=>B>0).reduce((B,A)=>B+A,0)]).sort((F,B)=>F[1]-B[1])[0])==null?void 0:Q[0];te&&(ie=te);break}case"initialPlacement":ie=s;break}if(i!==ie)return{reset:{placement:ie}}}return{}}}};function qS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function GS(e){return IU.some(t=>e[t]>=0)}const VU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Ei(e,t);switch(r){case"referenceHidden":{const o=await bl(t,{...i,elementContext:"reference"}),a=qS(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:GS(a)}}}case"escaped":{const o=await bl(t,{...i,altBoundary:!0}),a=qS(o,n.floating);return{data:{escapedOffsets:a,escaped:GS(a)}}}default:return{}}}}};async function $U(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Ti(n),s=bs(n),u=mo(n)==="y",l=["left","top"].includes(a)?-1:1,c=o&&u?-1:1,d=Ei(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),u?{x:p*c,y:f*l}:{x:f*l,y:p*c}}const WU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,u=await $U(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:a}}}}},YU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:g,y:x}=b;return{x:g,y:x}}},...u}=Ei(e,t),l={x:n,y:r},c=await bl(t,u),d=mo(Ti(i)),f=Oy(d);let p=l[f],m=l[d];if(o){const b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",x=p+c[b],w=p-c[g];p=Iy(x,p,w)}if(a){const b=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=m+c[b],w=m-c[g];m=Iy(x,m,w)}const y=s.fn({...t,[f]:p,[d]:m});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[f]:o,[d]:a}}}}}},qU=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=Ei(e,t),c={x:n,y:r},d=mo(i),f=Oy(d);let p=c[f],m=c[d];const y=Ei(s,t),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(u){const w=f==="y"?"height":"width",T=o.reference[f]-o.floating[w]+b.mainAxis,_=o.reference[f]+o.reference[w]-b.mainAxis;p<T?p=T:p>_&&(p=_)}if(l){var g,x;const w=f==="y"?"width":"height",T=["top","left"].includes(Ti(i)),_=o.reference[d]-o.floating[w]+(T&&((g=a.offset)==null?void 0:g[d])||0)+(T?0:b.crossAxis),C=o.reference[d]+o.reference[w]+(T?0:((x=a.offset)==null?void 0:x[d])||0)-(T?b.crossAxis:0);m<_?m=_:m>C&&(m=C)}return{[f]:p,[d]:m}}}},GU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:u=()=>{},...l}=Ei(e,t),c=await bl(t,l),d=Ti(i),f=bs(i),p=mo(i)==="y",{width:m,height:y}=o.floating;let b,g;d==="top"||d==="bottom"?(b=d,g=f===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,b=f==="end"?"top":"bottom");const x=y-c.top-c.bottom,w=m-c.left-c.right,T=po(y-c[b],x),_=po(m-c[g],w),C=!t.middlewareData.shift;let R=T,O=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=x),C&&!f){const P=Hn(c.left,0),$=Hn(c.right,0),z=Hn(c.top,0),Q=Hn(c.bottom,0);p?O=m-2*(P!==0||$!==0?P+$:Hn(c.left,c.right)):R=y-2*(z!==0||Q!==0?z+Q:Hn(c.top,c.bottom))}await u({...t,availableWidth:O,availableHeight:R});const V=await a.getDimensions(s.floating);return m!==V.width||y!==V.height?{reset:{rects:!0}}:{}}}};function Bf(){return typeof window<"u"}function Es(e){return KS(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vr(e){var t;return(t=(KS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function KS(e){return Bf()?e instanceof Node||e instanceof Vn(e).Node:!1}function _r(e){return Bf()?e instanceof Element||e instanceof Vn(e).Element:!1}function $r(e){return Bf()?e instanceof HTMLElement||e instanceof Vn(e).HTMLElement:!1}function XS(e){return!Bf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}function El(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function KU(e){return["table","td","th"].includes(Es(e))}function jf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Fy(e){const t=By(),n=_r(e)?Cr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function XU(e){let t=go(e);for(;$r(t)&&!Ts(t);){if(Fy(t))return t;if(jf(t))return null;t=go(t)}return null}function By(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ts(e){return["html","body","#document"].includes(Es(e))}function Cr(e){return Vn(e).getComputedStyle(e)}function Uf(e){return _r(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function go(e){if(Es(e)==="html")return e;const t=e.assignedSlot||e.parentNode||XS(e)&&e.host||Vr(e);return XS(t)?t.host:t}function QS(e){const t=go(e);return Ts(t)?e.ownerDocument?e.ownerDocument.body:e.body:$r(t)&&El(t)?t:QS(t)}function Tl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=QS(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Vn(i);if(o){const s=jy(a);return t.concat(a,a.visualViewport||[],El(i)?i:[],s&&n?Tl(s):[])}return t.concat(i,Tl(i,[],n))}function jy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ZS(e){const t=Cr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=$r(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Df(n)!==o||Df(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Uy(e){return _r(e)?e:e.contextElement}function _s(e){const t=Uy(e);if(!$r(t))return ho(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=ZS(t);let a=(o?Df(n.width):n.width)/r,s=(o?Df(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const QU=ho(0);function JS(e){const t=Vn(e);return!By()||!t.visualViewport?QU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ZU(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vn(e)?!1:t}function ua(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Uy(e);let a=ho(1);t&&(r?_r(r)&&(a=_s(r)):a=_s(e));const s=ZU(o,n,r)?JS(o):ho(0);let u=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){const f=Vn(o),p=r&&_r(r)?Vn(r):r;let m=f,y=jy(m);for(;y&&r&&p!==m;){const b=_s(y),g=y.getBoundingClientRect(),x=Cr(y),w=g.left+(y.clientLeft+parseFloat(x.paddingLeft))*b.x,T=g.top+(y.clientTop+parseFloat(x.paddingTop))*b.y;u*=b.x,l*=b.y,c*=b.x,d*=b.y,u+=w,l+=T,m=Vn(y),y=jy(m)}}return Ff({width:c,height:d,x:u,y:l})}function JU(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Vr(r),s=t?jf(t.floating):!1;if(r===a||s&&o)return n;let u={scrollLeft:0,scrollTop:0},l=ho(1);const c=ho(0),d=$r(r);if((d||!d&&!o)&&((Es(r)!=="body"||El(a))&&(u=Uf(r)),$r(r))){const f=ua(r);l=_s(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function ez(e){return Array.from(e.getClientRects())}function zy(e,t){const n=Uf(e).scrollLeft;return t?t.left+n:ua(Vr(e)).left+n}function tz(e){const t=Vr(e),n=Uf(e),r=e.ownerDocument.body,i=Hn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Hn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+zy(e);const s=-n.scrollTop;return Cr(r).direction==="rtl"&&(a+=Hn(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function nz(e,t){const n=Vn(e),r=Vr(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;const l=By();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:a,x:s,y:u}}function rz(e,t){const n=ua(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=$r(e)?_s(e):ho(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,u=i*o.x,l=r*o.y;return{width:a,height:s,x:u,y:l}}function eA(e,t,n){let r;if(t==="viewport")r=nz(e,n);else if(t==="document")r=tz(Vr(e));else if(_r(t))r=rz(t,n);else{const i=JS(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Ff(r)}function tA(e,t){const n=go(e);return n===t||!_r(n)||Ts(n)?!1:Cr(n).position==="fixed"||tA(n,t)}function iz(e,t){const n=t.get(e);if(n)return n;let r=Tl(e,[],!1).filter(s=>_r(s)&&Es(s)!=="body"),i=null;const o=Cr(e).position==="fixed";let a=o?go(e):e;for(;_r(a)&&!Ts(a);){const s=Cr(a),u=Fy(a);!u&&s.position==="fixed"&&(i=null),(o?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||El(a)&&!u&&tA(e,a))?r=r.filter(c=>c!==a):i=s,a=go(a)}return t.set(e,r),r}function oz(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?jf(t)?[]:iz(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((l,c)=>{const d=eA(t,c,i);return l.top=Hn(d.top,l.top),l.right=po(d.right,l.right),l.bottom=po(d.bottom,l.bottom),l.left=Hn(d.left,l.left),l},eA(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function az(e){const{width:t,height:n}=ZS(e);return{width:t,height:n}}function sz(e,t,n){const r=$r(t),i=Vr(t),o=n==="fixed",a=ua(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const u=ho(0);if(r||!r&&!o)if((Es(t)!=="body"||El(i))&&(s=Uf(t)),r){const p=ua(t,!0,o,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else i&&(u.x=zy(i));let l=0,c=0;if(i&&!r&&!o){const p=i.getBoundingClientRect();c=p.top+s.scrollTop,l=p.left+s.scrollLeft-zy(i,p)}const d=a.left+s.scrollLeft-u.x-l,f=a.top+s.scrollTop-u.y-c;return{x:d,y:f,width:a.width,height:a.height}}function Hy(e){return Cr(e).position==="static"}function nA(e,t){if(!$r(e)||Cr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vr(e)===n&&(n=n.ownerDocument.body),n}function rA(e,t){const n=Vn(e);if(jf(e))return n;if(!$r(e)){let i=go(e);for(;i&&!Ts(i);){if(_r(i)&&!Hy(i))return i;i=go(i)}return n}let r=nA(e,t);for(;r&&KU(r)&&Hy(r);)r=nA(r,t);return r&&Ts(r)&&Hy(r)&&!Fy(r)?n:r||XU(e)||n}const uz=async function(e){const t=this.getOffsetParent||rA,n=this.getDimensions,r=await n(e.floating);return{reference:sz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lz(e){return Cr(e).direction==="rtl"}const cz={convertOffsetParentRelativeRectToViewportRelativeRect:JU,getDocumentElement:Vr,getClippingRect:oz,getOffsetParent:rA,getElementRects:uz,getClientRects:ez,getDimensions:az,getScale:_s,isElement:_r,isRTL:lz};function dz(e,t){let n=null,r;const i=Vr(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),o();const{left:l,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p=Lf(c),m=Lf(i.clientWidth-(l+d)),y=Lf(i.clientHeight-(c+f)),b=Lf(l),x={rootMargin:-p+"px "+-m+"px "+-y+"px "+-b+"px",threshold:Hn(0,po(1,u))||1};let w=!0;function T(_){const C=_[0].intersectionRatio;if(C!==u){if(!w)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(T,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,x)}n.observe(e)}return a(!0),o}function iA(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Uy(e),c=i||o?[...l?Tl(l):[],...Tl(t)]:[];c.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const d=l&&s?dz(l,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(g=>{let[x]=g;x&&x.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let m,y=u?ua(e):null;u&&b();function b(){const g=ua(e);y&&(g.x!==y.x||g.y!==y.y||g.width!==y.width||g.height!==y.height)&&n(),y=g,m=requestAnimationFrame(b)}return n(),()=>{var g;c.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),d==null||d(),(g=p)==null||g.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const fz=WU,pz=YU,hz=HU,mz=GU,gz=VU,oA=zU,yz=qU,vz=(e,t,n)=>{const r=new Map,i={platform:cz,...n},o={...i.platform,_c:r};return UU(e,t,{...i,platform:o})};var zf=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Hf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Hf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Hf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function aA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sA(e,t){const n=aA(e);return Math.round(t*n)/n}function Vy(e){const t=v.useRef(e);return zf(()=>{t.current=e}),t}function uA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);Hf(f,r)||p(r);const[m,y]=v.useState(null),[b,g]=v.useState(null),x=v.useCallback(F=>{F!==C.current&&(C.current=F,y(F))},[]),w=v.useCallback(F=>{F!==R.current&&(R.current=F,g(F))},[]),T=o||m,_=a||b,C=v.useRef(null),R=v.useRef(null),O=v.useRef(c),V=u!=null,P=Vy(u),$=Vy(i),z=Vy(l),Q=v.useCallback(()=>{if(!C.current||!R.current)return;const F={placement:t,strategy:n,middleware:f};$.current&&(F.platform=$.current),vz(C.current,R.current,F).then(B=>{const A={...B,isPositioned:z.current!==!1};Y.current&&!Hf(O.current,A)&&(O.current=A,Zo.flushSync(()=>{d(A)}))})},[f,t,n,$,z]);zf(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[l]);const Y=v.useRef(!1);zf(()=>(Y.current=!0,()=>{Y.current=!1}),[]),zf(()=>{if(T&&(C.current=T),_&&(R.current=_),T&&_){if(P.current)return P.current(T,_,Q);Q()}},[T,_,Q,P,V]);const re=v.useMemo(()=>({reference:C,floating:R,setReference:x,setFloating:w}),[x,w]),ie=v.useMemo(()=>({reference:T,floating:_}),[T,_]),te=v.useMemo(()=>{const F={position:n,left:0,top:0};if(!ie.floating)return F;const B=sA(ie.floating,c.x),A=sA(ie.floating,c.y);return s?{...F,transform:"translate("+B+"px, "+A+"px)",...aA(ie.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:A}},[n,s,ie.floating,c.x,c.y]);return v.useMemo(()=>({...c,update:Q,refs:re,elements:ie,floatingStyles:te}),[c,Q,re,ie,te])}const xz=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?oA({element:r.current,padding:i}).fn(n):{}:r?oA({element:r,padding:i}).fn(n):{}}}},lA=(e,t)=>({...fz(e),options:[e,t]}),cA=(e,t)=>({...pz(e),options:[e,t]}),dA=(e,t)=>({...yz(e),options:[e,t]}),fA=(e,t)=>({...hz(e),options:[e,t]}),pA=(e,t)=>({...mz(e),options:[e,t]}),hA=(e,t)=>({...gz(e),options:[e,t]}),mA=(e,t)=>({...xz(e),options:[e,t]});var wz="Arrow",gA=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return E.jsx(zn.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});gA.displayName=wz;var bz=gA;function Ez(e,t=[]){let n=[];function r(o,a){const s=v.createContext(a),u=n.length;n=[...n,a];function l(d){const{scope:f,children:p,...m}=d,y=(f==null?void 0:f[e][u])||s,b=v.useMemo(()=>m,Object.values(m));return E.jsx(y.Provider,{value:b,children:p})}function c(d,f){const p=(f==null?void 0:f[e][u])||s,m=v.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,c]}const i=()=>{const o=n.map(a=>v.createContext(a));return function(s){const u=(s==null?void 0:s[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,Tz(i,...t)]}function Tz(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const d=u(o)[`__scope${l}`];return{...s,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function yA(e){const[t,n]=v.useState(void 0);return or(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const u=o.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var $y="Popper",[vA,Vf]=Ez($y),[_z,xA]=vA($y),wA=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return E.jsx(_z,{scope:t,anchor:r,onAnchorChange:i,children:n})};wA.displayName=$y;var bA="PopperAnchor",EA=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=xA(bA,n),a=v.useRef(null),s=Hr(t,a);return v.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:E.jsx(zn.div,{...i,ref:s})});EA.displayName=bA;var Wy="PopperContent",[Cz,Sz]=vA(Wy),TA=v.forwardRef((e,t)=>{var $e,Ve,We,Ge,_t,Te;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...y}=e,b=xA(Wy,n),[g,x]=v.useState(null),w=Hr(t,be=>x(be)),[T,_]=v.useState(null),C=yA(T),R=(C==null?void 0:C.width)??0,O=(C==null?void 0:C.height)??0,V=r+(o!=="center"?"-"+o:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},$=Array.isArray(l)?l:[l],z=$.length>0,Q={padding:P,boundary:$.filter(kz),altBoundary:z},{refs:Y,floatingStyles:re,placement:ie,isPositioned:te,middlewareData:F}=uA({strategy:"fixed",placement:V,whileElementsMounted:(...be)=>iA(...be,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[lA({mainAxis:i+O,alignmentAxis:a}),u&&cA({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?dA():void 0,...Q}),u&&fA({...Q}),pA({...Q,apply:({elements:be,rects:Ye,availableWidth:ze,availableHeight:yt})=>{const{width:vt,height:Ke}=Ye.reference,Fe=be.floating.style;Fe.setProperty("--radix-popper-available-width",`${ze}px`),Fe.setProperty("--radix-popper-available-height",`${yt}px`),Fe.setProperty("--radix-popper-anchor-width",`${vt}px`),Fe.setProperty("--radix-popper-anchor-height",`${Ke}px`)}}),T&&mA({element:T,padding:s}),Rz({arrowWidth:R,arrowHeight:O}),f&&hA({strategy:"referenceHidden",...Q})]}),[B,A]=SA(ie),oe=Pt(m);or(()=>{te&&(oe==null||oe())},[te,oe]);const he=($e=F.arrow)==null?void 0:$e.x,D=(Ve=F.arrow)==null?void 0:Ve.y,Oe=((We=F.arrow)==null?void 0:We.centerOffset)!==0,[ge,xe]=v.useState();return or(()=>{g&&xe(window.getComputedStyle(g).zIndex)},[g]),E.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:te?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(Ge=F.transformOrigin)==null?void 0:Ge.x,(_t=F.transformOrigin)==null?void 0:_t.y].join(" "),...((Te=F.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(Cz,{scope:n,placedSide:B,onArrowChange:_,arrowX:he,arrowY:D,shouldHideArrow:Oe,children:E.jsx(zn.div,{"data-side":B,"data-align":A,...y,ref:w,style:{...y.style,animation:te?void 0:"none"}})})})});TA.displayName=Wy;var _A="PopperArrow",Az={top:"bottom",right:"left",bottom:"top",left:"right"},CA=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Sz(_A,r),a=Az[o.placedSide];return E.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:E.jsx(bz,{...i,ref:n,style:{...i.style,display:"block"}})})});CA.displayName=_A;function kz(e){return e!==null}var Rz=e=>({name:"transformOrigin",options:e,fn(t){var b,g,x;const{placement:n,rects:r,middlewareData:i}=t,a=((b=i.arrow)==null?void 0:b.centerOffset)!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,c]=SA(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((g=i.arrow)==null?void 0:g.x)??0)+s/2,p=(((x=i.arrow)==null?void 0:x.y)??0)+u/2;let m="",y="";return l==="bottom"?(m=a?d:`${f}px`,y=`${-u}px`):l==="top"?(m=a?d:`${f}px`,y=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,y=a?d:`${p}px`):l==="left"&&(m=`${r.floating.width+u}px`,y=a?d:`${p}px`),{data:{x:m,y}}}});function SA(e){const[t,n="center"]=e.split("-");return[t,n]}var AA=wA,Yy=EA,kA=TA,RA=CA;function Nz(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var qy=e=>{const{present:t,children:n}=e,r=Pz(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=Hr(r.ref,Iz(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:o}):null};qy.displayName="Presence";function Pz(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),o=v.useRef("none"),a=e?"mounted":"unmounted",[s,u]=Nz(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=$f(r.current);o.current=s==="mounted"?l:"none"},[s]),or(()=>{const l=r.current,c=i.current;if(c!==e){const f=o.current,p=$f(l);e?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),or(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=p=>{const y=$f(r.current).includes(p.animationName);if(p.target===t&&y&&(u("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=p=>{p.target===t&&(o.current=$f(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function $f(e){return(e==null?void 0:e.animationName)||"none"}function Iz(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function _l({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Oz({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Pt(n),u=v.useCallback(l=>{if(o){const d=typeof l=="function"?l(e):l;d!==e&&s(d)}else i(l)},[o,e,i,s]);return[a,u]}function Oz({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,i=v.useRef(r),o=Pt(t);return v.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var Dz="VisuallyHidden",NA=v.forwardRef((e,t)=>E.jsx(zn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));NA.displayName=Dz;var Lz=NA,[Wf,Hie]=bi("Tooltip",[Vf]),Yf=Vf(),PA="TooltipProvider",Mz=700,Gy="tooltip.open",[Fz,Ky]=Wf(PA),IA=e=>{const{__scopeTooltip:t,delayDuration:n=Mz,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,s]=v.useState(!0),u=v.useRef(!1),l=v.useRef(0);return v.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),E.jsx(Fz,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(l.current),s(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:v.useCallback(c=>{u.current=c},[]),disableHoverableContent:i,children:o})};IA.displayName=PA;var qf="Tooltip",[Bz,Gf]=Wf(qf),OA=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,u=Ky(qf,e.__scopeTooltip),l=Yf(t),[c,d]=v.useState(null),f=fo(),p=v.useRef(0),m=a??u.disableHoverableContent,y=s??u.delayDuration,b=v.useRef(!1),[g=!1,x]=_l({prop:r,defaultProp:i,onChange:R=>{R?(u.onOpen(),document.dispatchEvent(new CustomEvent(Gy))):u.onClose(),o==null||o(R)}}),w=v.useMemo(()=>g?b.current?"delayed-open":"instant-open":"closed",[g]),T=v.useCallback(()=>{window.clearTimeout(p.current),b.current=!1,x(!0)},[x]),_=v.useCallback(()=>{window.clearTimeout(p.current),x(!1)},[x]),C=v.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,x(!0)},y)},[y,x]);return v.useEffect(()=>()=>window.clearTimeout(p.current),[]),E.jsx(AA,{...l,children:E.jsx(Bz,{scope:t,contentId:f,open:g,stateAttribute:w,trigger:c,onTriggerChange:d,onTriggerEnter:v.useCallback(()=>{u.isOpenDelayed?C():T()},[u.isOpenDelayed,C,T]),onTriggerLeave:v.useCallback(()=>{m?_():window.clearTimeout(p.current)},[_,m]),onOpen:T,onClose:_,disableHoverableContent:m,children:n})})};OA.displayName=qf;var Xy="TooltipTrigger",DA=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Gf(Xy,n),o=Ky(Xy,n),a=Yf(n),s=v.useRef(null),u=Hr(t,s,i.onTriggerChange),l=v.useRef(!1),c=v.useRef(!1),d=v.useCallback(()=>l.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),E.jsx(Yy,{asChild:!0,...a,children:E.jsx(zn.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Cn(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Cn(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Cn(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Cn(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Cn(e.onBlur,i.onClose),onClick:Cn(e.onClick,i.onClose)})})});DA.displayName=Xy;var jz="TooltipPortal",[Vie,Uz]=Wf(jz,{forceMount:void 0}),Cs="TooltipContent",LA=v.forwardRef((e,t)=>{const n=Uz(Cs,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=Gf(Cs,e.__scopeTooltip);return E.jsx(qy,{present:r||a.open,children:a.disableHoverableContent?E.jsx(MA,{side:i,...o,ref:t}):E.jsx(zz,{side:i,...o,ref:t})})}),zz=v.forwardRef((e,t)=>{const n=Gf(Cs,e.__scopeTooltip),r=Ky(Cs,e.__scopeTooltip),i=v.useRef(null),o=Hr(t,i),[a,s]=v.useState(null),{trigger:u,onClose:l}=n,c=i.current,{onPointerInTransitChange:d}=r,f=v.useCallback(()=>{s(null),d(!1)},[d]),p=v.useCallback((m,y)=>{const b=m.currentTarget,g={x:m.clientX,y:m.clientY},x=Wz(g,b.getBoundingClientRect()),w=Yz(g,x),T=qz(y.getBoundingClientRect()),_=Kz([...w,...T]);s(_),d(!0)},[d]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(u&&c){const m=b=>p(b,c),y=b=>p(b,u);return u.addEventListener("pointerleave",m),c.addEventListener("pointerleave",y),()=>{u.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",y)}}},[u,c,p,f]),v.useEffect(()=>{if(a){const m=y=>{const b=y.target,g={x:y.clientX,y:y.clientY},x=(u==null?void 0:u.contains(b))||(c==null?void 0:c.contains(b)),w=!Gz(g,a);x?f():w&&(f(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[u,c,a,l,f]),E.jsx(MA,{...e,ref:o})}),[Hz,Vz]=Wf(qf,{isInside:!1}),MA=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,u=Gf(Cs,n),l=Yf(n),{onClose:c}=u;return v.useEffect(()=>(document.addEventListener(Gy,c),()=>document.removeEventListener(Gy,c)),[c]),v.useEffect(()=>{if(u.trigger){const d=f=>{const p=f.target;p!=null&&p.contains(u.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[u.trigger,c]),E.jsx(Py,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:E.jsxs(kA,{"data-state":u.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[E.jsx(US,{children:r}),E.jsx(Hz,{scope:n,isInside:!0,children:E.jsx(Lz,{id:u.contentId,role:"tooltip",children:i||r})})]})})});LA.displayName=Cs;var FA="TooltipArrow",$z=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Yf(n);return Vz(FA,n).isInside?null:E.jsx(RA,{...i,...r,ref:t})});$z.displayName=FA;function Wz(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Yz(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function qz(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Gz(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o].x,u=t[o].y,l=t[a].x,c=t[a].y;u>r!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function Kz(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Xz(t)}function Xz(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Qz=IA,Zz=OA,Jz=DA,BA=LA;const eH=Qz,tH=Zz,nH=Jz,jA=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>E.jsx(BA,{ref:r,sideOffset:t,className:Ne("z-50 overflow-hidden max-w-xs rounded-xl bg-primary border text-primary-foreground p-2 text-center align-middle text-xs shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));jA.displayName=BA.displayName;function Kf({children:e,content:t,side:n,align:r}){return t?E.jsxs(tH,{children:[E.jsx(nH,{asChild:!0,children:e}),E.jsx(jA,{side:n,align:r,collisionPadding:8,avoidCollisions:!0,children:t})]}):e}const UA={en:{ok:"OK",yes:"Yes",no:"No",agree:"Agree",cancel:"Cancel","yes-exit":"Yes, exit","yes-reset":"Yes, reset","no-cancel":"No, cancel","are-you-sure":"Are you sure?",recording:"Recording...","thank-you":"Thank you","sorry-try-again":"Sorry, please try again","error-occurred":"An error occurred","please-try-again":"Please try again","write-a-message":"Write a message...","send-message":"Send message",connected:"Connected",connecting:"Connecting",reconnecting:"Reconnecting",reconnected:"Reconnected",disconnecting:"Disconnecting",disconnected:"Disconnected",error:"Error","persist-session":"Persist session",settings:"Settings",close:"Close",help:"Help",chat:"Chat",send:"Send",copy:"Copy",copied:"Copied","sound-effects":"Sound effects",language:"Language",select:"Select",agent:"Agent",user:"User",bot:"Bot","close-widget":"Close widget","got-any-questions":"Got any questions? Chat with us!","typical-response-time":"Typically respond in less than 1 minute","session-closed-lead":"Your issue has been resolved!","create-new-ticket":"Create new ticket",exit:"Exit","reset-conversation":"Reset conversation","new-conversation":"New conversation","welcome-title":"Welcome to our support chat","welcome-description":"We're here to help! Start a conversation and we'll get back to you as soon as possible.","your-name":"Your name","your-email":"Your email address","start-chat":"Talk to support","starting-chat":"Connecting...","hello-greeting":"Hi there!","i-need-more-help":"I need more help","this-was-helpful":"This was helpful"},ar:{ok:"حسنا",yes:"نعم",no:"لا",agree:"موافق",cancel:"إلغاء","yes-exit":"نعم، اخرج","yes-reset":"نعم، إعادة تعيين","no-cancel":"لا، إلغاء","are-you-sure":"هل أنت متأكد؟",recording:"تسجيل","thank-you":"شكرا","sorry-try-again":"عذرا، حاول مرة أخرى","error-occurred":"حدث خطأ","please-try-again":"يرجى المحاولة مرة أخرى","write-a-message":"اكتب رسالة...","send-message":"إرسال رسالة",connected:"متصل",connecting:"جاري الاتصال",reconnecting:"جاري إعادة الاتصال",reconnected:"تم إعادة الاتصال",disconnecting:"جاري قطع الاتصال",disconnected:"قطع الاتصال",error:"خطأ","persist-session":"حفظ الجلسة",settings:"إعدادات",close:"إغلاق",help:"مساعدة",chat:"محادثة",send:"إرسال",copy:"نسخ",copied:"تم النسخ","sound-effects":"التاثيرات الصوتية",language:"اللغة",select:"اختر",agent:"الوكيل",user:"المستخدم",bot:"البوت","close-widget":"إغلاق الودجة","got-any-questions":"هل لديك أي أسئلة؟ تحدث معنا!","typical-response-time":"عادة ما نرد في أقل من دقيقة واحدة","session-closed-lead":"تم حل مشكلتك!",exit:"خروج","create-new-ticket":"إنشاء تذكرة جديدة","reset-conversation":"إعادة تعيين المحادثة","new-conversation":"محادثة جديدة","welcome-title":"مرحبًا بك في دردشة الدعم الخاصة بنا","welcome-description":"نحن هنا للمساعدة! ابدأ محادثة وسنرد عليك في أقرب وقت ممكن.","your-name":"اسمك","your-email":"عنوان بريدك الإلكتروني","start-chat":"تحدث إلى الدعم","starting-chat":"جاري الاتصال...","hello-greeting":"مرحبًا! كيف يمكننا مساعدتك اليوم؟","i-need-more-help":"أحتاج المزيد من المساعدة","this-was-helpful":"كان هذا مفيدًا"},nl:{ok:"OK",yes:"Ja",no:"Nee",agree:"Akkoord",cancel:"Annuleren","yes-exit":"Ja, afsluiten","yes-reset":"Ja, resetten","no-cancel":"Nee, annuleren","are-you-sure":"Weet u het zeker?",recording:"Opname...","thank-you":"Dank u","sorry-try-again":"Sorry, probeer het opnieuw","error-occurred":"Er is een fout opgetreden","please-try-again":"Probeer het opnieuw","write-a-message":"Schrijf een bericht...","send-message":"Bericht verzenden",connected:"Verbonden",connecting:"Verbinding maken",reconnecting:"Opnieuw verbinding maken",reconnected:"Opnieuw verbonden",disconnecting:"Verbinding verbreken",disconnected:"Verbinding verbroken",error:"Fout","persist-session":"Sessie behouden",settings:"Instellingen",close:"Sluiten",help:"Help",chat:"Chat",send:"Verzenden",copy:"Kopiëren",copied:"Gekopieerd","sound-effects":"Geluidseffecten",language:"Taal",select:"Selecteren",agent:"Agent",user:"Gebruiker",bot:"Bot","close-widget":"Widget sluiten","got-any-questions":"Heeft u vragen? Chat met ons!","typical-response-time":"We reageren doorgaans binnen 1 minuut","session-closed-lead":"Uw probleem is opgelost!","create-new-ticket":"Nieuw ticket aanmaken",exit:"Afsluiten","reset-conversation":"Gesprek resetten","new-conversation":"Nieuw gesprek","welcome-title":"Welkom bij onze supportchat","welcome-description":"We zijn hier om te helpen! Begin een gesprek en we nemen zo snel mogelijk contact met u op.","your-name":"Uw naam","your-email":"Uw e-mailadres","start-chat":"Praat met ondersteuning","starting-chat":"Verbinding maken...","hello-greeting":"Hallo! Hoe kunnen we u vandaag helpen?","i-need-more-help":"Ik heb nog meer help nodig","this-was-helpful":"Dit was handig"},fr:{ok:"D'accord",yes:"Oui",no:"Non",agree:"Accepter",cancel:"Annuler","yes-exit":"Oui, quitter","yes-reset":"Oui, réinitialiser","no-cancel":"Non, annuler","are-you-sure":"Êtes-vous sûr ?",recording:"Enregistrement...","thank-you":"Merci","sorry-try-again":"Désolé, veuillez réessayer","error-occurred":"Une erreur s'est produite","please-try-again":"Veuillez réessayer","write-a-message":"Écrivez un message...","send-message":"Envoyer le message",connected:"Connecté",connecting:"Connexion en cours",reconnecting:"Reconnexion en cours",reconnected:"Reconnecté",disconnecting:"Déconnexion en cours",disconnected:"Déconnecté",error:"Erreur","persist-session":"Conserver la session",settings:"Paramètres",close:"Fermer",help:"Aide",chat:"Chat",send:"Envoyer",copy:"Copier",copied:"Copié","sound-effects":"Effets sonores",language:"Langue",select:"Sélectionner",agent:"Agent",user:"Utilisateur",bot:"Bot","close-widget":"Fermer le widget","got-any-questions":"Vous avez des questions ? Chattez avec nous !","typical-response-time":"Nous répondons généralement en moins d'une minute","session-closed-lead":"Votre problème a été résolu !","create-new-ticket":"Créer un nouveau ticket",exit:"Sortie","reset-conversation":"Réinitialiser la conversation","new-conversation":"Nouvelle conversation","welcome-title":"Bienvenue dans notre chat de support","welcome-description":"Nous sommes là pour vous aider ! Commencez une conversation et nous vous répondrons dès que possible.","your-name":"Votre nom","your-email":"Votre adresse e-mail","start-chat":"Parler au support","starting-chat":"Connexion...","hello-greeting":"Bonjour ! Comment pouvons-nous vous aider aujourd'hui ?","i-need-more-help":"Je besoin d'aide plus","this-was-helpful":"C'était utile"},de:{ok:"OK",yes:"Ja",no:"Nein",agree:"Zustimmen",cancel:"Stornieren","yes-exit":"Ja, beenden","yes-reset":"Ja, zurücksetzen","no-cancel":"Nein, abbrechen","are-you-sure":"Sind Sie sicher?",recording:"Aufnahme läuft","thank-you":"Vielen Dank","sorry-try-again":"Entschuldigung, bitte versuchen Sie es erneut","error-occurred":"Ein Fehler ist aufgetreten","please-try-again":"Bitte versuchen Sie es erneut","write-a-message":"Nachricht schreiben...","send-message":"Nachricht senden",connected:"Verbunden",connecting:"Verbindung wird hergestellt",reconnecting:"Verbindung wird wiederhergestellt",reconnected:"Wieder verbunden",disconnecting:"Verbindung wird getrennt",disconnected:"Verbindung getrennt",error:"Fehler","persist-session":"Sitzung beibehalten",settings:"Einstellungen",close:"Schließen",help:"Hilfe",chat:"Chat",send:"Senden",copy:"Kopieren",copied:"Kopiert","sound-effects":"Soundeffekte",language:"Sprache",select:"Auswählen",agent:"Agent",user:"Benutzer",bot:"Bot","got-any-questions":"Haben Sie Fragen? Chatten Sie mit uns!","typical-response-time":"Üblicherweise antworten wir in weniger als 1 Minute","close-widget":"Widget schließen","session-closed-lead":"Ihr Problem wurde gelöst!","create-new-ticket":"Neues Ticket erstellen",exit:"Beenden","reset-conversation":"Konversation zurücksetzen","new-conversation":"Neue Konversation","welcome-title":"Willkommen in unserem Support-Chat","welcome-description":"Wir sind hier, um zu helfen! Beginnen Sie ein Gesprách und wir werden so schnell wie mogelijk antworten.","your-name":"Ihr Name","your-email":"Ihre E-Mail-Adresse","start-chat":"Mit dem Support sprechen","starting-chat":"Verbindung wird hergestellt...","hello-greeting":"Hallo! Wie können wir Ihnen heute helfen?","i-need-more-help":"Ich brauche weitere Hilfe","this-was-helpful":"Dies war hilfreich"},pt:{ok:"OK",yes:"Sim",no:"Não",agree:"Concordo",cancel:"Cancelar","yes-exit":"Sim, sair","yes-reset":"Sim, redefinir","no-cancel":"Não, cancelar","are-you-sure":"Você tem certeza?",recording:"Gravando...","thank-you":"Obrigado","sorry-try-again":"Desculpe, tente novamente","error-occurred":"Ocorreu um erro","please-try-again":"Por favor, tente novamente","write-a-message":"Escreva uma mensagem...","send-message":"Enviar mensagem",connected:"Conectado",connecting:"Conectando",reconnecting:"Reconectando",reconnected:"Reconectado",disconnecting:"Desconectando",disconnected:"Desconectado",error:"Erro","persist-session":"Persistir sessão",settings:"Configurações",close:"Fechar",help:"Ajuda",chat:"Bate-papo",send:"Enviar",copy:"Copiar",copied:"Copiado","sound-effects":"Efeitos sonoros",language:"Idioma",select:"Selecionar",agent:"Agente",user:"Usuário",bot:"Bot","close-widget":"Fechar widget","got-any-questions":"Tem alguma dúvida? Converse conosco!","typical-response-time":"Geralmente respondemos em menos de 1 minuto","session-closed-lead":"Seu problema foi resolvido!","create-new-ticket":"Criar novo ticket",exit:"Sair","reset-conversation":"Redefinir conversa","new-conversation":"Nova conversa","welcome-title":"Bem-vindo ao nosso chat de suporte","welcome-description":"Estamos aqui para ajudar! Inicie uma conversa e responderemos o mais rápido possível.","your-name":"Seu nome","your-email":"Seu endereço de email","start-chat":"Falar com o suporte","starting-chat":"Conectando...","hello-greeting":"Olá! Como podemos ajudar você hoje?","i-need-more-help":"preciso de mais ajuda","this-was-helpful":"Isso foi útil"}},rH=Object.keys(UA),iH=e=>rH.includes(e);function oH(e,t){const n=UA[t];return n&&n[e]||""}function Ss(){const{widgetCtx:{config:e}}=ir();return v.useMemo(()=>{const n=iH(e.language)?e.language:"en";return{get:r=>oH(r,n),lang:n}},[e.language])}const aH=10,sH={right:(e,t)=>({initial:{opacity:0,x:-e,...t.initial},animate:{opacity:1,x:0,...t.animate},exit:{opacity:0,x:e,...t.exit}}),left:(e,t)=>({initial:{opacity:0,x:e,...t.initial},animate:{opacity:1,x:0,...t.animate},exit:{opacity:0,x:-e,...t.exit}}),up:(e,t)=>({initial:{opacity:0,y:e,...t.initial},animate:{opacity:1,y:0,...t.animate},exit:{opacity:0,y:-e,...t.exit}}),down:(e,t)=>({initial:{opacity:0,y:-e,...t.initial},animate:{opacity:1,y:0,...t.animate},exit:{opacity:0,y:e,...t.exit}})},st=v.forwardRef(({fadeIn:e="down",distance:t=aH,children:n,snapExit:r=!1,overrides:i={},...o},a)=>{const s=e?sH[e](t,i):{};return r&&s.exit&&typeof s.exit=="object"&&!Array.isArray(s.exit)&&(s.exit.transition={duration:0}),E.jsx(cs.div,{ref:a,...o,...s,children:n})});st.displayName="MotionDiv";function zA(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=zA(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function uH(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=zA(e))&&(r&&(r+=" "),r+=t);return r}const HA=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,VA=uH,lH=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return VA(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(l=>{const c=n==null?void 0:n[l],d=o==null?void 0:o[l];if(c===null)return null;const f=HA(c)||HA(d);return i[l][f]}),s=n&&Object.entries(n).reduce((l,c)=>{let[d,f]=c;return f===void 0||(l[d]=f),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:d,className:f,...p}=c;return Object.entries(p).every(m=>{let[y,b]=m;return Array.isArray(b)?b.includes({...o,...s}[y]):{...o,...s}[y]===b})?[...l,d,f]:l},[]);return VA(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},$A={x:2,y:2},cH={1:"scale-[1]","1.01":"scale-[1.01]","1.02":"scale-[1.02]","1.1":"scale-[1.1]"},yo=v.memo(v.forwardRef(({children:e,className:t,scale:n="1.02",off:r=!1},i)=>{const[o,a]=v.useState(!1),[s,u]=v.useState({x:0,y:0});if(r||/translate/.test(e.props.className||""))return e;const c=m=>{var O,V;const{clientX:y,clientY:b}=m,g=m.currentTarget.getBoundingClientRect(),x=y-(g.left+g.width/2),w=b-(g.top+g.height/2),T=Math.max(-1,Math.min(1,x/(g.width/2))),_=Math.max(-1,Math.min(1,w/(g.height/2))),C=T*$A.x,R=_*$A.y;u({x:C,y:R}),(V=(O=e.props).onMouseMove)==null||V.call(O,m)},d=()=>{var m,y;a(!0),(y=(m=e.props).onMouseEnter)==null||y.call(m)},f=()=>{var m,y;a(!1),u({x:0,y:0}),(y=(m=e.props).onMouseLeave)==null||y.call(m)},p={"--opencx-wobble-x":o?`${s.x}px`:"0px","--opencx-wobble-y":o?`${s.y}px`:"0px"};return v.cloneElement(e,{ref:i,onMouseMove:c,onMouseEnter:d,onMouseLeave:f,style:{...p,...e.props.style},className:Ne("translate-x-[var(--opencx-wobble-x)]","translate-y-[var(--opencx-wobble-y)]",`hover:${cH[n]}`,t,e.props.className,"transition-all ease-out")})}));yo.displayName="Wobble";const dH=lH(Ne("inline-flex shrink-0 items-center justify-center gap-2","text-sm font-medium whitespace-nowrap","ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","shadow-sm active:shadow-none active:scale-95 hover:active:scale-95","rounded-xl","border","transition"),{variants:{variant:{default:"border-primary bg-primary text-primary-foreground",destructive:"border-destructive bg-destructive text-destructive-foreground",outline:"bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground",ghost:"border-transparent shadow-none hover:bg-accent hover:text-accent-foreground",link:"border-transparent shadow-none text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-xs",lg:"min-h-12 px-4",icon:"h-10 w-10",fit:"size-fit p-2",free:"p-2"}},defaultVariants:{variant:"default",size:"default"}}),$n=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const a=r?Of:"button";return E.jsx(yo,{ref:o,children:E.jsx(a,{className:Ne(dH({variant:t,size:n,className:e})),...i})})});$n.displayName="Button";const Xf=()=>{const[e,t]=v.useState("ltr");return v.useEffect(()=>{const n=()=>{typeof document>"u"||t(window.getComputedStyle(document.body).direction)};n();const r=new MutationObserver(n);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),r.observe(document.body,{attributes:!0,attributeFilter:["dir"]}),window.addEventListener("languagechange",n),()=>{r.disconnect(),window.removeEventListener("languagechange",n)}},[]),e};function fH(){const{sendMessage:e}=xs(),t=Ss(),n=[t.get("i-need-more-help"),t.get("this-was-helpful")],r=i=>{const o=i.trim();o&&e({content:o})};return E.jsx("div",{className:"flex items-center gap-2 p-2 pb-0 flex-wrap",children:n.map(i=>E.jsx($n,{onClick:()=>r(i),className:"flex-1 rounded-full",size:"sm",children:i},i))})}function pH({file:{status:e,file:t,error:n},onCancel:r}){const[i,o]=v.useState(null);v.useEffect(()=>{if(!t.type.startsWith("image/"))return;const u=new FileReader;return u.onload=()=>o(u.result),u.onerror=()=>console.error("Error reading file"),u.readAsDataURL(t),()=>u.abort()},[t]);const a=()=>{switch(e){case"uploading":return E.jsx(VF,{className:"size-4 animate-spin"});case"error":return E.jsx(MF,{className:"size-4 text-destructive"});default:return null}},s=()=>{const u=t.type.split("/")[0];return u==="image"&&i?E.jsx("img",{src:typeof i=="string"?i:"",className:"object-cover bg-secondary size-full",alt:t.name}):u==="audio"?E.jsx(UF,{}):u==="video"?E.jsx(zF,{}):E.jsx(HF,{})};return E.jsx(Kf,{side:"bottom",content:e==="error"?E.jsxs("span",{className:"text-destructive",children:["Failed to upload: ",n]}):t.name,children:E.jsxs("div",{className:Ne(e==="uploading"&&"opacity-50","group","size-12 border rounded-2xl overflow-hidden relative","flex items-center justify-center shrink-0"),children:[E.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:a()}),E.jsx("button",{type:"button",className:Ne("absolute bg-black/50 inset-0 size-full z-10 opacity-0","flex items-center justify-center","opacity-0 group-hover:opacity-100 transition"),onClick:r,children:E.jsx(O0,{className:"size-4 text-primary-foreground"})}),E.jsx(s,{})]})})}const WA=Ne("rounded-3xl");function hH(){var C;const e=v.useRef(null),{sendMessage:t}=xs(),{sessionState:n}=gl(),r=Ss(),i=Xf(),[o,a]=v.useState(""),{allFiles:s,emptyTheFiles:u,handleCancelUpload:l,appendFiles:c,isUploading:d,successFiles:f}=hU(),p=!!((C=n.session)!=null&&C.isHandedOff),{isAwaitingBotReply:m}=TS(),y=R=>{p&&c(R)},b=!o.trim()&&f.length===0,g=async()=>{if(m||b)return;if(d){const O="please wait for the file(s) to upload";PC.error(O),console.info(O)}const R=o.trim();t({content:R,attachments:f.flatMap(O=>O.fileUrl?[{url:O.fileUrl,type:O.file.type,name:O.file.name,id:O.id,size:O.file.size}]:[])}),a(""),u()},{getRootProps:x,getInputProps:w,open:T}=CC({onDrop:y,noClick:!0,onDropRejected(){if(p){const R="unsupported file type, or the file is too large";PC.error(R),console.error(R)}},maxSize:5*1024*1024,accept:{"text/*":[".txt"],"image/*":[".png",".jpg",".jpeg",".gif"],"application/pdf":[".pdf"]}}),_=R=>{const O=R.clipboardData;O&&O.files.length>0&&y(Array.from(O.files))};return E.jsxs("div",{className:"p-2 relative space-y-1",...x(),children:[E.jsx("input",{...w()}),E.jsxs("div",{className:Ne(WA,"relative space-y-2 border transition-all shadow py-2"),children:[E.jsx("div",{className:"flex items-center gap-1 px-2",children:E.jsx(jn,{mode:"popLayout",children:s.map(R=>E.jsx(st,{snapExit:!0,children:E.jsx(pH,{onCancel:()=>l(R.id),file:R})},R.id))})}),E.jsx("textarea",{onPaste:_,ref:e,id:"chat-input",dir:i,value:o,rows:3,className:Ne(WA,"w-full resize-none px-3","text-sm rtl:placeholder:text-right bg-transparent outline-none"),onChange:R=>a(R.target.value),onKeyDown:async R=>{R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),g())},placeholder:r.get("write-a-message")}),E.jsxs("div",{dir:i,className:"px-2 flex justify-between rtl:text-right",children:[E.jsx(Kf,{side:"top",align:"start",content:"attach files, (maximum size 5mb)",children:E.jsx($n,{onClick:()=>{p&&T()},size:"fit",variant:"outline",className:Ne("disabled:opacity-0","rounded-full size-8 flex items-center justify-center p-0"),disabled:!p,children:E.jsx(YF,{className:"size-4"})})}),E.jsx(Kf,{content:"send message",side:"top",align:"end",children:E.jsx($n,{size:"fit",onClick:g,disabled:m||d||b,className:"rounded-full size-8 flex items-center justify-center p-0",children:E.jsx(jn,{mode:"wait",children:m||d?E.jsx(st,{snapExit:!0,children:E.jsx(FF,{className:"size-4 animate-spin animate-iteration-infinite"})},"loading"):E.jsx(st,{snapExit:!0,children:E.jsx(P_,{className:"size-4 rtl:-scale-100"})},"send")})})})]})]})]})}function mH(){const{widgetCtx:e}=ir(),t=Ss();return E.jsx("div",{className:"p-2",children:E.jsxs("div",{className:"p-2 bg-background rounded-3xl border shadow-2xl space-y-2",children:[E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(OF,{className:"size-4 text-emerald-500"}),E.jsx("h2",{className:"text-sm font-medium",dir:"auto",children:t.get("session-closed-lead")})]}),E.jsx("div",{children:E.jsx($n,{onClick:e.resetChat,className:"rounded-2xl w-full",children:t.get("new-conversation")})})]})})}function gH(){var a,s,u;const{sessionState:e}=gl(),{messagesState:t,sendMessage:n}=xs(),i=(s=(a=Pf().data)==null?void 0:a.data)==null?void 0:s.initialQuestions,o=t.messages.length===0;return E.jsx("footer",{children:E.jsx("div",{children:E.jsx(jn,{mode:"wait",children:e.session&&!((u=e.session)!=null&&u.isOpened)?E.jsx(st,{className:"overflow-hidden",overrides:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},children:E.jsx(mH,{})},"session-closed"):E.jsxs(st,{className:"overflow-hidden",overrides:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},children:[t.lastAIResMightSolveUserIssue&&E.jsx(fH,{}),o&&i&&E.jsx("div",{className:"flex items-center flex-row justify-end gap-2 flex-wrap px-2",children:i==null?void 0:i.map(l=>E.jsx($n,{dir:"auto",variant:"outline",size:"sm",onClick:()=>{n({content:l})},children:l},l))}),E.jsx(hH,{})]},"chat-input")})})})}function Se(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function YA(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qf(...e){return t=>{let n=!1;const r=e.map(i=>{const o=YA(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():YA(e[i],null)}}}}function It(...e){return v.useCallback(Qf(...e),e)}var As=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),o=i.find(vH);if(o){const a=o.props.children,s=i.map(u=>u===o?v.Children.count(a)>1?v.Children.only(null):v.isValidElement(a)?a.props.children:null:u);return E.jsx(Qy,{...r,ref:t,children:v.isValidElement(a)?v.cloneElement(a,void 0,s):null})}return E.jsx(Qy,{...r,ref:t,children:n})});As.displayName="Slot";var Qy=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=wH(n);return v.cloneElement(n,{...xH(r,n.props),ref:t?Qf(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});Qy.displayName="SlotClone";var yH=({children:e})=>E.jsx(E.Fragment,{children:e});function vH(e){return v.isValidElement(e)&&e.type===yH}function xH(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function wH(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Et=bH.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?As:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Zy(e,t){e&&Zo.flushSync(()=>e.dispatchEvent(t))}function qA(e){const t=e+"CollectionProvider",[n,r]=bi(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:m,children:y}=p,b=ln.useRef(null),g=ln.useRef(new Map).current;return E.jsx(i,{scope:m,itemMap:g,collectionRef:b,children:y})};a.displayName=t;const s=e+"CollectionSlot",u=ln.forwardRef((p,m)=>{const{scope:y,children:b}=p,g=o(s,y),x=It(m,g.collectionRef);return E.jsx(As,{ref:x,children:b})});u.displayName=s;const l=e+"CollectionItemSlot",c="data-radix-collection-item",d=ln.forwardRef((p,m)=>{const{scope:y,children:b,...g}=p,x=ln.useRef(null),w=It(m,x),T=o(l,y);return ln.useEffect(()=>(T.itemMap.set(x,{ref:x,...g}),()=>void T.itemMap.delete(x))),E.jsx(As,{[c]:"",ref:w,children:b})});d.displayName=l;function f(p){const m=o(e+"CollectionConsumer",p);return ln.useCallback(()=>{const b=m.collectionRef.current;if(!b)return[];const g=Array.from(b.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((T,_)=>g.indexOf(T.ref.current)-g.indexOf(_.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:u,ItemSlot:d},f,r]}var EH=v.createContext(void 0);function GA(e){const t=v.useContext(EH);return e||t||"ltr"}var TH="DismissableLayer",Jy="dismissableLayer.update",_H="dismissableLayer.pointerDownOutside",CH="dismissableLayer.focusOutside",KA,XA=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),QA=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=v.useContext(XA),[c,d]=v.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),m=It(t,R=>d(R)),y=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(b),x=c?y.indexOf(c):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,T=x>=g,_=kH(R=>{const O=R.target,V=[...l.branches].some(P=>P.contains(O));!T||V||(i==null||i(R),a==null||a(R),R.defaultPrevented||s==null||s())},f),C=RH(R=>{const O=R.target;[...l.branches].some(P=>P.contains(O))||(o==null||o(R),a==null||a(R),R.defaultPrevented||s==null||s())},f);return Ry(R=>{x===l.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&s&&(R.preventDefault(),s()))},f),v.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(KA=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),ZA(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=KA)}},[c,f,n,l]),v.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),ZA())},[c,l]),v.useEffect(()=>{const R=()=>p({});return document.addEventListener(Jy,R),()=>document.removeEventListener(Jy,R)},[]),E.jsx(Et.div,{...u,ref:m,style:{pointerEvents:w?T?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,_.onPointerDownCapture)})});QA.displayName=TH;var SH="DismissableLayerBranch",AH=v.forwardRef((e,t)=>{const n=v.useContext(XA),r=v.useRef(null),i=It(t,r);return v.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),E.jsx(Et.div,{...e,ref:i})});AH.displayName=SH;function kH(e,t=globalThis==null?void 0:globalThis.document){const n=Pt(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){JA(_H,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function RH(e,t=globalThis==null?void 0:globalThis.document){const n=Pt(e),r=v.useRef(!1);return v.useEffect(()=>{const i=o=>{o.target&&!r.current&&JA(CH,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ZA(){const e=new CustomEvent(Jy);document.dispatchEvent(e)}function JA(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Zy(i,o):i.dispatchEvent(o)}var e1=0;function t1(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ek()),document.body.insertAdjacentElement("beforeend",e[1]??ek()),e1++,()=>{e1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),e1--}},[])}function ek(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var n1="focusScope.autoFocusOnMount",r1="focusScope.autoFocusOnUnmount",tk={bubbles:!1,cancelable:!0},NH="FocusScope",i1=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=v.useState(null),l=Pt(i),c=Pt(o),d=v.useRef(null),f=It(t,y=>u(y)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let y=function(w){if(p.paused||!s)return;const T=w.target;s.contains(T)?d.current=T:vo(d.current,{select:!0})},b=function(w){if(p.paused||!s)return;const T=w.relatedTarget;T!==null&&(s.contains(T)||vo(d.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const _ of w)_.removedNodes.length>0&&vo(s)};document.addEventListener("focusin",y),document.addEventListener("focusout",b);const x=new MutationObserver(g);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),x.disconnect()}}},[r,s,p.paused]),v.useEffect(()=>{if(s){ik.add(p);const y=document.activeElement;if(!s.contains(y)){const g=new CustomEvent(n1,tk);s.addEventListener(n1,l),s.dispatchEvent(g),g.defaultPrevented||(PH(MH(nk(s)),{select:!0}),document.activeElement===y&&vo(s))}return()=>{s.removeEventListener(n1,l),setTimeout(()=>{const g=new CustomEvent(r1,tk);s.addEventListener(r1,c),s.dispatchEvent(g),g.defaultPrevented||vo(y??document.body,{select:!0}),s.removeEventListener(r1,c),ik.remove(p)},0)}}},[s,l,c,p]);const m=v.useCallback(y=>{if(!n&&!r||p.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,g=document.activeElement;if(b&&g){const x=y.currentTarget,[w,T]=IH(x);w&&T?!y.shiftKey&&g===T?(y.preventDefault(),n&&vo(w,{select:!0})):y.shiftKey&&g===w&&(y.preventDefault(),n&&vo(T,{select:!0})):g===x&&y.preventDefault()}},[n,r,p.paused]);return E.jsx(Et.div,{tabIndex:-1,...a,ref:f,onKeyDown:m})});i1.displayName=NH;function PH(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(vo(r,{select:t}),document.activeElement!==n)return}function IH(e){const t=nk(e),n=rk(t,e),r=rk(t.reverse(),e);return[n,r]}function nk(e){const t=[],n=document.createTreeWalker(e,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();)t.push(n.currentNode);return t}function rk(e,t){for(const n of e)if(!OH(n,{upTo:t}))return n}function OH(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function DH(e){return e instanceof HTMLInputElement&&"select"in e}function vo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&DH(e)&&t&&e.select()}}var ik=LH();function LH(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ok(e,t),e.unshift(t)},remove(t){var n;e=ok(e,t),(n=e[0])==null||n.resume()}}}function ok(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function MH(e){return e.filter(t=>t.tagName!=="A")}var FH="Arrow",ak=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return E.jsx(Et.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});ak.displayName=FH;var BH=ak,o1="Popper",[sk,uk]=bi(o1),[jH,lk]=sk(o1),ck=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return E.jsx(jH,{scope:t,anchor:r,onAnchorChange:i,children:n})};ck.displayName=o1;var dk="PopperAnchor",fk=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=lk(dk,n),a=v.useRef(null),s=It(t,a);return v.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:E.jsx(Et.div,{...i,ref:s})});fk.displayName=dk;var a1="PopperContent",[UH,zH]=sk(a1),pk=v.forwardRef((e,t)=>{var $e,Ve,We,Ge,_t,Te;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...y}=e,b=lk(a1,n),[g,x]=v.useState(null),w=It(t,be=>x(be)),[T,_]=v.useState(null),C=yA(T),R=(C==null?void 0:C.width)??0,O=(C==null?void 0:C.height)??0,V=r+(o!=="center"?"-"+o:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},$=Array.isArray(l)?l:[l],z=$.length>0,Q={padding:P,boundary:$.filter(VH),altBoundary:z},{refs:Y,floatingStyles:re,placement:ie,isPositioned:te,middlewareData:F}=uA({strategy:"fixed",placement:V,whileElementsMounted:(...be)=>iA(...be,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[lA({mainAxis:i+O,alignmentAxis:a}),u&&cA({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?dA():void 0,...Q}),u&&fA({...Q}),pA({...Q,apply:({elements:be,rects:Ye,availableWidth:ze,availableHeight:yt})=>{const{width:vt,height:Ke}=Ye.reference,Fe=be.floating.style;Fe.setProperty("--radix-popper-available-width",`${ze}px`),Fe.setProperty("--radix-popper-available-height",`${yt}px`),Fe.setProperty("--radix-popper-anchor-width",`${vt}px`),Fe.setProperty("--radix-popper-anchor-height",`${Ke}px`)}}),T&&mA({element:T,padding:s}),$H({arrowWidth:R,arrowHeight:O}),f&&hA({strategy:"referenceHidden",...Q})]}),[B,A]=gk(ie),oe=Pt(m);or(()=>{te&&(oe==null||oe())},[te,oe]);const he=($e=F.arrow)==null?void 0:$e.x,D=(Ve=F.arrow)==null?void 0:Ve.y,Oe=((We=F.arrow)==null?void 0:We.centerOffset)!==0,[ge,xe]=v.useState();return or(()=>{g&&xe(window.getComputedStyle(g).zIndex)},[g]),E.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:te?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(Ge=F.transformOrigin)==null?void 0:Ge.x,(_t=F.transformOrigin)==null?void 0:_t.y].join(" "),...((Te=F.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(UH,{scope:n,placedSide:B,onArrowChange:_,arrowX:he,arrowY:D,shouldHideArrow:Oe,children:E.jsx(Et.div,{"data-side":B,"data-align":A,...y,ref:w,style:{...y.style,animation:te?void 0:"none"}})})})});pk.displayName=a1;var hk="PopperArrow",HH={top:"bottom",right:"left",bottom:"top",left:"right"},mk=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=zH(hk,r),a=HH[o.placedSide];return E.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:E.jsx(BH,{...i,ref:n,style:{...i.style,display:"block"}})})});mk.displayName=hk;function VH(e){return e!==null}var $H=e=>({name:"transformOrigin",options:e,fn(t){var b,g,x;const{placement:n,rects:r,middlewareData:i}=t,a=((b=i.arrow)==null?void 0:b.centerOffset)!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,c]=gk(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((g=i.arrow)==null?void 0:g.x)??0)+s/2,p=(((x=i.arrow)==null?void 0:x.y)??0)+u/2;let m="",y="";return l==="bottom"?(m=a?d:`${f}px`,y=`${-u}px`):l==="top"?(m=a?d:`${f}px`,y=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,y=a?d:`${p}px`):l==="left"&&(m=`${r.floating.width+u}px`,y=a?d:`${p}px`),{data:{x:m,y}}}});function gk(e){const[t,n="center"]=e.split("-");return[t,n]}var WH=ck,YH=fk,qH=pk,GH=mk;function KH(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var ks=e=>{const{present:t,children:n}=e,r=XH(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=It(r.ref,QH(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:o}):null};ks.displayName="Presence";function XH(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),o=v.useRef("none"),a=e?"mounted":"unmounted",[s,u]=KH(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=Zf(r.current);o.current=s==="mounted"?l:"none"},[s]),or(()=>{const l=r.current,c=i.current;if(c!==e){const f=o.current,p=Zf(l);e?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),or(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=p=>{const y=Zf(r.current).includes(p.animationName);if(p.target===t&&y&&(u("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=p=>{p.target===t&&(o.current=Zf(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Zf(e){return(e==null?void 0:e.animationName)||"none"}function QH(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var s1="rovingFocusGroup.onEntryFocus",ZH={bubbles:!1,cancelable:!0},Jf="RovingFocusGroup",[u1,yk,JH]=qA(Jf),[eV,vk]=bi(Jf,[JH]),[tV,nV]=eV(Jf),xk=v.forwardRef((e,t)=>E.jsx(u1.Provider,{scope:e.__scopeRovingFocusGroup,children:E.jsx(u1.Slot,{scope:e.__scopeRovingFocusGroup,children:E.jsx(rV,{...e,ref:t})})}));xk.displayName=Jf;var rV=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...d}=e,f=v.useRef(null),p=It(t,f),m=GA(o),[y=null,b]=_l({prop:a,defaultProp:s,onChange:u}),[g,x]=v.useState(!1),w=Pt(l),T=yk(n),_=v.useRef(!1),[C,R]=v.useState(0);return v.useEffect(()=>{const O=f.current;if(O)return O.addEventListener(s1,w),()=>O.removeEventListener(s1,w)},[w]),E.jsx(tV,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:y,onItemFocus:v.useCallback(O=>b(O),[b]),onItemShiftTab:v.useCallback(()=>x(!0),[]),onFocusableItemAdd:v.useCallback(()=>R(O=>O+1),[]),onFocusableItemRemove:v.useCallback(()=>R(O=>O-1),[]),children:E.jsx(Et.div,{tabIndex:g||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:Se(e.onMouseDown,()=>{_.current=!0}),onFocus:Se(e.onFocus,O=>{const V=!_.current;if(O.target===O.currentTarget&&V&&!g){const P=new CustomEvent(s1,ZH);if(O.currentTarget.dispatchEvent(P),!P.defaultPrevented){const $=T().filter(ie=>ie.focusable),z=$.find(ie=>ie.active),Q=$.find(ie=>ie.id===y),re=[z,Q,...$].filter(Boolean).map(ie=>ie.ref.current);Ek(re,c)}}_.current=!1}),onBlur:Se(e.onBlur,()=>x(!1))})})}),wk="RovingFocusGroupItem",bk=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,s=fo(),u=o||s,l=nV(wk,n),c=l.currentTabStopId===u,d=yk(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=l;return v.useEffect(()=>{if(r)return f(),()=>p()},[r,f,p]),E.jsx(u1.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:E.jsx(Et.span,{tabIndex:c?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Se(e.onMouseDown,m=>{r?l.onItemFocus(u):m.preventDefault()}),onFocus:Se(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Se(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){l.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const y=aV(m,l.orientation,l.dir);if(y!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let g=d().filter(x=>x.focusable).map(x=>x.ref.current);if(y==="last")g.reverse();else if(y==="prev"||y==="next"){y==="prev"&&g.reverse();const x=g.indexOf(m.currentTarget);g=l.loop?sV(g,x+1):g.slice(x+1)}setTimeout(()=>Ek(g))}})})})});bk.displayName=wk;var iV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function oV(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function aV(e,t,n){const r=oV(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return iV[r]}function Ek(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function sV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var uV=xk,lV=bk,cV=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Rs=new WeakMap,ep=new WeakMap,tp={},l1=0,Tk=function(e){return e&&(e.host||Tk(e.parentNode))},dV=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Tk(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},fV=function(e,t,n,r){var i=dV(t,Array.isArray(e)?e:[e]);tp[n]||(tp[n]=new WeakMap);var o=tp[n],a=[],s=new Set,u=new Set(i),l=function(d){!d||s.has(d)||(s.add(d),l(d.parentNode))};i.forEach(l);var c=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else try{var p=f.getAttribute(r),m=p!==null&&p!=="false",y=(Rs.get(f)||0)+1,b=(o.get(f)||0)+1;Rs.set(f,y),o.set(f,b),a.push(f),y===1&&m&&ep.set(f,!0),b===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return c(t),s.clear(),l1++,function(){a.forEach(function(d){var f=Rs.get(d)-1,p=o.get(d)-1;Rs.set(d,f),o.set(d,p),f||(ep.has(d)||d.removeAttribute(r),ep.delete(d)),p||d.removeAttribute(n)}),l1--,l1||(Rs=new WeakMap,Rs=new WeakMap,ep=new WeakMap,tp={})}},c1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=cV(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),fV(r,i,n,"aria-hidden")):function(){return null}},np="right-scroll-bar-position",rp="width-before-scroll-bar",pV="with-scroll-bars-hidden",hV="--removed-body-scroll-bar-size";function d1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function mV(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var gV=typeof window<"u"?v.useLayoutEffect:v.useEffect,_k=new WeakMap;function yV(e,t){var n=mV(null,function(r){return e.forEach(function(i){return d1(i,r)})});return gV(function(){var r=_k.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||d1(s,null)}),o.forEach(function(s){i.has(s)||d1(s,a)})}_k.set(n,e)},[e]),n}function vV(e){return e}function xV(e,t){t===void 0&&(t=vV);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var u=function(){var c=a;a=[],c.forEach(o)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(c){a.push(c),l()},filter:function(c){return a=a.filter(c),n}}}};return i}function Ck(e){e===void 0&&(e={});var t=xV(null);return t.options=Mt({async:!0,ssr:!1},e),t}var Sk=function(e){var t=e.sideCar,n=ul(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Mt({},n))};Sk.isSideCarExport=!0;function Ak(e,t){return e.useMedium(t),Sk}var kk=Ck(),f1=function(){},ip=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:f1,onWheelCapture:f1,onTouchMoveCapture:f1}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,y=e.allowPinchZoom,b=e.as,g=b===void 0?"div":b,x=e.gapMode,w=ul(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=f,_=yV([n,t]),C=Mt(Mt({},w),i);return v.createElement(v.Fragment,null,c&&v.createElement(T,{sideCar:kk,removeScrollBar:l,shards:d,noIsolation:p,inert:m,setCallbacks:o,allowPinchZoom:!!y,lockRef:n,gapMode:x}),a?v.cloneElement(v.Children.only(s),Mt(Mt({},C),{ref:_})):v.createElement(g,Mt({},C,{className:u,ref:_}),s))});ip.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ip.classNames={fullWidth:rp,zeroRight:np};var Rk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Rk();return t&&e.setAttribute("nonce",t),e}function bV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function EV(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var TV=function(){var e=0,t=null;return{add:function(n){e==0&&(t=wV())&&(bV(t,n),EV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},_V=function(){var e=TV();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},CV=function(){var e=_V(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},SV={left:0,top:0,right:0,gap:0},p1=function(e){return parseInt(e||"",10)||0},AV=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[p1(n),p1(r),p1(i)]},kV=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return SV;var t=AV(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},RV=CV(),Ns="data-scroll-locked",NV=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
347
347
|
.`.concat(pV,` {
|
|
348
348
|
overflow: hidden `).concat(r,`;
|
|
349
349
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
@@ -383,7 +383,7 @@ to {
|
|
|
383
383
|
`)},Nk=function(){var e=parseInt(document.body.getAttribute(Ns)||"0",10);return isFinite(e)?e:0},PV=function(){v.useEffect(function(){return document.body.setAttribute(Ns,(Nk()+1).toString()),function(){var e=Nk()-1;e<=0?document.body.removeAttribute(Ns):document.body.setAttribute(Ns,e.toString())}},[])},IV=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;PV();var o=v.useMemo(function(){return kV(i)},[i]);return v.createElement(RV,{styles:NV(o,!t,i,n?"":"!important")})};function OV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Rk();return t&&e.setAttribute("nonce",t),e}function DV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function LV(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var MV=function(){var e=0,t=null;return{add:function(n){e==0&&(t=OV())&&(DV(t,n),LV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},FV=function(){var e=MV();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},h1=function(){var e=FV(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},m1=!1;if(typeof window<"u")try{var op=Object.defineProperty({},"passive",{get:function(){return m1=!0,!0}});window.addEventListener("test",op,op),window.removeEventListener("test",op,op)}catch{m1=!1}var Ps=m1?{passive:!1}:!1,BV=function(e){return e.tagName==="TEXTAREA"},Pk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!BV(e)&&n[t]==="visible")},jV=function(e){return Pk(e,"overflowY")},UV=function(e){return Pk(e,"overflowX")},Ik=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Ok(e,r);if(i){var o=Dk(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},zV=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},HV=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ok=function(e,t){return e==="v"?jV(t):UV(t)},Dk=function(e,t){return e==="v"?zV(t):HV(t)},VV=function(e,t){return e==="h"&&t==="rtl"?-1:1},$V=function(e,t,n,r,i){var o=VV(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,u=t.contains(s),l=!1,c=a>0,d=0,f=0;do{var p=Dk(e,s),m=p[0],y=p[1],b=p[2],g=y-b-o*m;(m||g)&&Ok(e,s)&&(d+=g,f+=m),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(d)<1||!i)||!c&&(Math.abs(f)<1||!i))&&(l=!0),l},ap=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Lk=function(e){return[e.deltaX,e.deltaY]},Mk=function(e){return e&&"current"in e?e.current:e},WV=function(e,t){return e[0]===t[0]&&e[1]===t[1]},YV=function(e){return`
|
|
384
384
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
385
385
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
386
|
-
`)},qV=0,Is=[];function GV(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(qV++)[0],o=v.useState(h1)[0],a=v.useRef(e);v.useEffect(function(){a.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=sf([e.lockRef.current],(e.shards||[]).map(Mk),!0).filter(Boolean);return y.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(y,b){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!a.current.allowPinchZoom;var g=ap(y),x=n.current,w="deltaX"in y?y.deltaX:x[0]-g[0],T="deltaY"in y?y.deltaY:x[1]-g[1],_,C=y.target,R=Math.abs(w)>Math.abs(T)?"h":"v";if("touches"in y&&R==="h"&&C.type==="range")return!1;var O=Ik(R,C);if(!O)return!0;if(O?_=R:(_=R==="v"?"h":"v",O=Ik(R,C)),!O)return!1;if(!r.current&&"changedTouches"in y&&(w||T)&&(r.current=_),!_)return!0;var V=r.current||_;return $V(V,b,y,V==="h"?w:T,!0)},[]),u=v.useCallback(function(y){var b=y;if(!(!Is.length||Is[Is.length-1]!==o)){var g="deltaY"in b?Lk(b):ap(b),x=t.current.filter(function(_){return _.name===b.type&&(_.target===b.target||b.target===_.shadowParent)&&WV(_.delta,g)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var w=(a.current.shards||[]).map(Mk).filter(Boolean).filter(function(_){return _.contains(b.target)}),T=w.length>0?s(b,w[0]):!a.current.noIsolation;T&&b.cancelable&&b.preventDefault()}}},[]),l=v.useCallback(function(y,b,g,x){var w={name:y,delta:b,target:g,should:x,shadowParent:KV(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(T){return T!==w})},1)},[]),c=v.useCallback(function(y){n.current=ap(y),r.current=void 0},[]),d=v.useCallback(function(y){l(y.type,Lk(y),y.target,s(y,e.lockRef.current))},[]),f=v.useCallback(function(y){l(y.type,ap(y),y.target,s(y,e.lockRef.current))},[]);v.useEffect(function(){return Is.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,Ps),document.addEventListener("touchmove",u,Ps),document.addEventListener("touchstart",c,Ps),function(){Is=Is.filter(function(y){return y!==o}),document.removeEventListener("wheel",u,Ps),document.removeEventListener("touchmove",u,Ps),document.removeEventListener("touchstart",c,Ps)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(o,{styles:YV(i)}):null,p?v.createElement(IV,{gapMode:e.gapMode}):null)}function KV(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const XV=Ak(kk,GV);var g1=v.forwardRef(function(e,t){return v.createElement(ip,Mt({},e,{ref:t,sideCar:XV}))});g1.classNames=ip.classNames;var y1=["Enter"," "],QV=["ArrowDown","PageUp","Home"],Fk=["ArrowUp","PageDown","End"],ZV=[...QV,...Fk],JV={ltr:[...y1,"ArrowRight"],rtl:[...y1,"ArrowLeft"]},e$={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Cl="Menu",[Sl,t$,n$]=qA(Cl),[la,Bk]=bi(Cl,[n$,uk,vk]),sp=uk(),jk=vk(),[r$,Os]=la(Cl),[i$,Al]=la(Cl),Uk=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=sp(t),[u,l]=v.useState(null),c=v.useRef(!1),d=Pt(o),f=GA(i);return v.useEffect(()=>{const p=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),E.jsx(WH,{...s,children:E.jsx(r$,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:l,children:E.jsx(i$,{scope:t,onClose:v.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:a,children:r})})})};Uk.displayName=Cl;var o$="MenuAnchor",v1=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=sp(n);return E.jsx(YH,{...i,...r,ref:t})});v1.displayName=o$;var a$="MenuPortal",[eoe,zk]=la(a$,{forceMount:void 0}),ar="MenuContent",[s$,x1]=la(ar),Hk=v.forwardRef((e,t)=>{const n=zk(ar,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Os(ar,e.__scopeMenu),a=Al(ar,e.__scopeMenu);return E.jsx(Sl.Provider,{scope:e.__scopeMenu,children:E.jsx(ks,{present:r||o.open,children:E.jsx(Sl.Slot,{scope:e.__scopeMenu,children:a.modal?E.jsx(u$,{...i,ref:t}):E.jsx(l$,{...i,ref:t})})})})}),u$=v.forwardRef((e,t)=>{const n=Os(ar,e.__scopeMenu),r=v.useRef(null),i=It(t,r);return v.useEffect(()=>{const o=r.current;if(o)return c1(o)},[]),E.jsx(w1,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Se(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),l$=v.forwardRef((e,t)=>{const n=Os(ar,e.__scopeMenu);return E.jsx(w1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),w1=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...y}=e,b=Os(ar,n),g=Al(ar,n),x=sp(n),w=jk(n),T=t$(n),[_,C]=v.useState(null),R=v.useRef(null),O=It(t,R,b.onContentChange),V=v.useRef(0),P=v.useRef(""),$=v.useRef(0),z=v.useRef(null),X=v.useRef("right"),Y=v.useRef(0),re=m?g1:v.Fragment,ie=m?{as:As,allowPinchZoom:!0}:void 0,te=B=>{var $e,Ve;const A=P.current+B,oe=T().filter(We=>!We.disabled),he=document.activeElement,D=($e=oe.find(We=>We.ref.current===he))==null?void 0:$e.textValue,Oe=oe.map(We=>We.textValue),ge=b$(Oe,A,D),xe=(Ve=oe.find(We=>We.textValue===ge))==null?void 0:Ve.ref.current;(function We(Ge){P.current=Ge,window.clearTimeout(V.current),Ge!==""&&(V.current=window.setTimeout(()=>We(""),1e3))})(A),xe&&setTimeout(()=>xe.focus())};v.useEffect(()=>()=>window.clearTimeout(V.current),[]),t1();const F=v.useCallback(B=>{var oe,he;return X.current===((oe=z.current)==null?void 0:oe.side)&&T$(B,(he=z.current)==null?void 0:he.area)},[]);return E.jsx(s$,{scope:n,searchRef:P,onItemEnter:v.useCallback(B=>{F(B)&&B.preventDefault()},[F]),onItemLeave:v.useCallback(B=>{var A;F(B)||((A=R.current)==null||A.focus(),C(null))},[F]),onTriggerLeave:v.useCallback(B=>{F(B)&&B.preventDefault()},[F]),pointerGraceTimerRef:$,onPointerGraceIntentChange:v.useCallback(B=>{z.current=B},[]),children:E.jsx(re,{...ie,children:E.jsx(i1,{asChild:!0,trapped:i,onMountAutoFocus:Se(o,B=>{var A;B.preventDefault(),(A=R.current)==null||A.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:E.jsx(QA,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:E.jsx(uV,{asChild:!0,...w,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:C,onEntryFocus:Se(u,B=>{g.isUsingKeyboardRef.current||B.preventDefault()}),preventScrollOnEntryFocus:!0,children:E.jsx(qH,{role:"menu","aria-orientation":"vertical","data-state":oR(b.open),"data-radix-menu-content":"",dir:g.dir,...x,...y,ref:O,style:{outline:"none",...y.style},onKeyDown:Se(y.onKeyDown,B=>{const oe=B.target.closest("[data-radix-menu-content]")===B.currentTarget,he=B.ctrlKey||B.altKey||B.metaKey,D=B.key.length===1;oe&&(B.key==="Tab"&&B.preventDefault(),!he&&D&&te(B.key));const Oe=R.current;if(B.target!==Oe||!ZV.includes(B.key))return;B.preventDefault();const xe=T().filter($e=>!$e.disabled).map($e=>$e.ref.current);Fk.includes(B.key)&&xe.reverse(),x$(xe)}),onBlur:Se(e.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(V.current),P.current="")}),onPointerMove:Se(e.onPointerMove,Rl(B=>{const A=B.target,oe=Y.current!==B.clientX;if(B.currentTarget.contains(A)&&oe){const he=B.clientX>Y.current?"right":"left";X.current=he,Y.current=B.clientX}}))})})})})})})});Hk.displayName=ar;var c$="MenuGroup",b1=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(Et.div,{role:"group",...r,ref:t})});b1.displayName=c$;var d$="MenuLabel",Vk=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(Et.div,{...r,ref:t})});Vk.displayName=d$;var up="MenuItem",$k="menu.itemSelect",lp=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=v.useRef(null),a=Al(up,e.__scopeMenu),s=x1(up,e.__scopeMenu),u=It(t,o),l=v.useRef(!1),c=()=>{const d=o.current;if(!n&&d){const f=new CustomEvent($k,{bubbles:!0,cancelable:!0});d.addEventListener($k,p=>r==null?void 0:r(p),{once:!0}),Zy(d,f),f.defaultPrevented?l.current=!1:a.onClose()}};return E.jsx(Wk,{...i,ref:u,disabled:n,onClick:Se(e.onClick,c),onPointerDown:d=>{var f;(f=e.onPointerDown)==null||f.call(e,d),l.current=!0},onPointerUp:Se(e.onPointerUp,d=>{var f;l.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:Se(e.onKeyDown,d=>{const f=s.searchRef.current!=="";n||f&&d.key===" "||y1.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});lp.displayName=up;var Wk=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=x1(up,n),s=jk(n),u=v.useRef(null),l=It(t,u),[c,d]=v.useState(!1),[f,p]=v.useState("");return v.useEffect(()=>{const m=u.current;m&&p((m.textContent??"").trim())},[o.children]),E.jsx(Sl.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:E.jsx(lV,{asChild:!0,...s,focusable:!r,children:E.jsx(Et.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:l,onPointerMove:Se(e.onPointerMove,Rl(m=>{r?a.onItemLeave(m):(a.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Se(e.onPointerLeave,Rl(m=>a.onItemLeave(m))),onFocus:Se(e.onFocus,()=>d(!0)),onBlur:Se(e.onBlur,()=>d(!1))})})})}),f$="MenuCheckboxItem",Yk=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return E.jsx(Qk,{scope:e.__scopeMenu,checked:n,children:E.jsx(lp,{role:"menuitemcheckbox","aria-checked":cp(n)?"mixed":n,...i,ref:t,"data-state":T1(n),onSelect:Se(i.onSelect,()=>r==null?void 0:r(cp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Yk.displayName=f$;var qk="MenuRadioGroup",[p$,h$]=la(qk,{value:void 0,onValueChange:()=>{}}),Gk=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Pt(r);return E.jsx(p$,{scope:e.__scopeMenu,value:n,onValueChange:o,children:E.jsx(b1,{...i,ref:t})})});Gk.displayName=qk;var Kk="MenuRadioItem",Xk=v.forwardRef((e,t)=>{const{value:n,...r}=e,i=h$(Kk,e.__scopeMenu),o=n===i.value;return E.jsx(Qk,{scope:e.__scopeMenu,checked:o,children:E.jsx(lp,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":T1(o),onSelect:Se(r.onSelect,()=>{var a;return(a=i.onValueChange)==null?void 0:a.call(i,n)},{checkForDefaultPrevented:!1})})})});Xk.displayName=Kk;var E1="MenuItemIndicator",[Qk,m$]=la(E1,{checked:!1}),Zk=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=m$(E1,n);return E.jsx(ks,{present:r||cp(o.checked)||o.checked===!0,children:E.jsx(Et.span,{...i,ref:t,"data-state":T1(o.checked)})})});Zk.displayName=E1;var g$="MenuSeparator",Jk=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(Et.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Jk.displayName=g$;var y$="MenuArrow",eR=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=sp(n);return E.jsx(GH,{...i,...r,ref:t})});eR.displayName=y$;var v$="MenuSub",[toe,tR]=la(v$),kl="MenuSubTrigger",nR=v.forwardRef((e,t)=>{const n=Os(kl,e.__scopeMenu),r=Al(kl,e.__scopeMenu),i=tR(kl,e.__scopeMenu),o=x1(kl,e.__scopeMenu),a=v.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:u}=o,l={__scopeMenu:e.__scopeMenu},c=v.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return v.useEffect(()=>c,[c]),v.useEffect(()=>{const d=s.current;return()=>{window.clearTimeout(d),u(null)}},[s,u]),E.jsx(v1,{asChild:!0,...l,children:E.jsx(Wk,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":oR(n.open),...e,ref:Qf(t,i.onTriggerChange),onClick:d=>{var f;(f=e.onClick)==null||f.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Se(e.onPointerMove,Rl(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Se(e.onPointerLeave,Rl(d=>{var p,m;c();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const y=(m=n.content)==null?void 0:m.dataset.side,b=y==="right",g=b?-5:5,x=f[b?"left":"right"],w=f[b?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x,y:f.bottom}],side:y}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Se(e.onKeyDown,d=>{var p;const f=o.searchRef.current!=="";e.disabled||f&&d.key===" "||JV[r.dir].includes(d.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),d.preventDefault())})})})});nR.displayName=kl;var rR="MenuSubContent",iR=v.forwardRef((e,t)=>{const n=zk(ar,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Os(ar,e.__scopeMenu),a=Al(ar,e.__scopeMenu),s=tR(rR,e.__scopeMenu),u=v.useRef(null),l=It(t,u);return E.jsx(Sl.Provider,{scope:e.__scopeMenu,children:E.jsx(ks,{present:r||o.open,children:E.jsx(Sl.Slot,{scope:e.__scopeMenu,children:E.jsx(w1,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{var d;a.isUsingKeyboardRef.current&&((d=u.current)==null||d.focus()),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Se(e.onFocusOutside,c=>{c.target!==s.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Se(e.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:Se(e.onKeyDown,c=>{var p;const d=c.currentTarget.contains(c.target),f=e$[a.dir].includes(c.key);d&&f&&(o.onOpenChange(!1),(p=s.trigger)==null||p.focus(),c.preventDefault())})})})})})});iR.displayName=rR;function oR(e){return e?"open":"closed"}function cp(e){return e==="indeterminate"}function T1(e){return cp(e)?"indeterminate":e?"checked":"unchecked"}function x$(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function w$(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function b$(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=w$(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function E$(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o].x,u=t[o].y,l=t[a].x,c=t[a].y;u>r!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function T$(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return E$(n,t)}function Rl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var _$=Uk,C$=v1,S$=Hk,A$=b1,k$=Vk,R$=lp,N$=Yk,P$=Gk,I$=Xk,O$=Zk,D$=Jk,L$=eR,M$=nR,F$=iR,_1="DropdownMenu",[B$,noe]=bi(_1,[Bk]),Sn=Bk(),[j$,aR]=B$(_1),sR=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,u=Sn(t),l=v.useRef(null),[c=!1,d]=_l({prop:i,defaultProp:o,onChange:a});return E.jsx(j$,{scope:t,triggerId:fo(),triggerRef:l,contentId:fo(),open:c,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(f=>!f),[d]),modal:s,children:E.jsx(_$,{...u,open:c,onOpenChange:d,dir:r,modal:s,children:n})})};sR.displayName=_1;var uR="DropdownMenuTrigger",lR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=aR(uR,n),a=Sn(n);return E.jsx(C$,{asChild:!0,...a,children:E.jsx(Et.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Qf(t,o.triggerRef),onPointerDown:Se(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(o.onOpenToggle(),o.open||s.preventDefault())}),onKeyDown:Se(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&o.onOpenToggle(),s.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});lR.displayName=uR;var cR="DropdownMenuContent",dR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=aR(cR,n),o=Sn(n),a=v.useRef(!1);return E.jsx(S$,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Se(e.onCloseAutoFocus,s=>{var u;a.current||(u=i.triggerRef.current)==null||u.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:Se(e.onInteractOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,c=u.button===2||l;(!i.modal||c)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});dR.displayName=cR;var U$="DropdownMenuGroup",fR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(A$,{...i,...r,ref:t})});fR.displayName=U$;var z$="DropdownMenuLabel",pR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(k$,{...i,...r,ref:t})});pR.displayName=z$;var H$="DropdownMenuItem",hR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(R$,{...i,...r,ref:t})});hR.displayName=H$;var V$="DropdownMenuCheckboxItem",mR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(N$,{...i,...r,ref:t})});mR.displayName=V$;var $$="DropdownMenuRadioGroup",W$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(P$,{...i,...r,ref:t})});W$.displayName=$$;var Y$="DropdownMenuRadioItem",gR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(I$,{...i,...r,ref:t})});gR.displayName=Y$;var q$="DropdownMenuItemIndicator",yR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(O$,{...i,...r,ref:t})});yR.displayName=q$;var G$="DropdownMenuSeparator",vR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(D$,{...i,...r,ref:t})});vR.displayName=G$;var K$="DropdownMenuArrow",X$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(L$,{...i,...r,ref:t})});X$.displayName=K$;var Q$="DropdownMenuSubTrigger",xR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(M$,{...i,...r,ref:t})});xR.displayName=Q$;var Z$="DropdownMenuSubContent",wR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(F$,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});wR.displayName=Z$;var J$=sR,eW=lR,bR=dR,tW=fR,ER=pR,TR=hR,_R=mR,CR=gR,SR=yR,AR=vR,kR=xR,RR=wR;const nW=J$,rW=eW,iW=tW,oW=v.forwardRef(({className:e,inset:t,children:n,...r},i)=>E.jsxs(kR,{ref:i,className:Ne("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,E.jsx(N_,{className:"ml-auto"})]}));oW.displayName=kR.displayName;const aW=v.forwardRef(({className:e,...t},n)=>E.jsx(RR,{ref:n,className:Ne("z-50 min-w-[8rem] overflow-hidden rounded-2xl border bg-background p-1 text-foreground shadow-2xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));aW.displayName=RR.displayName;const NR=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>E.jsx(bR,{ref:r,sideOffset:t,className:Ne("z-50 min-w-[8rem] overflow-hidden rounded-2xl border bg-background p-1 text-foreground shadow-2xl","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));NR.displayName=bR.displayName;const PR=v.forwardRef(({className:e,inset:t,...n},r)=>E.jsx(st,{children:E.jsx(TR,{ref:r,className:Ne("relative flex cursor-default select-none items-center gap-2 rounded-xl px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n})}));PR.displayName=TR.displayName;const sW=v.forwardRef(({className:e,children:t,checked:n,...r},i)=>E.jsxs(_R,{ref:i,className:Ne("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[E.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:E.jsx(SR,{children:E.jsx(DF,{className:"h-4 w-4"})})}),t]}));sW.displayName=_R.displayName;const uW=v.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(CR,{ref:r,className:Ne("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[E.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:E.jsx(SR,{children:E.jsx(BF,{className:"h-2 w-2 fill-current"})})}),t]}));uW.displayName=CR.displayName;const lW=v.forwardRef(({className:e,inset:t,...n},r)=>E.jsx(ER,{ref:r,className:Ne("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));lW.displayName=ER.displayName;const cW=v.forwardRef(({className:e,...t},n)=>E.jsx(AR,{ref:n,className:Ne("-mx-1 my-1 h-px bg-muted",e),...t}));cW.displayName=AR.displayName;function IR({className:e,...t}){return E.jsx("div",{className:Ne("animate-pulse rounded-md bg-secondary",e),...t})}function dW(){const e=Ss(),[t,n]=v.useState(!1),{toChatScreen:r}=wl();return E.jsxs(nW,{open:t,onOpenChange:n,children:[E.jsx(rW,{asChild:!0,children:E.jsx($n,{variant:"ghost",size:"fit",className:"rounded-full",children:E.jsx(jF,{className:"size-4"})})}),E.jsx(NR,{align:"end",className:"min-w-56",children:E.jsx(iW,{children:E.jsxs(PR,{onSelect:()=>{n(!1),r()},children:[E.jsx(cs.div,{initial:{opacity:0,x:-4,rotate:360},animate:{opacity:1,x:0,rotate:0},children:E.jsx(WF,{})}),e.get("new-conversation")]})})})]})}function OR(){var o,a;const{routerState:{screen:e},toSessionsScreen:t}=wl(),{data:n,isLoading:r}=Pf(),i=Xf();return E.jsx("header",{className:"p-2 border-b bg-background",children:E.jsxs("div",{dir:i,className:"flex items-center rtl:flex-row-reverse gap-2",children:[e==="chat"&&E.jsx($n,{variant:"ghost",size:"fit",className:"rounded-full",onClick:t,children:E.jsx(LF,{className:"size-4"})}),E.jsx("div",{className:Ne("flex-1",e==="sessions"&&"pl-2"),children:E.jsx(jn,{mode:"wait",children:r||!((o=n==null?void 0:n.data)!=null&&o.organizationName)?E.jsx(st,{snapExit:!0,children:E.jsx(IR,{className:"h-5 w-1/2"})},"skeleton"):E.jsx(st,{children:E.jsx("h2",{className:"font-semibold",children:(a=n==null?void 0:n.data)==null?void 0:a.organizationName})},"organization-name")})}),E.jsx(dW,{})]})})}function fW(e){const t=[];let n=null;return e.forEach(r=>{var i,o,a,s;(!n||((i=n[0])==null?void 0:i.type)!==r.type)&&(n=[],t.push(n)),((o=n[0])==null?void 0:o.type)==="FROM_AGENT"&&r.type==="FROM_AGENT"&&((a=r.agent)==null?void 0:a.id)!==((s=n[0].agent)==null?void 0:s.id)&&(n=[],t.push(n)),n.push(r)}),t}function pW(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_USER"}function hW(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_BOT"}function mW(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_AGENT"}function DR(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function roe(){}function ioe(){}const pn=xo(/[A-Za-z]/),nn=xo(/[\dA-Za-z]/),gW=xo(/[#-'*+\--9=?A-Z^-~]/);function dp(e){return e!==null&&(e<32||e===127)}const C1=xo(/\d/),yW=xo(/[\dA-Fa-f]/),vW=xo(/[!-/:-@[-`{-~]/);function me(e){return e!==null&&e<-2}function Ze(e){return e!==null&&(e<0||e===32)}function Me(e){return e===-2||e===-1||e===32}const fp=xo(new RegExp("\\p{P}|\\p{S}","u")),ca=xo(/\s/);function xo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function xW(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const pp=function(e){if(e==null)return TW;if(typeof e=="function")return hp(e);if(typeof e=="object")return Array.isArray(e)?wW(e):bW(e);if(typeof e=="string")return EW(e);throw new Error("Expected function, string, or object as test")};function wW(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=pp(e[n]);return hp(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function bW(e){const t=e;return hp(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function EW(e){return hp(t);function t(n){return n&&n.type===e}}function hp(e){return t;function t(n,r,i){return!!(_W(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function TW(){return!0}function _W(e){return e!==null&&typeof e=="object"&&"type"in e}function ooe(e){return e}const LR=[],CW=!0,S1=!1,SW="skip";function MR(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=pp(i),a=r?-1:1;s(e,void 0,[])();function s(u,l,c){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=LR,m,y,b;if((!t||o(u,l,c[c.length-1]||void 0))&&(p=AW(n(u,c)),p[0]===S1))return p;if("children"in u&&u.children){const g=u;if(g.children&&p[0]!==SW)for(y=(r?g.children.length:-1)+a,b=c.concat(g);y>-1&&y<g.children.length;){const x=g.children[y];if(m=s(x,y,b)(),m[0]===S1)return m;y=typeof m[1]=="number"?m[1]:y+a}}return p}}}function AW(e){return Array.isArray(e)?e:typeof e=="number"?[CW,e]:e==null?LR:[e]}function kW(e,t,n){const i=pp((n||{}).ignore||[]),o=RW(t);let a=-1;for(;++a<o.length;)MR(e,"text",s);function s(l,c){let d=-1,f;for(;++d<c.length;){const p=c[d],m=f?f.children:void 0;if(i(p,m?m.indexOf(p):void 0,f))return;f=p}if(f)return u(l,c)}function u(l,c){const d=c[c.length-1],f=o[a][0],p=o[a][1];let m=0;const b=d.children.indexOf(l);let g=!1,x=[];f.lastIndex=0;let w=f.exec(l.value);for(;w;){const T=w.index,_={index:w.index,input:w.input,stack:[...c,l]};let C=p(...w,_);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?f.lastIndex=T+1:(m!==T&&x.push({type:"text",value:l.value.slice(m,T)}),Array.isArray(C)?x.push(...C):C&&x.push(C),m=T+w[0].length,g=!0),!f.global)break;w=f.exec(l.value)}return g?(m<l.value.length&&x.push({type:"text",value:l.value.slice(m)}),d.children.splice(b,1,...x)):x=[l],b+x.length}}function RW(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([NW(i[0]),PW(i[1])])}return t}function NW(e){return typeof e=="string"?new RegExp(xW(e),"g"):e}function PW(e){return typeof e=="function"?e:function(){return e}}const A1="phrasing",k1=["autolink","link","image","label"];function IW(){return{transforms:[jW],enter:{literalAutolink:DW,literalAutolinkEmail:R1,literalAutolinkHttp:R1,literalAutolinkWww:R1},exit:{literalAutolink:BW,literalAutolinkEmail:FW,literalAutolinkHttp:LW,literalAutolinkWww:MW}}}function OW(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:A1,notInConstruct:k1},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:A1,notInConstruct:k1},{character:":",before:"[ps]",after:"\\/",inConstruct:A1,notInConstruct:k1}]}}function DW(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function R1(e){this.config.enter.autolinkProtocol.call(this,e)}function LW(e){this.config.exit.autolinkProtocol.call(this,e)}function MW(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function FW(e){this.config.exit.autolinkEmail.call(this,e)}function BW(e){this.exit(e)}function jW(e){kW(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,UW],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),zW]],{ignore:["link","linkReference"]})}function UW(e,t,n,r,i){let o="";if(!FR(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!HW(n)))return!1;const a=VW(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function zW(e,t,n,r){return!FR(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function HW(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function VW(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=DR(e,"(");let o=DR(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function FR(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ca(n)||fp(n))&&(!t||n!==47)}function Sr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}BR.peek=eY;function $W(){return{enter:{gfmFootnoteDefinition:YW,gfmFootnoteDefinitionLabelString:qW,gfmFootnoteCall:XW,gfmFootnoteCallString:QW},exit:{gfmFootnoteDefinition:KW,gfmFootnoteDefinitionLabelString:GW,gfmFootnoteCall:JW,gfmFootnoteCallString:ZW}}}function WW(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:tY,footnoteReference:BR}}}function YW(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function qW(){this.buffer()}function GW(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Sr(this.sliceSerialize(e)).toLowerCase()}function KW(e){this.exit(e)}function XW(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function QW(){this.buffer()}function ZW(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Sr(this.sliceSerialize(e)).toLowerCase()}function JW(e){this.exit(e)}function BR(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function eY(){return"["}function tY(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),nY)),a(),o}function nY(e,t,n){return t===0?e:(n?"":" ")+e}const rY=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];jR.peek=uY;function iY(){return{canContainEols:["delete"],enter:{strikethrough:aY},exit:{strikethrough:sY}}}function oY(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rY}],handlers:{delete:jR}}}function aY(e){this.enter({type:"delete",children:[]},e)}function sY(e){this.exit(e)}function jR(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function uY(){return"~"}function lY(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||dY,i=[],o=[],a=[],s=[];let u=0,l=-1;for(;++l<e.length;){const m=[],y=[];let b=-1;for(e[l].length>u&&(u=e[l].length);++b<e[l].length;){const g=cY(e[l][b]);if(t.alignDelimiters!==!1){const x=r(g);y[b]=x,(s[b]===void 0||x>s[b])&&(s[b]=x)}m.push(g)}o[l]=m,a[l]=y}let c=-1;if(typeof n=="object"&&"length"in n)for(;++c<u;)i[c]=UR(n[c]);else{const m=UR(n);for(;++c<u;)i[c]=m}c=-1;const d=[],f=[];for(;++c<u;){const m=i[c];let y="",b="";m===99?(y=":",b=":"):m===108?y=":":m===114&&(b=":");let g=t.alignDelimiters===!1?1:Math.max(1,s[c]-y.length-b.length);const x=y+"-".repeat(g)+b;t.alignDelimiters!==!1&&(g=y.length+g+b.length,g>s[c]&&(s[c]=g),f[c]=g),d[c]=x}o.splice(1,0,d),a.splice(1,0,f),l=-1;const p=[];for(;++l<o.length;){const m=o[l],y=a[l];c=-1;const b=[];for(;++c<u;){const g=m[c]||"";let x="",w="";if(t.alignDelimiters!==!1){const T=s[c]-(y[c]||0),_=i[c];_===114?x=" ".repeat(T):_===99?T%2?(x=" ".repeat(T/2+.5),w=" ".repeat(T/2-.5)):(x=" ".repeat(T/2),w=x):w=" ".repeat(T)}t.delimiterStart!==!1&&!c&&b.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&g==="")&&(t.delimiterStart!==!1||c)&&b.push(" "),t.alignDelimiters!==!1&&b.push(x),b.push(g),t.alignDelimiters!==!1&&b.push(w),t.padding!==!1&&b.push(" "),(t.delimiterEnd!==!1||c!==u-1)&&b.push("|")}p.push(t.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return p.join(`
|
|
386
|
+
`)},qV=0,Is=[];function GV(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(qV++)[0],o=v.useState(h1)[0],a=v.useRef(e);v.useEffect(function(){a.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=sf([e.lockRef.current],(e.shards||[]).map(Mk),!0).filter(Boolean);return y.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(y,b){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!a.current.allowPinchZoom;var g=ap(y),x=n.current,w="deltaX"in y?y.deltaX:x[0]-g[0],T="deltaY"in y?y.deltaY:x[1]-g[1],_,C=y.target,R=Math.abs(w)>Math.abs(T)?"h":"v";if("touches"in y&&R==="h"&&C.type==="range")return!1;var O=Ik(R,C);if(!O)return!0;if(O?_=R:(_=R==="v"?"h":"v",O=Ik(R,C)),!O)return!1;if(!r.current&&"changedTouches"in y&&(w||T)&&(r.current=_),!_)return!0;var V=r.current||_;return $V(V,b,y,V==="h"?w:T,!0)},[]),u=v.useCallback(function(y){var b=y;if(!(!Is.length||Is[Is.length-1]!==o)){var g="deltaY"in b?Lk(b):ap(b),x=t.current.filter(function(_){return _.name===b.type&&(_.target===b.target||b.target===_.shadowParent)&&WV(_.delta,g)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var w=(a.current.shards||[]).map(Mk).filter(Boolean).filter(function(_){return _.contains(b.target)}),T=w.length>0?s(b,w[0]):!a.current.noIsolation;T&&b.cancelable&&b.preventDefault()}}},[]),l=v.useCallback(function(y,b,g,x){var w={name:y,delta:b,target:g,should:x,shadowParent:KV(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(T){return T!==w})},1)},[]),c=v.useCallback(function(y){n.current=ap(y),r.current=void 0},[]),d=v.useCallback(function(y){l(y.type,Lk(y),y.target,s(y,e.lockRef.current))},[]),f=v.useCallback(function(y){l(y.type,ap(y),y.target,s(y,e.lockRef.current))},[]);v.useEffect(function(){return Is.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,Ps),document.addEventListener("touchmove",u,Ps),document.addEventListener("touchstart",c,Ps),function(){Is=Is.filter(function(y){return y!==o}),document.removeEventListener("wheel",u,Ps),document.removeEventListener("touchmove",u,Ps),document.removeEventListener("touchstart",c,Ps)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(o,{styles:YV(i)}):null,p?v.createElement(IV,{gapMode:e.gapMode}):null)}function KV(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const XV=Ak(kk,GV);var g1=v.forwardRef(function(e,t){return v.createElement(ip,Mt({},e,{ref:t,sideCar:XV}))});g1.classNames=ip.classNames;var y1=["Enter"," "],QV=["ArrowDown","PageUp","Home"],Fk=["ArrowUp","PageDown","End"],ZV=[...QV,...Fk],JV={ltr:[...y1,"ArrowRight"],rtl:[...y1,"ArrowLeft"]},e$={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Cl="Menu",[Sl,t$,n$]=qA(Cl),[la,Bk]=bi(Cl,[n$,uk,vk]),sp=uk(),jk=vk(),[r$,Os]=la(Cl),[i$,Al]=la(Cl),Uk=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=sp(t),[u,l]=v.useState(null),c=v.useRef(!1),d=Pt(o),f=GA(i);return v.useEffect(()=>{const p=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),E.jsx(WH,{...s,children:E.jsx(r$,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:l,children:E.jsx(i$,{scope:t,onClose:v.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:a,children:r})})})};Uk.displayName=Cl;var o$="MenuAnchor",v1=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=sp(n);return E.jsx(YH,{...i,...r,ref:t})});v1.displayName=o$;var a$="MenuPortal",[eoe,zk]=la(a$,{forceMount:void 0}),ar="MenuContent",[s$,x1]=la(ar),Hk=v.forwardRef((e,t)=>{const n=zk(ar,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Os(ar,e.__scopeMenu),a=Al(ar,e.__scopeMenu);return E.jsx(Sl.Provider,{scope:e.__scopeMenu,children:E.jsx(ks,{present:r||o.open,children:E.jsx(Sl.Slot,{scope:e.__scopeMenu,children:a.modal?E.jsx(u$,{...i,ref:t}):E.jsx(l$,{...i,ref:t})})})})}),u$=v.forwardRef((e,t)=>{const n=Os(ar,e.__scopeMenu),r=v.useRef(null),i=It(t,r);return v.useEffect(()=>{const o=r.current;if(o)return c1(o)},[]),E.jsx(w1,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Se(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),l$=v.forwardRef((e,t)=>{const n=Os(ar,e.__scopeMenu);return E.jsx(w1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),w1=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...y}=e,b=Os(ar,n),g=Al(ar,n),x=sp(n),w=jk(n),T=t$(n),[_,C]=v.useState(null),R=v.useRef(null),O=It(t,R,b.onContentChange),V=v.useRef(0),P=v.useRef(""),$=v.useRef(0),z=v.useRef(null),Q=v.useRef("right"),Y=v.useRef(0),re=m?g1:v.Fragment,ie=m?{as:As,allowPinchZoom:!0}:void 0,te=B=>{var $e,Ve;const A=P.current+B,oe=T().filter(We=>!We.disabled),he=document.activeElement,D=($e=oe.find(We=>We.ref.current===he))==null?void 0:$e.textValue,Oe=oe.map(We=>We.textValue),ge=b$(Oe,A,D),xe=(Ve=oe.find(We=>We.textValue===ge))==null?void 0:Ve.ref.current;(function We(Ge){P.current=Ge,window.clearTimeout(V.current),Ge!==""&&(V.current=window.setTimeout(()=>We(""),1e3))})(A),xe&&setTimeout(()=>xe.focus())};v.useEffect(()=>()=>window.clearTimeout(V.current),[]),t1();const F=v.useCallback(B=>{var oe,he;return Q.current===((oe=z.current)==null?void 0:oe.side)&&T$(B,(he=z.current)==null?void 0:he.area)},[]);return E.jsx(s$,{scope:n,searchRef:P,onItemEnter:v.useCallback(B=>{F(B)&&B.preventDefault()},[F]),onItemLeave:v.useCallback(B=>{var A;F(B)||((A=R.current)==null||A.focus(),C(null))},[F]),onTriggerLeave:v.useCallback(B=>{F(B)&&B.preventDefault()},[F]),pointerGraceTimerRef:$,onPointerGraceIntentChange:v.useCallback(B=>{z.current=B},[]),children:E.jsx(re,{...ie,children:E.jsx(i1,{asChild:!0,trapped:i,onMountAutoFocus:Se(o,B=>{var A;B.preventDefault(),(A=R.current)==null||A.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:E.jsx(QA,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:E.jsx(uV,{asChild:!0,...w,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:C,onEntryFocus:Se(u,B=>{g.isUsingKeyboardRef.current||B.preventDefault()}),preventScrollOnEntryFocus:!0,children:E.jsx(qH,{role:"menu","aria-orientation":"vertical","data-state":oR(b.open),"data-radix-menu-content":"",dir:g.dir,...x,...y,ref:O,style:{outline:"none",...y.style},onKeyDown:Se(y.onKeyDown,B=>{const oe=B.target.closest("[data-radix-menu-content]")===B.currentTarget,he=B.ctrlKey||B.altKey||B.metaKey,D=B.key.length===1;oe&&(B.key==="Tab"&&B.preventDefault(),!he&&D&&te(B.key));const Oe=R.current;if(B.target!==Oe||!ZV.includes(B.key))return;B.preventDefault();const xe=T().filter($e=>!$e.disabled).map($e=>$e.ref.current);Fk.includes(B.key)&&xe.reverse(),x$(xe)}),onBlur:Se(e.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(V.current),P.current="")}),onPointerMove:Se(e.onPointerMove,Rl(B=>{const A=B.target,oe=Y.current!==B.clientX;if(B.currentTarget.contains(A)&&oe){const he=B.clientX>Y.current?"right":"left";Q.current=he,Y.current=B.clientX}}))})})})})})})});Hk.displayName=ar;var c$="MenuGroup",b1=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(Et.div,{role:"group",...r,ref:t})});b1.displayName=c$;var d$="MenuLabel",Vk=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(Et.div,{...r,ref:t})});Vk.displayName=d$;var up="MenuItem",$k="menu.itemSelect",lp=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=v.useRef(null),a=Al(up,e.__scopeMenu),s=x1(up,e.__scopeMenu),u=It(t,o),l=v.useRef(!1),c=()=>{const d=o.current;if(!n&&d){const f=new CustomEvent($k,{bubbles:!0,cancelable:!0});d.addEventListener($k,p=>r==null?void 0:r(p),{once:!0}),Zy(d,f),f.defaultPrevented?l.current=!1:a.onClose()}};return E.jsx(Wk,{...i,ref:u,disabled:n,onClick:Se(e.onClick,c),onPointerDown:d=>{var f;(f=e.onPointerDown)==null||f.call(e,d),l.current=!0},onPointerUp:Se(e.onPointerUp,d=>{var f;l.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:Se(e.onKeyDown,d=>{const f=s.searchRef.current!=="";n||f&&d.key===" "||y1.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});lp.displayName=up;var Wk=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=x1(up,n),s=jk(n),u=v.useRef(null),l=It(t,u),[c,d]=v.useState(!1),[f,p]=v.useState("");return v.useEffect(()=>{const m=u.current;m&&p((m.textContent??"").trim())},[o.children]),E.jsx(Sl.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:E.jsx(lV,{asChild:!0,...s,focusable:!r,children:E.jsx(Et.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:l,onPointerMove:Se(e.onPointerMove,Rl(m=>{r?a.onItemLeave(m):(a.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Se(e.onPointerLeave,Rl(m=>a.onItemLeave(m))),onFocus:Se(e.onFocus,()=>d(!0)),onBlur:Se(e.onBlur,()=>d(!1))})})})}),f$="MenuCheckboxItem",Yk=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return E.jsx(Qk,{scope:e.__scopeMenu,checked:n,children:E.jsx(lp,{role:"menuitemcheckbox","aria-checked":cp(n)?"mixed":n,...i,ref:t,"data-state":T1(n),onSelect:Se(i.onSelect,()=>r==null?void 0:r(cp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Yk.displayName=f$;var qk="MenuRadioGroup",[p$,h$]=la(qk,{value:void 0,onValueChange:()=>{}}),Gk=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Pt(r);return E.jsx(p$,{scope:e.__scopeMenu,value:n,onValueChange:o,children:E.jsx(b1,{...i,ref:t})})});Gk.displayName=qk;var Kk="MenuRadioItem",Xk=v.forwardRef((e,t)=>{const{value:n,...r}=e,i=h$(Kk,e.__scopeMenu),o=n===i.value;return E.jsx(Qk,{scope:e.__scopeMenu,checked:o,children:E.jsx(lp,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":T1(o),onSelect:Se(r.onSelect,()=>{var a;return(a=i.onValueChange)==null?void 0:a.call(i,n)},{checkForDefaultPrevented:!1})})})});Xk.displayName=Kk;var E1="MenuItemIndicator",[Qk,m$]=la(E1,{checked:!1}),Zk=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=m$(E1,n);return E.jsx(ks,{present:r||cp(o.checked)||o.checked===!0,children:E.jsx(Et.span,{...i,ref:t,"data-state":T1(o.checked)})})});Zk.displayName=E1;var g$="MenuSeparator",Jk=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(Et.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Jk.displayName=g$;var y$="MenuArrow",eR=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=sp(n);return E.jsx(GH,{...i,...r,ref:t})});eR.displayName=y$;var v$="MenuSub",[toe,tR]=la(v$),kl="MenuSubTrigger",nR=v.forwardRef((e,t)=>{const n=Os(kl,e.__scopeMenu),r=Al(kl,e.__scopeMenu),i=tR(kl,e.__scopeMenu),o=x1(kl,e.__scopeMenu),a=v.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:u}=o,l={__scopeMenu:e.__scopeMenu},c=v.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return v.useEffect(()=>c,[c]),v.useEffect(()=>{const d=s.current;return()=>{window.clearTimeout(d),u(null)}},[s,u]),E.jsx(v1,{asChild:!0,...l,children:E.jsx(Wk,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":oR(n.open),...e,ref:Qf(t,i.onTriggerChange),onClick:d=>{var f;(f=e.onClick)==null||f.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Se(e.onPointerMove,Rl(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Se(e.onPointerLeave,Rl(d=>{var p,m;c();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const y=(m=n.content)==null?void 0:m.dataset.side,b=y==="right",g=b?-5:5,x=f[b?"left":"right"],w=f[b?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x,y:f.bottom}],side:y}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Se(e.onKeyDown,d=>{var p;const f=o.searchRef.current!=="";e.disabled||f&&d.key===" "||JV[r.dir].includes(d.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),d.preventDefault())})})})});nR.displayName=kl;var rR="MenuSubContent",iR=v.forwardRef((e,t)=>{const n=zk(ar,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Os(ar,e.__scopeMenu),a=Al(ar,e.__scopeMenu),s=tR(rR,e.__scopeMenu),u=v.useRef(null),l=It(t,u);return E.jsx(Sl.Provider,{scope:e.__scopeMenu,children:E.jsx(ks,{present:r||o.open,children:E.jsx(Sl.Slot,{scope:e.__scopeMenu,children:E.jsx(w1,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{var d;a.isUsingKeyboardRef.current&&((d=u.current)==null||d.focus()),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Se(e.onFocusOutside,c=>{c.target!==s.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Se(e.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:Se(e.onKeyDown,c=>{var p;const d=c.currentTarget.contains(c.target),f=e$[a.dir].includes(c.key);d&&f&&(o.onOpenChange(!1),(p=s.trigger)==null||p.focus(),c.preventDefault())})})})})})});iR.displayName=rR;function oR(e){return e?"open":"closed"}function cp(e){return e==="indeterminate"}function T1(e){return cp(e)?"indeterminate":e?"checked":"unchecked"}function x$(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function w$(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function b$(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=w$(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function E$(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o].x,u=t[o].y,l=t[a].x,c=t[a].y;u>r!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function T$(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return E$(n,t)}function Rl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var _$=Uk,C$=v1,S$=Hk,A$=b1,k$=Vk,R$=lp,N$=Yk,P$=Gk,I$=Xk,O$=Zk,D$=Jk,L$=eR,M$=nR,F$=iR,_1="DropdownMenu",[B$,noe]=bi(_1,[Bk]),Sn=Bk(),[j$,aR]=B$(_1),sR=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,u=Sn(t),l=v.useRef(null),[c=!1,d]=_l({prop:i,defaultProp:o,onChange:a});return E.jsx(j$,{scope:t,triggerId:fo(),triggerRef:l,contentId:fo(),open:c,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(f=>!f),[d]),modal:s,children:E.jsx(_$,{...u,open:c,onOpenChange:d,dir:r,modal:s,children:n})})};sR.displayName=_1;var uR="DropdownMenuTrigger",lR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=aR(uR,n),a=Sn(n);return E.jsx(C$,{asChild:!0,...a,children:E.jsx(Et.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Qf(t,o.triggerRef),onPointerDown:Se(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(o.onOpenToggle(),o.open||s.preventDefault())}),onKeyDown:Se(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&o.onOpenToggle(),s.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});lR.displayName=uR;var cR="DropdownMenuContent",dR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=aR(cR,n),o=Sn(n),a=v.useRef(!1);return E.jsx(S$,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Se(e.onCloseAutoFocus,s=>{var u;a.current||(u=i.triggerRef.current)==null||u.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:Se(e.onInteractOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,c=u.button===2||l;(!i.modal||c)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});dR.displayName=cR;var U$="DropdownMenuGroup",fR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(A$,{...i,...r,ref:t})});fR.displayName=U$;var z$="DropdownMenuLabel",pR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(k$,{...i,...r,ref:t})});pR.displayName=z$;var H$="DropdownMenuItem",hR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(R$,{...i,...r,ref:t})});hR.displayName=H$;var V$="DropdownMenuCheckboxItem",mR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(N$,{...i,...r,ref:t})});mR.displayName=V$;var $$="DropdownMenuRadioGroup",W$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(P$,{...i,...r,ref:t})});W$.displayName=$$;var Y$="DropdownMenuRadioItem",gR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(I$,{...i,...r,ref:t})});gR.displayName=Y$;var q$="DropdownMenuItemIndicator",yR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(O$,{...i,...r,ref:t})});yR.displayName=q$;var G$="DropdownMenuSeparator",vR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(D$,{...i,...r,ref:t})});vR.displayName=G$;var K$="DropdownMenuArrow",X$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(L$,{...i,...r,ref:t})});X$.displayName=K$;var Q$="DropdownMenuSubTrigger",xR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(M$,{...i,...r,ref:t})});xR.displayName=Q$;var Z$="DropdownMenuSubContent",wR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sn(n);return E.jsx(F$,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});wR.displayName=Z$;var J$=sR,eW=lR,bR=dR,tW=fR,ER=pR,TR=hR,_R=mR,CR=gR,SR=yR,AR=vR,kR=xR,RR=wR;const nW=J$,rW=eW,iW=tW,oW=v.forwardRef(({className:e,inset:t,children:n,...r},i)=>E.jsxs(kR,{ref:i,className:Ne("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,E.jsx(N_,{className:"ml-auto"})]}));oW.displayName=kR.displayName;const aW=v.forwardRef(({className:e,...t},n)=>E.jsx(RR,{ref:n,className:Ne("z-50 min-w-[8rem] overflow-hidden rounded-2xl border bg-background p-1 text-foreground shadow-2xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));aW.displayName=RR.displayName;const NR=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>E.jsx(bR,{ref:r,sideOffset:t,className:Ne("z-50 min-w-[8rem] overflow-hidden rounded-2xl border bg-background p-1 text-foreground shadow-2xl","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));NR.displayName=bR.displayName;const PR=v.forwardRef(({className:e,inset:t,...n},r)=>E.jsx(st,{children:E.jsx(TR,{ref:r,className:Ne("relative flex cursor-default select-none items-center gap-2 rounded-xl px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n})}));PR.displayName=TR.displayName;const sW=v.forwardRef(({className:e,children:t,checked:n,...r},i)=>E.jsxs(_R,{ref:i,className:Ne("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[E.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:E.jsx(SR,{children:E.jsx(DF,{className:"h-4 w-4"})})}),t]}));sW.displayName=_R.displayName;const uW=v.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(CR,{ref:r,className:Ne("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[E.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:E.jsx(SR,{children:E.jsx(BF,{className:"h-2 w-2 fill-current"})})}),t]}));uW.displayName=CR.displayName;const lW=v.forwardRef(({className:e,inset:t,...n},r)=>E.jsx(ER,{ref:r,className:Ne("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));lW.displayName=ER.displayName;const cW=v.forwardRef(({className:e,...t},n)=>E.jsx(AR,{ref:n,className:Ne("-mx-1 my-1 h-px bg-muted",e),...t}));cW.displayName=AR.displayName;function IR({className:e,...t}){return E.jsx("div",{className:Ne("animate-pulse rounded-md bg-secondary",e),...t})}function dW(){const e=Ss(),[t,n]=v.useState(!1),{toChatScreen:r}=wl();return E.jsxs(nW,{open:t,onOpenChange:n,children:[E.jsx(rW,{asChild:!0,children:E.jsx($n,{variant:"ghost",size:"fit",className:"rounded-full",children:E.jsx(jF,{className:"size-4"})})}),E.jsx(NR,{align:"end",className:"min-w-56",children:E.jsx(iW,{children:E.jsxs(PR,{onSelect:()=>{n(!1),r()},children:[E.jsx(cs.div,{initial:{opacity:0,x:-4,rotate:360},animate:{opacity:1,x:0,rotate:0},children:E.jsx(WF,{})}),e.get("new-conversation")]})})})]})}function OR(){var o,a;const{routerState:{screen:e},toSessionsScreen:t}=wl(),{data:n,isLoading:r}=Pf(),i=Xf();return E.jsx("header",{className:"p-2 border-b bg-background",children:E.jsxs("div",{dir:i,className:"flex items-center rtl:flex-row-reverse gap-2",children:[e==="chat"&&E.jsx($n,{variant:"ghost",size:"fit",className:"rounded-full",onClick:t,children:E.jsx(LF,{className:"size-4"})}),E.jsx("div",{className:Ne("flex-1",e==="sessions"&&"pl-2"),children:E.jsx(jn,{mode:"wait",children:r||!((o=n==null?void 0:n.data)!=null&&o.organizationName)?E.jsx(st,{snapExit:!0,children:E.jsx(IR,{className:"h-5 w-1/2"})},"skeleton"):E.jsx(st,{children:E.jsx("h2",{className:"font-semibold",children:(a=n==null?void 0:n.data)==null?void 0:a.organizationName})},"organization-name")})}),E.jsx(dW,{})]})})}function fW(e){const t=[];let n=null;return e.forEach(r=>{var i,o,a,s;(!n||((i=n[0])==null?void 0:i.type)!==r.type)&&(n=[],t.push(n)),((o=n[0])==null?void 0:o.type)==="FROM_AGENT"&&r.type==="FROM_AGENT"&&((a=r.agent)==null?void 0:a.id)!==((s=n[0].agent)==null?void 0:s.id)&&(n=[],t.push(n)),n.push(r)}),t}function pW(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_USER"}function hW(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_BOT"}function mW(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_AGENT"}function DR(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function roe(){}function ioe(){}const pn=xo(/[A-Za-z]/),nn=xo(/[\dA-Za-z]/),gW=xo(/[#-'*+\--9=?A-Z^-~]/);function dp(e){return e!==null&&(e<32||e===127)}const C1=xo(/\d/),yW=xo(/[\dA-Fa-f]/),vW=xo(/[!-/:-@[-`{-~]/);function me(e){return e!==null&&e<-2}function Ze(e){return e!==null&&(e<0||e===32)}function Me(e){return e===-2||e===-1||e===32}const fp=xo(new RegExp("\\p{P}|\\p{S}","u")),ca=xo(/\s/);function xo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function xW(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const pp=function(e){if(e==null)return TW;if(typeof e=="function")return hp(e);if(typeof e=="object")return Array.isArray(e)?wW(e):bW(e);if(typeof e=="string")return EW(e);throw new Error("Expected function, string, or object as test")};function wW(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=pp(e[n]);return hp(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function bW(e){const t=e;return hp(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function EW(e){return hp(t);function t(n){return n&&n.type===e}}function hp(e){return t;function t(n,r,i){return!!(_W(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function TW(){return!0}function _W(e){return e!==null&&typeof e=="object"&&"type"in e}function ooe(e){return e}const LR=[],CW=!0,S1=!1,SW="skip";function MR(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=pp(i),a=r?-1:1;s(e,void 0,[])();function s(u,l,c){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=LR,m,y,b;if((!t||o(u,l,c[c.length-1]||void 0))&&(p=AW(n(u,c)),p[0]===S1))return p;if("children"in u&&u.children){const g=u;if(g.children&&p[0]!==SW)for(y=(r?g.children.length:-1)+a,b=c.concat(g);y>-1&&y<g.children.length;){const x=g.children[y];if(m=s(x,y,b)(),m[0]===S1)return m;y=typeof m[1]=="number"?m[1]:y+a}}return p}}}function AW(e){return Array.isArray(e)?e:typeof e=="number"?[CW,e]:e==null?LR:[e]}function kW(e,t,n){const i=pp((n||{}).ignore||[]),o=RW(t);let a=-1;for(;++a<o.length;)MR(e,"text",s);function s(l,c){let d=-1,f;for(;++d<c.length;){const p=c[d],m=f?f.children:void 0;if(i(p,m?m.indexOf(p):void 0,f))return;f=p}if(f)return u(l,c)}function u(l,c){const d=c[c.length-1],f=o[a][0],p=o[a][1];let m=0;const b=d.children.indexOf(l);let g=!1,x=[];f.lastIndex=0;let w=f.exec(l.value);for(;w;){const T=w.index,_={index:w.index,input:w.input,stack:[...c,l]};let C=p(...w,_);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?f.lastIndex=T+1:(m!==T&&x.push({type:"text",value:l.value.slice(m,T)}),Array.isArray(C)?x.push(...C):C&&x.push(C),m=T+w[0].length,g=!0),!f.global)break;w=f.exec(l.value)}return g?(m<l.value.length&&x.push({type:"text",value:l.value.slice(m)}),d.children.splice(b,1,...x)):x=[l],b+x.length}}function RW(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([NW(i[0]),PW(i[1])])}return t}function NW(e){return typeof e=="string"?new RegExp(xW(e),"g"):e}function PW(e){return typeof e=="function"?e:function(){return e}}const A1="phrasing",k1=["autolink","link","image","label"];function IW(){return{transforms:[jW],enter:{literalAutolink:DW,literalAutolinkEmail:R1,literalAutolinkHttp:R1,literalAutolinkWww:R1},exit:{literalAutolink:BW,literalAutolinkEmail:FW,literalAutolinkHttp:LW,literalAutolinkWww:MW}}}function OW(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:A1,notInConstruct:k1},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:A1,notInConstruct:k1},{character:":",before:"[ps]",after:"\\/",inConstruct:A1,notInConstruct:k1}]}}function DW(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function R1(e){this.config.enter.autolinkProtocol.call(this,e)}function LW(e){this.config.exit.autolinkProtocol.call(this,e)}function MW(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function FW(e){this.config.exit.autolinkEmail.call(this,e)}function BW(e){this.exit(e)}function jW(e){kW(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,UW],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),zW]],{ignore:["link","linkReference"]})}function UW(e,t,n,r,i){let o="";if(!FR(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!HW(n)))return!1;const a=VW(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function zW(e,t,n,r){return!FR(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function HW(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function VW(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=DR(e,"(");let o=DR(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function FR(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ca(n)||fp(n))&&(!t||n!==47)}function Sr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}BR.peek=eY;function $W(){return{enter:{gfmFootnoteDefinition:YW,gfmFootnoteDefinitionLabelString:qW,gfmFootnoteCall:XW,gfmFootnoteCallString:QW},exit:{gfmFootnoteDefinition:KW,gfmFootnoteDefinitionLabelString:GW,gfmFootnoteCall:JW,gfmFootnoteCallString:ZW}}}function WW(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:tY,footnoteReference:BR}}}function YW(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function qW(){this.buffer()}function GW(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Sr(this.sliceSerialize(e)).toLowerCase()}function KW(e){this.exit(e)}function XW(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function QW(){this.buffer()}function ZW(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Sr(this.sliceSerialize(e)).toLowerCase()}function JW(e){this.exit(e)}function BR(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function eY(){return"["}function tY(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),nY)),a(),o}function nY(e,t,n){return t===0?e:(n?"":" ")+e}const rY=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];jR.peek=uY;function iY(){return{canContainEols:["delete"],enter:{strikethrough:aY},exit:{strikethrough:sY}}}function oY(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rY}],handlers:{delete:jR}}}function aY(e){this.enter({type:"delete",children:[]},e)}function sY(e){this.exit(e)}function jR(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function uY(){return"~"}function lY(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||dY,i=[],o=[],a=[],s=[];let u=0,l=-1;for(;++l<e.length;){const m=[],y=[];let b=-1;for(e[l].length>u&&(u=e[l].length);++b<e[l].length;){const g=cY(e[l][b]);if(t.alignDelimiters!==!1){const x=r(g);y[b]=x,(s[b]===void 0||x>s[b])&&(s[b]=x)}m.push(g)}o[l]=m,a[l]=y}let c=-1;if(typeof n=="object"&&"length"in n)for(;++c<u;)i[c]=UR(n[c]);else{const m=UR(n);for(;++c<u;)i[c]=m}c=-1;const d=[],f=[];for(;++c<u;){const m=i[c];let y="",b="";m===99?(y=":",b=":"):m===108?y=":":m===114&&(b=":");let g=t.alignDelimiters===!1?1:Math.max(1,s[c]-y.length-b.length);const x=y+"-".repeat(g)+b;t.alignDelimiters!==!1&&(g=y.length+g+b.length,g>s[c]&&(s[c]=g),f[c]=g),d[c]=x}o.splice(1,0,d),a.splice(1,0,f),l=-1;const p=[];for(;++l<o.length;){const m=o[l],y=a[l];c=-1;const b=[];for(;++c<u;){const g=m[c]||"";let x="",w="";if(t.alignDelimiters!==!1){const T=s[c]-(y[c]||0),_=i[c];_===114?x=" ".repeat(T):_===99?T%2?(x=" ".repeat(T/2+.5),w=" ".repeat(T/2-.5)):(x=" ".repeat(T/2),w=x):w=" ".repeat(T)}t.delimiterStart!==!1&&!c&&b.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&g==="")&&(t.delimiterStart!==!1||c)&&b.push(" "),t.alignDelimiters!==!1&&b.push(x),b.push(g),t.alignDelimiters!==!1&&b.push(w),t.padding!==!1&&b.push(" "),(t.delimiterEnd!==!1||c!==u-1)&&b.push("|")}p.push(t.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return p.join(`
|
|
387
387
|
`)}function cY(e){return e==null?"":String(e)}function dY(e){return e.length}function UR(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const zR={}.hasOwnProperty;function HR(e,t){const n=t||{};function r(i,...o){let a=r.invalid;const s=r.handlers;if(i&&zR.call(i,e)){const u=String(i[e]);a=zR.call(s,u)?s[u]:r.unknown}if(a)return a.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function fY(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),pY);return i(),a}function pY(e,t,n){return">"+(n?"":" ")+e}function hY(e,t){return VR(e,t.inConstruct,!0)&&!VR(e,t.notInConstruct,!1)}function VR(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function $R(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
388
388
|
`&&hY(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
389
389
|
`}function mY(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}function gY(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function yY(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function vY(e,t,n,r){const i=yY(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(gY(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(o,xY);return d(),f}const s=n.createTracker(r),u=i.repeat(Math.max(mY(o,i)+1,3)),l=n.enter("codeFenced");let c=s.move(u);if(e.lang){const d=n.enter(`codeFencedLang${a}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
|
|
@@ -397,10 +397,10 @@ to {
|
|
|
397
397
|
`))+1))}const a="#".repeat(i),s=n.enter("headingAtx"),u=n.enter("phrasing");o.move(a+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
|
|
398
398
|
`,...o.current()});return/^[\t ]/.test(l)&&(l="&#x"+l.charCodeAt(0).toString(16).toUpperCase()+";"+l.slice(1)),l=l?a+" "+l:a,n.options.closeAtx&&(l+=" "+a),u(),s(),l}GR.peek=AY;function GR(e){return e.value||""}function AY(){return"<"}KR.peek=kY;function KR(e,t,n,r){const i=N1(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("![");return l+=u.move(n.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=n.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),l+=u.move(")"),a(),l}function kY(){return"!"}XR.peek=RY;function XR(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("![");const l=n.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return a(),n.stack=c,o(),i==="full"||!l||l!==d?u+=s.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function RY(){return"!"}QR.peek=NY;function QR(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],s=n.compilePattern(a);let u;if(a.atBreak)for(;u=s.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function NY(){return"`"}function ZR(e,t){const n=P1(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}JR.peek=PY;function JR(e,t,n,r){const i=N1(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,u;if(ZR(e,n)){const c=n.stack;n.stack=[],s=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),s(),n.stack=c,d}s=n.enter("link"),u=n.enter("label");let l=a.move("[");return l+=a.move(n.containerPhrasing(e,{before:l,after:"](",...a.current()})),l+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(n.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(u=n.enter("destinationRaw"),l+=a.move(n.safe(e.url,{before:l,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=n.enter(`title${o}`),l+=a.move(" "+i),l+=a.move(n.safe(e.title,{before:l,after:i,...a.current()})),l+=a.move(i),u()),l+=a.move(")"),s(),l}function PY(e,t,n){return ZR(e,n)?"<":"["}e3.peek=IY;function e3(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("[");const l=n.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return a(),n.stack=c,o(),i==="full"||!l||l!==d?u+=s.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function IY(){return"["}function I1(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function OY(e){const t=I1(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function DY(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function t3(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function LY(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?DY(n):I1(n);const s=e.ordered?a==="."?")":".":OY(n);let u=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),t3(n)===a&&c){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=s),n.bulletCurrent=a;const l=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),l}function MY(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function FY(e,t,n,r){const i=MY(n);let o=n.bulletCurrent||I1(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),c);return u(),l;function c(d,f,p){return f?(p?"":" ".repeat(a))+d:(p?o:o+" ".repeat(a-o.length))+d}}function BY(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const jY=pp(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function UY(e,t,n,r){return(e.children.some(function(a){return jY(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function zY(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}n3.peek=HY;function n3(e,t,n,r){const i=zY(n),o=n.enter("strong"),a=n.createTracker(r);let s=a.move(i+i);return s+=a.move(n.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}function HY(e,t,n){return n.options.strong||"*"}function VY(e,t,n,r){return n.safe(e.value,r)}function $Y(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function WY(e,t,n){const r=(t3(n)+(n.options.ruleSpaces?" ":"")).repeat($Y(n));return n.options.ruleSpaces?r.slice(0,-1):r}const r3={blockquote:fY,break:$R,code:vY,definition:wY,emphasis:WR,hardBreak:$R,heading:SY,html:GR,image:KR,imageReference:XR,inlineCode:QR,link:JR,linkReference:e3,list:LY,listItem:FY,paragraph:BY,root:UY,strong:n3,text:VY,thematicBreak:WY},i3=document.createElement("i");function O1(e){const t="&"+e+";";i3.innerHTML=t;const n=i3.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function o3(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const YY=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qY(e){return e.replace(YY,GY)}function GY(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return o3(n.slice(o?2:1),o?16:10)}return O1(n)||e}function KY(){return{enter:{table:XY,tableData:a3,tableHeader:a3,tableRow:ZY},exit:{codeText:JY,table:QY,tableData:D1,tableHeader:D1,tableRow:D1}}}function XY(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function QY(e){this.exit(e),this.data.inTable=void 0}function ZY(e){this.enter({type:"tableRow",children:[]},e)}function D1(e){this.exit(e)}function a3(e){this.enter({type:"tableCell",children:[]},e)}function JY(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,eq));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function eq(e,t){return t==="|"?t:e}function tq(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
399
399
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:u,tableRow:s}};function a(p,m,y,b){return l(c(p,y,b),p.align)}function s(p,m,y,b){const g=d(p,y,b),x=l([g]);return x.slice(0,x.indexOf(`
|
|
400
|
-
`))}function u(p,m,y,b){const g=y.enter("tableCell"),x=y.enter("phrasing"),w=y.containerPhrasing(p,{...b,before:o,after:o});return x(),g(),w}function l(p,m){return lY(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(p,m,y){const b=p.children;let g=-1;const x=[],w=m.enter("table");for(;++g<b.length;)x[g]=d(b[g],m,y);return w(),x}function d(p,m,y){const b=p.children;let g=-1;const x=[],w=m.enter("tableRow");for(;++g<b.length;)x[g]=u(b[g],p,m,y);return w(),x}function f(p,m,y){let b=r3.inlineCode(p,m,y);return y.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function nq(){return{exit:{taskListCheckValueChecked:s3,taskListCheckValueUnchecked:s3,paragraph:iq}}}function rq(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:oq}}}function s3(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function iq(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function oq(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let u=r3.listItem(e,t,n,{...r,...s.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+a}}function aq(){return[IW(),$W(),iY(),KY(),nq()]}function sq(e){return{extensions:[OW(),WW(),oY(),tq(e),rq()]}}function sr(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function ur(e,t){return e.length>0?(sr(e,e.length,0,t),e):t}const u3={}.hasOwnProperty;function l3(e){const t={};let n=-1;for(;++n<e.length;)uq(t,e[n]);return t}function uq(e,t){let n;for(n in t){const i=(u3.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){u3.call(i,a)||(i[a]=[]);const s=o[a];lq(i[a],Array.isArray(s)?s:s?[s]:[])}}}function lq(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);sr(e,0,0,r)}const cq={tokenize:gq,partial:!0},c3={tokenize:yq,partial:!0},d3={tokenize:vq,partial:!0},f3={tokenize:xq,partial:!0},dq={tokenize:wq,partial:!0},p3={name:"wwwAutolink",tokenize:hq,previous:m3},h3={name:"protocolAutolink",tokenize:mq,previous:g3},_i={name:"emailAutolink",tokenize:pq,previous:y3},Wr={};function fq(){return{text:Wr}}let da=48;for(;da<123;)Wr[da]=_i,da++,da===58?da=65:da===91&&(da=97);Wr[43]=_i,Wr[45]=_i,Wr[46]=_i,Wr[95]=_i,Wr[72]=[_i,h3],Wr[104]=[_i,h3],Wr[87]=[_i,p3],Wr[119]=[_i,p3];function pq(e,t,n){const r=this;let i,o;return a;function a(d){return!L1(d)||!y3.call(r,r.previous)||M1(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return L1(d)?(e.consume(d),s):d===64?(e.consume(d),u):n(d)}function u(d){return d===46?e.check(dq,c,l)(d):d===45||d===95||nn(d)?(o=!0,e.consume(d),u):c(d)}function l(d){return e.consume(d),i=!0,u}function c(d){return o&&i&&pn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function hq(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!m3.call(r,r.previous)||M1(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(cq,e.attempt(c3,e.attempt(d3,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function mq(e,t,n){const r=this;let i="",o=!1;return a;function a(d){return(d===72||d===104)&&g3.call(r,r.previous)&&!M1(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(pn(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),u}return n(d)}function u(d){return d===47?(e.consume(d),o?l:(o=!0,u)):n(d)}function l(d){return d===null||dp(d)||Ze(d)||ca(d)||fp(d)?n(d):e.attempt(c3,e.attempt(d3,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function gq(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function yq(e,t,n){let r,i,o;return a;function a(l){return l===46||l===95?e.check(f3,u,s)(l):l===null||Ze(l)||ca(l)||l!==45&&fp(l)?u(l):(o=!0,e.consume(l),a)}function s(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),a}function u(l){return i||r||!o?n(l):t(l)}}function vq(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(f3,t,o)(a):a===null||Ze(a)||ca(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function xq(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Ze(s)||ca(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Ze(s)||ca(s)?t(s):r(s)}function o(s){return pn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):pn(s)?(e.consume(s),a):n(s)}}function wq(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return nn(o)?n(o):t(o)}}function m3(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ze(e)}function g3(e){return!pn(e)}function y3(e){return!(e===47||L1(e))}function L1(e){return e===43||e===45||e===46||e===95||nn(e)}function M1(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Ds(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&nn(e.charCodeAt(n+1))&&nn(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function gp(e){if(e===null||Ze(e)||ca(e))return 1;if(fp(e))return 2}function yp(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const F1={name:"attention",tokenize:Eq,resolveAll:bq};function bq(e,t){let n=-1,r,i,o,a,s,u,l,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d=Object.assign({},e[r][1].end),f=Object.assign({},e[n][1].start);v3(d,-u),v3(f,u),a={type:u>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[r][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:f},o={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=ur(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=ur(l,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),l=ur(l,yp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=ur(l,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,l=ur(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,sr(e,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Eq(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=gp(r);let o;return a;function a(u){return o=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===o)return e.consume(u),s;const l=e.exit("attentionSequence"),c=gp(u),d=!c||c===2&&i||n.includes(u),f=!i||i===2&&c||n.includes(r);return l._open=!!(o===42?d:d&&(i||!f)),l._close=!!(o===42?f:f&&(c||!d)),t(u)}}function v3(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Tq={name:"autolink",tokenize:_q};function _q(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return pn(p)?(e.consume(p),a):p===64?n(p):l(p)}function a(p){return p===43||p===45||p===46||nn(p)?(r=1,s(p)):l(p)}function s(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||nn(p))&&r++<32?(e.consume(p),s):(r=0,l(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||dp(p)?n(p):(e.consume(p),u)}function l(p){return p===64?(e.consume(p),c):gW(p)?(e.consume(p),l):n(p)}function c(p){return nn(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||nn(p))&&r++<63){const m=p===45?f:d;return e.consume(p),m}return n(p)}}function Be(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(u){return Me(u)?(e.enter(n),s(u)):t(u)}function s(u){return Me(u)&&o++<i?(e.consume(u),s):(e.exit(n),t(u))}}const Nl={tokenize:Cq,partial:!0};function Cq(e,t,n){return r;function r(o){return Me(o)?Be(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||me(o)?t(o):n(o)}}const x3={name:"blockQuote",tokenize:Sq,continuation:{tokenize:Aq},exit:kq};function Sq(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return Me(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Aq(e,t,n){const r=this;return i;function i(a){return Me(a)?Be(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(x3,t,n)(a)}}function kq(e){e.exit("blockQuote")}const w3={name:"characterEscape",tokenize:Rq};function Rq(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return vW(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const b3={name:"characterReference",tokenize:Nq};function Nq(e,t,n){const r=this;let i=0,o,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,a=nn,c(d))}function l(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=yW,c):(e.enter("characterReferenceValue"),o=7,a=C1,c(d))}function c(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return a===nn&&!O1(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<o?(e.consume(d),c):n(d)}}const E3={tokenize:Iq,partial:!0},T3={name:"codeFenced",tokenize:Pq,concrete:!0};function Pq(e,t,n){const r=this,i={tokenize:_,partial:!0};let o=0,a=0,s;return u;function u(C){return l(C)}function l(C){const R=r.events[r.events.length-1];return o=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,s=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(C)}function c(C){return C===s?(a++,e.consume(C),c):a<3?n(C):(e.exit("codeFencedFenceSequence"),Me(C)?Be(e,d,"whitespace")(C):d(C))}function d(C){return C===null||me(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(E3,y,T)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(C))}function f(C){return C===null||me(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(C)):Me(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Be(e,p,"whitespace")(C)):C===96&&C===s?n(C):(e.consume(C),f)}function p(C){return C===null||me(C)?d(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||me(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(C)):C===96&&C===s?n(C):(e.consume(C),m)}function y(C){return e.attempt(i,T,b)(C)}function b(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),g}function g(C){return o>0&&Me(C)?Be(e,x,"linePrefix",o+1)(C):x(C)}function x(C){return C===null||me(C)?e.check(E3,y,T)(C):(e.enter("codeFlowValue"),w(C))}function w(C){return C===null||me(C)?(e.exit("codeFlowValue"),x(C)):(e.consume(C),w)}function T(C){return e.exit("codeFenced"),t(C)}function _(C,R,O){let V=0;return P;function P(re){return C.enter("lineEnding"),C.consume(re),C.exit("lineEnding"),$}function $(re){return C.enter("codeFencedFence"),Me(re)?Be(C,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(re):z(re)}function z(re){return re===s?(C.enter("codeFencedFenceSequence"),X(re)):O(re)}function X(re){return re===s?(V++,C.consume(re),X):V>=a?(C.exit("codeFencedFenceSequence"),Me(re)?Be(C,Y,"whitespace")(re):Y(re)):O(re)}function Y(re){return re===null||me(re)?(C.exit("codeFencedFence"),R(re)):O(re)}}}function Iq(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const B1={name:"codeIndented",tokenize:Dq},Oq={tokenize:Lq,partial:!0};function Dq(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),Be(e,o,"linePrefix",5)(l)}function o(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(l):n(l)}function a(l){return l===null?u(l):me(l)?e.attempt(Oq,a,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||me(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function Lq(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):me(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Be(e,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):me(a)?i(a):n(a)}}const Mq={name:"codeText",tokenize:jq,resolve:Fq,previous:Bq};function Fq(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Bq(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function jq(e,t,n){let r=0,i,o;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(o=e.enter("codeTextSequence"),i=0,c(d)):me(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||me(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),l)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",l(d))}}class Uq{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Pl(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Pl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Pl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Pl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Pl(this.left,n.reverse())}}}function Pl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function _3(e){const t={};let n=-1,r,i,o,a,s,u,l;const c=new Uq(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,zq(c,n)),n=t[n],l=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(a=c.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return sr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function zq(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,u=[],l={};let c,d,f=-1,p=n,m=0,y=0;const b=[y];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(y=f+1,b.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):b.pop(),f=b.length;f--;){const g=s.slice(b[f],b[f+1]),x=o.pop();u.push([x,x+g.length-1]),e.splice(x,2,g)}for(u.reverse(),f=-1;++f<u.length;)l[m+u[f][0]]=m+u[f][1],m+=u[f][1]-u[f][0]-1;return l}const Hq={tokenize:Wq,resolve:$q},Vq={tokenize:Yq,partial:!0};function $q(e){return _3(e),e}function Wq(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):me(s)?e.check(Vq,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Yq(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Be(e,o,"linePrefix")}function o(a){if(a===null||me(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function C3(e,t,n,r,i,o,a,s,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),f):g===null||g===32||g===41||dp(g)?n(g):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(g))}function f(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(s),f(g)):g===null||g===60||me(g)?n(g):(e.consume(g),g===92?m:p)}function m(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function y(g){return!c&&(g===null||g===41||Ze(g))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(g)):c<l&&g===40?(e.consume(g),c++,y):g===41?(e.consume(g),c--,y):g===null||g===32||g===40||dp(g)?n(g):(e.consume(g),g===92?b:y)}function b(g){return g===40||g===41||g===92?(e.consume(g),y):y(g)}}function S3(e,t,n,r,i,o){const a=this;let s=0,u;return l;function l(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),c}function c(p){return s>999||p===null||p===91||p===93&&!u||p===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):me(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||me(p)||s++>999?(e.exit("chunkString"),c(p)):(e.consume(p),u||(u=!Me(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,d):d(p)}}function A3(e,t,n,r,i,o){let a;return s;function s(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),a=f===40?41:f,u):n(f)}function u(f){return f===a?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(o),l(f))}function l(f){return f===a?(e.exit(o),u(a)):f===null?n(f):me(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Be(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===a||f===null||me(f)?(e.exit("chunkString"),l(f)):(e.consume(f),f===92?d:c)}function d(f){return f===a||f===92?(e.consume(f),c):c(f)}}function Il(e,t){let n;return r;function r(i){return me(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Me(i)?Be(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const qq={name:"definition",tokenize:Kq},Gq={tokenize:Xq,partial:!0};function Kq(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),a(p)}function a(p){return S3.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=Sr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return Ze(p)?Il(e,l)(p):l(p)}function l(p){return C3(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(Gq,d,d)(p)}function d(p){return Me(p)?Be(e,f,"whitespace")(p):f(p)}function f(p){return p===null||me(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Xq(e,t,n){return r;function r(s){return Ze(s)?Il(e,i)(s):n(s)}function i(s){return A3(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return Me(s)?Be(e,a,"whitespace")(s):a(s)}function a(s){return s===null||me(s)?t(s):n(s)}}const Qq={name:"hardBreakEscape",tokenize:Zq};function Zq(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return me(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Jq={name:"headingAtx",tokenize:tG,resolve:eG};function eG(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},sr(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function tG(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(e.consume(c),a):c===null||Ze(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||me(c)?(e.exit("atxHeading"),t(c)):Me(c)?Be(e,s,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function l(c){return c===null||c===35||Ze(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}const nG=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],k3=["pre","script","style","textarea"],rG={name:"htmlFlow",tokenize:sG,resolveTo:aG,concrete:!0},iG={tokenize:lG,partial:!0},oG={tokenize:uG,partial:!0};function aG(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function sG(e,t,n){const r=this;let i,o,a,s,u;return l;function l(D){return c(D)}function c(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),d}function d(D){return D===33?(e.consume(D),f):D===47?(e.consume(D),o=!0,y):D===63?(e.consume(D),i=3,r.interrupt?t:A):pn(D)?(e.consume(D),a=String.fromCharCode(D),b):n(D)}function f(D){return D===45?(e.consume(D),i=2,p):D===91?(e.consume(D),i=5,s=0,m):pn(D)?(e.consume(D),i=4,r.interrupt?t:A):n(D)}function p(D){return D===45?(e.consume(D),r.interrupt?t:A):n(D)}function m(D){const Oe="CDATA[";return D===Oe.charCodeAt(s++)?(e.consume(D),s===Oe.length?r.interrupt?t:z:m):n(D)}function y(D){return pn(D)?(e.consume(D),a=String.fromCharCode(D),b):n(D)}function b(D){if(D===null||D===47||D===62||Ze(D)){const Oe=D===47,ge=a.toLowerCase();return!Oe&&!o&&k3.includes(ge)?(i=1,r.interrupt?t(D):z(D)):nG.includes(a.toLowerCase())?(i=6,Oe?(e.consume(D),g):r.interrupt?t(D):z(D)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(D):o?x(D):w(D))}return D===45||nn(D)?(e.consume(D),a+=String.fromCharCode(D),b):n(D)}function g(D){return D===62?(e.consume(D),r.interrupt?t:z):n(D)}function x(D){return Me(D)?(e.consume(D),x):P(D)}function w(D){return D===47?(e.consume(D),P):D===58||D===95||pn(D)?(e.consume(D),T):Me(D)?(e.consume(D),w):P(D)}function T(D){return D===45||D===46||D===58||D===95||nn(D)?(e.consume(D),T):_(D)}function _(D){return D===61?(e.consume(D),C):Me(D)?(e.consume(D),_):w(D)}function C(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),u=D,R):Me(D)?(e.consume(D),C):O(D)}function R(D){return D===u?(e.consume(D),u=null,V):D===null||me(D)?n(D):(e.consume(D),R)}function O(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||Ze(D)?_(D):(e.consume(D),O)}function V(D){return D===47||D===62||Me(D)?w(D):n(D)}function P(D){return D===62?(e.consume(D),$):n(D)}function $(D){return D===null||me(D)?z(D):Me(D)?(e.consume(D),$):n(D)}function z(D){return D===45&&i===2?(e.consume(D),ie):D===60&&i===1?(e.consume(D),te):D===62&&i===4?(e.consume(D),oe):D===63&&i===3?(e.consume(D),A):D===93&&i===5?(e.consume(D),B):me(D)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(iG,he,X)(D)):D===null||me(D)?(e.exit("htmlFlowData"),X(D)):(e.consume(D),z)}function X(D){return e.check(oG,Y,he)(D)}function Y(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),re}function re(D){return D===null||me(D)?X(D):(e.enter("htmlFlowData"),z(D))}function ie(D){return D===45?(e.consume(D),A):z(D)}function te(D){return D===47?(e.consume(D),a="",F):z(D)}function F(D){if(D===62){const Oe=a.toLowerCase();return k3.includes(Oe)?(e.consume(D),oe):z(D)}return pn(D)&&a.length<8?(e.consume(D),a+=String.fromCharCode(D),F):z(D)}function B(D){return D===93?(e.consume(D),A):z(D)}function A(D){return D===62?(e.consume(D),oe):D===45&&i===2?(e.consume(D),A):z(D)}function oe(D){return D===null||me(D)?(e.exit("htmlFlowData"),he(D)):(e.consume(D),oe)}function he(D){return e.exit("htmlFlow"),t(D)}}function uG(e,t,n){const r=this;return i;function i(a){return me(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function lG(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Nl,t,n)}}const cG={name:"htmlText",tokenize:dG};function dG(e,t,n){const r=this;let i,o,a;return s;function s(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),u}function u(A){return A===33?(e.consume(A),l):A===47?(e.consume(A),_):A===63?(e.consume(A),w):pn(A)?(e.consume(A),O):n(A)}function l(A){return A===45?(e.consume(A),c):A===91?(e.consume(A),o=0,m):pn(A)?(e.consume(A),x):n(A)}function c(A){return A===45?(e.consume(A),p):n(A)}function d(A){return A===null?n(A):A===45?(e.consume(A),f):me(A)?(a=d,te(A)):(e.consume(A),d)}function f(A){return A===45?(e.consume(A),p):d(A)}function p(A){return A===62?ie(A):A===45?f(A):d(A)}function m(A){const oe="CDATA[";return A===oe.charCodeAt(o++)?(e.consume(A),o===oe.length?y:m):n(A)}function y(A){return A===null?n(A):A===93?(e.consume(A),b):me(A)?(a=y,te(A)):(e.consume(A),y)}function b(A){return A===93?(e.consume(A),g):y(A)}function g(A){return A===62?ie(A):A===93?(e.consume(A),g):y(A)}function x(A){return A===null||A===62?ie(A):me(A)?(a=x,te(A)):(e.consume(A),x)}function w(A){return A===null?n(A):A===63?(e.consume(A),T):me(A)?(a=w,te(A)):(e.consume(A),w)}function T(A){return A===62?ie(A):w(A)}function _(A){return pn(A)?(e.consume(A),C):n(A)}function C(A){return A===45||nn(A)?(e.consume(A),C):R(A)}function R(A){return me(A)?(a=R,te(A)):Me(A)?(e.consume(A),R):ie(A)}function O(A){return A===45||nn(A)?(e.consume(A),O):A===47||A===62||Ze(A)?V(A):n(A)}function V(A){return A===47?(e.consume(A),ie):A===58||A===95||pn(A)?(e.consume(A),P):me(A)?(a=V,te(A)):Me(A)?(e.consume(A),V):ie(A)}function P(A){return A===45||A===46||A===58||A===95||nn(A)?(e.consume(A),P):$(A)}function $(A){return A===61?(e.consume(A),z):me(A)?(a=$,te(A)):Me(A)?(e.consume(A),$):V(A)}function z(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),i=A,X):me(A)?(a=z,te(A)):Me(A)?(e.consume(A),z):(e.consume(A),Y)}function X(A){return A===i?(e.consume(A),i=void 0,re):A===null?n(A):me(A)?(a=X,te(A)):(e.consume(A),X)}function Y(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||Ze(A)?V(A):(e.consume(A),Y)}function re(A){return A===47||A===62||Ze(A)?V(A):n(A)}function ie(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}function te(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),F}function F(A){return Me(A)?Be(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):B(A)}function B(A){return e.enter("htmlTextData"),a(A)}}const j1={name:"labelEnd",tokenize:yG,resolveTo:gG,resolveAll:mG},fG={tokenize:vG},pG={tokenize:xG},hG={tokenize:wG};function mG(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function gG(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},c={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",u,t],["enter",l,t]],s=ur(s,e.slice(o+1,o+r+3)),s=ur(s,[["enter",c,t]]),s=ur(s,yp(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=ur(s,[["exit",c,t],e[a-2],e[a-1],["exit",l,t]]),s=ur(s,e.slice(a+1)),s=ur(s,[["exit",u,t]]),sr(e,o,e.length,s),e}function yG(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(f){return o?o._inactive?d(f):(a=r.parser.defined.includes(Sr(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),u):n(f)}function u(f){return f===40?e.attempt(fG,c,a?c:d)(f):f===91?e.attempt(pG,c,a?l:d)(f):a?c(f):d(f)}function l(f){return e.attempt(hG,c,d)(f)}function c(f){return t(f)}function d(f){return o._balanced=!0,n(f)}}function vG(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Ze(d)?Il(e,o)(d):o(d)}function o(d){return d===41?c(d):C3(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return Ze(d)?Il(e,u)(d):c(d)}function s(d){return n(d)}function u(d){return d===34||d===39||d===40?A3(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function l(d){return Ze(d)?Il(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function xG(e,t,n){const r=this;return i;function i(s){return S3.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(Sr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function wG(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const bG={name:"labelStartImage",tokenize:EG,resolveAll:j1.resolveAll};function EG(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const TG={name:"labelStartLink",tokenize:_G,resolveAll:j1.resolveAll};function _G(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const U1={name:"lineEnding",tokenize:CG};function CG(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Be(e,t,"linePrefix")}}const vp={name:"thematicBreak",tokenize:SG};function SG(e,t,n){let r=0,i;return o;function o(l){return e.enter("thematicBreak"),a(l)}function a(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||me(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),Me(l)?Be(e,s,"whitespace")(l):s(l))}}const An={name:"list",tokenize:RG,continuation:{tokenize:NG},exit:IG},AG={tokenize:OG,partial:!0},kG={tokenize:PG,partial:!0};function RG(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:C1(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(vp,n,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return C1(p)&&++a<10?(e.consume(p),u):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Nl,r.interrupt?n:c,e.attempt(AG,f,d))}function c(p){return r.containerState.initialBlankLine=!0,o++,f(p)}function d(p){return Me(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function NG(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Nl,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Be(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!Me(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(kG,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Be(e,e.attempt(An,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function PG(e,t,n){const r=this;return Be(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function IG(e){e.exit(this.containerState.type)}function OG(e,t,n){const r=this;return Be(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!Me(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const R3={name:"setextUnderline",tokenize:LG,resolveTo:DG};function DG(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function LG(e,t,n){const r=this;let i;return o;function o(l){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=l,a(l)):n(l)}function a(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Me(l)?Be(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||me(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const MG={tokenize:$G,partial:!0};function FG(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:zG,continuation:{tokenize:HG},exit:VG}},text:{91:{name:"gfmFootnoteCall",tokenize:UG},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:BG,resolveTo:jG}}}}function BG(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!a||!a._balanced)return n(u);const l=Sr(r.sliceSerialize({start:a.end,end:r.now()}));return l.codePointAt(0)!==94||!o.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function jG(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function UG(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),u}function u(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(o>999||d===93&&!a||d===null||d===91||Ze(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Sr(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Ze(d)||(a=!0),o++,e.consume(d),d===92?c:l}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,l):l(d)}}function zG(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return u;function u(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(a>999||m===93&&!s||m===null||m===91||Ze(m))return n(m);if(m===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return o=Sr(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return Ze(m)||(s=!0),a++,e.consume(m),m===92?d:c}function d(m){return m===91||m===92||m===93?(e.consume(m),a++,c):c(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),Be(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function HG(e,t,n){return e.check(Nl,t,e.attempt(MG,t,n))}function VG(e){e.exit("gfmFootnoteDefinition")}function $G(e,t,n){const r=this;return Be(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function WG(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let l=u;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[u][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[u][1].end)},d={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[u][1].start)},f=[["enter",c,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",d,s]],p=s.parser.constructs.insideSpan.null;p&&sr(f,f.length,0,yp(p,a.slice(l+1,u),s)),sr(f,f.length,0,[["exit",d,s],["enter",a[u][1],s],["exit",a[u][1],s],["exit",c,s]]),sr(a,l-1,u-l+3,f),u=l+f.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function o(a,s,u){const l=this.previous,c=this.events;let d=0;return f;function f(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(m):(a.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const y=gp(l);if(m===126)return d>1?u(m):(a.consume(m),d++,p);if(d<2&&!n)return u(m);const b=a.exit("strikethroughSequenceTemporary"),g=gp(m);return b._open=!g||g===2&&!!y,b._close=!y||y===2&&!!g,s(m)}}}class YG{constructor(){this.map=[]}add(t,n,r){qG(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function qG(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function GG(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function KG(){return{flow:{null:{name:"table",tokenize:XG,resolveAll:QG}}}}function XG(e,t,n){const r=this;let i=0,o=0,a;return s;function s(P){let $=r.events.length-1;for(;$>-1;){const Y=r.events[$][1].type;if(Y==="lineEnding"||Y==="linePrefix")$--;else break}const z=$>-1?r.events[$][1].type:null,X=z==="tableHead"||z==="tableRow"?C:u;return X===C&&r.parser.lazy[r.now().line]?n(P):X(P)}function u(P){return e.enter("tableHead"),e.enter("tableRow"),l(P)}function l(P){return P===124||(a=!0,o+=1),c(P)}function c(P){return P===null?n(P):me(P)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),p):n(P):Me(P)?Be(e,c,"whitespace")(P):(o+=1,a&&(a=!1,i+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),d(P)))}function d(P){return P===null||P===124||Ze(P)?(e.exit("data"),c(P)):(e.consume(P),P===92?f:d)}function f(P){return P===92||P===124?(e.consume(P),d):d(P)}function p(P){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(P):(e.enter("tableDelimiterRow"),a=!1,Me(P)?Be(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):m(P))}function m(P){return P===45||P===58?b(P):P===124?(a=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),y):_(P)}function y(P){return Me(P)?Be(e,b,"whitespace")(P):b(P)}function b(P){return P===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),g):P===45?(o+=1,g(P)):P===null||me(P)?T(P):_(P)}function g(P){return P===45?(e.enter("tableDelimiterFiller"),x(P)):_(P)}function x(P){return P===45?(e.consume(P),x):P===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(P))}function w(P){return Me(P)?Be(e,T,"whitespace")(P):T(P)}function T(P){return P===124?m(P):P===null||me(P)?!a||i!==o?_(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):_(P)}function _(P){return n(P)}function C(P){return e.enter("tableRow"),R(P)}function R(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),R):P===null||me(P)?(e.exit("tableRow"),t(P)):Me(P)?Be(e,R,"whitespace")(P):(e.enter("data"),O(P))}function O(P){return P===null||P===124||Ze(P)?(e.exit("data"),R(P)):(e.consume(P),P===92?V:O)}function V(P){return P===92||P===124?(e.consume(P),O):O(P)}}function QG(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,u=0,l,c,d;const f=new YG;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(s=!1,u!==0&&(N3(f,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],d=xp(f,t,o,i,void 0,d),o=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],d=xp(f,t,o,i,void 0,d)),o=a,a=[o[1],n,0,0])):m.type==="tableHead"?(s=!0,u=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=n,o[1]!==0?(a[0]=a[1],d=xp(f,t,o,i,n,d)):a[1]!==0&&(d=xp(f,t,a,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&N3(f,t,u,l,c),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=GG(t.events,n))}return e}function xp(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},Ls(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const u=Ls(t.events,n[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const l=Ls(t.events,n[2]),c=Ls(t.events,n[3]),d={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,y=n[3]-n[2]-1;e.add(m,y,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},Ls(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function N3(e,t,n,r,i){const o=[],a=Ls(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ls(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const ZG={name:"tasklistCheck",tokenize:eK};function JG(){return{text:{91:ZG}}}function eK(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return Ze(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):n(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return me(u)?t(u):Me(u)?e.check({tokenize:tK},t,n)(u):n(u)}}function tK(e,t,n){return Be(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function nK(e){return l3([fq(),FG(),WG(e),KG(),JG()])}const rK={};function P3(e){const t=this,n=e||rK,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(nK(n)),o.push(aq()),a.push(sq(n))}function I3(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const a=n.slice(i,r).trim();(a||!o)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function O3(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const iK=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oK=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,aK={};function D3(e,t){return(aK.jsx?oK:iK).test(e)}const sK=/[ \t\n\f\r]/g;function uK(e){return typeof e=="object"?e.type==="text"?L3(e.value):!1:L3(e)}function L3(e){return e.replace(sK,"")===""}class Ol{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ol.prototype.property={},Ol.prototype.normal={},Ol.prototype.space=null;function M3(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Ol(n,r,t)}function Dl(e){return e.toLowerCase()}class lr{constructor(t,n){this.property=t,this.attribute=n}}lr.prototype.space=null,lr.prototype.boolean=!1,lr.prototype.booleanish=!1,lr.prototype.overloadedBoolean=!1,lr.prototype.number=!1,lr.prototype.commaSeparated=!1,lr.prototype.spaceSeparated=!1,lr.prototype.commaOrSpaceSeparated=!1,lr.prototype.mustUseProperty=!1,lr.prototype.defined=!1;let lK=0;const Ae=fa(),At=fa(),F3=fa(),ee=fa(),et=fa(),Ms=fa(),Wn=fa();function fa(){return 2**++lK}const z1=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ae,booleanish:At,commaOrSpaceSeparated:Wn,commaSeparated:Ms,number:ee,overloadedBoolean:F3,spaceSeparated:et},Symbol.toStringTag,{value:"Module"})),H1=Object.keys(z1);class V1 extends lr{constructor(t,n,r,i){let o=-1;if(super(t,n),B3(this,"space",i),typeof r=="number")for(;++o<H1.length;){const a=H1[o];B3(this,H1[o],(r&z1[a])===z1[a])}}}V1.prototype.defined=!0;function B3(e,t,n){n&&(e[t]=n)}const cK={}.hasOwnProperty;function Fs(e){const t={},n={};let r;for(r in e.properties)if(cK.call(e.properties,r)){const i=e.properties[r],o=new V1(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Dl(r)]=r,n[Dl(o.attribute)]=r}return new Ol(t,n,e.space)}const j3=Fs({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),U3=Fs({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function z3(e,t){return t in e?e[t]:t}function H3(e,t){return z3(e,t.toLowerCase())}const V3=Fs({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:H3,properties:{xmlns:null,xmlnsXLink:null}}),$3=Fs({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:At,ariaAutoComplete:null,ariaBusy:At,ariaChecked:At,ariaColCount:ee,ariaColIndex:ee,ariaColSpan:ee,ariaControls:et,ariaCurrent:null,ariaDescribedBy:et,ariaDetails:null,ariaDisabled:At,ariaDropEffect:et,ariaErrorMessage:null,ariaExpanded:At,ariaFlowTo:et,ariaGrabbed:At,ariaHasPopup:null,ariaHidden:At,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:et,ariaLevel:ee,ariaLive:null,ariaModal:At,ariaMultiLine:At,ariaMultiSelectable:At,ariaOrientation:null,ariaOwns:et,ariaPlaceholder:null,ariaPosInSet:ee,ariaPressed:At,ariaReadOnly:At,ariaRelevant:null,ariaRequired:At,ariaRoleDescription:et,ariaRowCount:ee,ariaRowIndex:ee,ariaRowSpan:ee,ariaSelected:At,ariaSetSize:ee,ariaSort:null,ariaValueMax:ee,ariaValueMin:ee,ariaValueNow:ee,ariaValueText:null,role:null}}),dK=Fs({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:H3,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ms,acceptCharset:et,accessKey:et,action:null,allow:null,allowFullScreen:Ae,allowPaymentRequest:Ae,allowUserMedia:Ae,alt:null,as:null,async:Ae,autoCapitalize:null,autoComplete:et,autoFocus:Ae,autoPlay:Ae,blocking:et,capture:null,charSet:null,checked:Ae,cite:null,className:et,cols:ee,colSpan:null,content:null,contentEditable:At,controls:Ae,controlsList:et,coords:ee|Ms,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ae,defer:Ae,dir:null,dirName:null,disabled:Ae,download:F3,draggable:At,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ae,formTarget:null,headers:et,height:ee,hidden:Ae,high:ee,href:null,hrefLang:null,htmlFor:et,httpEquiv:et,id:null,imageSizes:null,imageSrcSet:null,inert:Ae,inputMode:null,integrity:null,is:null,isMap:Ae,itemId:null,itemProp:et,itemRef:et,itemScope:Ae,itemType:et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ae,low:ee,manifest:null,max:null,maxLength:ee,media:null,method:null,min:null,minLength:ee,multiple:Ae,muted:Ae,name:null,nonce:null,noModule:Ae,noValidate:Ae,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ae,optimum:ee,pattern:null,ping:et,placeholder:null,playsInline:Ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ae,referrerPolicy:null,rel:et,required:Ae,reversed:Ae,rows:ee,rowSpan:ee,sandbox:et,scope:null,scoped:Ae,seamless:Ae,selected:Ae,shadowRootClonable:Ae,shadowRootDelegatesFocus:Ae,shadowRootMode:null,shape:null,size:ee,sizes:null,slot:null,span:ee,spellCheck:At,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ee,step:null,style:null,tabIndex:ee,target:null,title:null,translate:null,type:null,typeMustMatch:Ae,useMap:null,value:At,width:ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:et,axis:null,background:null,bgColor:null,border:ee,borderColor:null,bottomMargin:ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ae,declare:Ae,event:null,face:null,frame:null,frameBorder:null,hSpace:ee,leftMargin:ee,link:null,longDesc:null,lowSrc:null,marginHeight:ee,marginWidth:ee,noResize:Ae,noHref:Ae,noShade:Ae,noWrap:Ae,object:null,profile:null,prompt:null,rev:null,rightMargin:ee,rules:null,scheme:null,scrolling:At,standby:null,summary:null,text:null,topMargin:ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ae,disableRemotePlayback:Ae,prefix:null,property:null,results:ee,security:null,unselectable:null}}),fK=Fs({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:z3,properties:{about:Wn,accentHeight:ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ee,amplitude:ee,arabicForm:null,ascent:ee,attributeName:null,attributeType:null,azimuth:ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ee,by:null,calcMode:null,capHeight:ee,className:et,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ee,diffuseConstant:ee,direction:null,display:null,dur:null,divisor:ee,dominantBaseline:null,download:Ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:ee,enableBackground:null,end:null,event:null,exponent:ee,externalResourcesRequired:null,fill:null,fillOpacity:ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ms,g2:Ms,glyphName:Ms,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ee,horizOriginX:ee,horizOriginY:ee,id:null,ideographic:ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ee,k:ee,k1:ee,k2:ee,k3:ee,k4:ee,kernelMatrix:Wn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ee,overlineThickness:ee,paintOrder:null,panose1:null,path:null,pathLength:ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ee,pointsAtY:ee,pointsAtZ:ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wn,rev:Wn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wn,requiredFeatures:Wn,requiredFonts:Wn,requiredFormats:Wn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ee,specularExponent:ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ee,strikethroughThickness:ee,string:null,stroke:null,strokeDashArray:Wn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ee,strokeOpacity:ee,strokeWidth:null,style:null,surfaceScale:ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wn,tabIndex:ee,tableValues:null,target:null,targetX:ee,targetY:ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ee,underlineThickness:ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ee,values:null,vAlphabetic:ee,vMathematical:ee,vectorEffect:null,vHanging:ee,vIdeographic:ee,version:null,vertAdvY:ee,vertOriginX:ee,vertOriginY:ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),pK=/^data[-\w.:]+$/i,W3=/-[a-z]/g,hK=/[A-Z]/g;function wp(e,t){const n=Dl(t);let r=t,i=lr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&pK.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(W3,gK);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!W3.test(o)){let a=o.replace(hK,mK);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=V1}return new i(r,t)}function mK(e){return"-"+e.toLowerCase()}function gK(e){return e.charAt(1).toUpperCase()}const yK={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Ll=M3([U3,j3,V3,$3,dK],"html"),wo=M3([U3,j3,V3,$3,fK],"svg");function Y3(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function q3(e){return e.join(" ").trim()}var G3={},K3=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,vK=/\n/g,xK=/^\s*/,wK=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,bK=/^:\s*/,EK=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,TK=/^[;\s]*/,_K=/^\s+|\s+$/g,CK=`
|
|
401
|
-
`,X3="/",Q3="*",pa="",SK="comment",AK="declaration",kK=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var y=m.match(vK);y&&(n+=y.length);var b=m.lastIndexOf(CK);r=~b?m.length-b:r+m.length}function o(){var m={line:n,column:r};return function(y){return y.position=new a(m),l(),y}}function a(m){this.start=m,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(m){var y=new Error(t.source+":"+n+":"+r+": "+m);if(y.reason=m,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function u(m){var y=m.exec(e);if(y){var b=y[0];return i(b),e=e.slice(b.length),y}}function l(){u(xK)}function c(m){var y;for(m=m||[];y=d();)y!==!1&&m.push(y);return m}function d(){var m=o();if(!(X3!=e.charAt(0)||Q3!=e.charAt(1))){for(var y=2;pa!=e.charAt(y)&&(Q3!=e.charAt(y)||X3!=e.charAt(y+1));)++y;if(y+=2,pa===e.charAt(y-1))return s("End of comment missing");var b=e.slice(2,y-2);return r+=2,i(b),e=e.slice(y),r+=2,m({type:SK,comment:b})}}function f(){var m=o(),y=u(wK);if(y){if(d(),!u(bK))return s("property missing ':'");var b=u(EK),g=m({type:AK,property:Z3(y[0].replace(K3,pa)),value:b?Z3(b[0].replace(K3,pa)):pa});return u(TK),g}}function p(){var m=[];c(m);for(var y;y=f();)y!==!1&&(m.push(y),c(m));return m}return l(),p()};function Z3(e){return e?e.replace(_K,pa):pa}var RK=yn&&yn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(G3,"__esModule",{value:!0});var J3=G3.default=PK,NK=RK(kK);function PK(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,NK.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var a=o.property,s=o.value;i?t(a,s,o):s&&(n=n||{},n[a]=s)}}),n}const IK=J3.default||J3,bp=eN("end"),Yr=eN("start");function eN(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function OK(e){const t=Yr(e),n=bp(e);if(t&&n)return{start:t,end:n}}function Ml(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?tN(e.position):"start"in e||"end"in e?tN(e):"line"in e||"column"in e?$1(e):""}function $1(e){return nN(e&&e.line)+":"+nN(e&&e.column)}function tN(e){return $1(e&&e.start)+"-"+$1(e&&e.end)}function nN(e){return e&&typeof e=="number"?e:1}class rn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Ml(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}rn.prototype.file="",rn.prototype.name="",rn.prototype.reason="",rn.prototype.message="",rn.prototype.stack="",rn.prototype.column=void 0,rn.prototype.line=void 0,rn.prototype.ancestors=void 0,rn.prototype.cause=void 0,rn.prototype.fatal=void 0,rn.prototype.place=void 0,rn.prototype.ruleId=void 0,rn.prototype.source=void 0;const W1={}.hasOwnProperty,DK=new Map,LK=/[A-Z]/g,MK=/-([a-z])/g,FK=new Set(["table","tbody","thead","tfoot","tr"]),BK=new Set(["td","th"]),rN="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function jK(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=qK(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=YK(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?wo:Ll,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=iN(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function iN(e,t,n){if(t.type==="element")return UK(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return zK(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return VK(e,t,n);if(t.type==="mdxjsEsm")return HK(e,t);if(t.type==="root")return $K(e,t,n);if(t.type==="text")return WK(e,t)}function UK(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=wo,e.schema=i),e.ancestors.push(t);const o=aN(e,t.tagName,!1),a=GK(e,t);let s=q1(e,t);return FK.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!uK(u):!0})),oN(e,a,o,t),Y1(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function zK(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Fl(e,t.position)}function HK(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Fl(e,t.position)}function VK(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=wo,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:aN(e,t.name,!0),a=KK(e,t),s=q1(e,t);return oN(e,a,o,t),Y1(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function $K(e,t,n){const r={};return Y1(r,q1(e,t)),e.create(t,e.Fragment,r,n)}function WK(e,t){return t.value}function oN(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Y1(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function YK(e,t,n){return r;function r(i,o,a,s){const l=Array.isArray(a.children)?n:t;return s?l(o,a,s):l(o,a)}}function qK(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),u=Yr(r);return t(i,o,a,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function GK(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&W1.call(t.properties,i)){const o=XK(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&BK.has(t.tagName)?r=s:n[a]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function KK(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Fl(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else Fl(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function q1(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:DK;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const l=i.get(u)||0;a=u+"-"+l,i.set(u,l+1)}}const s=iN(e,o,a);s!==void 0&&n.push(s)}return n}function XK(e,t,n){const r=wp(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?O3(n):q3(n)),r.property==="style"){let i=typeof n=="object"?n:QK(e,String(n));return e.stylePropertyNameCase==="css"&&(i=ZK(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?yK[r.property]||r.property:r.attribute,n]}}function QK(e,t){const n={};try{IK(t,r)}catch(i){if(!e.ignoreInvalidStyle){const o=i,a=new rn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=rN+"#cannot-parse-style-attribute",a}}return n;function r(i,o){let a=i;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(MK,eX)),n[a]=o}}function aN(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const s=D3(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=D3(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return W1.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Fl(e)}function Fl(e,t){const n=new rn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=rN+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ZK(e){const t={};let n;for(n in e)W1.call(e,n)&&(t[JK(n)]=e[n]);return t}function JK(e){let t=e.replace(LK,tX);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function eX(e,t){return t.toUpperCase()}function tX(e){return"-"+e.toLowerCase()}const G1={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},nX={tokenize:rX};function rX(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Be(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return me(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const iX={tokenize:oX},sN={tokenize:aX};function oX(e){const t=this,n=[];let r=0,i,o,a;return s;function s(w){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,u,l)(w)}return l(w)}function u(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const T=t.events.length;let _=T,C;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){C=t.events[_][1].end;break}g(r);let R=T;for(;R<t.events.length;)t.events[R][1].end=Object.assign({},C),R++;return sr(t.events,_+1,0,t.events.slice(T)),t.events.length=R,l(w)}return s(w)}function l(w){if(r===n.length){if(!i)return f(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sN,c,d)(w)}function c(w){return i&&x(),g(r),f(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(w)}function f(w){return t.containerState={},e.attempt(sN,p,m)(w)}function p(w){return r++,n.push([t.currentConstruct,t.containerState]),f(w)}function m(w){if(w===null){i&&x(),g(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),y(w)}function y(w){if(w===null){b(e.exit("chunkFlow"),!0),g(0),e.consume(w);return}return me(w)?(e.consume(w),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),y)}function b(w,T){const _=t.sliceStream(w);if(T&&_.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(_),t.parser.lazy[w.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<a&&(!i.events[C][1].end||i.events[C][1].end.offset>a))return;const R=t.events.length;let O=R,V,P;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(V){P=t.events[O][1].end;break}V=!0}for(g(r),C=R;C<t.events.length;)t.events[C][1].end=Object.assign({},P),C++;sr(t.events,O+1,0,t.events.slice(R)),t.events.length=C}}function g(w){let T=n.length;for(;T-- >w;){const _=n[T];t.containerState=_[1],_[0].exit.call(t,e)}n.length=w}function x(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function aX(e,t,n){return Be(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const sX={tokenize:uX};function uX(e){const t=this,n=e.attempt(Nl,r,e.attempt(this.parser.constructs.flowInitial,i,Be(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Hq,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const lX={resolveAll:lN()},cX=uN("string"),dX=uN("text");function uN(e){return{tokenize:t,resolveAll:lN(e==="text"?fX:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(c){return l(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return l(c)?(n.exit("data"),o(c)):(n.consume(c),u)}function l(c){if(c===null)return!0;const d=i[c];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function lN(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function fX(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,u;for(;o--;){const l=i[o];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(l===-2)u=!0,s++;else if(l!==-1){o++;break}}if(s){const l={type:n===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function pX(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const u={consume:x,enter:w,exit:T,attempt:R(_),check:R(C),interrupt:R(C,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:f,now:m,defineSkip:y,write:d};let c=t.tokenize.call(l,u);return t.resolveAll&&o.push(t),l;function d($){return a=ur(a,$),b(),a[a.length-1]!==null?[]:(O(t,0),l.events=yp(o,l.events,l),l.events)}function f($,z){return mX(p($),z)}function p($){return hX(a,$)}function m(){const{line:$,column:z,offset:X,_index:Y,_bufferIndex:re}=r;return{line:$,column:z,offset:X,_index:Y,_bufferIndex:re}}function y($){i[$.line]=$.column,P()}function b(){let $;for(;r._index<a.length;){const z=a[r._index];if(typeof z=="string")for($=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===$&&r._bufferIndex<z.length;)g(z.charCodeAt(r._bufferIndex));else g(z)}}function g($){c=c($)}function x($){me($)?(r.line++,r.column=1,r.offset+=$===-3?2:1,P()):$!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=$}function w($,z){const X=z||{};return X.type=$,X.start=m(),l.events.push(["enter",X,l]),s.push(X),X}function T($){const z=s.pop();return z.end=m(),l.events.push(["exit",z,l]),z}function _($,z){O($,z.from)}function C($,z){z.restore()}function R($,z){return X;function X(Y,re,ie){let te,F,B,A;return Array.isArray(Y)?he(Y):"tokenize"in Y?he([Y]):oe(Y);function oe(xe){return $e;function $e(Ve){const We=Ve!==null&&xe[Ve],Ge=Ve!==null&&xe.null,_t=[...Array.isArray(We)?We:We?[We]:[],...Array.isArray(Ge)?Ge:Ge?[Ge]:[]];return he(_t)(Ve)}}function he(xe){return te=xe,F=0,xe.length===0?ie:D(xe[F])}function D(xe){return $e;function $e(Ve){return A=V(),B=xe,xe.partial||(l.currentConstruct=xe),xe.name&&l.parser.constructs.disable.null.includes(xe.name)?ge():xe.tokenize.call(z?Object.assign(Object.create(l),z):l,u,Oe,ge)(Ve)}}function Oe(xe){return $(B,A),re}function ge(xe){return A.restore(),++F<te.length?D(te[F]):ie}}}function O($,z){$.resolveAll&&!o.includes($)&&o.push($),$.resolve&&sr(l.events,z,l.events.length-z,$.resolve(l.events.slice(z),l)),$.resolveTo&&(l.events=$.resolveTo(l.events,l))}function V(){const $=m(),z=l.previous,X=l.currentConstruct,Y=l.events.length,re=Array.from(s);return{restore:ie,from:Y};function ie(){r=$,l.previous=z,l.currentConstruct=X,l.events.length=Y,s=re,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function hX(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function mX(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
400
|
+
`))}function u(p,m,y,b){const g=y.enter("tableCell"),x=y.enter("phrasing"),w=y.containerPhrasing(p,{...b,before:o,after:o});return x(),g(),w}function l(p,m){return lY(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(p,m,y){const b=p.children;let g=-1;const x=[],w=m.enter("table");for(;++g<b.length;)x[g]=d(b[g],m,y);return w(),x}function d(p,m,y){const b=p.children;let g=-1;const x=[],w=m.enter("tableRow");for(;++g<b.length;)x[g]=u(b[g],p,m,y);return w(),x}function f(p,m,y){let b=r3.inlineCode(p,m,y);return y.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function nq(){return{exit:{taskListCheckValueChecked:s3,taskListCheckValueUnchecked:s3,paragraph:iq}}}function rq(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:oq}}}function s3(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function iq(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function oq(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let u=r3.listItem(e,t,n,{...r,...s.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+a}}function aq(){return[IW(),$W(),iY(),KY(),nq()]}function sq(e){return{extensions:[OW(),WW(),oY(),tq(e),rq()]}}function sr(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function ur(e,t){return e.length>0?(sr(e,e.length,0,t),e):t}const u3={}.hasOwnProperty;function l3(e){const t={};let n=-1;for(;++n<e.length;)uq(t,e[n]);return t}function uq(e,t){let n;for(n in t){const i=(u3.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){u3.call(i,a)||(i[a]=[]);const s=o[a];lq(i[a],Array.isArray(s)?s:s?[s]:[])}}}function lq(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);sr(e,0,0,r)}const cq={tokenize:gq,partial:!0},c3={tokenize:yq,partial:!0},d3={tokenize:vq,partial:!0},f3={tokenize:xq,partial:!0},dq={tokenize:wq,partial:!0},p3={name:"wwwAutolink",tokenize:hq,previous:m3},h3={name:"protocolAutolink",tokenize:mq,previous:g3},_i={name:"emailAutolink",tokenize:pq,previous:y3},Wr={};function fq(){return{text:Wr}}let da=48;for(;da<123;)Wr[da]=_i,da++,da===58?da=65:da===91&&(da=97);Wr[43]=_i,Wr[45]=_i,Wr[46]=_i,Wr[95]=_i,Wr[72]=[_i,h3],Wr[104]=[_i,h3],Wr[87]=[_i,p3],Wr[119]=[_i,p3];function pq(e,t,n){const r=this;let i,o;return a;function a(d){return!L1(d)||!y3.call(r,r.previous)||M1(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return L1(d)?(e.consume(d),s):d===64?(e.consume(d),u):n(d)}function u(d){return d===46?e.check(dq,c,l)(d):d===45||d===95||nn(d)?(o=!0,e.consume(d),u):c(d)}function l(d){return e.consume(d),i=!0,u}function c(d){return o&&i&&pn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function hq(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!m3.call(r,r.previous)||M1(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(cq,e.attempt(c3,e.attempt(d3,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function mq(e,t,n){const r=this;let i="",o=!1;return a;function a(d){return(d===72||d===104)&&g3.call(r,r.previous)&&!M1(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(pn(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),u}return n(d)}function u(d){return d===47?(e.consume(d),o?l:(o=!0,u)):n(d)}function l(d){return d===null||dp(d)||Ze(d)||ca(d)||fp(d)?n(d):e.attempt(c3,e.attempt(d3,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function gq(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function yq(e,t,n){let r,i,o;return a;function a(l){return l===46||l===95?e.check(f3,u,s)(l):l===null||Ze(l)||ca(l)||l!==45&&fp(l)?u(l):(o=!0,e.consume(l),a)}function s(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),a}function u(l){return i||r||!o?n(l):t(l)}}function vq(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(f3,t,o)(a):a===null||Ze(a)||ca(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function xq(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Ze(s)||ca(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Ze(s)||ca(s)?t(s):r(s)}function o(s){return pn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):pn(s)?(e.consume(s),a):n(s)}}function wq(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return nn(o)?n(o):t(o)}}function m3(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ze(e)}function g3(e){return!pn(e)}function y3(e){return!(e===47||L1(e))}function L1(e){return e===43||e===45||e===46||e===95||nn(e)}function M1(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Ds(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&nn(e.charCodeAt(n+1))&&nn(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function gp(e){if(e===null||Ze(e)||ca(e))return 1;if(fp(e))return 2}function yp(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const F1={name:"attention",tokenize:Eq,resolveAll:bq};function bq(e,t){let n=-1,r,i,o,a,s,u,l,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d=Object.assign({},e[r][1].end),f=Object.assign({},e[n][1].start);v3(d,-u),v3(f,u),a={type:u>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[r][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:f},o={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=ur(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=ur(l,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),l=ur(l,yp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=ur(l,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,l=ur(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,sr(e,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Eq(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=gp(r);let o;return a;function a(u){return o=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===o)return e.consume(u),s;const l=e.exit("attentionSequence"),c=gp(u),d=!c||c===2&&i||n.includes(u),f=!i||i===2&&c||n.includes(r);return l._open=!!(o===42?d:d&&(i||!f)),l._close=!!(o===42?f:f&&(c||!d)),t(u)}}function v3(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Tq={name:"autolink",tokenize:_q};function _q(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return pn(p)?(e.consume(p),a):p===64?n(p):l(p)}function a(p){return p===43||p===45||p===46||nn(p)?(r=1,s(p)):l(p)}function s(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||nn(p))&&r++<32?(e.consume(p),s):(r=0,l(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||dp(p)?n(p):(e.consume(p),u)}function l(p){return p===64?(e.consume(p),c):gW(p)?(e.consume(p),l):n(p)}function c(p){return nn(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||nn(p))&&r++<63){const m=p===45?f:d;return e.consume(p),m}return n(p)}}function Be(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(u){return Me(u)?(e.enter(n),s(u)):t(u)}function s(u){return Me(u)&&o++<i?(e.consume(u),s):(e.exit(n),t(u))}}const Nl={tokenize:Cq,partial:!0};function Cq(e,t,n){return r;function r(o){return Me(o)?Be(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||me(o)?t(o):n(o)}}const x3={name:"blockQuote",tokenize:Sq,continuation:{tokenize:Aq},exit:kq};function Sq(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return Me(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Aq(e,t,n){const r=this;return i;function i(a){return Me(a)?Be(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(x3,t,n)(a)}}function kq(e){e.exit("blockQuote")}const w3={name:"characterEscape",tokenize:Rq};function Rq(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return vW(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const b3={name:"characterReference",tokenize:Nq};function Nq(e,t,n){const r=this;let i=0,o,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,a=nn,c(d))}function l(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=yW,c):(e.enter("characterReferenceValue"),o=7,a=C1,c(d))}function c(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return a===nn&&!O1(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<o?(e.consume(d),c):n(d)}}const E3={tokenize:Iq,partial:!0},T3={name:"codeFenced",tokenize:Pq,concrete:!0};function Pq(e,t,n){const r=this,i={tokenize:_,partial:!0};let o=0,a=0,s;return u;function u(C){return l(C)}function l(C){const R=r.events[r.events.length-1];return o=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,s=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(C)}function c(C){return C===s?(a++,e.consume(C),c):a<3?n(C):(e.exit("codeFencedFenceSequence"),Me(C)?Be(e,d,"whitespace")(C):d(C))}function d(C){return C===null||me(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(E3,y,T)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(C))}function f(C){return C===null||me(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(C)):Me(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Be(e,p,"whitespace")(C)):C===96&&C===s?n(C):(e.consume(C),f)}function p(C){return C===null||me(C)?d(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||me(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(C)):C===96&&C===s?n(C):(e.consume(C),m)}function y(C){return e.attempt(i,T,b)(C)}function b(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),g}function g(C){return o>0&&Me(C)?Be(e,x,"linePrefix",o+1)(C):x(C)}function x(C){return C===null||me(C)?e.check(E3,y,T)(C):(e.enter("codeFlowValue"),w(C))}function w(C){return C===null||me(C)?(e.exit("codeFlowValue"),x(C)):(e.consume(C),w)}function T(C){return e.exit("codeFenced"),t(C)}function _(C,R,O){let V=0;return P;function P(re){return C.enter("lineEnding"),C.consume(re),C.exit("lineEnding"),$}function $(re){return C.enter("codeFencedFence"),Me(re)?Be(C,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(re):z(re)}function z(re){return re===s?(C.enter("codeFencedFenceSequence"),Q(re)):O(re)}function Q(re){return re===s?(V++,C.consume(re),Q):V>=a?(C.exit("codeFencedFenceSequence"),Me(re)?Be(C,Y,"whitespace")(re):Y(re)):O(re)}function Y(re){return re===null||me(re)?(C.exit("codeFencedFence"),R(re)):O(re)}}}function Iq(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const B1={name:"codeIndented",tokenize:Dq},Oq={tokenize:Lq,partial:!0};function Dq(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),Be(e,o,"linePrefix",5)(l)}function o(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(l):n(l)}function a(l){return l===null?u(l):me(l)?e.attempt(Oq,a,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||me(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function Lq(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):me(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Be(e,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):me(a)?i(a):n(a)}}const Mq={name:"codeText",tokenize:jq,resolve:Fq,previous:Bq};function Fq(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Bq(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function jq(e,t,n){let r=0,i,o;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(o=e.enter("codeTextSequence"),i=0,c(d)):me(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||me(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),l)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",l(d))}}class Uq{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Pl(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Pl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Pl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Pl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Pl(this.left,n.reverse())}}}function Pl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function _3(e){const t={};let n=-1,r,i,o,a,s,u,l;const c=new Uq(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,zq(c,n)),n=t[n],l=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(a=c.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return sr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function zq(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,u=[],l={};let c,d,f=-1,p=n,m=0,y=0;const b=[y];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(y=f+1,b.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):b.pop(),f=b.length;f--;){const g=s.slice(b[f],b[f+1]),x=o.pop();u.push([x,x+g.length-1]),e.splice(x,2,g)}for(u.reverse(),f=-1;++f<u.length;)l[m+u[f][0]]=m+u[f][1],m+=u[f][1]-u[f][0]-1;return l}const Hq={tokenize:Wq,resolve:$q},Vq={tokenize:Yq,partial:!0};function $q(e){return _3(e),e}function Wq(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):me(s)?e.check(Vq,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Yq(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Be(e,o,"linePrefix")}function o(a){if(a===null||me(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function C3(e,t,n,r,i,o,a,s,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),f):g===null||g===32||g===41||dp(g)?n(g):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(g))}function f(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(s),f(g)):g===null||g===60||me(g)?n(g):(e.consume(g),g===92?m:p)}function m(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function y(g){return!c&&(g===null||g===41||Ze(g))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(g)):c<l&&g===40?(e.consume(g),c++,y):g===41?(e.consume(g),c--,y):g===null||g===32||g===40||dp(g)?n(g):(e.consume(g),g===92?b:y)}function b(g){return g===40||g===41||g===92?(e.consume(g),y):y(g)}}function S3(e,t,n,r,i,o){const a=this;let s=0,u;return l;function l(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),c}function c(p){return s>999||p===null||p===91||p===93&&!u||p===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):me(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||me(p)||s++>999?(e.exit("chunkString"),c(p)):(e.consume(p),u||(u=!Me(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,d):d(p)}}function A3(e,t,n,r,i,o){let a;return s;function s(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),a=f===40?41:f,u):n(f)}function u(f){return f===a?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(o),l(f))}function l(f){return f===a?(e.exit(o),u(a)):f===null?n(f):me(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Be(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===a||f===null||me(f)?(e.exit("chunkString"),l(f)):(e.consume(f),f===92?d:c)}function d(f){return f===a||f===92?(e.consume(f),c):c(f)}}function Il(e,t){let n;return r;function r(i){return me(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Me(i)?Be(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const qq={name:"definition",tokenize:Kq},Gq={tokenize:Xq,partial:!0};function Kq(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),a(p)}function a(p){return S3.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=Sr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return Ze(p)?Il(e,l)(p):l(p)}function l(p){return C3(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(Gq,d,d)(p)}function d(p){return Me(p)?Be(e,f,"whitespace")(p):f(p)}function f(p){return p===null||me(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Xq(e,t,n){return r;function r(s){return Ze(s)?Il(e,i)(s):n(s)}function i(s){return A3(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return Me(s)?Be(e,a,"whitespace")(s):a(s)}function a(s){return s===null||me(s)?t(s):n(s)}}const Qq={name:"hardBreakEscape",tokenize:Zq};function Zq(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return me(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Jq={name:"headingAtx",tokenize:tG,resolve:eG};function eG(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},sr(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function tG(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(e.consume(c),a):c===null||Ze(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||me(c)?(e.exit("atxHeading"),t(c)):Me(c)?Be(e,s,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function l(c){return c===null||c===35||Ze(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}const nG=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],k3=["pre","script","style","textarea"],rG={name:"htmlFlow",tokenize:sG,resolveTo:aG,concrete:!0},iG={tokenize:lG,partial:!0},oG={tokenize:uG,partial:!0};function aG(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function sG(e,t,n){const r=this;let i,o,a,s,u;return l;function l(D){return c(D)}function c(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),d}function d(D){return D===33?(e.consume(D),f):D===47?(e.consume(D),o=!0,y):D===63?(e.consume(D),i=3,r.interrupt?t:A):pn(D)?(e.consume(D),a=String.fromCharCode(D),b):n(D)}function f(D){return D===45?(e.consume(D),i=2,p):D===91?(e.consume(D),i=5,s=0,m):pn(D)?(e.consume(D),i=4,r.interrupt?t:A):n(D)}function p(D){return D===45?(e.consume(D),r.interrupt?t:A):n(D)}function m(D){const Oe="CDATA[";return D===Oe.charCodeAt(s++)?(e.consume(D),s===Oe.length?r.interrupt?t:z:m):n(D)}function y(D){return pn(D)?(e.consume(D),a=String.fromCharCode(D),b):n(D)}function b(D){if(D===null||D===47||D===62||Ze(D)){const Oe=D===47,ge=a.toLowerCase();return!Oe&&!o&&k3.includes(ge)?(i=1,r.interrupt?t(D):z(D)):nG.includes(a.toLowerCase())?(i=6,Oe?(e.consume(D),g):r.interrupt?t(D):z(D)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(D):o?x(D):w(D))}return D===45||nn(D)?(e.consume(D),a+=String.fromCharCode(D),b):n(D)}function g(D){return D===62?(e.consume(D),r.interrupt?t:z):n(D)}function x(D){return Me(D)?(e.consume(D),x):P(D)}function w(D){return D===47?(e.consume(D),P):D===58||D===95||pn(D)?(e.consume(D),T):Me(D)?(e.consume(D),w):P(D)}function T(D){return D===45||D===46||D===58||D===95||nn(D)?(e.consume(D),T):_(D)}function _(D){return D===61?(e.consume(D),C):Me(D)?(e.consume(D),_):w(D)}function C(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),u=D,R):Me(D)?(e.consume(D),C):O(D)}function R(D){return D===u?(e.consume(D),u=null,V):D===null||me(D)?n(D):(e.consume(D),R)}function O(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||Ze(D)?_(D):(e.consume(D),O)}function V(D){return D===47||D===62||Me(D)?w(D):n(D)}function P(D){return D===62?(e.consume(D),$):n(D)}function $(D){return D===null||me(D)?z(D):Me(D)?(e.consume(D),$):n(D)}function z(D){return D===45&&i===2?(e.consume(D),ie):D===60&&i===1?(e.consume(D),te):D===62&&i===4?(e.consume(D),oe):D===63&&i===3?(e.consume(D),A):D===93&&i===5?(e.consume(D),B):me(D)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(iG,he,Q)(D)):D===null||me(D)?(e.exit("htmlFlowData"),Q(D)):(e.consume(D),z)}function Q(D){return e.check(oG,Y,he)(D)}function Y(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),re}function re(D){return D===null||me(D)?Q(D):(e.enter("htmlFlowData"),z(D))}function ie(D){return D===45?(e.consume(D),A):z(D)}function te(D){return D===47?(e.consume(D),a="",F):z(D)}function F(D){if(D===62){const Oe=a.toLowerCase();return k3.includes(Oe)?(e.consume(D),oe):z(D)}return pn(D)&&a.length<8?(e.consume(D),a+=String.fromCharCode(D),F):z(D)}function B(D){return D===93?(e.consume(D),A):z(D)}function A(D){return D===62?(e.consume(D),oe):D===45&&i===2?(e.consume(D),A):z(D)}function oe(D){return D===null||me(D)?(e.exit("htmlFlowData"),he(D)):(e.consume(D),oe)}function he(D){return e.exit("htmlFlow"),t(D)}}function uG(e,t,n){const r=this;return i;function i(a){return me(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function lG(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Nl,t,n)}}const cG={name:"htmlText",tokenize:dG};function dG(e,t,n){const r=this;let i,o,a;return s;function s(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),u}function u(A){return A===33?(e.consume(A),l):A===47?(e.consume(A),_):A===63?(e.consume(A),w):pn(A)?(e.consume(A),O):n(A)}function l(A){return A===45?(e.consume(A),c):A===91?(e.consume(A),o=0,m):pn(A)?(e.consume(A),x):n(A)}function c(A){return A===45?(e.consume(A),p):n(A)}function d(A){return A===null?n(A):A===45?(e.consume(A),f):me(A)?(a=d,te(A)):(e.consume(A),d)}function f(A){return A===45?(e.consume(A),p):d(A)}function p(A){return A===62?ie(A):A===45?f(A):d(A)}function m(A){const oe="CDATA[";return A===oe.charCodeAt(o++)?(e.consume(A),o===oe.length?y:m):n(A)}function y(A){return A===null?n(A):A===93?(e.consume(A),b):me(A)?(a=y,te(A)):(e.consume(A),y)}function b(A){return A===93?(e.consume(A),g):y(A)}function g(A){return A===62?ie(A):A===93?(e.consume(A),g):y(A)}function x(A){return A===null||A===62?ie(A):me(A)?(a=x,te(A)):(e.consume(A),x)}function w(A){return A===null?n(A):A===63?(e.consume(A),T):me(A)?(a=w,te(A)):(e.consume(A),w)}function T(A){return A===62?ie(A):w(A)}function _(A){return pn(A)?(e.consume(A),C):n(A)}function C(A){return A===45||nn(A)?(e.consume(A),C):R(A)}function R(A){return me(A)?(a=R,te(A)):Me(A)?(e.consume(A),R):ie(A)}function O(A){return A===45||nn(A)?(e.consume(A),O):A===47||A===62||Ze(A)?V(A):n(A)}function V(A){return A===47?(e.consume(A),ie):A===58||A===95||pn(A)?(e.consume(A),P):me(A)?(a=V,te(A)):Me(A)?(e.consume(A),V):ie(A)}function P(A){return A===45||A===46||A===58||A===95||nn(A)?(e.consume(A),P):$(A)}function $(A){return A===61?(e.consume(A),z):me(A)?(a=$,te(A)):Me(A)?(e.consume(A),$):V(A)}function z(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),i=A,Q):me(A)?(a=z,te(A)):Me(A)?(e.consume(A),z):(e.consume(A),Y)}function Q(A){return A===i?(e.consume(A),i=void 0,re):A===null?n(A):me(A)?(a=Q,te(A)):(e.consume(A),Q)}function Y(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||Ze(A)?V(A):(e.consume(A),Y)}function re(A){return A===47||A===62||Ze(A)?V(A):n(A)}function ie(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}function te(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),F}function F(A){return Me(A)?Be(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):B(A)}function B(A){return e.enter("htmlTextData"),a(A)}}const j1={name:"labelEnd",tokenize:yG,resolveTo:gG,resolveAll:mG},fG={tokenize:vG},pG={tokenize:xG},hG={tokenize:wG};function mG(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function gG(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},c={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",u,t],["enter",l,t]],s=ur(s,e.slice(o+1,o+r+3)),s=ur(s,[["enter",c,t]]),s=ur(s,yp(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=ur(s,[["exit",c,t],e[a-2],e[a-1],["exit",l,t]]),s=ur(s,e.slice(a+1)),s=ur(s,[["exit",u,t]]),sr(e,o,e.length,s),e}function yG(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(f){return o?o._inactive?d(f):(a=r.parser.defined.includes(Sr(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),u):n(f)}function u(f){return f===40?e.attempt(fG,c,a?c:d)(f):f===91?e.attempt(pG,c,a?l:d)(f):a?c(f):d(f)}function l(f){return e.attempt(hG,c,d)(f)}function c(f){return t(f)}function d(f){return o._balanced=!0,n(f)}}function vG(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Ze(d)?Il(e,o)(d):o(d)}function o(d){return d===41?c(d):C3(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return Ze(d)?Il(e,u)(d):c(d)}function s(d){return n(d)}function u(d){return d===34||d===39||d===40?A3(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function l(d){return Ze(d)?Il(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function xG(e,t,n){const r=this;return i;function i(s){return S3.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(Sr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function wG(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const bG={name:"labelStartImage",tokenize:EG,resolveAll:j1.resolveAll};function EG(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const TG={name:"labelStartLink",tokenize:_G,resolveAll:j1.resolveAll};function _G(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const U1={name:"lineEnding",tokenize:CG};function CG(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Be(e,t,"linePrefix")}}const vp={name:"thematicBreak",tokenize:SG};function SG(e,t,n){let r=0,i;return o;function o(l){return e.enter("thematicBreak"),a(l)}function a(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||me(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),Me(l)?Be(e,s,"whitespace")(l):s(l))}}const An={name:"list",tokenize:RG,continuation:{tokenize:NG},exit:IG},AG={tokenize:OG,partial:!0},kG={tokenize:PG,partial:!0};function RG(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:C1(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(vp,n,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return C1(p)&&++a<10?(e.consume(p),u):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Nl,r.interrupt?n:c,e.attempt(AG,f,d))}function c(p){return r.containerState.initialBlankLine=!0,o++,f(p)}function d(p){return Me(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function NG(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Nl,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Be(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!Me(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(kG,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Be(e,e.attempt(An,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function PG(e,t,n){const r=this;return Be(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function IG(e){e.exit(this.containerState.type)}function OG(e,t,n){const r=this;return Be(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!Me(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const R3={name:"setextUnderline",tokenize:LG,resolveTo:DG};function DG(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function LG(e,t,n){const r=this;let i;return o;function o(l){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=l,a(l)):n(l)}function a(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Me(l)?Be(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||me(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const MG={tokenize:$G,partial:!0};function FG(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:zG,continuation:{tokenize:HG},exit:VG}},text:{91:{name:"gfmFootnoteCall",tokenize:UG},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:BG,resolveTo:jG}}}}function BG(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!a||!a._balanced)return n(u);const l=Sr(r.sliceSerialize({start:a.end,end:r.now()}));return l.codePointAt(0)!==94||!o.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function jG(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function UG(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),u}function u(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(o>999||d===93&&!a||d===null||d===91||Ze(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Sr(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Ze(d)||(a=!0),o++,e.consume(d),d===92?c:l}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,l):l(d)}}function zG(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return u;function u(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(a>999||m===93&&!s||m===null||m===91||Ze(m))return n(m);if(m===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return o=Sr(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return Ze(m)||(s=!0),a++,e.consume(m),m===92?d:c}function d(m){return m===91||m===92||m===93?(e.consume(m),a++,c):c(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),Be(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function HG(e,t,n){return e.check(Nl,t,e.attempt(MG,t,n))}function VG(e){e.exit("gfmFootnoteDefinition")}function $G(e,t,n){const r=this;return Be(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function WG(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let l=u;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[u][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[u][1].end)},d={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[u][1].start)},f=[["enter",c,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",d,s]],p=s.parser.constructs.insideSpan.null;p&&sr(f,f.length,0,yp(p,a.slice(l+1,u),s)),sr(f,f.length,0,[["exit",d,s],["enter",a[u][1],s],["exit",a[u][1],s],["exit",c,s]]),sr(a,l-1,u-l+3,f),u=l+f.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function o(a,s,u){const l=this.previous,c=this.events;let d=0;return f;function f(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(m):(a.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const y=gp(l);if(m===126)return d>1?u(m):(a.consume(m),d++,p);if(d<2&&!n)return u(m);const b=a.exit("strikethroughSequenceTemporary"),g=gp(m);return b._open=!g||g===2&&!!y,b._close=!y||y===2&&!!g,s(m)}}}class YG{constructor(){this.map=[]}add(t,n,r){qG(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function qG(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function GG(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function KG(){return{flow:{null:{name:"table",tokenize:XG,resolveAll:QG}}}}function XG(e,t,n){const r=this;let i=0,o=0,a;return s;function s(P){let $=r.events.length-1;for(;$>-1;){const Y=r.events[$][1].type;if(Y==="lineEnding"||Y==="linePrefix")$--;else break}const z=$>-1?r.events[$][1].type:null,Q=z==="tableHead"||z==="tableRow"?C:u;return Q===C&&r.parser.lazy[r.now().line]?n(P):Q(P)}function u(P){return e.enter("tableHead"),e.enter("tableRow"),l(P)}function l(P){return P===124||(a=!0,o+=1),c(P)}function c(P){return P===null?n(P):me(P)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),p):n(P):Me(P)?Be(e,c,"whitespace")(P):(o+=1,a&&(a=!1,i+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),d(P)))}function d(P){return P===null||P===124||Ze(P)?(e.exit("data"),c(P)):(e.consume(P),P===92?f:d)}function f(P){return P===92||P===124?(e.consume(P),d):d(P)}function p(P){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(P):(e.enter("tableDelimiterRow"),a=!1,Me(P)?Be(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):m(P))}function m(P){return P===45||P===58?b(P):P===124?(a=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),y):_(P)}function y(P){return Me(P)?Be(e,b,"whitespace")(P):b(P)}function b(P){return P===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),g):P===45?(o+=1,g(P)):P===null||me(P)?T(P):_(P)}function g(P){return P===45?(e.enter("tableDelimiterFiller"),x(P)):_(P)}function x(P){return P===45?(e.consume(P),x):P===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(P))}function w(P){return Me(P)?Be(e,T,"whitespace")(P):T(P)}function T(P){return P===124?m(P):P===null||me(P)?!a||i!==o?_(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):_(P)}function _(P){return n(P)}function C(P){return e.enter("tableRow"),R(P)}function R(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),R):P===null||me(P)?(e.exit("tableRow"),t(P)):Me(P)?Be(e,R,"whitespace")(P):(e.enter("data"),O(P))}function O(P){return P===null||P===124||Ze(P)?(e.exit("data"),R(P)):(e.consume(P),P===92?V:O)}function V(P){return P===92||P===124?(e.consume(P),O):O(P)}}function QG(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,u=0,l,c,d;const f=new YG;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(s=!1,u!==0&&(N3(f,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],d=xp(f,t,o,i,void 0,d),o=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],d=xp(f,t,o,i,void 0,d)),o=a,a=[o[1],n,0,0])):m.type==="tableHead"?(s=!0,u=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=n,o[1]!==0?(a[0]=a[1],d=xp(f,t,o,i,n,d)):a[1]!==0&&(d=xp(f,t,a,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&N3(f,t,u,l,c),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=GG(t.events,n))}return e}function xp(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},Ls(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const u=Ls(t.events,n[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const l=Ls(t.events,n[2]),c=Ls(t.events,n[3]),d={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,y=n[3]-n[2]-1;e.add(m,y,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},Ls(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function N3(e,t,n,r,i){const o=[],a=Ls(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ls(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const ZG={name:"tasklistCheck",tokenize:eK};function JG(){return{text:{91:ZG}}}function eK(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return Ze(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):n(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return me(u)?t(u):Me(u)?e.check({tokenize:tK},t,n)(u):n(u)}}function tK(e,t,n){return Be(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function nK(e){return l3([fq(),FG(),WG(e),KG(),JG()])}const rK={};function P3(e){const t=this,n=e||rK,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(nK(n)),o.push(aq()),a.push(sq(n))}function I3(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const a=n.slice(i,r).trim();(a||!o)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function O3(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const iK=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oK=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,aK={};function D3(e,t){return(aK.jsx?oK:iK).test(e)}const sK=/[ \t\n\f\r]/g;function uK(e){return typeof e=="object"?e.type==="text"?L3(e.value):!1:L3(e)}function L3(e){return e.replace(sK,"")===""}class Ol{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ol.prototype.property={},Ol.prototype.normal={},Ol.prototype.space=null;function M3(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Ol(n,r,t)}function Dl(e){return e.toLowerCase()}class lr{constructor(t,n){this.property=t,this.attribute=n}}lr.prototype.space=null,lr.prototype.boolean=!1,lr.prototype.booleanish=!1,lr.prototype.overloadedBoolean=!1,lr.prototype.number=!1,lr.prototype.commaSeparated=!1,lr.prototype.spaceSeparated=!1,lr.prototype.commaOrSpaceSeparated=!1,lr.prototype.mustUseProperty=!1,lr.prototype.defined=!1;let lK=0;const Ae=fa(),At=fa(),F3=fa(),ee=fa(),et=fa(),Ms=fa(),Wn=fa();function fa(){return 2**++lK}const z1=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ae,booleanish:At,commaOrSpaceSeparated:Wn,commaSeparated:Ms,number:ee,overloadedBoolean:F3,spaceSeparated:et},Symbol.toStringTag,{value:"Module"})),H1=Object.keys(z1);class V1 extends lr{constructor(t,n,r,i){let o=-1;if(super(t,n),B3(this,"space",i),typeof r=="number")for(;++o<H1.length;){const a=H1[o];B3(this,H1[o],(r&z1[a])===z1[a])}}}V1.prototype.defined=!0;function B3(e,t,n){n&&(e[t]=n)}const cK={}.hasOwnProperty;function Fs(e){const t={},n={};let r;for(r in e.properties)if(cK.call(e.properties,r)){const i=e.properties[r],o=new V1(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Dl(r)]=r,n[Dl(o.attribute)]=r}return new Ol(t,n,e.space)}const j3=Fs({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),U3=Fs({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function z3(e,t){return t in e?e[t]:t}function H3(e,t){return z3(e,t.toLowerCase())}const V3=Fs({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:H3,properties:{xmlns:null,xmlnsXLink:null}}),$3=Fs({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:At,ariaAutoComplete:null,ariaBusy:At,ariaChecked:At,ariaColCount:ee,ariaColIndex:ee,ariaColSpan:ee,ariaControls:et,ariaCurrent:null,ariaDescribedBy:et,ariaDetails:null,ariaDisabled:At,ariaDropEffect:et,ariaErrorMessage:null,ariaExpanded:At,ariaFlowTo:et,ariaGrabbed:At,ariaHasPopup:null,ariaHidden:At,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:et,ariaLevel:ee,ariaLive:null,ariaModal:At,ariaMultiLine:At,ariaMultiSelectable:At,ariaOrientation:null,ariaOwns:et,ariaPlaceholder:null,ariaPosInSet:ee,ariaPressed:At,ariaReadOnly:At,ariaRelevant:null,ariaRequired:At,ariaRoleDescription:et,ariaRowCount:ee,ariaRowIndex:ee,ariaRowSpan:ee,ariaSelected:At,ariaSetSize:ee,ariaSort:null,ariaValueMax:ee,ariaValueMin:ee,ariaValueNow:ee,ariaValueText:null,role:null}}),dK=Fs({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:H3,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ms,acceptCharset:et,accessKey:et,action:null,allow:null,allowFullScreen:Ae,allowPaymentRequest:Ae,allowUserMedia:Ae,alt:null,as:null,async:Ae,autoCapitalize:null,autoComplete:et,autoFocus:Ae,autoPlay:Ae,blocking:et,capture:null,charSet:null,checked:Ae,cite:null,className:et,cols:ee,colSpan:null,content:null,contentEditable:At,controls:Ae,controlsList:et,coords:ee|Ms,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ae,defer:Ae,dir:null,dirName:null,disabled:Ae,download:F3,draggable:At,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ae,formTarget:null,headers:et,height:ee,hidden:Ae,high:ee,href:null,hrefLang:null,htmlFor:et,httpEquiv:et,id:null,imageSizes:null,imageSrcSet:null,inert:Ae,inputMode:null,integrity:null,is:null,isMap:Ae,itemId:null,itemProp:et,itemRef:et,itemScope:Ae,itemType:et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ae,low:ee,manifest:null,max:null,maxLength:ee,media:null,method:null,min:null,minLength:ee,multiple:Ae,muted:Ae,name:null,nonce:null,noModule:Ae,noValidate:Ae,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ae,optimum:ee,pattern:null,ping:et,placeholder:null,playsInline:Ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ae,referrerPolicy:null,rel:et,required:Ae,reversed:Ae,rows:ee,rowSpan:ee,sandbox:et,scope:null,scoped:Ae,seamless:Ae,selected:Ae,shadowRootClonable:Ae,shadowRootDelegatesFocus:Ae,shadowRootMode:null,shape:null,size:ee,sizes:null,slot:null,span:ee,spellCheck:At,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ee,step:null,style:null,tabIndex:ee,target:null,title:null,translate:null,type:null,typeMustMatch:Ae,useMap:null,value:At,width:ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:et,axis:null,background:null,bgColor:null,border:ee,borderColor:null,bottomMargin:ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ae,declare:Ae,event:null,face:null,frame:null,frameBorder:null,hSpace:ee,leftMargin:ee,link:null,longDesc:null,lowSrc:null,marginHeight:ee,marginWidth:ee,noResize:Ae,noHref:Ae,noShade:Ae,noWrap:Ae,object:null,profile:null,prompt:null,rev:null,rightMargin:ee,rules:null,scheme:null,scrolling:At,standby:null,summary:null,text:null,topMargin:ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ae,disableRemotePlayback:Ae,prefix:null,property:null,results:ee,security:null,unselectable:null}}),fK=Fs({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:z3,properties:{about:Wn,accentHeight:ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ee,amplitude:ee,arabicForm:null,ascent:ee,attributeName:null,attributeType:null,azimuth:ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ee,by:null,calcMode:null,capHeight:ee,className:et,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ee,diffuseConstant:ee,direction:null,display:null,dur:null,divisor:ee,dominantBaseline:null,download:Ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:ee,enableBackground:null,end:null,event:null,exponent:ee,externalResourcesRequired:null,fill:null,fillOpacity:ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ms,g2:Ms,glyphName:Ms,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ee,horizOriginX:ee,horizOriginY:ee,id:null,ideographic:ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ee,k:ee,k1:ee,k2:ee,k3:ee,k4:ee,kernelMatrix:Wn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ee,overlineThickness:ee,paintOrder:null,panose1:null,path:null,pathLength:ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ee,pointsAtY:ee,pointsAtZ:ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wn,rev:Wn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wn,requiredFeatures:Wn,requiredFonts:Wn,requiredFormats:Wn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ee,specularExponent:ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ee,strikethroughThickness:ee,string:null,stroke:null,strokeDashArray:Wn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ee,strokeOpacity:ee,strokeWidth:null,style:null,surfaceScale:ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wn,tabIndex:ee,tableValues:null,target:null,targetX:ee,targetY:ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ee,underlineThickness:ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ee,values:null,vAlphabetic:ee,vMathematical:ee,vectorEffect:null,vHanging:ee,vIdeographic:ee,version:null,vertAdvY:ee,vertOriginX:ee,vertOriginY:ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),pK=/^data[-\w.:]+$/i,W3=/-[a-z]/g,hK=/[A-Z]/g;function wp(e,t){const n=Dl(t);let r=t,i=lr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&pK.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(W3,gK);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!W3.test(o)){let a=o.replace(hK,mK);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=V1}return new i(r,t)}function mK(e){return"-"+e.toLowerCase()}function gK(e){return e.charAt(1).toUpperCase()}const yK={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Ll=M3([U3,j3,V3,$3,dK],"html"),wo=M3([U3,j3,V3,$3,fK],"svg");function Y3(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function q3(e){return e.join(" ").trim()}var G3={},K3=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,vK=/\n/g,xK=/^\s*/,wK=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,bK=/^:\s*/,EK=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,TK=/^[;\s]*/,_K=/^\s+|\s+$/g,CK=`
|
|
401
|
+
`,X3="/",Q3="*",pa="",SK="comment",AK="declaration",kK=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var y=m.match(vK);y&&(n+=y.length);var b=m.lastIndexOf(CK);r=~b?m.length-b:r+m.length}function o(){var m={line:n,column:r};return function(y){return y.position=new a(m),l(),y}}function a(m){this.start=m,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(m){var y=new Error(t.source+":"+n+":"+r+": "+m);if(y.reason=m,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function u(m){var y=m.exec(e);if(y){var b=y[0];return i(b),e=e.slice(b.length),y}}function l(){u(xK)}function c(m){var y;for(m=m||[];y=d();)y!==!1&&m.push(y);return m}function d(){var m=o();if(!(X3!=e.charAt(0)||Q3!=e.charAt(1))){for(var y=2;pa!=e.charAt(y)&&(Q3!=e.charAt(y)||X3!=e.charAt(y+1));)++y;if(y+=2,pa===e.charAt(y-1))return s("End of comment missing");var b=e.slice(2,y-2);return r+=2,i(b),e=e.slice(y),r+=2,m({type:SK,comment:b})}}function f(){var m=o(),y=u(wK);if(y){if(d(),!u(bK))return s("property missing ':'");var b=u(EK),g=m({type:AK,property:Z3(y[0].replace(K3,pa)),value:b?Z3(b[0].replace(K3,pa)):pa});return u(TK),g}}function p(){var m=[];c(m);for(var y;y=f();)y!==!1&&(m.push(y),c(m));return m}return l(),p()};function Z3(e){return e?e.replace(_K,pa):pa}var RK=yn&&yn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(G3,"__esModule",{value:!0});var J3=G3.default=PK,NK=RK(kK);function PK(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,NK.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var a=o.property,s=o.value;i?t(a,s,o):s&&(n=n||{},n[a]=s)}}),n}const IK=J3.default||J3,bp=eN("end"),Yr=eN("start");function eN(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function OK(e){const t=Yr(e),n=bp(e);if(t&&n)return{start:t,end:n}}function Ml(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?tN(e.position):"start"in e||"end"in e?tN(e):"line"in e||"column"in e?$1(e):""}function $1(e){return nN(e&&e.line)+":"+nN(e&&e.column)}function tN(e){return $1(e&&e.start)+"-"+$1(e&&e.end)}function nN(e){return e&&typeof e=="number"?e:1}class rn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Ml(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}rn.prototype.file="",rn.prototype.name="",rn.prototype.reason="",rn.prototype.message="",rn.prototype.stack="",rn.prototype.column=void 0,rn.prototype.line=void 0,rn.prototype.ancestors=void 0,rn.prototype.cause=void 0,rn.prototype.fatal=void 0,rn.prototype.place=void 0,rn.prototype.ruleId=void 0,rn.prototype.source=void 0;const W1={}.hasOwnProperty,DK=new Map,LK=/[A-Z]/g,MK=/-([a-z])/g,FK=new Set(["table","tbody","thead","tfoot","tr"]),BK=new Set(["td","th"]),rN="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function jK(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=qK(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=YK(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?wo:Ll,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=iN(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function iN(e,t,n){if(t.type==="element")return UK(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return zK(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return VK(e,t,n);if(t.type==="mdxjsEsm")return HK(e,t);if(t.type==="root")return $K(e,t,n);if(t.type==="text")return WK(e,t)}function UK(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=wo,e.schema=i),e.ancestors.push(t);const o=aN(e,t.tagName,!1),a=GK(e,t);let s=q1(e,t);return FK.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!uK(u):!0})),oN(e,a,o,t),Y1(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function zK(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Fl(e,t.position)}function HK(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Fl(e,t.position)}function VK(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=wo,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:aN(e,t.name,!0),a=KK(e,t),s=q1(e,t);return oN(e,a,o,t),Y1(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function $K(e,t,n){const r={};return Y1(r,q1(e,t)),e.create(t,e.Fragment,r,n)}function WK(e,t){return t.value}function oN(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Y1(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function YK(e,t,n){return r;function r(i,o,a,s){const l=Array.isArray(a.children)?n:t;return s?l(o,a,s):l(o,a)}}function qK(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),u=Yr(r);return t(i,o,a,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function GK(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&W1.call(t.properties,i)){const o=XK(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&BK.has(t.tagName)?r=s:n[a]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function KK(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Fl(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else Fl(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function q1(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:DK;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const l=i.get(u)||0;a=u+"-"+l,i.set(u,l+1)}}const s=iN(e,o,a);s!==void 0&&n.push(s)}return n}function XK(e,t,n){const r=wp(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?O3(n):q3(n)),r.property==="style"){let i=typeof n=="object"?n:QK(e,String(n));return e.stylePropertyNameCase==="css"&&(i=ZK(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?yK[r.property]||r.property:r.attribute,n]}}function QK(e,t){const n={};try{IK(t,r)}catch(i){if(!e.ignoreInvalidStyle){const o=i,a=new rn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=rN+"#cannot-parse-style-attribute",a}}return n;function r(i,o){let a=i;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(MK,eX)),n[a]=o}}function aN(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const s=D3(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=D3(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return W1.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Fl(e)}function Fl(e,t){const n=new rn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=rN+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ZK(e){const t={};let n;for(n in e)W1.call(e,n)&&(t[JK(n)]=e[n]);return t}function JK(e){let t=e.replace(LK,tX);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function eX(e,t){return t.toUpperCase()}function tX(e){return"-"+e.toLowerCase()}const G1={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},nX={tokenize:rX};function rX(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Be(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return me(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const iX={tokenize:oX},sN={tokenize:aX};function oX(e){const t=this,n=[];let r=0,i,o,a;return s;function s(w){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,u,l)(w)}return l(w)}function u(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const T=t.events.length;let _=T,C;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){C=t.events[_][1].end;break}g(r);let R=T;for(;R<t.events.length;)t.events[R][1].end=Object.assign({},C),R++;return sr(t.events,_+1,0,t.events.slice(T)),t.events.length=R,l(w)}return s(w)}function l(w){if(r===n.length){if(!i)return f(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sN,c,d)(w)}function c(w){return i&&x(),g(r),f(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(w)}function f(w){return t.containerState={},e.attempt(sN,p,m)(w)}function p(w){return r++,n.push([t.currentConstruct,t.containerState]),f(w)}function m(w){if(w===null){i&&x(),g(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),y(w)}function y(w){if(w===null){b(e.exit("chunkFlow"),!0),g(0),e.consume(w);return}return me(w)?(e.consume(w),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),y)}function b(w,T){const _=t.sliceStream(w);if(T&&_.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(_),t.parser.lazy[w.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<a&&(!i.events[C][1].end||i.events[C][1].end.offset>a))return;const R=t.events.length;let O=R,V,P;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(V){P=t.events[O][1].end;break}V=!0}for(g(r),C=R;C<t.events.length;)t.events[C][1].end=Object.assign({},P),C++;sr(t.events,O+1,0,t.events.slice(R)),t.events.length=C}}function g(w){let T=n.length;for(;T-- >w;){const _=n[T];t.containerState=_[1],_[0].exit.call(t,e)}n.length=w}function x(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function aX(e,t,n){return Be(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const sX={tokenize:uX};function uX(e){const t=this,n=e.attempt(Nl,r,e.attempt(this.parser.constructs.flowInitial,i,Be(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Hq,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const lX={resolveAll:lN()},cX=uN("string"),dX=uN("text");function uN(e){return{tokenize:t,resolveAll:lN(e==="text"?fX:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(c){return l(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return l(c)?(n.exit("data"),o(c)):(n.consume(c),u)}function l(c){if(c===null)return!0;const d=i[c];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function lN(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function fX(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,u;for(;o--;){const l=i[o];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(l===-2)u=!0,s++;else if(l!==-1){o++;break}}if(s){const l={type:n===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function pX(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const u={consume:x,enter:w,exit:T,attempt:R(_),check:R(C),interrupt:R(C,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:f,now:m,defineSkip:y,write:d};let c=t.tokenize.call(l,u);return t.resolveAll&&o.push(t),l;function d($){return a=ur(a,$),b(),a[a.length-1]!==null?[]:(O(t,0),l.events=yp(o,l.events,l),l.events)}function f($,z){return mX(p($),z)}function p($){return hX(a,$)}function m(){const{line:$,column:z,offset:Q,_index:Y,_bufferIndex:re}=r;return{line:$,column:z,offset:Q,_index:Y,_bufferIndex:re}}function y($){i[$.line]=$.column,P()}function b(){let $;for(;r._index<a.length;){const z=a[r._index];if(typeof z=="string")for($=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===$&&r._bufferIndex<z.length;)g(z.charCodeAt(r._bufferIndex));else g(z)}}function g($){c=c($)}function x($){me($)?(r.line++,r.column=1,r.offset+=$===-3?2:1,P()):$!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=$}function w($,z){const Q=z||{};return Q.type=$,Q.start=m(),l.events.push(["enter",Q,l]),s.push(Q),Q}function T($){const z=s.pop();return z.end=m(),l.events.push(["exit",z,l]),z}function _($,z){O($,z.from)}function C($,z){z.restore()}function R($,z){return Q;function Q(Y,re,ie){let te,F,B,A;return Array.isArray(Y)?he(Y):"tokenize"in Y?he([Y]):oe(Y);function oe(xe){return $e;function $e(Ve){const We=Ve!==null&&xe[Ve],Ge=Ve!==null&&xe.null,_t=[...Array.isArray(We)?We:We?[We]:[],...Array.isArray(Ge)?Ge:Ge?[Ge]:[]];return he(_t)(Ve)}}function he(xe){return te=xe,F=0,xe.length===0?ie:D(xe[F])}function D(xe){return $e;function $e(Ve){return A=V(),B=xe,xe.partial||(l.currentConstruct=xe),xe.name&&l.parser.constructs.disable.null.includes(xe.name)?ge():xe.tokenize.call(z?Object.assign(Object.create(l),z):l,u,Oe,ge)(Ve)}}function Oe(xe){return $(B,A),re}function ge(xe){return A.restore(),++F<te.length?D(te[F]):ie}}}function O($,z){$.resolveAll&&!o.includes($)&&o.push($),$.resolve&&sr(l.events,z,l.events.length-z,$.resolve(l.events.slice(z),l)),$.resolveTo&&(l.events=$.resolveTo(l.events,l))}function V(){const $=m(),z=l.previous,Q=l.currentConstruct,Y=l.events.length,re=Array.from(s);return{restore:ie,from:Y};function ie(){r=$,l.previous=z,l.currentConstruct=Q,l.events.length=Y,s=re,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function hX(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function mX(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
402
402
|
`;break}case-3:{a=`\r
|
|
403
|
-
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}const gX=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:qq},disable:{null:[]},document:{42:An,43:An,45:An,48:An,49:An,50:An,51:An,52:An,53:An,54:An,55:An,56:An,57:An,62:x3},flow:{35:Jq,42:vp,45:[R3,vp],60:rG,61:R3,95:vp,96:T3,126:T3},flowInitial:{[-2]:B1,[-1]:B1,32:B1},insideSpan:{null:[F1,lX]},string:{38:b3,92:w3},text:{[-5]:U1,[-4]:U1,[-3]:U1,33:bG,38:b3,42:F1,60:[Tq,cG],91:TG,92:[Qq,w3],93:j1,95:F1,96:Mq}},Symbol.toStringTag,{value:"Module"}));function yX(e){const n=l3([gX,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(nX),document:i(iX),flow:i(sX),string:i(cX),text:i(dX)};return r;function i(o){return a;function a(s){return pX(r,o,s)}}}function vX(e){for(;!_3(e););return e}const cN=/[\0\t\n\r]/g;function xX(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const u=[];let l,c,d,f,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(cN.lastIndex=d,l=cN.exec(o),f=l&&l.index!==void 0?l.index:o.length,p=o.charCodeAt(f),!l){t=o.slice(d);break}if(p===10&&d===f&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),d<f&&(u.push(o.slice(d,f)),e+=f-d),p){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return s&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const dN={}.hasOwnProperty;function wX(e,t,n){return typeof t!="string"&&(n=t,t=void 0),bX(n)(vX(yX(n).document().write(xX()(e,t,!0))))}function bX(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Fe),autolinkProtocol:V,autolinkEmail:V,atxHeading:o(ze),blockQuote:o(Ge),characterEscape:V,characterReference:V,codeFenced:o(_t),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(_t,a),codeText:o(Te,a),codeTextData:V,data:V,codeFlowValue:V,definition:o(be),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(Ye),hardBreakEscape:o(yt),hardBreakTrailing:o(yt),htmlFlow:o(vt,a),htmlFlowData:V,htmlText:o(vt,a),htmlTextData:V,image:o(Ke),label:a,link:o(Fe),listItem:o(Po),listItemValue:f,listOrdered:o(Ot,d),listUnordered:o(Ot),paragraph:o(Io),reference:D,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(ze),strong:o(Oo),thematicBreak:o(de)},exit:{atxHeading:u(),atxHeadingSequence:_,autolink:u(),autolinkEmail:We,autolinkProtocol:Ve,blockQuote:u(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:xe,characterReference:$e,codeFenced:u(b),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:P,codeIndented:u(g),codeText:u(re),codeTextData:P,data:P,definition:u(),definitionDestinationString:T,definitionLabelString:x,definitionTitleString:w,emphasis:u(),hardBreakEscape:u(z),hardBreakTrailing:u(z),htmlFlow:u(X),htmlFlowData:P,htmlText:u(Y),htmlTextData:P,image:u(te),label:B,labelText:F,lineEnding:$,link:u(ie),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Oe,resourceDestinationString:A,resourceTitleString:oe,resource:he,setextHeading:u(O),setextHeadingLineSequence:R,setextHeadingText:C,strong:u(),thematicBreak:u()}};fN(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(j){let q={type:"root",children:[]};const ce={stack:[q],tokenStack:[],config:t,enter:s,exit:l,buffer:a,resume:c,data:n},_e=[];let Ee=-1;for(;++Ee<j.length;)if(j[Ee][1].type==="listOrdered"||j[Ee][1].type==="listUnordered")if(j[Ee][0]==="enter")_e.push(Ee);else{const jt=_e.pop();Ee=i(j,jt,Ee)}for(Ee=-1;++Ee<j.length;){const jt=t[j[Ee][0]];dN.call(jt,j[Ee][1].type)&&jt[j[Ee][1].type].call(Object.assign({sliceSerialize:j[Ee][2].sliceSerialize},ce),j[Ee][1])}if(ce.tokenStack.length>0){const jt=ce.tokenStack[ce.tokenStack.length-1];(jt[1]||pN).call(ce,void 0,jt[0])}for(q.position={start:bo(j.length>0?j[0][1].start:{line:1,column:1,offset:0}),end:bo(j.length>0?j[j.length-2][1].end:{line:1,column:1,offset:0})},Ee=-1;++Ee<t.transforms.length;)q=t.transforms[Ee](q)||q;return q}function i(j,q,ce){let _e=q-1,Ee=-1,jt=!1,Rn,mn,qn,Nn;for(;++_e<=ce;){const kt=j[_e];switch(kt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{kt[0]==="enter"?Ee++:Ee--,Nn=void 0;break}case"lineEndingBlank":{kt[0]==="enter"&&(Rn&&!Nn&&!Ee&&!qn&&(qn=_e),Nn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Nn=void 0}if(!Ee&&kt[0]==="enter"&&kt[1].type==="listItemPrefix"||Ee===-1&&kt[0]==="exit"&&(kt[1].type==="listUnordered"||kt[1].type==="listOrdered")){if(Rn){let Gn=_e;for(mn=void 0;Gn--;){const gn=j[Gn];if(gn[1].type==="lineEnding"||gn[1].type==="lineEndingBlank"){if(gn[0]==="exit")continue;mn&&(j[mn][1].type="lineEndingBlank",jt=!0),gn[1].type="lineEnding",mn=Gn}else if(!(gn[1].type==="linePrefix"||gn[1].type==="blockQuotePrefix"||gn[1].type==="blockQuotePrefixWhitespace"||gn[1].type==="blockQuoteMarker"||gn[1].type==="listItemIndent"))break}qn&&(!mn||qn<mn)&&(Rn._spread=!0),Rn.end=Object.assign({},mn?j[mn][1].start:kt[1].end),j.splice(mn||_e,0,["exit",Rn,kt[2]]),_e++,ce++}if(kt[1].type==="listItemPrefix"){const Gn={type:"listItem",_spread:!1,start:Object.assign({},kt[1].start),end:void 0};Rn=Gn,j.splice(_e,0,["enter",Gn,kt[2]]),_e++,ce++,qn=void 0,Nn=!0}}}return j[q][1]._spread=jt,ce}function o(j,q){return ce;function ce(_e){s.call(this,j(_e),_e),q&&q.call(this,_e)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(j,q,ce){this.stack[this.stack.length-1].children.push(j),this.stack.push(j),this.tokenStack.push([q,ce]),j.position={start:bo(q.start),end:void 0}}function u(j){return q;function q(ce){j&&j.call(this,ce),l.call(this,ce)}}function l(j,q){const ce=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==j.type&&(q?q.call(this,j,_e[0]):(_e[1]||pN).call(this,j,_e[0]));else throw new Error("Cannot close `"+j.type+"` ("+Ml({start:j.start,end:j.end})+"): it’s not open");ce.position.end=bo(j.end)}function c(){return P1(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(j){if(this.data.expectingFirstListItemValue){const q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(j),10),this.data.expectingFirstListItemValue=void 0}}function p(){const j=this.resume(),q=this.stack[this.stack.length-1];q.lang=j}function m(){const j=this.resume(),q=this.stack[this.stack.length-1];q.meta=j}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const j=this.resume(),q=this.stack[this.stack.length-1];q.value=j.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const j=this.resume(),q=this.stack[this.stack.length-1];q.value=j.replace(/(\r?\n|\r)$/g,"")}function x(j){const q=this.resume(),ce=this.stack[this.stack.length-1];ce.label=q,ce.identifier=Sr(this.sliceSerialize(j)).toLowerCase()}function w(){const j=this.resume(),q=this.stack[this.stack.length-1];q.title=j}function T(){const j=this.resume(),q=this.stack[this.stack.length-1];q.url=j}function _(j){const q=this.stack[this.stack.length-1];if(!q.depth){const ce=this.sliceSerialize(j).length;q.depth=ce}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function R(j){const q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(j).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function V(j){const ce=this.stack[this.stack.length-1].children;let _e=ce[ce.length-1];(!_e||_e.type!=="text")&&(_e=ne(),_e.position={start:bo(j.start),end:void 0},ce.push(_e)),this.stack.push(_e)}function P(j){const q=this.stack.pop();q.value+=this.sliceSerialize(j),q.position.end=bo(j.end)}function $(j){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ce=q.children[q.children.length-1];ce.position.end=bo(j.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(q.type)&&(V.call(this,j),P.call(this,j))}function z(){this.data.atHardBreak=!0}function X(){const j=this.resume(),q=this.stack[this.stack.length-1];q.value=j}function Y(){const j=this.resume(),q=this.stack[this.stack.length-1];q.value=j}function re(){const j=this.resume(),q=this.stack[this.stack.length-1];q.value=j}function ie(){const j=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";j.type+="Reference",j.referenceType=q,delete j.url,delete j.title}else delete j.identifier,delete j.label;this.data.referenceType=void 0}function te(){const j=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";j.type+="Reference",j.referenceType=q,delete j.url,delete j.title}else delete j.identifier,delete j.label;this.data.referenceType=void 0}function F(j){const q=this.sliceSerialize(j),ce=this.stack[this.stack.length-2];ce.label=qY(q),ce.identifier=Sr(q).toLowerCase()}function B(){const j=this.stack[this.stack.length-1],q=this.resume(),ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,ce.type==="link"){const _e=j.children;ce.children=_e}else ce.alt=q}function A(){const j=this.resume(),q=this.stack[this.stack.length-1];q.url=j}function oe(){const j=this.resume(),q=this.stack[this.stack.length-1];q.title=j}function he(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function Oe(j){const q=this.resume(),ce=this.stack[this.stack.length-1];ce.label=q,ce.identifier=Sr(this.sliceSerialize(j)).toLowerCase(),this.data.referenceType="full"}function ge(j){this.data.characterReferenceType=j.type}function xe(j){const q=this.sliceSerialize(j),ce=this.data.characterReferenceType;let _e;ce?(_e=o3(q,ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=O1(q);const Ee=this.stack[this.stack.length-1];Ee.value+=_e}function $e(j){const q=this.stack.pop();q.position.end=bo(j.end)}function Ve(j){P.call(this,j);const q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(j)}function We(j){P.call(this,j);const q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(j)}function Ge(){return{type:"blockquote",children:[]}}function _t(){return{type:"code",lang:null,meta:null,value:""}}function Te(){return{type:"inlineCode",value:""}}function be(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ye(){return{type:"emphasis",children:[]}}function ze(){return{type:"heading",depth:0,children:[]}}function yt(){return{type:"break"}}function vt(){return{type:"html",value:""}}function Ke(){return{type:"image",title:null,url:"",alt:null}}function Fe(){return{type:"link",title:null,url:"",children:[]}}function Ot(j){return{type:"list",ordered:j.type==="listOrdered",start:null,spread:j._spread,children:[]}}function Po(j){return{type:"listItem",spread:j._spread,checked:null,children:[]}}function Io(){return{type:"paragraph",children:[]}}function Oo(){return{type:"strong",children:[]}}function ne(){return{type:"text",value:""}}function de(){return{type:"thematicBreak"}}}function bo(e){return{line:e.line,column:e.column,offset:e.offset}}function fN(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?fN(e,r):EX(e,r)}}function EX(e,t){let n;for(n in t)if(dN.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function pN(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ml({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ml({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ml({start:t.start,end:t.end})+") is still open")}function TX(e){const t=this;t.parser=n;function n(r){return wX(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function _X(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function CX(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
403
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}const gX=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:qq},disable:{null:[]},document:{42:An,43:An,45:An,48:An,49:An,50:An,51:An,52:An,53:An,54:An,55:An,56:An,57:An,62:x3},flow:{35:Jq,42:vp,45:[R3,vp],60:rG,61:R3,95:vp,96:T3,126:T3},flowInitial:{[-2]:B1,[-1]:B1,32:B1},insideSpan:{null:[F1,lX]},string:{38:b3,92:w3},text:{[-5]:U1,[-4]:U1,[-3]:U1,33:bG,38:b3,42:F1,60:[Tq,cG],91:TG,92:[Qq,w3],93:j1,95:F1,96:Mq}},Symbol.toStringTag,{value:"Module"}));function yX(e){const n=l3([gX,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(nX),document:i(iX),flow:i(sX),string:i(cX),text:i(dX)};return r;function i(o){return a;function a(s){return pX(r,o,s)}}}function vX(e){for(;!_3(e););return e}const cN=/[\0\t\n\r]/g;function xX(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const u=[];let l,c,d,f,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(cN.lastIndex=d,l=cN.exec(o),f=l&&l.index!==void 0?l.index:o.length,p=o.charCodeAt(f),!l){t=o.slice(d);break}if(p===10&&d===f&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),d<f&&(u.push(o.slice(d,f)),e+=f-d),p){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return s&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const dN={}.hasOwnProperty;function wX(e,t,n){return typeof t!="string"&&(n=t,t=void 0),bX(n)(vX(yX(n).document().write(xX()(e,t,!0))))}function bX(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Fe),autolinkProtocol:V,autolinkEmail:V,atxHeading:o(ze),blockQuote:o(Ge),characterEscape:V,characterReference:V,codeFenced:o(_t),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(_t,a),codeText:o(Te,a),codeTextData:V,data:V,codeFlowValue:V,definition:o(be),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(Ye),hardBreakEscape:o(yt),hardBreakTrailing:o(yt),htmlFlow:o(vt,a),htmlFlowData:V,htmlText:o(vt,a),htmlTextData:V,image:o(Ke),label:a,link:o(Fe),listItem:o(Po),listItemValue:f,listOrdered:o(Ot,d),listUnordered:o(Ot),paragraph:o(Io),reference:D,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(ze),strong:o(Oo),thematicBreak:o(de)},exit:{atxHeading:u(),atxHeadingSequence:_,autolink:u(),autolinkEmail:We,autolinkProtocol:Ve,blockQuote:u(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:xe,characterReference:$e,codeFenced:u(b),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:P,codeIndented:u(g),codeText:u(re),codeTextData:P,data:P,definition:u(),definitionDestinationString:T,definitionLabelString:x,definitionTitleString:w,emphasis:u(),hardBreakEscape:u(z),hardBreakTrailing:u(z),htmlFlow:u(Q),htmlFlowData:P,htmlText:u(Y),htmlTextData:P,image:u(te),label:B,labelText:F,lineEnding:$,link:u(ie),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Oe,resourceDestinationString:A,resourceTitleString:oe,resource:he,setextHeading:u(O),setextHeadingLineSequence:R,setextHeadingText:C,strong:u(),thematicBreak:u()}};fN(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(j){let q={type:"root",children:[]};const ce={stack:[q],tokenStack:[],config:t,enter:s,exit:l,buffer:a,resume:c,data:n},_e=[];let Ee=-1;for(;++Ee<j.length;)if(j[Ee][1].type==="listOrdered"||j[Ee][1].type==="listUnordered")if(j[Ee][0]==="enter")_e.push(Ee);else{const jt=_e.pop();Ee=i(j,jt,Ee)}for(Ee=-1;++Ee<j.length;){const jt=t[j[Ee][0]];dN.call(jt,j[Ee][1].type)&&jt[j[Ee][1].type].call(Object.assign({sliceSerialize:j[Ee][2].sliceSerialize},ce),j[Ee][1])}if(ce.tokenStack.length>0){const jt=ce.tokenStack[ce.tokenStack.length-1];(jt[1]||pN).call(ce,void 0,jt[0])}for(q.position={start:bo(j.length>0?j[0][1].start:{line:1,column:1,offset:0}),end:bo(j.length>0?j[j.length-2][1].end:{line:1,column:1,offset:0})},Ee=-1;++Ee<t.transforms.length;)q=t.transforms[Ee](q)||q;return q}function i(j,q,ce){let _e=q-1,Ee=-1,jt=!1,Rn,mn,qn,Nn;for(;++_e<=ce;){const kt=j[_e];switch(kt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{kt[0]==="enter"?Ee++:Ee--,Nn=void 0;break}case"lineEndingBlank":{kt[0]==="enter"&&(Rn&&!Nn&&!Ee&&!qn&&(qn=_e),Nn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Nn=void 0}if(!Ee&&kt[0]==="enter"&&kt[1].type==="listItemPrefix"||Ee===-1&&kt[0]==="exit"&&(kt[1].type==="listUnordered"||kt[1].type==="listOrdered")){if(Rn){let Gn=_e;for(mn=void 0;Gn--;){const gn=j[Gn];if(gn[1].type==="lineEnding"||gn[1].type==="lineEndingBlank"){if(gn[0]==="exit")continue;mn&&(j[mn][1].type="lineEndingBlank",jt=!0),gn[1].type="lineEnding",mn=Gn}else if(!(gn[1].type==="linePrefix"||gn[1].type==="blockQuotePrefix"||gn[1].type==="blockQuotePrefixWhitespace"||gn[1].type==="blockQuoteMarker"||gn[1].type==="listItemIndent"))break}qn&&(!mn||qn<mn)&&(Rn._spread=!0),Rn.end=Object.assign({},mn?j[mn][1].start:kt[1].end),j.splice(mn||_e,0,["exit",Rn,kt[2]]),_e++,ce++}if(kt[1].type==="listItemPrefix"){const Gn={type:"listItem",_spread:!1,start:Object.assign({},kt[1].start),end:void 0};Rn=Gn,j.splice(_e,0,["enter",Gn,kt[2]]),_e++,ce++,qn=void 0,Nn=!0}}}return j[q][1]._spread=jt,ce}function o(j,q){return ce;function ce(_e){s.call(this,j(_e),_e),q&&q.call(this,_e)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(j,q,ce){this.stack[this.stack.length-1].children.push(j),this.stack.push(j),this.tokenStack.push([q,ce]),j.position={start:bo(q.start),end:void 0}}function u(j){return q;function q(ce){j&&j.call(this,ce),l.call(this,ce)}}function l(j,q){const ce=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==j.type&&(q?q.call(this,j,_e[0]):(_e[1]||pN).call(this,j,_e[0]));else throw new Error("Cannot close `"+j.type+"` ("+Ml({start:j.start,end:j.end})+"): it’s not open");ce.position.end=bo(j.end)}function c(){return P1(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(j){if(this.data.expectingFirstListItemValue){const q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(j),10),this.data.expectingFirstListItemValue=void 0}}function p(){const j=this.resume(),q=this.stack[this.stack.length-1];q.lang=j}function m(){const j=this.resume(),q=this.stack[this.stack.length-1];q.meta=j}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const j=this.resume(),q=this.stack[this.stack.length-1];q.value=j.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const j=this.resume(),q=this.stack[this.stack.length-1];q.value=j.replace(/(\r?\n|\r)$/g,"")}function x(j){const q=this.resume(),ce=this.stack[this.stack.length-1];ce.label=q,ce.identifier=Sr(this.sliceSerialize(j)).toLowerCase()}function w(){const j=this.resume(),q=this.stack[this.stack.length-1];q.title=j}function T(){const j=this.resume(),q=this.stack[this.stack.length-1];q.url=j}function _(j){const q=this.stack[this.stack.length-1];if(!q.depth){const ce=this.sliceSerialize(j).length;q.depth=ce}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function R(j){const q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(j).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function V(j){const ce=this.stack[this.stack.length-1].children;let _e=ce[ce.length-1];(!_e||_e.type!=="text")&&(_e=ne(),_e.position={start:bo(j.start),end:void 0},ce.push(_e)),this.stack.push(_e)}function P(j){const q=this.stack.pop();q.value+=this.sliceSerialize(j),q.position.end=bo(j.end)}function $(j){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ce=q.children[q.children.length-1];ce.position.end=bo(j.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(q.type)&&(V.call(this,j),P.call(this,j))}function z(){this.data.atHardBreak=!0}function Q(){const j=this.resume(),q=this.stack[this.stack.length-1];q.value=j}function Y(){const j=this.resume(),q=this.stack[this.stack.length-1];q.value=j}function re(){const j=this.resume(),q=this.stack[this.stack.length-1];q.value=j}function ie(){const j=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";j.type+="Reference",j.referenceType=q,delete j.url,delete j.title}else delete j.identifier,delete j.label;this.data.referenceType=void 0}function te(){const j=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";j.type+="Reference",j.referenceType=q,delete j.url,delete j.title}else delete j.identifier,delete j.label;this.data.referenceType=void 0}function F(j){const q=this.sliceSerialize(j),ce=this.stack[this.stack.length-2];ce.label=qY(q),ce.identifier=Sr(q).toLowerCase()}function B(){const j=this.stack[this.stack.length-1],q=this.resume(),ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,ce.type==="link"){const _e=j.children;ce.children=_e}else ce.alt=q}function A(){const j=this.resume(),q=this.stack[this.stack.length-1];q.url=j}function oe(){const j=this.resume(),q=this.stack[this.stack.length-1];q.title=j}function he(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function Oe(j){const q=this.resume(),ce=this.stack[this.stack.length-1];ce.label=q,ce.identifier=Sr(this.sliceSerialize(j)).toLowerCase(),this.data.referenceType="full"}function ge(j){this.data.characterReferenceType=j.type}function xe(j){const q=this.sliceSerialize(j),ce=this.data.characterReferenceType;let _e;ce?(_e=o3(q,ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=O1(q);const Ee=this.stack[this.stack.length-1];Ee.value+=_e}function $e(j){const q=this.stack.pop();q.position.end=bo(j.end)}function Ve(j){P.call(this,j);const q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(j)}function We(j){P.call(this,j);const q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(j)}function Ge(){return{type:"blockquote",children:[]}}function _t(){return{type:"code",lang:null,meta:null,value:""}}function Te(){return{type:"inlineCode",value:""}}function be(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ye(){return{type:"emphasis",children:[]}}function ze(){return{type:"heading",depth:0,children:[]}}function yt(){return{type:"break"}}function vt(){return{type:"html",value:""}}function Ke(){return{type:"image",title:null,url:"",alt:null}}function Fe(){return{type:"link",title:null,url:"",children:[]}}function Ot(j){return{type:"list",ordered:j.type==="listOrdered",start:null,spread:j._spread,children:[]}}function Po(j){return{type:"listItem",spread:j._spread,checked:null,children:[]}}function Io(){return{type:"paragraph",children:[]}}function Oo(){return{type:"strong",children:[]}}function ne(){return{type:"text",value:""}}function de(){return{type:"thematicBreak"}}}function bo(e){return{line:e.line,column:e.column,offset:e.offset}}function fN(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?fN(e,r):EX(e,r)}}function EX(e,t){let n;for(n in t)if(dN.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function pN(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ml({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ml({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ml({start:t.start,end:t.end})+") is still open")}function TX(e){const t=this;t.parser=n;function n(r){return wX(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function _X(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function CX(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
404
404
|
`}]}function SX(e,t){const n=t.value?t.value+`
|
|
405
405
|
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function AX(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kX(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RX(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ds(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(r,s);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function NX(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PX(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function hN(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function IX(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hN(e,t);const i={src:Ds(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function OX(e,t){const n={src:Ds(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function DX(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function LX(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hN(e,t);const i={href:Ds(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function MX(e,t){const n={href:Ds(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function FX(e,t,n){const r=e.all(t),i=n?BX(n):mN(t),o={},a=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const c=r[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
|
|
406
406
|
`}),c.type==="element"&&c.tagName==="p"&&!i?a.push(...c.children):a.push(c)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
|