@alfatech/livechat 2025.1.1-4.2 → 2025.1.1-4.4
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/main.js +20 -20
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Bg=e=>{throw TypeError(e)};var yT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var cd=(e,t,n)=>t.has(e)||Bg("Cannot "+n);var E=(e,t,n)=>(cd(e,t,"read from private field"),n?n.call(e):t.get(e)),ue=(e,t,n)=>t.has(e)?Bg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ee=(e,t,n,r)=>(cd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ge=(e,t,n)=>(cd(e,t,"access private method"),n);var
|
|
1
|
+
var Bg=e=>{throw TypeError(e)};var yT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var cd=(e,t,n)=>t.has(e)||Bg("Cannot "+n);var E=(e,t,n)=>(cd(e,t,"read from private field"),n?n.call(e):t.get(e)),ue=(e,t,n)=>t.has(e)?Bg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ee=(e,t,n,r)=>(cd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ge=(e,t,n)=>(cd(e,t,"access private method"),n);var bl=(e,t,n,r)=>({set _(i){ee(e,t,i,n)},get _(){return E(e,t,r)}});var LB=yT((Jt,en)=>{function xT(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 s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Th=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n1={exports:{}},fc={},r1={exports:{}},ve={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var Bg=e=>{throw TypeError(e)};var yT=(e,t)=>()=>(t||e((t={exports:{}}).exports,
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var rl=Symbol.for("react.element"),wT=Symbol.for("react.portal"),bT=Symbol.for("react.fragment"),CT=Symbol.for("react.strict_mode"),kT=Symbol.for("react.profiler"),ST=Symbol.for("react.provider"),TT=Symbol.for("react.context"),_T=Symbol.for("react.forward_ref"),ET=Symbol.for("react.suspense"),jT=Symbol.for("react.memo"),AT=Symbol.for("react.lazy"),zg=Symbol.iterator;function RT(e){return e===null||typeof e!="object"?null:(e=zg&&e[zg]||e["@@iterator"],typeof e=="function"?e:null)}var i1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},s1=Object.assign,o1={};function Ao(e,t,n){this.props=e,this.context=t,this.refs=o1,this.updater=n||i1}Ao.prototype.isReactComponent={};Ao.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ao.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function a1(){}a1.prototype=Ao.prototype;function _h(e,t,n){this.props=e,this.context=t,this.refs=o1,this.updater=n||i1}var Eh=_h.prototype=new a1;Eh.constructor=_h;s1(Eh,Ao.prototype);Eh.isPureReactComponent=!0;var Vg=Array.isArray,l1=Object.prototype.hasOwnProperty,jh={current:null},u1={key:!0,ref:!0,__self:!0,__source:!0};function c1(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)l1.call(t,r)&&!u1.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:rl,type:e,key:s,ref:o,props:i,_owner:jh.current}}function PT(e,t){return{$$typeof:rl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ah(e){return typeof e=="object"&&e!==null&&e.$$typeof===rl}function OT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ug=/\/+/g;function dd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?OT(""+e.key):t.toString(36)}function Zl(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case rl:case wT:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+dd(o,0):r,Vg(i)?(n="",e!=null&&(n=e.replace(Ug,"$&/")+"/"),Zl(i,t,n,"",function(c){return c})):i!=null&&(Ah(i)&&(i=PT(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Ug,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Vg(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+dd(s,a);o+=Zl(s,t,n,l,i)}else if(l=RT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+dd(s,a++),o+=Zl(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Cl(e,t,n){if(e==null)return e;var r=[],i=0;return Zl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function MT(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Nt={current:null},Jl={transition:null},DT={ReactCurrentDispatcher:Nt,ReactCurrentBatchConfig:Jl,ReactCurrentOwner:jh};function d1(){throw Error("act(...) is not supported in production builds of React.")}ve.Children={map:Cl,forEach:function(e,t,n){Cl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Cl(e,function(){t++}),t},toArray:function(e){return Cl(e,function(t){return t})||[]},only:function(e){if(!Ah(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ve.Component=Ao;ve.Fragment=bT;ve.Profiler=kT;ve.PureComponent=_h;ve.StrictMode=CT;ve.Suspense=ET;ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DT;ve.act=d1;ve.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=s1({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=jh.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)l1.call(t,l)&&!u1.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:rl,type:e.type,key:i,ref:s,props:r,_owner:o}};ve.createContext=function(e){return e={$$typeof:TT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ST,_context:e},e.Consumer=e};ve.createElement=c1;ve.createFactory=function(e){var t=c1.bind(null,e);return t.type=e,t};ve.createRef=function(){return{current:null}};ve.forwardRef=function(e){return{$$typeof:_T,render:e}};ve.isValidElement=Ah;ve.lazy=function(e){return{$$typeof:AT,_payload:{_status:-1,_result:e},_init:MT}};ve.memo=function(e,t){return{$$typeof:jT,type:e,compare:t===void 0?null:t}};ve.startTransition=function(e){var t=Jl.transition;Jl.transition={};try{e()}finally{Jl.transition=t}};ve.unstable_act=d1;ve.useCallback=function(e,t){return Nt.current.useCallback(e,t)};ve.useContext=function(e){return Nt.current.useContext(e)};ve.useDebugValue=function(){};ve.useDeferredValue=function(e){return Nt.current.useDeferredValue(e)};ve.useEffect=function(e,t){return Nt.current.useEffect(e,t)};ve.useId=function(){return Nt.current.useId()};ve.useImperativeHandle=function(e,t,n){return Nt.current.useImperativeHandle(e,t,n)};ve.useInsertionEffect=function(e,t){return Nt.current.useInsertionEffect(e,t)};ve.useLayoutEffect=function(e,t){return Nt.current.useLayoutEffect(e,t)};ve.useMemo=function(e,t){return Nt.current.useMemo(e,t)};ve.useReducer=function(e,t,n){return Nt.current.useReducer(e,t,n)};ve.useRef=function(e){return Nt.current.useRef(e)};ve.useState=function(e){return Nt.current.useState(e)};ve.useSyncExternalStore=function(e,t,n){return Nt.current.useSyncExternalStore(e,t,n)};ve.useTransition=function(){return Nt.current.useTransition()};ve.version="18.3.1";r1.exports=ve;var v=r1.exports;const W=_r(v),xf=xT({__proto__:null,default:W},[v]);/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.production.min.js
|
|
12
12
|
*
|
|
@@ -30,14 +30,14 @@ var Bg=e=>{throw TypeError(e)};var yT=(e,t)=>()=>(t||e((t={exports:{}}).exports,
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var VT=v,nn=zT;function
|
|
33
|
+
*/var VT=v,nn=zT;function G(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var g1=new Set,ba={};function us(e,t){ho(e,t),ho(e+"Capture",t)}function ho(e,t){for(ba[e]=t,e=0;e<t.length;e++)g1.add(t[e])}var br=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wf=Object.prototype.hasOwnProperty,UT=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Hg={},Wg={};function HT(e){return wf.call(Wg,e)?!0:wf.call(Hg,e)?!1:UT.test(e)?Wg[e]=!0:(Hg[e]=!0,!1)}function WT(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function qT(e,t,n,r){if(t===null||typeof t>"u"||WT(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ft(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var bt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){bt[e]=new Ft(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];bt[t]=new Ft(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){bt[e]=new Ft(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){bt[e]=new Ft(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){bt[e]=new Ft(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){bt[e]=new Ft(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){bt[e]=new Ft(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){bt[e]=new Ft(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){bt[e]=new Ft(e,5,!1,e.toLowerCase(),null,!1,!1)});var Rh=/[\-:]([a-z])/g;function Ph(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Rh,Ph);bt[t]=new Ft(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Rh,Ph);bt[t]=new Ft(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Rh,Ph);bt[t]=new Ft(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){bt[e]=new Ft(e,1,!1,e.toLowerCase(),null,!1,!1)});bt.xlinkHref=new Ft("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){bt[e]=new Ft(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oh(e,t,n,r){var i=bt.hasOwnProperty(t)?bt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(qT(t,n,i,r)&&(n=null),r||i===null?HT(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Er=VT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,kl=Symbol.for("react.element"),js=Symbol.for("react.portal"),As=Symbol.for("react.fragment"),Mh=Symbol.for("react.strict_mode"),bf=Symbol.for("react.profiler"),v1=Symbol.for("react.provider"),y1=Symbol.for("react.context"),Dh=Symbol.for("react.forward_ref"),Cf=Symbol.for("react.suspense"),kf=Symbol.for("react.suspense_list"),Nh=Symbol.for("react.memo"),Nr=Symbol.for("react.lazy"),x1=Symbol.for("react.offscreen"),qg=Symbol.iterator;function $o(e){return e===null||typeof e!="object"?null:(e=qg&&e[qg]||e["@@iterator"],typeof e=="function"?e:null)}var We=Object.assign,fd;function Ko(e){if(fd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);fd=t&&t[1]||""}return`
|
|
34
34
|
`+fd+e}var pd=!1;function hd(e,t){if(!e||pd)return"";pd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
|
|
35
35
|
`),s=r.stack.split(`
|
|
36
36
|
`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
|
|
37
|
-
`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{pd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ko(e):""}function GT(e){switch(e.tag){case 5:return Ko(e.type);case 16:return Ko("Lazy");case 13:return Ko("Suspense");case 19:return Ko("SuspenseList");case 0:case 2:case 15:return e=hd(e.type,!1),e;case 11:return e=hd(e.type.render,!1),e;case 1:return e=hd(e.type,!0),e;default:return""}}function Sf(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 js:return"Fragment";case Es:return"Portal";case bf:return"Profiler";case Mh:return"StrictMode";case Cf:return"Suspense";case kf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case y1:return(e.displayName||"Context")+".Consumer";case v1:return(e._context.displayName||"Context")+".Provider";case Dh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nh:return t=e.displayName||null,t!==null?t:Sf(e.type)||"Memo";case Nr:t=e._payload,e=e._init;try{return Sf(e(t))}catch{}}return null}function YT(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 Sf(t);case 8:return t===Mh?"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 fi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function w1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function QT(e){var t=w1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function kl(e){e._valueTracker||(e._valueTracker=QT(e))}function b1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=w1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Cu(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 Tf(e,t){var n=t.checked;return We({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Gg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=fi(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 C1(e,t){t=t.checked,t!=null&&Oh(e,"checked",t,!1)}function _f(e,t){C1(e,t);var n=fi(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")?Ef(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ef(e,t.type,fi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yg(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 Ef(e,t,n){(t!=="number"||Cu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xo=Array.isArray;function Ws(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=""+fi(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 jf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(q(91));return We({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Qg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(q(92));if(Xo(n)){if(1<n.length)throw Error(q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:fi(n)}}function k1(e,t){var n=fi(t.value),r=fi(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 Kg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function S1(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 Af(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?S1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Sl,T1=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(Sl=Sl||document.createElement("div"),Sl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Sl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ba(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ia={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},KT=["Webkit","ms","Moz","O"];Object.keys(ia).forEach(function(e){KT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ia[t]=ia[e]})});function _1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ia.hasOwnProperty(e)&&ia[e]?(""+t).trim():t+"px"}function E1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var XT=We({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 Rf(e,t){if(t){if(XT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(q(62))}}function Pf(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 Of=null;function Fh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Mf=null,qs=null,Gs=null;function Xg(e){if(e=sl(e)){if(typeof Mf!="function")throw Error(q(280));var t=e.stateNode;t&&(t=vc(t),Mf(e.stateNode,e.type,t))}}function j1(e){qs?Gs?Gs.push(e):Gs=[e]:qs=e}function A1(){if(qs){var e=qs,t=Gs;if(Gs=qs=null,Xg(e),t)for(e=0;e<t.length;e++)Xg(t[e])}}function R1(e,t){return e(t)}function P1(){}var md=!1;function O1(e,t,n){if(md)return e(t,n);md=!0;try{return R1(e,t,n)}finally{md=!1,(qs!==null||Gs!==null)&&(P1(),A1())}}function Ca(e,t){var n=e.stateNode;if(n===null)return null;var r=vc(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(q(231,t,typeof n));return n}var Df=!1;if(br)try{var Bo={};Object.defineProperty(Bo,"passive",{get:function(){Df=!0}}),window.addEventListener("test",Bo,Bo),window.removeEventListener("test",Bo,Bo)}catch{Df=!1}function ZT(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var sa=!1,ku=null,Su=!1,Nf=null,JT={onError:function(e){sa=!0,ku=e}};function e_(e,t,n,r,i,s,o,a,l){sa=!1,ku=null,ZT.apply(JT,arguments)}function t_(e,t,n,r,i,s,o,a,l){if(e_.apply(this,arguments),sa){if(sa){var c=ku;sa=!1,ku=null}else throw Error(q(198));Su||(Su=!0,Nf=c)}}function cs(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 M1(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 Zg(e){if(cs(e)!==e)throw Error(q(188))}function n_(e){var t=e.alternate;if(!t){if(t=cs(e),t===null)throw Error(q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Zg(i),e;if(s===r)return Zg(i),t;s=s.sibling}throw Error(q(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(q(189))}}if(n.alternate!==r)throw Error(q(190))}if(n.tag!==3)throw Error(q(188));return n.stateNode.current===n?e:t}function D1(e){return e=n_(e),e!==null?N1(e):null}function N1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=N1(e);if(t!==null)return t;e=e.sibling}return null}var F1=nn.unstable_scheduleCallback,Jg=nn.unstable_cancelCallback,r_=nn.unstable_shouldYield,i_=nn.unstable_requestPaint,et=nn.unstable_now,s_=nn.unstable_getCurrentPriorityLevel,Ih=nn.unstable_ImmediatePriority,I1=nn.unstable_UserBlockingPriority,Tu=nn.unstable_NormalPriority,o_=nn.unstable_LowPriority,L1=nn.unstable_IdlePriority,pc=null,Jn=null;function a_(e){if(Jn&&typeof Jn.onCommitFiberRoot=="function")try{Jn.onCommitFiberRoot(pc,e,void 0,(e.current.flags&128)===128)}catch{}}var Fn=Math.clz32?Math.clz32:c_,l_=Math.log,u_=Math.LN2;function c_(e){return e>>>=0,e===0?32:31-(l_(e)/u_|0)|0}var Tl=64,_l=4194304;function Zo(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 _u(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Zo(a):(s&=o,s!==0&&(r=Zo(s)))}else o=n&~i,o!==0?r=Zo(o):s!==0&&(r=Zo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Fn(t),i=1<<n,r|=e[n],t&=~i;return r}function d_(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 f_(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-Fn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=d_(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Ff(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $1(){var e=Tl;return Tl<<=1,!(Tl&4194240)&&(Tl=64),e}function gd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function rl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Fn(t),e[t]=n}function p_(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-Fn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Lh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Fn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ee=0;function B1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var z1,$h,V1,U1,H1,If=!1,El=[],Jr=null,ei=null,ti=null,ka=new Map,Sa=new Map,Lr=[],h_="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 ev(e,t){switch(e){case"focusin":case"focusout":Jr=null;break;case"dragenter":case"dragleave":ei=null;break;case"mouseover":case"mouseout":ti=null;break;case"pointerover":case"pointerout":ka.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sa.delete(t.pointerId)}}function zo(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=sl(t),t!==null&&$h(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function m_(e,t,n,r,i){switch(t){case"focusin":return Jr=zo(Jr,e,t,n,r,i),!0;case"dragenter":return ei=zo(ei,e,t,n,r,i),!0;case"mouseover":return ti=zo(ti,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return ka.set(s,zo(ka.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Sa.set(s,zo(Sa.get(s)||null,e,t,n,r,i)),!0}return!1}function W1(e){var t=Di(e.target);if(t!==null){var n=cs(t);if(n!==null){if(t=n.tag,t===13){if(t=M1(n),t!==null){e.blockedOn=t,H1(e.priority,function(){V1(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 Jl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Lf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Of=r,n.target.dispatchEvent(r),Of=null}else return t=sl(n),t!==null&&$h(t),e.blockedOn=n,!1;t.shift()}return!0}function tv(e,t,n){Jl(e)&&n.delete(t)}function g_(){If=!1,Jr!==null&&Jl(Jr)&&(Jr=null),ei!==null&&Jl(ei)&&(ei=null),ti!==null&&Jl(ti)&&(ti=null),ka.forEach(tv),Sa.forEach(tv)}function Vo(e,t){e.blockedOn===t&&(e.blockedOn=null,If||(If=!0,nn.unstable_scheduleCallback(nn.unstable_NormalPriority,g_)))}function Ta(e){function t(i){return Vo(i,e)}if(0<El.length){Vo(El[0],e);for(var n=1;n<El.length;n++){var r=El[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Jr!==null&&Vo(Jr,e),ei!==null&&Vo(ei,e),ti!==null&&Vo(ti,e),ka.forEach(t),Sa.forEach(t),n=0;n<Lr.length;n++)r=Lr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Lr.length&&(n=Lr[0],n.blockedOn===null);)W1(n),n.blockedOn===null&&Lr.shift()}var Ys=Er.ReactCurrentBatchConfig,Eu=!0;function v_(e,t,n,r){var i=Ee,s=Ys.transition;Ys.transition=null;try{Ee=1,Bh(e,t,n,r)}finally{Ee=i,Ys.transition=s}}function y_(e,t,n,r){var i=Ee,s=Ys.transition;Ys.transition=null;try{Ee=4,Bh(e,t,n,r)}finally{Ee=i,Ys.transition=s}}function Bh(e,t,n,r){if(Eu){var i=Lf(e,t,n,r);if(i===null)_d(e,t,r,ju,n),ev(e,r);else if(m_(i,e,t,n,r))r.stopPropagation();else if(ev(e,r),t&4&&-1<h_.indexOf(e)){for(;i!==null;){var s=sl(i);if(s!==null&&z1(s),s=Lf(e,t,n,r),s===null&&_d(e,t,r,ju,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else _d(e,t,r,null,n)}}var ju=null;function Lf(e,t,n,r){if(ju=null,e=Fh(r),e=Di(e),e!==null)if(t=cs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=M1(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 ju=e,null}function q1(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(s_()){case Ih:return 1;case I1:return 4;case Tu:case o_:return 16;case L1:return 536870912;default:return 16}default:return 16}}var Qr=null,zh=null,eu=null;function G1(){if(eu)return eu;var e,t=zh,n=t.length,r,i="value"in Qr?Qr.value:Qr.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return eu=i.slice(e,1<r?1-r:void 0)}function tu(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 jl(){return!0}function nv(){return!1}function sn(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?jl:nv,this.isPropagationStopped=nv,this}return We(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=jl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=jl)},persist:function(){},isPersistent:jl}),t}var Ao={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vh=sn(Ao),il=We({},Ao,{view:0,detail:0}),x_=sn(il),vd,yd,Uo,hc=We({},il,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uh,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!==Uo&&(Uo&&e.type==="mousemove"?(vd=e.screenX-Uo.screenX,yd=e.screenY-Uo.screenY):yd=vd=0,Uo=e),vd)},movementY:function(e){return"movementY"in e?e.movementY:yd}}),rv=sn(hc),w_=We({},hc,{dataTransfer:0}),b_=sn(w_),C_=We({},il,{relatedTarget:0}),xd=sn(C_),k_=We({},Ao,{animationName:0,elapsedTime:0,pseudoElement:0}),S_=sn(k_),T_=We({},Ao,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),__=sn(T_),E_=We({},Ao,{data:0}),iv=sn(E_),j_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},A_={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"},R_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function P_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=R_[e])?!!t[e]:!1}function Uh(){return P_}var O_=We({},il,{key:function(e){if(e.key){var t=j_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=tu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?A_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uh,charCode:function(e){return e.type==="keypress"?tu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?tu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),M_=sn(O_),D_=We({},hc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sv=sn(D_),N_=We({},il,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uh}),F_=sn(N_),I_=We({},Ao,{propertyName:0,elapsedTime:0,pseudoElement:0}),L_=sn(I_),$_=We({},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}),B_=sn($_),z_=[9,13,27,32],Hh=br&&"CompositionEvent"in window,oa=null;br&&"documentMode"in document&&(oa=document.documentMode);var V_=br&&"TextEvent"in window&&!oa,Y1=br&&(!Hh||oa&&8<oa&&11>=oa),ov=" ",av=!1;function Q1(e,t){switch(e){case"keyup":return z_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function K1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var As=!1;function U_(e,t){switch(e){case"compositionend":return K1(t);case"keypress":return t.which!==32?null:(av=!0,ov);case"textInput":return e=t.data,e===ov&&av?null:e;default:return null}}function H_(e,t){if(As)return e==="compositionend"||!Hh&&Q1(e,t)?(e=G1(),eu=zh=Qr=null,As=!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 Y1&&t.locale!=="ko"?null:t.data;default:return null}}var W_={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 lv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!W_[e.type]:t==="textarea"}function X1(e,t,n,r){j1(r),t=Au(t,"onChange"),0<t.length&&(n=new Vh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var aa=null,_a=null;function q_(e){lw(e,0)}function mc(e){var t=Os(e);if(b1(t))return e}function G_(e,t){if(e==="change")return t}var Z1=!1;if(br){var wd;if(br){var bd="oninput"in document;if(!bd){var uv=document.createElement("div");uv.setAttribute("oninput","return;"),bd=typeof uv.oninput=="function"}wd=bd}else wd=!1;Z1=wd&&(!document.documentMode||9<document.documentMode)}function cv(){aa&&(aa.detachEvent("onpropertychange",J1),_a=aa=null)}function J1(e){if(e.propertyName==="value"&&mc(_a)){var t=[];X1(t,_a,e,Fh(e)),O1(q_,t)}}function Y_(e,t,n){e==="focusin"?(cv(),aa=t,_a=n,aa.attachEvent("onpropertychange",J1)):e==="focusout"&&cv()}function Q_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return mc(_a)}function K_(e,t){if(e==="click")return mc(t)}function X_(e,t){if(e==="input"||e==="change")return mc(t)}function Z_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $n=typeof Object.is=="function"?Object.is:Z_;function Ea(e,t){if($n(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(!wf.call(t,i)||!$n(e[i],t[i]))return!1}return!0}function dv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fv(e,t){var n=dv(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=dv(n)}}function ew(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ew(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tw(){for(var e=window,t=Cu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Cu(e.document)}return t}function Wh(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 J_(e){var t=tw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ew(n.ownerDocument.documentElement,n)){if(r!==null&&Wh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=fv(n,s);var o=fv(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var e2=br&&"documentMode"in document&&11>=document.documentMode,Rs=null,$f=null,la=null,Bf=!1;function pv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Bf||Rs==null||Rs!==Cu(r)||(r=Rs,"selectionStart"in r&&Wh(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}),la&&Ea(la,r)||(la=r,r=Au($f,"onSelect"),0<r.length&&(t=new Vh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Rs)))}function Al(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ps={animationend:Al("Animation","AnimationEnd"),animationiteration:Al("Animation","AnimationIteration"),animationstart:Al("Animation","AnimationStart"),transitionend:Al("Transition","TransitionEnd")},Cd={},nw={};br&&(nw=document.createElement("div").style,"AnimationEvent"in window||(delete Ps.animationend.animation,delete Ps.animationiteration.animation,delete Ps.animationstart.animation),"TransitionEvent"in window||delete Ps.transitionend.transition);function gc(e){if(Cd[e])return Cd[e];if(!Ps[e])return e;var t=Ps[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in nw)return Cd[e]=t[n];return e}var rw=gc("animationend"),iw=gc("animationiteration"),sw=gc("animationstart"),ow=gc("transitionend"),aw=new Map,hv="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 yi(e,t){aw.set(e,t),us(t,[e])}for(var kd=0;kd<hv.length;kd++){var Sd=hv[kd],t2=Sd.toLowerCase(),n2=Sd[0].toUpperCase()+Sd.slice(1);yi(t2,"on"+n2)}yi(rw,"onAnimationEnd");yi(iw,"onAnimationIteration");yi(sw,"onAnimationStart");yi("dblclick","onDoubleClick");yi("focusin","onFocus");yi("focusout","onBlur");yi(ow,"onTransitionEnd");po("onMouseEnter",["mouseout","mouseover"]);po("onMouseLeave",["mouseout","mouseover"]);po("onPointerEnter",["pointerout","pointerover"]);po("onPointerLeave",["pointerout","pointerover"]);us("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));us("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));us("onBeforeInput",["compositionend","keypress","textInput","paste"]);us("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));us("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));us("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jo="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(" "),r2=new Set("cancel close invalid load scroll toggle".split(" ").concat(Jo));function mv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,t_(r,t,void 0,e),e.currentTarget=null}function lw(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 s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;mv(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;mv(i,a,c),s=l}}}if(Su)throw e=Nf,Su=!1,Nf=null,e}function De(e,t){var n=t[Wf];n===void 0&&(n=t[Wf]=new Set);var r=e+"__bubble";n.has(r)||(uw(t,e,2,!1),n.add(r))}function Td(e,t,n){var r=0;t&&(r|=4),uw(n,e,r,t)}var Rl="_reactListening"+Math.random().toString(36).slice(2);function ja(e){if(!e[Rl]){e[Rl]=!0,g1.forEach(function(n){n!=="selectionchange"&&(r2.has(n)||Td(n,!1,e),Td(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Rl]||(t[Rl]=!0,Td("selectionchange",!1,t))}}function uw(e,t,n,r){switch(q1(t)){case 1:var i=v_;break;case 4:i=y_;break;default:i=Bh}n=i.bind(null,t,n,e),i=void 0,!Df||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 _d(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=Di(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}O1(function(){var c=s,d=Fh(n),u=[];e:{var f=aw.get(e);if(f!==void 0){var m=Vh,h=e;switch(e){case"keypress":if(tu(n)===0)break e;case"keydown":case"keyup":m=M_;break;case"focusin":h="focus",m=xd;break;case"focusout":h="blur",m=xd;break;case"beforeblur":case"afterblur":m=xd;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":m=rv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=b_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=F_;break;case rw:case iw:case sw:m=S_;break;case ow:m=L_;break;case"scroll":m=x_;break;case"wheel":m=B_;break;case"copy":case"cut":case"paste":m=__;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=sv}var g=(t&4)!==0,b=!g&&e==="scroll",x=g?f!==null?f+"Capture":null:f;g=[];for(var y=c,w;y!==null;){w=y;var j=w.stateNode;if(w.tag===5&&j!==null&&(w=j,x!==null&&(j=Ca(y,x),j!=null&&g.push(Aa(y,j,w)))),b)break;y=y.return}0<g.length&&(f=new m(f,h,null,n,d),u.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&n!==Of&&(h=n.relatedTarget||n.fromElement)&&(Di(h)||h[Cr]))break e;if((m||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,m?(h=n.relatedTarget||n.toElement,m=c,h=h?Di(h):null,h!==null&&(b=cs(h),h!==b||h.tag!==5&&h.tag!==6)&&(h=null)):(m=null,h=c),m!==h)){if(g=rv,j="onMouseLeave",x="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=sv,j="onPointerLeave",x="onPointerEnter",y="pointer"),b=m==null?f:Os(m),w=h==null?f:Os(h),f=new g(j,y+"leave",m,n,d),f.target=b,f.relatedTarget=w,j=null,Di(d)===c&&(g=new g(x,y+"enter",h,n,d),g.target=w,g.relatedTarget=b,j=g),b=j,m&&h)t:{for(g=m,x=h,y=0,w=g;w;w=Ts(w))y++;for(w=0,j=x;j;j=Ts(j))w++;for(;0<y-w;)g=Ts(g),y--;for(;0<w-y;)x=Ts(x),w--;for(;y--;){if(g===x||x!==null&&g===x.alternate)break t;g=Ts(g),x=Ts(x)}g=null}else g=null;m!==null&&gv(u,f,m,g,!1),h!==null&&b!==null&&gv(u,b,h,g,!0)}}e:{if(f=c?Os(c):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var k=G_;else if(lv(f))if(Z1)k=X_;else{k=Q_;var T=Y_}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=K_);if(k&&(k=k(e,c))){X1(u,k,n,d);break e}T&&T(e,f,c),e==="focusout"&&(T=f._wrapperState)&&T.controlled&&f.type==="number"&&Ef(f,"number",f.value)}switch(T=c?Os(c):window,e){case"focusin":(lv(T)||T.contentEditable==="true")&&(Rs=T,$f=c,la=null);break;case"focusout":la=$f=Rs=null;break;case"mousedown":Bf=!0;break;case"contextmenu":case"mouseup":case"dragend":Bf=!1,pv(u,n,d);break;case"selectionchange":if(e2)break;case"keydown":case"keyup":pv(u,n,d)}var A;if(Hh)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else As?Q1(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(Y1&&n.locale!=="ko"&&(As||S!=="onCompositionStart"?S==="onCompositionEnd"&&As&&(A=G1()):(Qr=d,zh="value"in Qr?Qr.value:Qr.textContent,As=!0)),T=Au(c,S),0<T.length&&(S=new iv(S,e,null,n,d),u.push({event:S,listeners:T}),A?S.data=A:(A=K1(n),A!==null&&(S.data=A)))),(A=V_?U_(e,n):H_(e,n))&&(c=Au(c,"onBeforeInput"),0<c.length&&(d=new iv("onBeforeInput","beforeinput",null,n,d),u.push({event:d,listeners:c}),d.data=A))}lw(u,t)})}function Aa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Au(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ca(e,n),s!=null&&r.unshift(Aa(e,s,i)),s=Ca(e,t),s!=null&&r.push(Aa(e,s,i))),e=e.return}return r}function Ts(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function gv(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=Ca(n,s),l!=null&&o.unshift(Aa(n,l,a))):i||(l=Ca(n,s),l!=null&&o.push(Aa(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var i2=/\r\n?/g,s2=/\u0000|\uFFFD/g;function vv(e){return(typeof e=="string"?e:""+e).replace(i2,`
|
|
38
|
-
`).replace(s2,"")}function Pl(e,t,n){if(t=vv(t),vv(e)!==t&&n)throw Error(q(425))}function Ru(){}var zf=null,Vf=null;function Uf(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 Hf=typeof setTimeout=="function"?setTimeout:void 0,o2=typeof clearTimeout=="function"?clearTimeout:void 0,yv=typeof Promise=="function"?Promise:void 0,a2=typeof queueMicrotask=="function"?queueMicrotask:typeof yv<"u"?function(e){return yv.resolve(null).then(e).catch(l2)}:Hf;function l2(e){setTimeout(function(){throw e})}function Ed(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),Ta(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ta(t)}function ni(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 xv(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 Ro=Math.random().toString(36).slice(2),Xn="__reactFiber$"+Ro,Ra="__reactProps$"+Ro,Cr="__reactContainer$"+Ro,Wf="__reactEvents$"+Ro,u2="__reactListeners$"+Ro,c2="__reactHandles$"+Ro;function Di(e){var t=e[Xn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Cr]||n[Xn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xv(e);e!==null;){if(n=e[Xn])return n;e=xv(e)}return t}e=n,n=e.parentNode}return null}function sl(e){return e=e[Xn]||e[Cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Os(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function vc(e){return e[Ra]||null}var qf=[],Ms=-1;function xi(e){return{current:e}}function Fe(e){0>Ms||(e.current=qf[Ms],qf[Ms]=null,Ms--)}function Oe(e,t){Ms++,qf[Ms]=e.current,e.current=t}var pi={},At=xi(pi),Ht=xi(!1),es=pi;function ho(e,t){var n=e.type.contextTypes;if(!n)return pi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Wt(e){return e=e.childContextTypes,e!=null}function Pu(){Fe(Ht),Fe(At)}function wv(e,t,n){if(At.current!==pi)throw Error(q(168));Oe(At,t),Oe(Ht,n)}function cw(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(q(108,YT(e)||"Unknown",i));return We({},n,r)}function Ou(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pi,es=At.current,Oe(At,e),Oe(Ht,Ht.current),!0}function bv(e,t,n){var r=e.stateNode;if(!r)throw Error(q(169));n?(e=cw(e,t,es),r.__reactInternalMemoizedMergedChildContext=e,Fe(Ht),Fe(At),Oe(At,e)):Fe(Ht),Oe(Ht,n)}var pr=null,yc=!1,jd=!1;function dw(e){pr===null?pr=[e]:pr.push(e)}function d2(e){yc=!0,dw(e)}function wi(){if(!jd&&pr!==null){jd=!0;var e=0,t=Ee;try{var n=pr;for(Ee=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}pr=null,yc=!1}catch(i){throw pr!==null&&(pr=pr.slice(e+1)),F1(Ih,wi),i}finally{Ee=t,jd=!1}}return null}var Ds=[],Ns=0,Mu=null,Du=0,hn=[],mn=0,ts=null,gr=1,vr="";function ji(e,t){Ds[Ns++]=Du,Ds[Ns++]=Mu,Mu=e,Du=t}function fw(e,t,n){hn[mn++]=gr,hn[mn++]=vr,hn[mn++]=ts,ts=e;var r=gr;e=vr;var i=32-Fn(r)-1;r&=~(1<<i),n+=1;var s=32-Fn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,gr=1<<32-Fn(t)+i|n<<i|r,vr=s+e}else gr=1<<s|n<<i|r,vr=e}function qh(e){e.return!==null&&(ji(e,1),fw(e,1,0))}function Gh(e){for(;e===Mu;)Mu=Ds[--Ns],Ds[Ns]=null,Du=Ds[--Ns],Ds[Ns]=null;for(;e===ts;)ts=hn[--mn],hn[mn]=null,vr=hn[--mn],hn[mn]=null,gr=hn[--mn],hn[mn]=null}var tn=null,Zt=null,Le=!1,On=null;function pw(e,t){var n=vn(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 Cv(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,tn=e,Zt=ni(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,tn=e,Zt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ts!==null?{id:gr,overflow:vr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=vn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,tn=e,Zt=null,!0):!1;default:return!1}}function Gf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Yf(e){if(Le){var t=Zt;if(t){var n=t;if(!Cv(e,t)){if(Gf(e))throw Error(q(418));t=ni(n.nextSibling);var r=tn;t&&Cv(e,t)?pw(r,n):(e.flags=e.flags&-4097|2,Le=!1,tn=e)}}else{if(Gf(e))throw Error(q(418));e.flags=e.flags&-4097|2,Le=!1,tn=e}}}function kv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;tn=e}function Ol(e){if(e!==tn)return!1;if(!Le)return kv(e),Le=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Uf(e.type,e.memoizedProps)),t&&(t=Zt)){if(Gf(e))throw hw(),Error(q(418));for(;t;)pw(e,t),t=ni(t.nextSibling)}if(kv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Zt=ni(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Zt=null}}else Zt=tn?ni(e.stateNode.nextSibling):null;return!0}function hw(){for(var e=Zt;e;)e=ni(e.nextSibling)}function mo(){Zt=tn=null,Le=!1}function Yh(e){On===null?On=[e]:On.push(e)}var f2=Er.ReactCurrentBatchConfig;function Ho(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(q(309));var r=n.stateNode}if(!r)throw Error(q(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(q(284));if(!n._owner)throw Error(q(290,e))}return e}function Ml(e,t){throw e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Sv(e){var t=e._init;return t(e._payload)}function mw(e){function t(x,y){if(e){var w=x.deletions;w===null?(x.deletions=[y],x.flags|=16):w.push(y)}}function n(x,y){if(!e)return null;for(;y!==null;)t(x,y),y=y.sibling;return null}function r(x,y){for(x=new Map;y!==null;)y.key!==null?x.set(y.key,y):x.set(y.index,y),y=y.sibling;return x}function i(x,y){return x=oi(x,y),x.index=0,x.sibling=null,x}function s(x,y,w){return x.index=w,e?(w=x.alternate,w!==null?(w=w.index,w<y?(x.flags|=2,y):w):(x.flags|=2,y)):(x.flags|=1048576,y)}function o(x){return e&&x.alternate===null&&(x.flags|=2),x}function a(x,y,w,j){return y===null||y.tag!==6?(y=Nd(w,x.mode,j),y.return=x,y):(y=i(y,w),y.return=x,y)}function l(x,y,w,j){var k=w.type;return k===js?d(x,y,w.props.children,j,w.key):y!==null&&(y.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Nr&&Sv(k)===y.type)?(j=i(y,w.props),j.ref=Ho(x,y,w),j.return=x,j):(j=lu(w.type,w.key,w.props,null,x.mode,j),j.ref=Ho(x,y,w),j.return=x,j)}function c(x,y,w,j){return y===null||y.tag!==4||y.stateNode.containerInfo!==w.containerInfo||y.stateNode.implementation!==w.implementation?(y=Fd(w,x.mode,j),y.return=x,y):(y=i(y,w.children||[]),y.return=x,y)}function d(x,y,w,j,k){return y===null||y.tag!==7?(y=Qi(w,x.mode,j,k),y.return=x,y):(y=i(y,w),y.return=x,y)}function u(x,y,w){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Nd(""+y,x.mode,w),y.return=x,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Cl:return w=lu(y.type,y.key,y.props,null,x.mode,w),w.ref=Ho(x,null,y),w.return=x,w;case Es:return y=Fd(y,x.mode,w),y.return=x,y;case Nr:var j=y._init;return u(x,j(y._payload),w)}if(Xo(y)||$o(y))return y=Qi(y,x.mode,w,null),y.return=x,y;Ml(x,y)}return null}function f(x,y,w,j){var k=y!==null?y.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return k!==null?null:a(x,y,""+w,j);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Cl:return w.key===k?l(x,y,w,j):null;case Es:return w.key===k?c(x,y,w,j):null;case Nr:return k=w._init,f(x,y,k(w._payload),j)}if(Xo(w)||$o(w))return k!==null?null:d(x,y,w,j,null);Ml(x,w)}return null}function m(x,y,w,j,k){if(typeof j=="string"&&j!==""||typeof j=="number")return x=x.get(w)||null,a(y,x,""+j,k);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Cl:return x=x.get(j.key===null?w:j.key)||null,l(y,x,j,k);case Es:return x=x.get(j.key===null?w:j.key)||null,c(y,x,j,k);case Nr:var T=j._init;return m(x,y,w,T(j._payload),k)}if(Xo(j)||$o(j))return x=x.get(w)||null,d(y,x,j,k,null);Ml(y,j)}return null}function h(x,y,w,j){for(var k=null,T=null,A=y,S=y=0,F=null;A!==null&&S<w.length;S++){A.index>S?(F=A,A=null):F=A.sibling;var N=f(x,A,w[S],j);if(N===null){A===null&&(A=F);break}e&&A&&N.alternate===null&&t(x,A),y=s(N,y,S),T===null?k=N:T.sibling=N,T=N,A=F}if(S===w.length)return n(x,A),Le&&ji(x,S),k;if(A===null){for(;S<w.length;S++)A=u(x,w[S],j),A!==null&&(y=s(A,y,S),T===null?k=A:T.sibling=A,T=A);return Le&&ji(x,S),k}for(A=r(x,A);S<w.length;S++)F=m(A,x,S,w[S],j),F!==null&&(e&&F.alternate!==null&&A.delete(F.key===null?S:F.key),y=s(F,y,S),T===null?k=F:T.sibling=F,T=F);return e&&A.forEach(function(O){return t(x,O)}),Le&&ji(x,S),k}function g(x,y,w,j){var k=$o(w);if(typeof k!="function")throw Error(q(150));if(w=k.call(w),w==null)throw Error(q(151));for(var T=k=null,A=y,S=y=0,F=null,N=w.next();A!==null&&!N.done;S++,N=w.next()){A.index>S?(F=A,A=null):F=A.sibling;var O=f(x,A,N.value,j);if(O===null){A===null&&(A=F);break}e&&A&&O.alternate===null&&t(x,A),y=s(O,y,S),T===null?k=O:T.sibling=O,T=O,A=F}if(N.done)return n(x,A),Le&&ji(x,S),k;if(A===null){for(;!N.done;S++,N=w.next())N=u(x,N.value,j),N!==null&&(y=s(N,y,S),T===null?k=N:T.sibling=N,T=N);return Le&&ji(x,S),k}for(A=r(x,A);!N.done;S++,N=w.next())N=m(A,x,S,N.value,j),N!==null&&(e&&N.alternate!==null&&A.delete(N.key===null?S:N.key),y=s(N,y,S),T===null?k=N:T.sibling=N,T=N);return e&&A.forEach(function(Q){return t(x,Q)}),Le&&ji(x,S),k}function b(x,y,w,j){if(typeof w=="object"&&w!==null&&w.type===js&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Cl:e:{for(var k=w.key,T=y;T!==null;){if(T.key===k){if(k=w.type,k===js){if(T.tag===7){n(x,T.sibling),y=i(T,w.props.children),y.return=x,x=y;break e}}else if(T.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Nr&&Sv(k)===T.type){n(x,T.sibling),y=i(T,w.props),y.ref=Ho(x,T,w),y.return=x,x=y;break e}n(x,T);break}else t(x,T);T=T.sibling}w.type===js?(y=Qi(w.props.children,x.mode,j,w.key),y.return=x,x=y):(j=lu(w.type,w.key,w.props,null,x.mode,j),j.ref=Ho(x,y,w),j.return=x,x=j)}return o(x);case Es:e:{for(T=w.key;y!==null;){if(y.key===T)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(x,y.sibling),y=i(y,w.children||[]),y.return=x,x=y;break e}else{n(x,y);break}else t(x,y);y=y.sibling}y=Fd(w,x.mode,j),y.return=x,x=y}return o(x);case Nr:return T=w._init,b(x,y,T(w._payload),j)}if(Xo(w))return h(x,y,w,j);if($o(w))return g(x,y,w,j);Ml(x,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(x,y.sibling),y=i(y,w),y.return=x,x=y):(n(x,y),y=Nd(w,x.mode,j),y.return=x,x=y),o(x)):n(x,y)}return b}var go=mw(!0),gw=mw(!1),Nu=xi(null),Fu=null,Fs=null,Qh=null;function Kh(){Qh=Fs=Fu=null}function Xh(e){var t=Nu.current;Fe(Nu),e._currentValue=t}function Qf(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 Qs(e,t){Fu=e,Qh=Fs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ut=!0),e.firstContext=null)}function wn(e){var t=e._currentValue;if(Qh!==e)if(e={context:e,memoizedValue:t,next:null},Fs===null){if(Fu===null)throw Error(q(308));Fs=e,Fu.dependencies={lanes:0,firstContext:e}}else Fs=Fs.next=e;return t}var Ni=null;function Zh(e){Ni===null?Ni=[e]:Ni.push(e)}function vw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Zh(t)):(n.next=i.next,i.next=n),t.interleaved=n,kr(e,r)}function kr(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 Fr=!1;function Jh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function yw(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 xr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ri(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ke&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,kr(e,n)}return i=r.interleaved,i===null?(t.next=t,Zh(r)):(t.next=i.next,i.next=t),r.interleaved=t,kr(e,n)}function nu(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,Lh(e,n)}}function Tv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Iu(e,t,n,r){var i=e.updateQueue;Fr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;o=0,d=c=l=null,a=s;do{var f=a.lane,m=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,g=a;switch(f=t,m=n,g.tag){case 1:if(h=g.payload,typeof h=="function"){u=h.call(m,u,f);break e}u=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h=="function"?h.call(m,u,f):h,f==null)break e;u=We({},u,f);break e;case 2:Fr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else m={eventTime:m,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=m,l=u):d=d.next=m,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);rs|=o,e.lanes=o,e.memoizedState=u}}function _v(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(q(191,i));i.call(r)}}}var ol={},er=xi(ol),Pa=xi(ol),Oa=xi(ol);function Fi(e){if(e===ol)throw Error(q(174));return e}function em(e,t){switch(Oe(Oa,t),Oe(Pa,e),Oe(er,ol),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Af(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Af(t,e)}Fe(er),Oe(er,t)}function vo(){Fe(er),Fe(Pa),Fe(Oa)}function xw(e){Fi(Oa.current);var t=Fi(er.current),n=Af(t,e.type);t!==n&&(Oe(Pa,e),Oe(er,n))}function tm(e){Pa.current===e&&(Fe(er),Fe(Pa))}var ze=xi(0);function Lu(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 Ad=[];function nm(){for(var e=0;e<Ad.length;e++)Ad[e]._workInProgressVersionPrimary=null;Ad.length=0}var ru=Er.ReactCurrentDispatcher,Rd=Er.ReactCurrentBatchConfig,ns=0,Ue=null,st=null,dt=null,$u=!1,ua=!1,Ma=0,p2=0;function kt(){throw Error(q(321))}function rm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!$n(e[n],t[n]))return!1;return!0}function im(e,t,n,r,i,s){if(ns=s,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ru.current=e===null||e.memoizedState===null?v2:y2,e=n(r,i),ua){s=0;do{if(ua=!1,Ma=0,25<=s)throw Error(q(301));s+=1,dt=st=null,t.updateQueue=null,ru.current=x2,e=n(r,i)}while(ua)}if(ru.current=Bu,t=st!==null&&st.next!==null,ns=0,dt=st=Ue=null,$u=!1,t)throw Error(q(300));return e}function sm(){var e=Ma!==0;return Ma=0,e}function Wn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?Ue.memoizedState=dt=e:dt=dt.next=e,dt}function bn(){if(st===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=st.next;var t=dt===null?Ue.memoizedState:dt.next;if(t!==null)dt=t,st=e;else{if(e===null)throw Error(q(310));st=e,e={memoizedState:st.memoizedState,baseState:st.baseState,baseQueue:st.baseQueue,queue:st.queue,next:null},dt===null?Ue.memoizedState=dt=e:dt=dt.next=e}return dt}function Da(e,t){return typeof t=="function"?t(e):t}function Pd(e){var t=bn(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var r=st,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var d=c.lane;if((ns&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var u={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=u,o=r):l=l.next=u,Ue.lanes|=d,rs|=d}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,$n(r,t.memoizedState)||(Ut=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Ue.lanes|=s,rs|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Od(e){var t=bn(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);$n(s,t.memoizedState)||(Ut=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function ww(){}function bw(e,t){var n=Ue,r=bn(),i=t(),s=!$n(r.memoizedState,i);if(s&&(r.memoizedState=i,Ut=!0),r=r.queue,om(Sw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||dt!==null&&dt.memoizedState.tag&1){if(n.flags|=2048,Na(9,kw.bind(null,n,r,i,t),void 0,null),ht===null)throw Error(q(349));ns&30||Cw(n,t,i)}return i}function Cw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ue.updateQueue,t===null?(t={lastEffect:null,stores:null},Ue.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kw(e,t,n,r){t.value=n,t.getSnapshot=r,Tw(t)&&_w(e)}function Sw(e,t,n){return n(function(){Tw(t)&&_w(e)})}function Tw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!$n(e,n)}catch{return!0}}function _w(e){var t=kr(e,1);t!==null&&In(t,e,1,-1)}function Ev(e){var t=Wn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:e},t.queue=e,e=e.dispatch=g2.bind(null,Ue,e),[t.memoizedState,e]}function Na(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ue.updateQueue,t===null?(t={lastEffect:null,stores:null},Ue.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 Ew(){return bn().memoizedState}function iu(e,t,n,r){var i=Wn();Ue.flags|=e,i.memoizedState=Na(1|t,n,void 0,r===void 0?null:r)}function xc(e,t,n,r){var i=bn();r=r===void 0?null:r;var s=void 0;if(st!==null){var o=st.memoizedState;if(s=o.destroy,r!==null&&rm(r,o.deps)){i.memoizedState=Na(t,n,s,r);return}}Ue.flags|=e,i.memoizedState=Na(1|t,n,s,r)}function jv(e,t){return iu(8390656,8,e,t)}function om(e,t){return xc(2048,8,e,t)}function jw(e,t){return xc(4,2,e,t)}function Aw(e,t){return xc(4,4,e,t)}function Rw(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 Pw(e,t,n){return n=n!=null?n.concat([e]):null,xc(4,4,Rw.bind(null,t,e),n)}function am(){}function Ow(e,t){var n=bn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&rm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Mw(e,t){var n=bn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&rm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Dw(e,t,n){return ns&21?($n(n,t)||(n=$1(),Ue.lanes|=n,rs|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ut=!0),e.memoizedState=n)}function h2(e,t){var n=Ee;Ee=n!==0&&4>n?n:4,e(!0);var r=Rd.transition;Rd.transition={};try{e(!1),t()}finally{Ee=n,Rd.transition=r}}function Nw(){return bn().memoizedState}function m2(e,t,n){var r=si(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Fw(e))Iw(t,n);else if(n=vw(e,t,n,r),n!==null){var i=Dt();In(n,e,r,i),Lw(n,t,r)}}function g2(e,t,n){var r=si(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fw(e))Iw(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,$n(a,o)){var l=t.interleaved;l===null?(i.next=i,Zh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=vw(e,t,i,r),n!==null&&(i=Dt(),In(n,e,r,i),Lw(n,t,r))}}function Fw(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function Iw(e,t){ua=$u=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Lw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lh(e,n)}}var Bu={readContext:wn,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},v2={readContext:wn,useCallback:function(e,t){return Wn().memoizedState=[e,t===void 0?null:t],e},useContext:wn,useEffect:jv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,iu(4194308,4,Rw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return iu(4194308,4,e,t)},useInsertionEffect:function(e,t){return iu(4,2,e,t)},useMemo:function(e,t){var n=Wn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wn();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=m2.bind(null,Ue,e),[r.memoizedState,e]},useRef:function(e){var t=Wn();return e={current:e},t.memoizedState=e},useState:Ev,useDebugValue:am,useDeferredValue:function(e){return Wn().memoizedState=e},useTransition:function(){var e=Ev(!1),t=e[0];return e=h2.bind(null,e[1]),Wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ue,i=Wn();if(Le){if(n===void 0)throw Error(q(407));n=n()}else{if(n=t(),ht===null)throw Error(q(349));ns&30||Cw(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,jv(Sw.bind(null,r,s,e),[e]),r.flags|=2048,Na(9,kw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Wn(),t=ht.identifierPrefix;if(Le){var n=vr,r=gr;n=(r&~(1<<32-Fn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ma++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=p2++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},y2={readContext:wn,useCallback:Ow,useContext:wn,useEffect:om,useImperativeHandle:Pw,useInsertionEffect:jw,useLayoutEffect:Aw,useMemo:Mw,useReducer:Pd,useRef:Ew,useState:function(){return Pd(Da)},useDebugValue:am,useDeferredValue:function(e){var t=bn();return Dw(t,st.memoizedState,e)},useTransition:function(){var e=Pd(Da)[0],t=bn().memoizedState;return[e,t]},useMutableSource:ww,useSyncExternalStore:bw,useId:Nw,unstable_isNewReconciler:!1},x2={readContext:wn,useCallback:Ow,useContext:wn,useEffect:om,useImperativeHandle:Pw,useInsertionEffect:jw,useLayoutEffect:Aw,useMemo:Mw,useReducer:Od,useRef:Ew,useState:function(){return Od(Da)},useDebugValue:am,useDeferredValue:function(e){var t=bn();return st===null?t.memoizedState=e:Dw(t,st.memoizedState,e)},useTransition:function(){var e=Od(Da)[0],t=bn().memoizedState;return[e,t]},useMutableSource:ww,useSyncExternalStore:bw,useId:Nw,unstable_isNewReconciler:!1};function En(e,t){if(e&&e.defaultProps){t=We({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Kf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:We({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wc={isMounted:function(e){return(e=e._reactInternals)?cs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Dt(),i=si(e),s=xr(r,i);s.payload=t,n!=null&&(s.callback=n),t=ri(e,s,i),t!==null&&(In(t,e,i,r),nu(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Dt(),i=si(e),s=xr(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=ri(e,s,i),t!==null&&(In(t,e,i,r),nu(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Dt(),r=si(e),i=xr(n,r);i.tag=2,t!=null&&(i.callback=t),t=ri(e,i,r),t!==null&&(In(t,e,r,n),nu(t,e,r))}};function Av(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Ea(n,r)||!Ea(i,s):!0}function $w(e,t,n){var r=!1,i=pi,s=t.contextType;return typeof s=="object"&&s!==null?s=wn(s):(i=Wt(t)?es:At.current,r=t.contextTypes,s=(r=r!=null)?ho(e,i):pi),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=wc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Rv(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&&wc.enqueueReplaceState(t,t.state,null)}function Xf(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Jh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=wn(s):(s=Wt(t)?es:At.current,i.context=ho(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Kf(e,t,s,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&&wc.enqueueReplaceState(i,i.state,null),Iu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function yo(e,t){try{var n="",r=t;do n+=GT(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
37
|
+
`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{pd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ko(e):""}function GT(e){switch(e.tag){case 5:return Ko(e.type);case 16:return Ko("Lazy");case 13:return Ko("Suspense");case 19:return Ko("SuspenseList");case 0:case 2:case 15:return e=hd(e.type,!1),e;case 11:return e=hd(e.type.render,!1),e;case 1:return e=hd(e.type,!0),e;default:return""}}function Sf(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 As:return"Fragment";case js:return"Portal";case bf:return"Profiler";case Mh:return"StrictMode";case Cf:return"Suspense";case kf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case y1:return(e.displayName||"Context")+".Consumer";case v1:return(e._context.displayName||"Context")+".Provider";case Dh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nh:return t=e.displayName||null,t!==null?t:Sf(e.type)||"Memo";case Nr:t=e._payload,e=e._init;try{return Sf(e(t))}catch{}}return null}function YT(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 Sf(t);case 8:return t===Mh?"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 fi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function w1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function QT(e){var t=w1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Sl(e){e._valueTracker||(e._valueTracker=QT(e))}function b1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=w1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Cu(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 Tf(e,t){var n=t.checked;return We({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Gg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=fi(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 C1(e,t){t=t.checked,t!=null&&Oh(e,"checked",t,!1)}function _f(e,t){C1(e,t);var n=fi(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")?Ef(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ef(e,t.type,fi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yg(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 Ef(e,t,n){(t!=="number"||Cu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xo=Array.isArray;function qs(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=""+fi(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 jf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(G(91));return We({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Qg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(G(92));if(Xo(n)){if(1<n.length)throw Error(G(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:fi(n)}}function k1(e,t){var n=fi(t.value),r=fi(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 Kg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function S1(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 Af(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?S1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tl,T1=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(Tl=Tl||document.createElement("div"),Tl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ca(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var sa={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},KT=["Webkit","ms","Moz","O"];Object.keys(sa).forEach(function(e){KT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),sa[t]=sa[e]})});function _1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||sa.hasOwnProperty(e)&&sa[e]?(""+t).trim():t+"px"}function E1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var XT=We({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 Rf(e,t){if(t){if(XT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(G(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(G(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(G(61))}if(t.style!=null&&typeof t.style!="object")throw Error(G(62))}}function Pf(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 Of=null;function Fh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Mf=null,Gs=null,Ys=null;function Xg(e){if(e=ol(e)){if(typeof Mf!="function")throw Error(G(280));var t=e.stateNode;t&&(t=vc(t),Mf(e.stateNode,e.type,t))}}function j1(e){Gs?Ys?Ys.push(e):Ys=[e]:Gs=e}function A1(){if(Gs){var e=Gs,t=Ys;if(Ys=Gs=null,Xg(e),t)for(e=0;e<t.length;e++)Xg(t[e])}}function R1(e,t){return e(t)}function P1(){}var md=!1;function O1(e,t,n){if(md)return e(t,n);md=!0;try{return R1(e,t,n)}finally{md=!1,(Gs!==null||Ys!==null)&&(P1(),A1())}}function ka(e,t){var n=e.stateNode;if(n===null)return null;var r=vc(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(G(231,t,typeof n));return n}var Df=!1;if(br)try{var Bo={};Object.defineProperty(Bo,"passive",{get:function(){Df=!0}}),window.addEventListener("test",Bo,Bo),window.removeEventListener("test",Bo,Bo)}catch{Df=!1}function ZT(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var oa=!1,ku=null,Su=!1,Nf=null,JT={onError:function(e){oa=!0,ku=e}};function e_(e,t,n,r,i,s,o,a,l){oa=!1,ku=null,ZT.apply(JT,arguments)}function t_(e,t,n,r,i,s,o,a,l){if(e_.apply(this,arguments),oa){if(oa){var c=ku;oa=!1,ku=null}else throw Error(G(198));Su||(Su=!0,Nf=c)}}function cs(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 M1(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 Zg(e){if(cs(e)!==e)throw Error(G(188))}function n_(e){var t=e.alternate;if(!t){if(t=cs(e),t===null)throw Error(G(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Zg(i),e;if(s===r)return Zg(i),t;s=s.sibling}throw Error(G(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(G(189))}}if(n.alternate!==r)throw Error(G(190))}if(n.tag!==3)throw Error(G(188));return n.stateNode.current===n?e:t}function D1(e){return e=n_(e),e!==null?N1(e):null}function N1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=N1(e);if(t!==null)return t;e=e.sibling}return null}var F1=nn.unstable_scheduleCallback,Jg=nn.unstable_cancelCallback,r_=nn.unstable_shouldYield,i_=nn.unstable_requestPaint,et=nn.unstable_now,s_=nn.unstable_getCurrentPriorityLevel,Ih=nn.unstable_ImmediatePriority,I1=nn.unstable_UserBlockingPriority,Tu=nn.unstable_NormalPriority,o_=nn.unstable_LowPriority,L1=nn.unstable_IdlePriority,pc=null,Jn=null;function a_(e){if(Jn&&typeof Jn.onCommitFiberRoot=="function")try{Jn.onCommitFiberRoot(pc,e,void 0,(e.current.flags&128)===128)}catch{}}var Fn=Math.clz32?Math.clz32:c_,l_=Math.log,u_=Math.LN2;function c_(e){return e>>>=0,e===0?32:31-(l_(e)/u_|0)|0}var _l=64,El=4194304;function Zo(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 _u(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Zo(a):(s&=o,s!==0&&(r=Zo(s)))}else o=n&~i,o!==0?r=Zo(o):s!==0&&(r=Zo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Fn(t),i=1<<n,r|=e[n],t&=~i;return r}function d_(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 f_(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-Fn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=d_(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Ff(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $1(){var e=_l;return _l<<=1,!(_l&4194240)&&(_l=64),e}function gd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function il(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Fn(t),e[t]=n}function p_(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-Fn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Lh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Fn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ee=0;function B1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var z1,$h,V1,U1,H1,If=!1,jl=[],Jr=null,ei=null,ti=null,Sa=new Map,Ta=new Map,Lr=[],h_="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 ev(e,t){switch(e){case"focusin":case"focusout":Jr=null;break;case"dragenter":case"dragleave":ei=null;break;case"mouseover":case"mouseout":ti=null;break;case"pointerover":case"pointerout":Sa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ta.delete(t.pointerId)}}function zo(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=ol(t),t!==null&&$h(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function m_(e,t,n,r,i){switch(t){case"focusin":return Jr=zo(Jr,e,t,n,r,i),!0;case"dragenter":return ei=zo(ei,e,t,n,r,i),!0;case"mouseover":return ti=zo(ti,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Sa.set(s,zo(Sa.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Ta.set(s,zo(Ta.get(s)||null,e,t,n,r,i)),!0}return!1}function W1(e){var t=Di(e.target);if(t!==null){var n=cs(t);if(n!==null){if(t=n.tag,t===13){if(t=M1(n),t!==null){e.blockedOn=t,H1(e.priority,function(){V1(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 eu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Lf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Of=r,n.target.dispatchEvent(r),Of=null}else return t=ol(n),t!==null&&$h(t),e.blockedOn=n,!1;t.shift()}return!0}function tv(e,t,n){eu(e)&&n.delete(t)}function g_(){If=!1,Jr!==null&&eu(Jr)&&(Jr=null),ei!==null&&eu(ei)&&(ei=null),ti!==null&&eu(ti)&&(ti=null),Sa.forEach(tv),Ta.forEach(tv)}function Vo(e,t){e.blockedOn===t&&(e.blockedOn=null,If||(If=!0,nn.unstable_scheduleCallback(nn.unstable_NormalPriority,g_)))}function _a(e){function t(i){return Vo(i,e)}if(0<jl.length){Vo(jl[0],e);for(var n=1;n<jl.length;n++){var r=jl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Jr!==null&&Vo(Jr,e),ei!==null&&Vo(ei,e),ti!==null&&Vo(ti,e),Sa.forEach(t),Ta.forEach(t),n=0;n<Lr.length;n++)r=Lr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Lr.length&&(n=Lr[0],n.blockedOn===null);)W1(n),n.blockedOn===null&&Lr.shift()}var Qs=Er.ReactCurrentBatchConfig,Eu=!0;function v_(e,t,n,r){var i=Ee,s=Qs.transition;Qs.transition=null;try{Ee=1,Bh(e,t,n,r)}finally{Ee=i,Qs.transition=s}}function y_(e,t,n,r){var i=Ee,s=Qs.transition;Qs.transition=null;try{Ee=4,Bh(e,t,n,r)}finally{Ee=i,Qs.transition=s}}function Bh(e,t,n,r){if(Eu){var i=Lf(e,t,n,r);if(i===null)_d(e,t,r,ju,n),ev(e,r);else if(m_(i,e,t,n,r))r.stopPropagation();else if(ev(e,r),t&4&&-1<h_.indexOf(e)){for(;i!==null;){var s=ol(i);if(s!==null&&z1(s),s=Lf(e,t,n,r),s===null&&_d(e,t,r,ju,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else _d(e,t,r,null,n)}}var ju=null;function Lf(e,t,n,r){if(ju=null,e=Fh(r),e=Di(e),e!==null)if(t=cs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=M1(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 ju=e,null}function q1(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(s_()){case Ih:return 1;case I1:return 4;case Tu:case o_:return 16;case L1:return 536870912;default:return 16}default:return 16}}var Qr=null,zh=null,tu=null;function G1(){if(tu)return tu;var e,t=zh,n=t.length,r,i="value"in Qr?Qr.value:Qr.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return tu=i.slice(e,1<r?1-r:void 0)}function nu(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 Al(){return!0}function nv(){return!1}function sn(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Al:nv,this.isPropagationStopped=nv,this}return We(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=Al)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Al)},persist:function(){},isPersistent:Al}),t}var Ro={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vh=sn(Ro),sl=We({},Ro,{view:0,detail:0}),x_=sn(sl),vd,yd,Uo,hc=We({},sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uh,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!==Uo&&(Uo&&e.type==="mousemove"?(vd=e.screenX-Uo.screenX,yd=e.screenY-Uo.screenY):yd=vd=0,Uo=e),vd)},movementY:function(e){return"movementY"in e?e.movementY:yd}}),rv=sn(hc),w_=We({},hc,{dataTransfer:0}),b_=sn(w_),C_=We({},sl,{relatedTarget:0}),xd=sn(C_),k_=We({},Ro,{animationName:0,elapsedTime:0,pseudoElement:0}),S_=sn(k_),T_=We({},Ro,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),__=sn(T_),E_=We({},Ro,{data:0}),iv=sn(E_),j_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},A_={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"},R_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function P_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=R_[e])?!!t[e]:!1}function Uh(){return P_}var O_=We({},sl,{key:function(e){if(e.key){var t=j_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=nu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?A_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uh,charCode:function(e){return e.type==="keypress"?nu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?nu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),M_=sn(O_),D_=We({},hc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sv=sn(D_),N_=We({},sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uh}),F_=sn(N_),I_=We({},Ro,{propertyName:0,elapsedTime:0,pseudoElement:0}),L_=sn(I_),$_=We({},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}),B_=sn($_),z_=[9,13,27,32],Hh=br&&"CompositionEvent"in window,aa=null;br&&"documentMode"in document&&(aa=document.documentMode);var V_=br&&"TextEvent"in window&&!aa,Y1=br&&(!Hh||aa&&8<aa&&11>=aa),ov=" ",av=!1;function Q1(e,t){switch(e){case"keyup":return z_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function K1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rs=!1;function U_(e,t){switch(e){case"compositionend":return K1(t);case"keypress":return t.which!==32?null:(av=!0,ov);case"textInput":return e=t.data,e===ov&&av?null:e;default:return null}}function H_(e,t){if(Rs)return e==="compositionend"||!Hh&&Q1(e,t)?(e=G1(),tu=zh=Qr=null,Rs=!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 Y1&&t.locale!=="ko"?null:t.data;default:return null}}var W_={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 lv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!W_[e.type]:t==="textarea"}function X1(e,t,n,r){j1(r),t=Au(t,"onChange"),0<t.length&&(n=new Vh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var la=null,Ea=null;function q_(e){lw(e,0)}function mc(e){var t=Ms(e);if(b1(t))return e}function G_(e,t){if(e==="change")return t}var Z1=!1;if(br){var wd;if(br){var bd="oninput"in document;if(!bd){var uv=document.createElement("div");uv.setAttribute("oninput","return;"),bd=typeof uv.oninput=="function"}wd=bd}else wd=!1;Z1=wd&&(!document.documentMode||9<document.documentMode)}function cv(){la&&(la.detachEvent("onpropertychange",J1),Ea=la=null)}function J1(e){if(e.propertyName==="value"&&mc(Ea)){var t=[];X1(t,Ea,e,Fh(e)),O1(q_,t)}}function Y_(e,t,n){e==="focusin"?(cv(),la=t,Ea=n,la.attachEvent("onpropertychange",J1)):e==="focusout"&&cv()}function Q_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return mc(Ea)}function K_(e,t){if(e==="click")return mc(t)}function X_(e,t){if(e==="input"||e==="change")return mc(t)}function Z_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $n=typeof Object.is=="function"?Object.is:Z_;function ja(e,t){if($n(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(!wf.call(t,i)||!$n(e[i],t[i]))return!1}return!0}function dv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fv(e,t){var n=dv(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=dv(n)}}function ew(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ew(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tw(){for(var e=window,t=Cu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Cu(e.document)}return t}function Wh(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 J_(e){var t=tw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ew(n.ownerDocument.documentElement,n)){if(r!==null&&Wh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=fv(n,s);var o=fv(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var eE=br&&"documentMode"in document&&11>=document.documentMode,Ps=null,$f=null,ua=null,Bf=!1;function pv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Bf||Ps==null||Ps!==Cu(r)||(r=Ps,"selectionStart"in r&&Wh(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}),ua&&ja(ua,r)||(ua=r,r=Au($f,"onSelect"),0<r.length&&(t=new Vh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ps)))}function Rl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Os={animationend:Rl("Animation","AnimationEnd"),animationiteration:Rl("Animation","AnimationIteration"),animationstart:Rl("Animation","AnimationStart"),transitionend:Rl("Transition","TransitionEnd")},Cd={},nw={};br&&(nw=document.createElement("div").style,"AnimationEvent"in window||(delete Os.animationend.animation,delete Os.animationiteration.animation,delete Os.animationstart.animation),"TransitionEvent"in window||delete Os.transitionend.transition);function gc(e){if(Cd[e])return Cd[e];if(!Os[e])return e;var t=Os[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in nw)return Cd[e]=t[n];return e}var rw=gc("animationend"),iw=gc("animationiteration"),sw=gc("animationstart"),ow=gc("transitionend"),aw=new Map,hv="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 yi(e,t){aw.set(e,t),us(t,[e])}for(var kd=0;kd<hv.length;kd++){var Sd=hv[kd],tE=Sd.toLowerCase(),nE=Sd[0].toUpperCase()+Sd.slice(1);yi(tE,"on"+nE)}yi(rw,"onAnimationEnd");yi(iw,"onAnimationIteration");yi(sw,"onAnimationStart");yi("dblclick","onDoubleClick");yi("focusin","onFocus");yi("focusout","onBlur");yi(ow,"onTransitionEnd");ho("onMouseEnter",["mouseout","mouseover"]);ho("onMouseLeave",["mouseout","mouseover"]);ho("onPointerEnter",["pointerout","pointerover"]);ho("onPointerLeave",["pointerout","pointerover"]);us("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));us("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));us("onBeforeInput",["compositionend","keypress","textInput","paste"]);us("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));us("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));us("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jo="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(" "),rE=new Set("cancel close invalid load scroll toggle".split(" ").concat(Jo));function mv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,t_(r,t,void 0,e),e.currentTarget=null}function lw(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 s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;mv(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;mv(i,a,c),s=l}}}if(Su)throw e=Nf,Su=!1,Nf=null,e}function De(e,t){var n=t[Wf];n===void 0&&(n=t[Wf]=new Set);var r=e+"__bubble";n.has(r)||(uw(t,e,2,!1),n.add(r))}function Td(e,t,n){var r=0;t&&(r|=4),uw(n,e,r,t)}var Pl="_reactListening"+Math.random().toString(36).slice(2);function Aa(e){if(!e[Pl]){e[Pl]=!0,g1.forEach(function(n){n!=="selectionchange"&&(rE.has(n)||Td(n,!1,e),Td(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pl]||(t[Pl]=!0,Td("selectionchange",!1,t))}}function uw(e,t,n,r){switch(q1(t)){case 1:var i=v_;break;case 4:i=y_;break;default:i=Bh}n=i.bind(null,t,n,e),i=void 0,!Df||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 _d(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=Di(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}O1(function(){var c=s,d=Fh(n),u=[];e:{var f=aw.get(e);if(f!==void 0){var m=Vh,h=e;switch(e){case"keypress":if(nu(n)===0)break e;case"keydown":case"keyup":m=M_;break;case"focusin":h="focus",m=xd;break;case"focusout":h="blur",m=xd;break;case"beforeblur":case"afterblur":m=xd;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":m=rv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=b_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=F_;break;case rw:case iw:case sw:m=S_;break;case ow:m=L_;break;case"scroll":m=x_;break;case"wheel":m=B_;break;case"copy":case"cut":case"paste":m=__;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=sv}var g=(t&4)!==0,b=!g&&e==="scroll",x=g?f!==null?f+"Capture":null:f;g=[];for(var y=c,w;y!==null;){w=y;var j=w.stateNode;if(w.tag===5&&j!==null&&(w=j,x!==null&&(j=ka(y,x),j!=null&&g.push(Ra(y,j,w)))),b)break;y=y.return}0<g.length&&(f=new m(f,h,null,n,d),u.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&n!==Of&&(h=n.relatedTarget||n.fromElement)&&(Di(h)||h[Cr]))break e;if((m||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,m?(h=n.relatedTarget||n.toElement,m=c,h=h?Di(h):null,h!==null&&(b=cs(h),h!==b||h.tag!==5&&h.tag!==6)&&(h=null)):(m=null,h=c),m!==h)){if(g=rv,j="onMouseLeave",x="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=sv,j="onPointerLeave",x="onPointerEnter",y="pointer"),b=m==null?f:Ms(m),w=h==null?f:Ms(h),f=new g(j,y+"leave",m,n,d),f.target=b,f.relatedTarget=w,j=null,Di(d)===c&&(g=new g(x,y+"enter",h,n,d),g.target=w,g.relatedTarget=b,j=g),b=j,m&&h)t:{for(g=m,x=h,y=0,w=g;w;w=_s(w))y++;for(w=0,j=x;j;j=_s(j))w++;for(;0<y-w;)g=_s(g),y--;for(;0<w-y;)x=_s(x),w--;for(;y--;){if(g===x||x!==null&&g===x.alternate)break t;g=_s(g),x=_s(x)}g=null}else g=null;m!==null&&gv(u,f,m,g,!1),h!==null&&b!==null&&gv(u,b,h,g,!0)}}e:{if(f=c?Ms(c):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var k=G_;else if(lv(f))if(Z1)k=X_;else{k=Q_;var T=Y_}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=K_);if(k&&(k=k(e,c))){X1(u,k,n,d);break e}T&&T(e,f,c),e==="focusout"&&(T=f._wrapperState)&&T.controlled&&f.type==="number"&&Ef(f,"number",f.value)}switch(T=c?Ms(c):window,e){case"focusin":(lv(T)||T.contentEditable==="true")&&(Ps=T,$f=c,ua=null);break;case"focusout":ua=$f=Ps=null;break;case"mousedown":Bf=!0;break;case"contextmenu":case"mouseup":case"dragend":Bf=!1,pv(u,n,d);break;case"selectionchange":if(eE)break;case"keydown":case"keyup":pv(u,n,d)}var A;if(Hh)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else Rs?Q1(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(Y1&&n.locale!=="ko"&&(Rs||S!=="onCompositionStart"?S==="onCompositionEnd"&&Rs&&(A=G1()):(Qr=d,zh="value"in Qr?Qr.value:Qr.textContent,Rs=!0)),T=Au(c,S),0<T.length&&(S=new iv(S,e,null,n,d),u.push({event:S,listeners:T}),A?S.data=A:(A=K1(n),A!==null&&(S.data=A)))),(A=V_?U_(e,n):H_(e,n))&&(c=Au(c,"onBeforeInput"),0<c.length&&(d=new iv("onBeforeInput","beforeinput",null,n,d),u.push({event:d,listeners:c}),d.data=A))}lw(u,t)})}function Ra(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Au(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=ka(e,n),s!=null&&r.unshift(Ra(e,s,i)),s=ka(e,t),s!=null&&r.push(Ra(e,s,i))),e=e.return}return r}function _s(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function gv(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=ka(n,s),l!=null&&o.unshift(Ra(n,l,a))):i||(l=ka(n,s),l!=null&&o.push(Ra(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var iE=/\r\n?/g,sE=/\u0000|\uFFFD/g;function vv(e){return(typeof e=="string"?e:""+e).replace(iE,`
|
|
38
|
+
`).replace(sE,"")}function Ol(e,t,n){if(t=vv(t),vv(e)!==t&&n)throw Error(G(425))}function Ru(){}var zf=null,Vf=null;function Uf(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 Hf=typeof setTimeout=="function"?setTimeout:void 0,oE=typeof clearTimeout=="function"?clearTimeout:void 0,yv=typeof Promise=="function"?Promise:void 0,aE=typeof queueMicrotask=="function"?queueMicrotask:typeof yv<"u"?function(e){return yv.resolve(null).then(e).catch(lE)}:Hf;function lE(e){setTimeout(function(){throw e})}function Ed(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),_a(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);_a(t)}function ni(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 xv(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 Po=Math.random().toString(36).slice(2),Xn="__reactFiber$"+Po,Pa="__reactProps$"+Po,Cr="__reactContainer$"+Po,Wf="__reactEvents$"+Po,uE="__reactListeners$"+Po,cE="__reactHandles$"+Po;function Di(e){var t=e[Xn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Cr]||n[Xn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xv(e);e!==null;){if(n=e[Xn])return n;e=xv(e)}return t}e=n,n=e.parentNode}return null}function ol(e){return e=e[Xn]||e[Cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ms(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(G(33))}function vc(e){return e[Pa]||null}var qf=[],Ds=-1;function xi(e){return{current:e}}function Fe(e){0>Ds||(e.current=qf[Ds],qf[Ds]=null,Ds--)}function Oe(e,t){Ds++,qf[Ds]=e.current,e.current=t}var pi={},At=xi(pi),Ht=xi(!1),es=pi;function mo(e,t){var n=e.type.contextTypes;if(!n)return pi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Wt(e){return e=e.childContextTypes,e!=null}function Pu(){Fe(Ht),Fe(At)}function wv(e,t,n){if(At.current!==pi)throw Error(G(168));Oe(At,t),Oe(Ht,n)}function cw(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(G(108,YT(e)||"Unknown",i));return We({},n,r)}function Ou(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pi,es=At.current,Oe(At,e),Oe(Ht,Ht.current),!0}function bv(e,t,n){var r=e.stateNode;if(!r)throw Error(G(169));n?(e=cw(e,t,es),r.__reactInternalMemoizedMergedChildContext=e,Fe(Ht),Fe(At),Oe(At,e)):Fe(Ht),Oe(Ht,n)}var pr=null,yc=!1,jd=!1;function dw(e){pr===null?pr=[e]:pr.push(e)}function dE(e){yc=!0,dw(e)}function wi(){if(!jd&&pr!==null){jd=!0;var e=0,t=Ee;try{var n=pr;for(Ee=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}pr=null,yc=!1}catch(i){throw pr!==null&&(pr=pr.slice(e+1)),F1(Ih,wi),i}finally{Ee=t,jd=!1}}return null}var Ns=[],Fs=0,Mu=null,Du=0,hn=[],mn=0,ts=null,gr=1,vr="";function ji(e,t){Ns[Fs++]=Du,Ns[Fs++]=Mu,Mu=e,Du=t}function fw(e,t,n){hn[mn++]=gr,hn[mn++]=vr,hn[mn++]=ts,ts=e;var r=gr;e=vr;var i=32-Fn(r)-1;r&=~(1<<i),n+=1;var s=32-Fn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,gr=1<<32-Fn(t)+i|n<<i|r,vr=s+e}else gr=1<<s|n<<i|r,vr=e}function qh(e){e.return!==null&&(ji(e,1),fw(e,1,0))}function Gh(e){for(;e===Mu;)Mu=Ns[--Fs],Ns[Fs]=null,Du=Ns[--Fs],Ns[Fs]=null;for(;e===ts;)ts=hn[--mn],hn[mn]=null,vr=hn[--mn],hn[mn]=null,gr=hn[--mn],hn[mn]=null}var tn=null,Zt=null,Le=!1,On=null;function pw(e,t){var n=vn(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 Cv(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,tn=e,Zt=ni(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,tn=e,Zt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ts!==null?{id:gr,overflow:vr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=vn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,tn=e,Zt=null,!0):!1;default:return!1}}function Gf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Yf(e){if(Le){var t=Zt;if(t){var n=t;if(!Cv(e,t)){if(Gf(e))throw Error(G(418));t=ni(n.nextSibling);var r=tn;t&&Cv(e,t)?pw(r,n):(e.flags=e.flags&-4097|2,Le=!1,tn=e)}}else{if(Gf(e))throw Error(G(418));e.flags=e.flags&-4097|2,Le=!1,tn=e}}}function kv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;tn=e}function Ml(e){if(e!==tn)return!1;if(!Le)return kv(e),Le=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Uf(e.type,e.memoizedProps)),t&&(t=Zt)){if(Gf(e))throw hw(),Error(G(418));for(;t;)pw(e,t),t=ni(t.nextSibling)}if(kv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Zt=ni(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Zt=null}}else Zt=tn?ni(e.stateNode.nextSibling):null;return!0}function hw(){for(var e=Zt;e;)e=ni(e.nextSibling)}function go(){Zt=tn=null,Le=!1}function Yh(e){On===null?On=[e]:On.push(e)}var fE=Er.ReactCurrentBatchConfig;function Ho(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(G(309));var r=n.stateNode}if(!r)throw Error(G(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(G(284));if(!n._owner)throw Error(G(290,e))}return e}function Dl(e,t){throw e=Object.prototype.toString.call(t),Error(G(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Sv(e){var t=e._init;return t(e._payload)}function mw(e){function t(x,y){if(e){var w=x.deletions;w===null?(x.deletions=[y],x.flags|=16):w.push(y)}}function n(x,y){if(!e)return null;for(;y!==null;)t(x,y),y=y.sibling;return null}function r(x,y){for(x=new Map;y!==null;)y.key!==null?x.set(y.key,y):x.set(y.index,y),y=y.sibling;return x}function i(x,y){return x=oi(x,y),x.index=0,x.sibling=null,x}function s(x,y,w){return x.index=w,e?(w=x.alternate,w!==null?(w=w.index,w<y?(x.flags|=2,y):w):(x.flags|=2,y)):(x.flags|=1048576,y)}function o(x){return e&&x.alternate===null&&(x.flags|=2),x}function a(x,y,w,j){return y===null||y.tag!==6?(y=Nd(w,x.mode,j),y.return=x,y):(y=i(y,w),y.return=x,y)}function l(x,y,w,j){var k=w.type;return k===As?d(x,y,w.props.children,j,w.key):y!==null&&(y.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Nr&&Sv(k)===y.type)?(j=i(y,w.props),j.ref=Ho(x,y,w),j.return=x,j):(j=uu(w.type,w.key,w.props,null,x.mode,j),j.ref=Ho(x,y,w),j.return=x,j)}function c(x,y,w,j){return y===null||y.tag!==4||y.stateNode.containerInfo!==w.containerInfo||y.stateNode.implementation!==w.implementation?(y=Fd(w,x.mode,j),y.return=x,y):(y=i(y,w.children||[]),y.return=x,y)}function d(x,y,w,j,k){return y===null||y.tag!==7?(y=Qi(w,x.mode,j,k),y.return=x,y):(y=i(y,w),y.return=x,y)}function u(x,y,w){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Nd(""+y,x.mode,w),y.return=x,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case kl:return w=uu(y.type,y.key,y.props,null,x.mode,w),w.ref=Ho(x,null,y),w.return=x,w;case js:return y=Fd(y,x.mode,w),y.return=x,y;case Nr:var j=y._init;return u(x,j(y._payload),w)}if(Xo(y)||$o(y))return y=Qi(y,x.mode,w,null),y.return=x,y;Dl(x,y)}return null}function f(x,y,w,j){var k=y!==null?y.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return k!==null?null:a(x,y,""+w,j);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case kl:return w.key===k?l(x,y,w,j):null;case js:return w.key===k?c(x,y,w,j):null;case Nr:return k=w._init,f(x,y,k(w._payload),j)}if(Xo(w)||$o(w))return k!==null?null:d(x,y,w,j,null);Dl(x,w)}return null}function m(x,y,w,j,k){if(typeof j=="string"&&j!==""||typeof j=="number")return x=x.get(w)||null,a(y,x,""+j,k);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case kl:return x=x.get(j.key===null?w:j.key)||null,l(y,x,j,k);case js:return x=x.get(j.key===null?w:j.key)||null,c(y,x,j,k);case Nr:var T=j._init;return m(x,y,w,T(j._payload),k)}if(Xo(j)||$o(j))return x=x.get(w)||null,d(y,x,j,k,null);Dl(y,j)}return null}function h(x,y,w,j){for(var k=null,T=null,A=y,S=y=0,F=null;A!==null&&S<w.length;S++){A.index>S?(F=A,A=null):F=A.sibling;var N=f(x,A,w[S],j);if(N===null){A===null&&(A=F);break}e&&A&&N.alternate===null&&t(x,A),y=s(N,y,S),T===null?k=N:T.sibling=N,T=N,A=F}if(S===w.length)return n(x,A),Le&&ji(x,S),k;if(A===null){for(;S<w.length;S++)A=u(x,w[S],j),A!==null&&(y=s(A,y,S),T===null?k=A:T.sibling=A,T=A);return Le&&ji(x,S),k}for(A=r(x,A);S<w.length;S++)F=m(A,x,S,w[S],j),F!==null&&(e&&F.alternate!==null&&A.delete(F.key===null?S:F.key),y=s(F,y,S),T===null?k=F:T.sibling=F,T=F);return e&&A.forEach(function(O){return t(x,O)}),Le&&ji(x,S),k}function g(x,y,w,j){var k=$o(w);if(typeof k!="function")throw Error(G(150));if(w=k.call(w),w==null)throw Error(G(151));for(var T=k=null,A=y,S=y=0,F=null,N=w.next();A!==null&&!N.done;S++,N=w.next()){A.index>S?(F=A,A=null):F=A.sibling;var O=f(x,A,N.value,j);if(O===null){A===null&&(A=F);break}e&&A&&O.alternate===null&&t(x,A),y=s(O,y,S),T===null?k=O:T.sibling=O,T=O,A=F}if(N.done)return n(x,A),Le&&ji(x,S),k;if(A===null){for(;!N.done;S++,N=w.next())N=u(x,N.value,j),N!==null&&(y=s(N,y,S),T===null?k=N:T.sibling=N,T=N);return Le&&ji(x,S),k}for(A=r(x,A);!N.done;S++,N=w.next())N=m(A,x,S,N.value,j),N!==null&&(e&&N.alternate!==null&&A.delete(N.key===null?S:N.key),y=s(N,y,S),T===null?k=N:T.sibling=N,T=N);return e&&A.forEach(function(Q){return t(x,Q)}),Le&&ji(x,S),k}function b(x,y,w,j){if(typeof w=="object"&&w!==null&&w.type===As&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case kl:e:{for(var k=w.key,T=y;T!==null;){if(T.key===k){if(k=w.type,k===As){if(T.tag===7){n(x,T.sibling),y=i(T,w.props.children),y.return=x,x=y;break e}}else if(T.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Nr&&Sv(k)===T.type){n(x,T.sibling),y=i(T,w.props),y.ref=Ho(x,T,w),y.return=x,x=y;break e}n(x,T);break}else t(x,T);T=T.sibling}w.type===As?(y=Qi(w.props.children,x.mode,j,w.key),y.return=x,x=y):(j=uu(w.type,w.key,w.props,null,x.mode,j),j.ref=Ho(x,y,w),j.return=x,x=j)}return o(x);case js:e:{for(T=w.key;y!==null;){if(y.key===T)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(x,y.sibling),y=i(y,w.children||[]),y.return=x,x=y;break e}else{n(x,y);break}else t(x,y);y=y.sibling}y=Fd(w,x.mode,j),y.return=x,x=y}return o(x);case Nr:return T=w._init,b(x,y,T(w._payload),j)}if(Xo(w))return h(x,y,w,j);if($o(w))return g(x,y,w,j);Dl(x,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(x,y.sibling),y=i(y,w),y.return=x,x=y):(n(x,y),y=Nd(w,x.mode,j),y.return=x,x=y),o(x)):n(x,y)}return b}var vo=mw(!0),gw=mw(!1),Nu=xi(null),Fu=null,Is=null,Qh=null;function Kh(){Qh=Is=Fu=null}function Xh(e){var t=Nu.current;Fe(Nu),e._currentValue=t}function Qf(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 Ks(e,t){Fu=e,Qh=Is=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ut=!0),e.firstContext=null)}function wn(e){var t=e._currentValue;if(Qh!==e)if(e={context:e,memoizedValue:t,next:null},Is===null){if(Fu===null)throw Error(G(308));Is=e,Fu.dependencies={lanes:0,firstContext:e}}else Is=Is.next=e;return t}var Ni=null;function Zh(e){Ni===null?Ni=[e]:Ni.push(e)}function vw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Zh(t)):(n.next=i.next,i.next=n),t.interleaved=n,kr(e,r)}function kr(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 Fr=!1;function Jh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function yw(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 xr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ri(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ke&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,kr(e,n)}return i=r.interleaved,i===null?(t.next=t,Zh(r)):(t.next=i.next,i.next=t),r.interleaved=t,kr(e,n)}function ru(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,Lh(e,n)}}function Tv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Iu(e,t,n,r){var i=e.updateQueue;Fr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;o=0,d=c=l=null,a=s;do{var f=a.lane,m=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,g=a;switch(f=t,m=n,g.tag){case 1:if(h=g.payload,typeof h=="function"){u=h.call(m,u,f);break e}u=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h=="function"?h.call(m,u,f):h,f==null)break e;u=We({},u,f);break e;case 2:Fr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else m={eventTime:m,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=m,l=u):d=d.next=m,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);rs|=o,e.lanes=o,e.memoizedState=u}}function _v(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(G(191,i));i.call(r)}}}var al={},er=xi(al),Oa=xi(al),Ma=xi(al);function Fi(e){if(e===al)throw Error(G(174));return e}function em(e,t){switch(Oe(Ma,t),Oe(Oa,e),Oe(er,al),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Af(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Af(t,e)}Fe(er),Oe(er,t)}function yo(){Fe(er),Fe(Oa),Fe(Ma)}function xw(e){Fi(Ma.current);var t=Fi(er.current),n=Af(t,e.type);t!==n&&(Oe(Oa,e),Oe(er,n))}function tm(e){Oa.current===e&&(Fe(er),Fe(Oa))}var ze=xi(0);function Lu(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 Ad=[];function nm(){for(var e=0;e<Ad.length;e++)Ad[e]._workInProgressVersionPrimary=null;Ad.length=0}var iu=Er.ReactCurrentDispatcher,Rd=Er.ReactCurrentBatchConfig,ns=0,Ue=null,st=null,ft=null,$u=!1,ca=!1,Da=0,pE=0;function kt(){throw Error(G(321))}function rm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!$n(e[n],t[n]))return!1;return!0}function im(e,t,n,r,i,s){if(ns=s,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,iu.current=e===null||e.memoizedState===null?vE:yE,e=n(r,i),ca){s=0;do{if(ca=!1,Da=0,25<=s)throw Error(G(301));s+=1,ft=st=null,t.updateQueue=null,iu.current=xE,e=n(r,i)}while(ca)}if(iu.current=Bu,t=st!==null&&st.next!==null,ns=0,ft=st=Ue=null,$u=!1,t)throw Error(G(300));return e}function sm(){var e=Da!==0;return Da=0,e}function Wn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?Ue.memoizedState=ft=e:ft=ft.next=e,ft}function bn(){if(st===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=st.next;var t=ft===null?Ue.memoizedState:ft.next;if(t!==null)ft=t,st=e;else{if(e===null)throw Error(G(310));st=e,e={memoizedState:st.memoizedState,baseState:st.baseState,baseQueue:st.baseQueue,queue:st.queue,next:null},ft===null?Ue.memoizedState=ft=e:ft=ft.next=e}return ft}function Na(e,t){return typeof t=="function"?t(e):t}function Pd(e){var t=bn(),n=t.queue;if(n===null)throw Error(G(311));n.lastRenderedReducer=e;var r=st,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var d=c.lane;if((ns&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var u={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=u,o=r):l=l.next=u,Ue.lanes|=d,rs|=d}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,$n(r,t.memoizedState)||(Ut=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Ue.lanes|=s,rs|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Od(e){var t=bn(),n=t.queue;if(n===null)throw Error(G(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);$n(s,t.memoizedState)||(Ut=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function ww(){}function bw(e,t){var n=Ue,r=bn(),i=t(),s=!$n(r.memoizedState,i);if(s&&(r.memoizedState=i,Ut=!0),r=r.queue,om(Sw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||ft!==null&&ft.memoizedState.tag&1){if(n.flags|=2048,Fa(9,kw.bind(null,n,r,i,t),void 0,null),ht===null)throw Error(G(349));ns&30||Cw(n,t,i)}return i}function Cw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ue.updateQueue,t===null?(t={lastEffect:null,stores:null},Ue.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kw(e,t,n,r){t.value=n,t.getSnapshot=r,Tw(t)&&_w(e)}function Sw(e,t,n){return n(function(){Tw(t)&&_w(e)})}function Tw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!$n(e,n)}catch{return!0}}function _w(e){var t=kr(e,1);t!==null&&In(t,e,1,-1)}function Ev(e){var t=Wn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:e},t.queue=e,e=e.dispatch=gE.bind(null,Ue,e),[t.memoizedState,e]}function Fa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ue.updateQueue,t===null?(t={lastEffect:null,stores:null},Ue.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 Ew(){return bn().memoizedState}function su(e,t,n,r){var i=Wn();Ue.flags|=e,i.memoizedState=Fa(1|t,n,void 0,r===void 0?null:r)}function xc(e,t,n,r){var i=bn();r=r===void 0?null:r;var s=void 0;if(st!==null){var o=st.memoizedState;if(s=o.destroy,r!==null&&rm(r,o.deps)){i.memoizedState=Fa(t,n,s,r);return}}Ue.flags|=e,i.memoizedState=Fa(1|t,n,s,r)}function jv(e,t){return su(8390656,8,e,t)}function om(e,t){return xc(2048,8,e,t)}function jw(e,t){return xc(4,2,e,t)}function Aw(e,t){return xc(4,4,e,t)}function Rw(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 Pw(e,t,n){return n=n!=null?n.concat([e]):null,xc(4,4,Rw.bind(null,t,e),n)}function am(){}function Ow(e,t){var n=bn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&rm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Mw(e,t){var n=bn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&rm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Dw(e,t,n){return ns&21?($n(n,t)||(n=$1(),Ue.lanes|=n,rs|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ut=!0),e.memoizedState=n)}function hE(e,t){var n=Ee;Ee=n!==0&&4>n?n:4,e(!0);var r=Rd.transition;Rd.transition={};try{e(!1),t()}finally{Ee=n,Rd.transition=r}}function Nw(){return bn().memoizedState}function mE(e,t,n){var r=si(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Fw(e))Iw(t,n);else if(n=vw(e,t,n,r),n!==null){var i=Dt();In(n,e,r,i),Lw(n,t,r)}}function gE(e,t,n){var r=si(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fw(e))Iw(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,$n(a,o)){var l=t.interleaved;l===null?(i.next=i,Zh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=vw(e,t,i,r),n!==null&&(i=Dt(),In(n,e,r,i),Lw(n,t,r))}}function Fw(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function Iw(e,t){ca=$u=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Lw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lh(e,n)}}var Bu={readContext:wn,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},vE={readContext:wn,useCallback:function(e,t){return Wn().memoizedState=[e,t===void 0?null:t],e},useContext:wn,useEffect:jv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,su(4194308,4,Rw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return su(4194308,4,e,t)},useInsertionEffect:function(e,t){return su(4,2,e,t)},useMemo:function(e,t){var n=Wn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wn();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=mE.bind(null,Ue,e),[r.memoizedState,e]},useRef:function(e){var t=Wn();return e={current:e},t.memoizedState=e},useState:Ev,useDebugValue:am,useDeferredValue:function(e){return Wn().memoizedState=e},useTransition:function(){var e=Ev(!1),t=e[0];return e=hE.bind(null,e[1]),Wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ue,i=Wn();if(Le){if(n===void 0)throw Error(G(407));n=n()}else{if(n=t(),ht===null)throw Error(G(349));ns&30||Cw(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,jv(Sw.bind(null,r,s,e),[e]),r.flags|=2048,Fa(9,kw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Wn(),t=ht.identifierPrefix;if(Le){var n=vr,r=gr;n=(r&~(1<<32-Fn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Da++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=pE++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},yE={readContext:wn,useCallback:Ow,useContext:wn,useEffect:om,useImperativeHandle:Pw,useInsertionEffect:jw,useLayoutEffect:Aw,useMemo:Mw,useReducer:Pd,useRef:Ew,useState:function(){return Pd(Na)},useDebugValue:am,useDeferredValue:function(e){var t=bn();return Dw(t,st.memoizedState,e)},useTransition:function(){var e=Pd(Na)[0],t=bn().memoizedState;return[e,t]},useMutableSource:ww,useSyncExternalStore:bw,useId:Nw,unstable_isNewReconciler:!1},xE={readContext:wn,useCallback:Ow,useContext:wn,useEffect:om,useImperativeHandle:Pw,useInsertionEffect:jw,useLayoutEffect:Aw,useMemo:Mw,useReducer:Od,useRef:Ew,useState:function(){return Od(Na)},useDebugValue:am,useDeferredValue:function(e){var t=bn();return st===null?t.memoizedState=e:Dw(t,st.memoizedState,e)},useTransition:function(){var e=Od(Na)[0],t=bn().memoizedState;return[e,t]},useMutableSource:ww,useSyncExternalStore:bw,useId:Nw,unstable_isNewReconciler:!1};function En(e,t){if(e&&e.defaultProps){t=We({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Kf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:We({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wc={isMounted:function(e){return(e=e._reactInternals)?cs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Dt(),i=si(e),s=xr(r,i);s.payload=t,n!=null&&(s.callback=n),t=ri(e,s,i),t!==null&&(In(t,e,i,r),ru(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Dt(),i=si(e),s=xr(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=ri(e,s,i),t!==null&&(In(t,e,i,r),ru(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Dt(),r=si(e),i=xr(n,r);i.tag=2,t!=null&&(i.callback=t),t=ri(e,i,r),t!==null&&(In(t,e,r,n),ru(t,e,r))}};function Av(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!ja(n,r)||!ja(i,s):!0}function $w(e,t,n){var r=!1,i=pi,s=t.contextType;return typeof s=="object"&&s!==null?s=wn(s):(i=Wt(t)?es:At.current,r=t.contextTypes,s=(r=r!=null)?mo(e,i):pi),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=wc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Rv(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&&wc.enqueueReplaceState(t,t.state,null)}function Xf(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Jh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=wn(s):(s=Wt(t)?es:At.current,i.context=mo(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Kf(e,t,s,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&&wc.enqueueReplaceState(i,i.state,null),Iu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function xo(e,t){try{var n="",r=t;do n+=GT(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
39
39
|
Error generating stack: `+s.message+`
|
|
40
|
-
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function Md(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Zf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var w2=typeof WeakMap=="function"?WeakMap:Map;function Bw(e,t,n){n=xr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vu||(Vu=!0,lp=r),Zf(e,t)},n}function zw(e,t,n){n=xr(-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(){Zf(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Zf(e,t),typeof r!="function"&&(ii===null?ii=new Set([this]):ii.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Pv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new w2;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=D2.bind(null,e,t,n),t.then(e,e))}function Ov(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 Mv(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=xr(-1,1),t.tag=2,ri(n,t,1))),n.lanes|=1),e)}var b2=Er.ReactCurrentOwner,Ut=!1;function Ot(e,t,n,r){t.child=e===null?gw(t,null,n,r):go(t,e.child,n,r)}function Dv(e,t,n,r,i){n=n.render;var s=t.ref;return Qs(t,i),r=im(e,t,n,r,s,i),n=sm(),e!==null&&!Ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Sr(e,t,i)):(Le&&n&&qh(t),t.flags|=1,Ot(e,t,r,i),t.child)}function Nv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!mm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Vw(e,t,s,r,i)):(e=lu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ea,n(o,r)&&e.ref===t.ref)return Sr(e,t,i)}return t.flags|=1,e=oi(s,r),e.ref=t.ref,e.return=t,t.child=e}function Vw(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Ea(s,r)&&e.ref===t.ref)if(Ut=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Ut=!0);else return t.lanes=e.lanes,Sr(e,t,i)}return Jf(e,t,n,r,i)}function Uw(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oe(Ls,Xt),Xt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oe(Ls,Xt),Xt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Oe(Ls,Xt),Xt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Oe(Ls,Xt),Xt|=r;return Ot(e,t,i,n),t.child}function Hw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Jf(e,t,n,r,i){var s=Wt(n)?es:At.current;return s=ho(t,s),Qs(t,i),n=im(e,t,n,r,s,i),r=sm(),e!==null&&!Ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Sr(e,t,i)):(Le&&r&&qh(t),t.flags|=1,Ot(e,t,n,i),t.child)}function Fv(e,t,n,r,i){if(Wt(n)){var s=!0;Ou(t)}else s=!1;if(Qs(t,i),t.stateNode===null)su(e,t),$w(t,n,r),Xf(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=wn(c):(c=Wt(n)?es:At.current,c=ho(t,c));var d=n.getDerivedStateFromProps,u=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Rv(t,o,r,c),Fr=!1;var f=t.memoizedState;o.state=f,Iu(t,r,o,i),l=t.memoizedState,a!==r||f!==l||Ht.current||Fr?(typeof d=="function"&&(Kf(t,n,d,r),l=t.memoizedState),(a=Fr||Av(t,n,a,r,f,l,c))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,yw(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:En(t.type,a),o.props=c,u=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=wn(l):(l=Wt(n)?es:At.current,l=ho(t,l));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||f!==l)&&Rv(t,o,r,l),Fr=!1,f=t.memoizedState,o.state=f,Iu(t,r,o,i);var h=t.memoizedState;a!==u||f!==h||Ht.current||Fr?(typeof m=="function"&&(Kf(t,n,m,r),h=t.memoizedState),(c=Fr||Av(t,n,c,r,f,h,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,h,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,h,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ep(e,t,n,r,s,i)}function ep(e,t,n,r,i,s){Hw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&bv(t,n,!1),Sr(e,t,s);r=t.stateNode,b2.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=go(t,e.child,null,s),t.child=go(t,null,a,s)):Ot(e,t,a,s),t.memoizedState=r.state,i&&bv(t,n,!0),t.child}function Ww(e){var t=e.stateNode;t.pendingContext?wv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wv(e,t.context,!1),em(e,t.containerInfo)}function Iv(e,t,n,r,i){return mo(),Yh(i),t.flags|=256,Ot(e,t,n,r),t.child}var tp={dehydrated:null,treeContext:null,retryLane:0};function np(e){return{baseLanes:e,cachePool:null,transitions:null}}function qw(e,t,n){var r=t.pendingProps,i=ze.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Oe(ze,i&1),e===null)return Yf(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):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=kc(o,r,0,null),e=Qi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=np(n),t.memoizedState=tp,e):lm(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return C2(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=oi(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=oi(a,s):(s=Qi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?np(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=tp,r}return s=e.child,e=s.sibling,r=oi(s,{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 lm(e,t){return t=kc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Dl(e,t,n,r){return r!==null&&Yh(r),go(t,e.child,null,n),e=lm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function C2(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Md(Error(q(422))),Dl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=kc({mode:"visible",children:r.children},i,0,null),s=Qi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&go(t,e.child,null,o),t.child.memoizedState=np(o),t.memoizedState=tp,s);if(!(t.mode&1))return Dl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(q(419)),r=Md(s,r,void 0),Dl(e,t,o,r)}if(a=(o&e.childLanes)!==0,Ut||a){if(r=ht,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,kr(e,i),In(r,e,i,-1))}return hm(),r=Md(Error(q(421))),Dl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=N2.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Zt=ni(i.nextSibling),tn=t,Le=!0,On=null,e!==null&&(hn[mn++]=gr,hn[mn++]=vr,hn[mn++]=ts,gr=e.id,vr=e.overflow,ts=t),t=lm(t,r.children),t.flags|=4096,t)}function Lv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qf(e.return,t,n)}function Dd(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Gw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Ot(e,t,r.children,n),r=ze.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&&Lv(e,n,t);else if(e.tag===19)Lv(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(Oe(ze,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&&Lu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dd(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Lu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dd(t,!0,n,null,s);break;case"together":Dd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function su(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Sr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),rs|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,n=oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function k2(e,t,n){switch(t.tag){case 3:Ww(t),mo();break;case 5:xw(t);break;case 1:Wt(t.type)&&Ou(t);break;case 4:em(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Oe(Nu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Oe(ze,ze.current&1),t.flags|=128,null):n&t.child.childLanes?qw(e,t,n):(Oe(ze,ze.current&1),e=Sr(e,t,n),e!==null?e.sibling:null);Oe(ze,ze.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Gw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Oe(ze,ze.current),r)break;return null;case 22:case 23:return t.lanes=0,Uw(e,t,n)}return Sr(e,t,n)}var Yw,rp,Qw,Kw;Yw=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}};rp=function(){};Qw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Fi(er.current);var s=null;switch(n){case"input":i=Tf(e,i),r=Tf(e,r),s=[];break;case"select":i=We({},i,{value:void 0}),r=We({},r,{value:void 0}),s=[];break;case"textarea":i=jf(e,i),r=jf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ru)}Rf(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(wa.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(wa.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&De("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Kw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Wo(e,t){if(!Le)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 St(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 S2(e,t,n){var r=t.pendingProps;switch(Gh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(t),null;case 1:return Wt(t.type)&&Pu(),St(t),null;case 3:return r=t.stateNode,vo(),Fe(Ht),Fe(At),nm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ol(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,On!==null&&(dp(On),On=null))),rp(e,t),St(t),null;case 5:tm(t);var i=Fi(Oa.current);if(n=t.type,e!==null&&t.stateNode!=null)Qw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(q(166));return St(t),null}if(e=Fi(er.current),Ol(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Xn]=t,r[Ra]=s,e=(t.mode&1)!==0,n){case"dialog":De("cancel",r),De("close",r);break;case"iframe":case"object":case"embed":De("load",r);break;case"video":case"audio":for(i=0;i<Jo.length;i++)De(Jo[i],r);break;case"source":De("error",r);break;case"img":case"image":case"link":De("error",r),De("load",r);break;case"details":De("toggle",r);break;case"input":Gg(r,s),De("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},De("invalid",r);break;case"textarea":Qg(r,s),De("invalid",r)}Rf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Pl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Pl(r.textContent,a,e),i=["children",""+a]):wa.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&De("scroll",r)}switch(n){case"input":kl(r),Yg(r,s,!0);break;case"textarea":kl(r),Kg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ru)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=S1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Xn]=t,e[Ra]=r,Yw(e,t,!1,!1),t.stateNode=e;e:{switch(o=Pf(n,r),n){case"dialog":De("cancel",e),De("close",e),i=r;break;case"iframe":case"object":case"embed":De("load",e),i=r;break;case"video":case"audio":for(i=0;i<Jo.length;i++)De(Jo[i],e);i=r;break;case"source":De("error",e),i=r;break;case"img":case"image":case"link":De("error",e),De("load",e),i=r;break;case"details":De("toggle",e),i=r;break;case"input":Gg(e,r),i=Tf(e,r),De("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=We({},r,{value:void 0}),De("invalid",e);break;case"textarea":Qg(e,r),i=jf(e,r),De("invalid",e);break;default:i=r}Rf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?E1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&T1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ba(e,l):typeof l=="number"&&ba(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(wa.hasOwnProperty(s)?l!=null&&s==="onScroll"&&De("scroll",e):l!=null&&Oh(e,s,l,o))}switch(n){case"input":kl(e),Yg(e,r,!1);break;case"textarea":kl(e),Kg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+fi(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ws(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ws(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ru)}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 St(t),null;case 6:if(e&&t.stateNode!=null)Kw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(q(166));if(n=Fi(Oa.current),Fi(er.current),Ol(t)){if(r=t.stateNode,n=t.memoizedProps,r[Xn]=t,(s=r.nodeValue!==n)&&(e=tn,e!==null))switch(e.tag){case 3:Pl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Pl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Xn]=t,t.stateNode=r}return St(t),null;case 13:if(Fe(ze),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Le&&Zt!==null&&t.mode&1&&!(t.flags&128))hw(),mo(),t.flags|=98560,s=!1;else if(s=Ol(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(q(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(q(317));s[Xn]=t}else mo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;St(t),s=!1}else On!==null&&(dp(On),On=null),s=!0;if(!s)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||ze.current&1?at===0&&(at=3):hm())),t.updateQueue!==null&&(t.flags|=4),St(t),null);case 4:return vo(),rp(e,t),e===null&&ja(t.stateNode.containerInfo),St(t),null;case 10:return Xh(t.type._context),St(t),null;case 17:return Wt(t.type)&&Pu(),St(t),null;case 19:if(Fe(ze),s=t.memoizedState,s===null)return St(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Wo(s,!1);else{if(at!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Lu(e),o!==null){for(t.flags|=128,Wo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Oe(ze,ze.current&1|2),t.child}e=e.sibling}s.tail!==null&&et()>xo&&(t.flags|=128,r=!0,Wo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Lu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Le)return St(t),null}else 2*et()-s.renderingStartTime>xo&&n!==1073741824&&(t.flags|=128,r=!0,Wo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=et(),t.sibling=null,n=ze.current,Oe(ze,r?n&1|2:n&1),t):(St(t),null);case 22:case 23:return pm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Xt&1073741824&&(St(t),t.subtreeFlags&6&&(t.flags|=8192)):St(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function T2(e,t){switch(Gh(t),t.tag){case 1:return Wt(t.type)&&Pu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vo(),Fe(Ht),Fe(At),nm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return tm(t),null;case 13:if(Fe(ze),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));mo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fe(ze),null;case 4:return vo(),null;case 10:return Xh(t.type._context),null;case 22:case 23:return pm(),null;case 24:return null;default:return null}}var Nl=!1,Et=!1,_2=typeof WeakSet=="function"?WeakSet:Set,te=null;function Is(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Qe(e,t,r)}else n.current=null}function ip(e,t,n){try{n()}catch(r){Qe(e,t,r)}}var $v=!1;function E2(e,t){if(zf=Eu,e=tw(),Wh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,d=0,u=e,f=null;t:for(;;){for(var m;u!==n||i!==0&&u.nodeType!==3||(a=o+i),u!==s||r!==0&&u.nodeType!==3||(l=o+r),u.nodeType===3&&(o+=u.nodeValue.length),(m=u.firstChild)!==null;)f=u,u=m;for(;;){if(u===e)break t;if(f===n&&++c===i&&(a=o),f===s&&++d===r&&(l=o),(m=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vf={focusedElem:e,selectionRange:n},Eu=!1,te=t;te!==null;)if(t=te,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,te=e;else for(;te!==null;){t=te;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,b=h.memoizedState,x=t.stateNode,y=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:En(t.type,g),b);x.__reactInternalSnapshotBeforeUpdate=y}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(q(163))}}catch(j){Qe(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,te=e;break}te=t.return}return h=$v,$v=!1,h}function ca(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&ip(t,n,s)}i=i.next}while(i!==r)}}function bc(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 sp(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 Xw(e){var t=e.alternate;t!==null&&(e.alternate=null,Xw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xn],delete t[Ra],delete t[Wf],delete t[u2],delete t[c2])),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 Zw(e){return e.tag===5||e.tag===3||e.tag===4}function Bv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zw(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 op(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=Ru));else if(r!==4&&(e=e.child,e!==null))for(op(e,t,n),e=e.sibling;e!==null;)op(e,t,n),e=e.sibling}function ap(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(ap(e,t,n),e=e.sibling;e!==null;)ap(e,t,n),e=e.sibling}var yt=null,Rn=!1;function Or(e,t,n){for(n=n.child;n!==null;)Jw(e,t,n),n=n.sibling}function Jw(e,t,n){if(Jn&&typeof Jn.onCommitFiberUnmount=="function")try{Jn.onCommitFiberUnmount(pc,n)}catch{}switch(n.tag){case 5:Et||Is(n,t);case 6:var r=yt,i=Rn;yt=null,Or(e,t,n),yt=r,Rn=i,yt!==null&&(Rn?(e=yt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):yt.removeChild(n.stateNode));break;case 18:yt!==null&&(Rn?(e=yt,n=n.stateNode,e.nodeType===8?Ed(e.parentNode,n):e.nodeType===1&&Ed(e,n),Ta(e)):Ed(yt,n.stateNode));break;case 4:r=yt,i=Rn,yt=n.stateNode.containerInfo,Rn=!0,Or(e,t,n),yt=r,Rn=i;break;case 0:case 11:case 14:case 15:if(!Et&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&ip(n,t,o),i=i.next}while(i!==r)}Or(e,t,n);break;case 1:if(!Et&&(Is(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Qe(n,t,a)}Or(e,t,n);break;case 21:Or(e,t,n);break;case 22:n.mode&1?(Et=(r=Et)||n.memoizedState!==null,Or(e,t,n),Et=r):Or(e,t,n);break;default:Or(e,t,n)}}function zv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _2),t.forEach(function(r){var i=F2.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Sn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:yt=a.stateNode,Rn=!1;break e;case 3:yt=a.stateNode.containerInfo,Rn=!0;break e;case 4:yt=a.stateNode.containerInfo,Rn=!0;break e}a=a.return}if(yt===null)throw Error(q(160));Jw(s,o,i),yt=null,Rn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Qe(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)eb(t,e),t=t.sibling}function eb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Sn(t,e),Vn(e),r&4){try{ca(3,e,e.return),bc(3,e)}catch(g){Qe(e,e.return,g)}try{ca(5,e,e.return)}catch(g){Qe(e,e.return,g)}}break;case 1:Sn(t,e),Vn(e),r&512&&n!==null&&Is(n,n.return);break;case 5:if(Sn(t,e),Vn(e),r&512&&n!==null&&Is(n,n.return),e.flags&32){var i=e.stateNode;try{ba(i,"")}catch(g){Qe(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&C1(i,s),Pf(a,o);var c=Pf(a,s);for(o=0;o<l.length;o+=2){var d=l[o],u=l[o+1];d==="style"?E1(i,u):d==="dangerouslySetInnerHTML"?T1(i,u):d==="children"?ba(i,u):Oh(i,d,u,c)}switch(a){case"input":_f(i,s);break;case"textarea":k1(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?Ws(i,!!s.multiple,m,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ws(i,!!s.multiple,s.defaultValue,!0):Ws(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ra]=s}catch(g){Qe(e,e.return,g)}}break;case 6:if(Sn(t,e),Vn(e),r&4){if(e.stateNode===null)throw Error(q(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(g){Qe(e,e.return,g)}}break;case 3:if(Sn(t,e),Vn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ta(t.containerInfo)}catch(g){Qe(e,e.return,g)}break;case 4:Sn(t,e),Vn(e);break;case 13:Sn(t,e),Vn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(dm=et())),r&4&&zv(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Et=(c=Et)||d,Sn(t,e),Et=c):Sn(t,e),Vn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(te=e,d=e.child;d!==null;){for(u=te=d;te!==null;){switch(f=te,m=f.child,f.tag){case 0:case 11:case 14:case 15:ca(4,f,f.return);break;case 1:Is(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(g){Qe(r,n,g)}}break;case 5:Is(f,f.return);break;case 22:if(f.memoizedState!==null){Uv(u);continue}}m!==null?(m.return=f,te=m):Uv(u)}d=d.sibling}e:for(d=null,u=e;;){if(u.tag===5){if(d===null){d=u;try{i=u.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=u.stateNode,l=u.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=_1("display",o))}catch(g){Qe(e,e.return,g)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(g){Qe(e,e.return,g)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:Sn(t,e),Vn(e),r&4&&zv(e);break;case 21:break;default:Sn(t,e),Vn(e)}}function Vn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Zw(n)){var r=n;break e}n=n.return}throw Error(q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ba(i,""),r.flags&=-33);var s=Bv(e);ap(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Bv(e);op(e,a,o);break;default:throw Error(q(161))}}catch(l){Qe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function j2(e,t,n){te=e,tb(e)}function tb(e,t,n){for(var r=(e.mode&1)!==0;te!==null;){var i=te,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Nl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||Et;a=Nl;var c=Et;if(Nl=o,(Et=l)&&!c)for(te=i;te!==null;)o=te,l=o.child,o.tag===22&&o.memoizedState!==null?Hv(i):l!==null?(l.return=o,te=l):Hv(i);for(;s!==null;)te=s,tb(s),s=s.sibling;te=i,Nl=a,Et=c}Vv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,te=s):Vv(e)}}function Vv(e){for(;te!==null;){var t=te;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Et||bc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Et)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:En(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&_v(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}_v(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var u=d.dehydrated;u!==null&&Ta(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}Et||t.flags&512&&sp(t)}catch(f){Qe(t,t.return,f)}}if(t===e){te=null;break}if(n=t.sibling,n!==null){n.return=t.return,te=n;break}te=t.return}}function Uv(e){for(;te!==null;){var t=te;if(t===e){te=null;break}var n=t.sibling;if(n!==null){n.return=t.return,te=n;break}te=t.return}}function Hv(e){for(;te!==null;){var t=te;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{bc(4,t)}catch(l){Qe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Qe(t,i,l)}}var s=t.return;try{sp(t)}catch(l){Qe(t,s,l)}break;case 5:var o=t.return;try{sp(t)}catch(l){Qe(t,o,l)}}}catch(l){Qe(t,t.return,l)}if(t===e){te=null;break}var a=t.sibling;if(a!==null){a.return=t.return,te=a;break}te=t.return}}var A2=Math.ceil,zu=Er.ReactCurrentDispatcher,um=Er.ReactCurrentOwner,yn=Er.ReactCurrentBatchConfig,ke=0,ht=null,nt=null,wt=0,Xt=0,Ls=xi(0),at=0,Fa=null,rs=0,Cc=0,cm=0,da=null,zt=null,dm=0,xo=1/0,fr=null,Vu=!1,lp=null,ii=null,Fl=!1,Kr=null,Uu=0,fa=0,up=null,ou=-1,au=0;function Dt(){return ke&6?et():ou!==-1?ou:ou=et()}function si(e){return e.mode&1?ke&2&&wt!==0?wt&-wt:f2.transition!==null?(au===0&&(au=$1()),au):(e=Ee,e!==0||(e=window.event,e=e===void 0?16:q1(e.type)),e):1}function In(e,t,n,r){if(50<fa)throw fa=0,up=null,Error(q(185));rl(e,n,r),(!(ke&2)||e!==ht)&&(e===ht&&(!(ke&2)&&(Cc|=n),at===4&&$r(e,wt)),qt(e,r),n===1&&ke===0&&!(t.mode&1)&&(xo=et()+500,yc&&wi()))}function qt(e,t){var n=e.callbackNode;f_(e,t);var r=_u(e,e===ht?wt:0);if(r===0)n!==null&&Jg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Jg(n),t===1)e.tag===0?d2(Wv.bind(null,e)):dw(Wv.bind(null,e)),a2(function(){!(ke&6)&&wi()}),n=null;else{switch(B1(r)){case 1:n=Ih;break;case 4:n=I1;break;case 16:n=Tu;break;case 536870912:n=L1;break;default:n=Tu}n=ub(n,nb.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function nb(e,t){if(ou=-1,au=0,ke&6)throw Error(q(327));var n=e.callbackNode;if(Ks()&&e.callbackNode!==n)return null;var r=_u(e,e===ht?wt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Hu(e,r);else{t=r;var i=ke;ke|=2;var s=ib();(ht!==e||wt!==t)&&(fr=null,xo=et()+500,Yi(e,t));do try{O2();break}catch(a){rb(e,a)}while(!0);Kh(),zu.current=s,ke=i,nt!==null?t=0:(ht=null,wt=0,t=at)}if(t!==0){if(t===2&&(i=Ff(e),i!==0&&(r=i,t=cp(e,i))),t===1)throw n=Fa,Yi(e,0),$r(e,r),qt(e,et()),n;if(t===6)$r(e,r);else{if(i=e.current.alternate,!(r&30)&&!R2(i)&&(t=Hu(e,r),t===2&&(s=Ff(e),s!==0&&(r=s,t=cp(e,s))),t===1))throw n=Fa,Yi(e,0),$r(e,r),qt(e,et()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(q(345));case 2:Ai(e,zt,fr);break;case 3:if($r(e,r),(r&130023424)===r&&(t=dm+500-et(),10<t)){if(_u(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Dt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Hf(Ai.bind(null,e,zt,fr),t);break}Ai(e,zt,fr);break;case 4:if($r(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Fn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=et()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*A2(r/1960))-r,10<r){e.timeoutHandle=Hf(Ai.bind(null,e,zt,fr),r);break}Ai(e,zt,fr);break;case 5:Ai(e,zt,fr);break;default:throw Error(q(329))}}}return qt(e,et()),e.callbackNode===n?nb.bind(null,e):null}function cp(e,t){var n=da;return e.current.memoizedState.isDehydrated&&(Yi(e,t).flags|=256),e=Hu(e,t),e!==2&&(t=zt,zt=n,t!==null&&dp(t)),e}function dp(e){zt===null?zt=e:zt.push.apply(zt,e)}function R2(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],s=i.getSnapshot;i=i.value;try{if(!$n(s(),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 $r(e,t){for(t&=~cm,t&=~Cc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Fn(t),r=1<<n;e[n]=-1,t&=~r}}function Wv(e){if(ke&6)throw Error(q(327));Ks();var t=_u(e,0);if(!(t&1))return qt(e,et()),null;var n=Hu(e,t);if(e.tag!==0&&n===2){var r=Ff(e);r!==0&&(t=r,n=cp(e,r))}if(n===1)throw n=Fa,Yi(e,0),$r(e,t),qt(e,et()),n;if(n===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ai(e,zt,fr),qt(e,et()),null}function fm(e,t){var n=ke;ke|=1;try{return e(t)}finally{ke=n,ke===0&&(xo=et()+500,yc&&wi())}}function is(e){Kr!==null&&Kr.tag===0&&!(ke&6)&&Ks();var t=ke;ke|=1;var n=yn.transition,r=Ee;try{if(yn.transition=null,Ee=1,e)return e()}finally{Ee=r,yn.transition=n,ke=t,!(ke&6)&&wi()}}function pm(){Xt=Ls.current,Fe(Ls)}function Yi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,o2(n)),nt!==null)for(n=nt.return;n!==null;){var r=n;switch(Gh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Pu();break;case 3:vo(),Fe(Ht),Fe(At),nm();break;case 5:tm(r);break;case 4:vo();break;case 13:Fe(ze);break;case 19:Fe(ze);break;case 10:Xh(r.type._context);break;case 22:case 23:pm()}n=n.return}if(ht=e,nt=e=oi(e.current,null),wt=Xt=t,at=0,Fa=null,cm=Cc=rs=0,zt=da=null,Ni!==null){for(t=0;t<Ni.length;t++)if(n=Ni[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Ni=null}return e}function rb(e,t){do{var n=nt;try{if(Kh(),ru.current=Bu,$u){for(var r=Ue.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}$u=!1}if(ns=0,dt=st=Ue=null,ua=!1,Ma=0,um.current=null,n===null||n.return===null){at=1,Fa=t,nt=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=wt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,u=d.tag;if(!(d.mode&1)&&(u===0||u===11||u===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Ov(o);if(m!==null){m.flags&=-257,Mv(m,o,a,s,t),m.mode&1&&Pv(s,c,t),t=m,l=c;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break e}else{if(!(t&1)){Pv(s,c,t),hm();break e}l=Error(q(426))}}else if(Le&&a.mode&1){var b=Ov(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Mv(b,o,a,s,t),Yh(yo(l,a));break e}}s=l=yo(l,a),at!==4&&(at=2),da===null?da=[s]:da.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var x=Bw(s,l,t);Tv(s,x);break e;case 1:a=l;var y=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof y.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(ii===null||!ii.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var j=zw(s,a,t);Tv(s,j);break e}}s=s.return}while(s!==null)}ob(n)}catch(k){t=k,nt===n&&n!==null&&(nt=n=n.return);continue}break}while(!0)}function ib(){var e=zu.current;return zu.current=Bu,e===null?Bu:e}function hm(){(at===0||at===3||at===2)&&(at=4),ht===null||!(rs&268435455)&&!(Cc&268435455)||$r(ht,wt)}function Hu(e,t){var n=ke;ke|=2;var r=ib();(ht!==e||wt!==t)&&(fr=null,Yi(e,t));do try{P2();break}catch(i){rb(e,i)}while(!0);if(Kh(),ke=n,zu.current=r,nt!==null)throw Error(q(261));return ht=null,wt=0,at}function P2(){for(;nt!==null;)sb(nt)}function O2(){for(;nt!==null&&!r_();)sb(nt)}function sb(e){var t=lb(e.alternate,e,Xt);e.memoizedProps=e.pendingProps,t===null?ob(e):nt=t,um.current=null}function ob(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=T2(n,t),n!==null){n.flags&=32767,nt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{at=6,nt=null;return}}else if(n=S2(n,t,Xt),n!==null){nt=n;return}if(t=t.sibling,t!==null){nt=t;return}nt=t=e}while(t!==null);at===0&&(at=5)}function Ai(e,t,n){var r=Ee,i=yn.transition;try{yn.transition=null,Ee=1,M2(e,t,n,r)}finally{yn.transition=i,Ee=r}return null}function M2(e,t,n,r){do Ks();while(Kr!==null);if(ke&6)throw Error(q(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(q(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(p_(e,s),e===ht&&(nt=ht=null,wt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Fl||(Fl=!0,ub(Tu,function(){return Ks(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=yn.transition,yn.transition=null;var o=Ee;Ee=1;var a=ke;ke|=4,um.current=null,E2(e,n),eb(n,e),J_(Vf),Eu=!!zf,Vf=zf=null,e.current=n,j2(n),i_(),ke=a,Ee=o,yn.transition=s}else e.current=n;if(Fl&&(Fl=!1,Kr=e,Uu=i),s=e.pendingLanes,s===0&&(ii=null),a_(n.stateNode),qt(e,et()),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(Vu)throw Vu=!1,e=lp,lp=null,e;return Uu&1&&e.tag!==0&&Ks(),s=e.pendingLanes,s&1?e===up?fa++:(fa=0,up=e):fa=0,wi(),null}function Ks(){if(Kr!==null){var e=B1(Uu),t=yn.transition,n=Ee;try{if(yn.transition=null,Ee=16>e?16:e,Kr===null)var r=!1;else{if(e=Kr,Kr=null,Uu=0,ke&6)throw Error(q(331));var i=ke;for(ke|=4,te=e.current;te!==null;){var s=te,o=s.child;if(te.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(te=c;te!==null;){var d=te;switch(d.tag){case 0:case 11:case 15:ca(8,d,s)}var u=d.child;if(u!==null)u.return=d,te=u;else for(;te!==null;){d=te;var f=d.sibling,m=d.return;if(Xw(d),d===c){te=null;break}if(f!==null){f.return=m,te=f;break}te=m}}}var h=s.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(g!==null)}}te=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,te=o;else e:for(;te!==null;){if(s=te,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ca(9,s,s.return)}var x=s.sibling;if(x!==null){x.return=s.return,te=x;break e}te=s.return}}var y=e.current;for(te=y;te!==null;){o=te;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,te=w;else e:for(o=y;te!==null;){if(a=te,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:bc(9,a)}}catch(k){Qe(a,a.return,k)}if(a===o){te=null;break e}var j=a.sibling;if(j!==null){j.return=a.return,te=j;break e}te=a.return}}if(ke=i,wi(),Jn&&typeof Jn.onPostCommitFiberRoot=="function")try{Jn.onPostCommitFiberRoot(pc,e)}catch{}r=!0}return r}finally{Ee=n,yn.transition=t}}return!1}function qv(e,t,n){t=yo(n,t),t=Bw(e,t,1),e=ri(e,t,1),t=Dt(),e!==null&&(rl(e,1,t),qt(e,t))}function Qe(e,t,n){if(e.tag===3)qv(e,e,n);else for(;t!==null;){if(t.tag===3){qv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ii===null||!ii.has(r))){e=yo(n,e),e=zw(t,e,1),t=ri(t,e,1),e=Dt(),t!==null&&(rl(t,1,e),qt(t,e));break}}t=t.return}}function D2(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Dt(),e.pingedLanes|=e.suspendedLanes&n,ht===e&&(wt&n)===n&&(at===4||at===3&&(wt&130023424)===wt&&500>et()-dm?Yi(e,0):cm|=n),qt(e,t)}function ab(e,t){t===0&&(e.mode&1?(t=_l,_l<<=1,!(_l&130023424)&&(_l=4194304)):t=1);var n=Dt();e=kr(e,t),e!==null&&(rl(e,t,n),qt(e,n))}function N2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ab(e,n)}function F2(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(q(314))}r!==null&&r.delete(t),ab(e,n)}var lb;lb=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ht.current)Ut=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ut=!1,k2(e,t,n);Ut=!!(e.flags&131072)}else Ut=!1,Le&&t.flags&1048576&&fw(t,Du,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;su(e,t),e=t.pendingProps;var i=ho(t,At.current);Qs(t,n),i=im(null,t,r,e,i,n);var s=sm();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,Wt(r)?(s=!0,Ou(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Jh(t),i.updater=wc,t.stateNode=i,i._reactInternals=t,Xf(t,r,e,n),t=ep(null,t,r,!0,s,n)):(t.tag=0,Le&&s&&qh(t),Ot(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(su(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=L2(r),e=En(r,e),i){case 0:t=Jf(null,t,r,e,n);break e;case 1:t=Fv(null,t,r,e,n);break e;case 11:t=Dv(null,t,r,e,n);break e;case 14:t=Nv(null,t,r,En(r.type,e),n);break e}throw Error(q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:En(r,i),Jf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:En(r,i),Fv(e,t,r,i,n);case 3:e:{if(Ww(t),e===null)throw Error(q(387));r=t.pendingProps,s=t.memoizedState,i=s.element,yw(e,t),Iu(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=yo(Error(q(423)),t),t=Iv(e,t,r,n,i);break e}else if(r!==i){i=yo(Error(q(424)),t),t=Iv(e,t,r,n,i);break e}else for(Zt=ni(t.stateNode.containerInfo.firstChild),tn=t,Le=!0,On=null,n=gw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(mo(),r===i){t=Sr(e,t,n);break e}Ot(e,t,r,n)}t=t.child}return t;case 5:return xw(t),e===null&&Yf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Uf(r,i)?o=null:s!==null&&Uf(r,s)&&(t.flags|=32),Hw(e,t),Ot(e,t,o,n),t.child;case 6:return e===null&&Yf(t),null;case 13:return qw(e,t,n);case 4:return em(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=go(t,null,r,n):Ot(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:En(r,i),Dv(e,t,r,i,n);case 7:return Ot(e,t,t.pendingProps,n),t.child;case 8:return Ot(e,t,t.pendingProps.children,n),t.child;case 12:return Ot(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,Oe(Nu,r._currentValue),r._currentValue=o,s!==null)if($n(s.value,o)){if(s.children===i.children&&!Ht.current){t=Sr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=xr(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Qf(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(q(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Qf(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Ot(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Qs(t,n),i=wn(i),r=r(i),t.flags|=1,Ot(e,t,r,n),t.child;case 14:return r=t.type,i=En(r,t.pendingProps),i=En(r.type,i),Nv(e,t,r,i,n);case 15:return Vw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:En(r,i),su(e,t),t.tag=1,Wt(r)?(e=!0,Ou(t)):e=!1,Qs(t,n),$w(t,r,i),Xf(t,r,i,n),ep(null,t,r,!0,e,n);case 19:return Gw(e,t,n);case 22:return Uw(e,t,n)}throw Error(q(156,t.tag))};function ub(e,t){return F1(e,t)}function I2(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 vn(e,t,n,r){return new I2(e,t,n,r)}function mm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function L2(e){if(typeof e=="function")return mm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Dh)return 11;if(e===Nh)return 14}return 2}function oi(e,t){var n=e.alternate;return n===null?(n=vn(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 lu(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")mm(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case js:return Qi(n.children,i,s,t);case Mh:o=8,i|=8;break;case bf:return e=vn(12,n,t,i|2),e.elementType=bf,e.lanes=s,e;case Cf:return e=vn(13,n,t,i),e.elementType=Cf,e.lanes=s,e;case kf:return e=vn(19,n,t,i),e.elementType=kf,e.lanes=s,e;case x1:return kc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case v1:o=10;break e;case y1:o=9;break e;case Dh:o=11;break e;case Nh:o=14;break e;case Nr:o=16,r=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=vn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Qi(e,t,n,r){return e=vn(7,e,r,t),e.lanes=n,e}function kc(e,t,n,r){return e=vn(22,e,r,t),e.elementType=x1,e.lanes=n,e.stateNode={isHidden:!1},e}function Nd(e,t,n){return e=vn(6,e,null,t),e.lanes=n,e}function Fd(e,t,n){return t=vn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $2(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=gd(0),this.expirationTimes=gd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gm(e,t,n,r,i,s,o,a,l){return e=new $2(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=vn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jh(s),e}function B2(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Es,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function cb(e){if(!e)return pi;e=e._reactInternals;e:{if(cs(e)!==e||e.tag!==1)throw Error(q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Wt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(q(171))}if(e.tag===1){var n=e.type;if(Wt(n))return cw(e,n,t)}return t}function db(e,t,n,r,i,s,o,a,l){return e=gm(n,r,!0,e,i,s,o,a,l),e.context=cb(null),n=e.current,r=Dt(),i=si(n),s=xr(r,i),s.callback=t??null,ri(n,s,i),e.current.lanes=i,rl(e,i,r),qt(e,r),e}function Sc(e,t,n,r){var i=t.current,s=Dt(),o=si(i);return n=cb(n),t.context===null?t.context=n:t.pendingContext=n,t=xr(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ri(i,t,o),e!==null&&(In(e,i,o,s),nu(e,i,o)),o}function Wu(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 Gv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vm(e,t){Gv(e,t),(e=e.alternate)&&Gv(e,t)}function z2(){return null}var fb=typeof reportError=="function"?reportError:function(e){console.error(e)};function ym(e){this._internalRoot=e}Tc.prototype.render=ym.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));Sc(e,t,null,null)};Tc.prototype.unmount=ym.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;is(function(){Sc(null,e,null,null)}),t[Cr]=null}};function Tc(e){this._internalRoot=e}Tc.prototype.unstable_scheduleHydration=function(e){if(e){var t=U1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lr.length&&t!==0&&t<Lr[n].priority;n++);Lr.splice(n,0,e),n===0&&W1(e)}};function xm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Yv(){}function V2(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Wu(o);s.call(c)}}var o=db(t,r,e,0,null,!1,!1,"",Yv);return e._reactRootContainer=o,e[Cr]=o.current,ja(e.nodeType===8?e.parentNode:e),is(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=Wu(l);a.call(c)}}var l=gm(e,0,!1,null,null,!1,!1,"",Yv);return e._reactRootContainer=l,e[Cr]=l.current,ja(e.nodeType===8?e.parentNode:e),is(function(){Sc(t,l,n,r)}),l}function Ec(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=Wu(o);a.call(l)}}Sc(t,o,e,i)}else o=V2(n,t,e,i,r);return Wu(o)}z1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Zo(t.pendingLanes);n!==0&&(Lh(t,n|1),qt(t,et()),!(ke&6)&&(xo=et()+500,wi()))}break;case 13:is(function(){var r=kr(e,1);if(r!==null){var i=Dt();In(r,e,1,i)}}),vm(e,1)}};$h=function(e){if(e.tag===13){var t=kr(e,134217728);if(t!==null){var n=Dt();In(t,e,134217728,n)}vm(e,134217728)}};V1=function(e){if(e.tag===13){var t=si(e),n=kr(e,t);if(n!==null){var r=Dt();In(n,e,t,r)}vm(e,t)}};U1=function(){return Ee};H1=function(e,t){var n=Ee;try{return Ee=e,t()}finally{Ee=n}};Mf=function(e,t,n){switch(t){case"input":if(_f(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=vc(r);if(!i)throw Error(q(90));b1(r),_f(r,i)}}}break;case"textarea":k1(e,n);break;case"select":t=n.value,t!=null&&Ws(e,!!n.multiple,t,!1)}};R1=fm;P1=is;var U2={usingClientEntryPoint:!1,Events:[sl,Os,vc,j1,A1,fm]},qo={findFiberByHostInstance:Di,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},H2={bundleType:qo.bundleType,version:qo.version,rendererPackageName:qo.rendererPackageName,rendererConfig:qo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Er.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=D1(e),e===null?null:e.stateNode},findFiberByHostInstance:qo.findFiberByHostInstance||z2,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 Il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Il.isDisabled&&Il.supportsFiber)try{pc=Il.inject(H2),Jn=Il}catch{}}rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U2;rn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!xm(t))throw Error(q(200));return B2(e,t,null,n)};rn.createRoot=function(e,t){if(!xm(e))throw Error(q(299));var n=!1,r="",i=fb;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=gm(e,1,!1,null,null,n,!1,r,i),e[Cr]=t.current,ja(e.nodeType===8?e.parentNode:e),new ym(t)};rn.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(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=D1(t),e=e===null?null:e.stateNode,e};rn.flushSync=function(e){return is(e)};rn.hydrate=function(e,t,n){if(!_c(t))throw Error(q(200));return Ec(null,e,t,!0,n)};rn.hydrateRoot=function(e,t,n){if(!xm(e))throw Error(q(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=fb;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=db(t,null,e,1,n??null,i,!1,s,o),e[Cr]=t.current,ja(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 Tc(t)};rn.render=function(e,t,n){if(!_c(t))throw Error(q(200));return Ec(null,e,t,!1,n)};rn.unmountComponentAtNode=function(e){if(!_c(e))throw Error(q(40));return e._reactRootContainer?(is(function(){Ec(null,null,e,!1,function(){e._reactRootContainer=null,e[Cr]=null})}),!0):!1};rn.unstable_batchedUpdates=fm;rn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!_c(n))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return Ec(e,t,n,!1,r)};rn.version="18.3.1-next-f1338f8080-20240426";function pb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(pb)}catch(e){console.error(e)}}pb(),p1.exports=rn;var hb=p1.exports;const W2=_r(hb);var mb,Qv=hb;mb=Qv.createRoot,Qv.hydrateRoot;const q2="@alfatech/livechat",G2="v2025.01.14.2",Y2="module",Q2="https://api-live.alfatek.dev",K2="wss://api-live.alfatek.dev",X2=["dist","README.md","component/chatier.js"],Z2="dist/widget.js",J2={dev:"vite",dev2:"vite --config vite.config.2.ts",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},eE={"@headlessui/react":"^2.2.2","@tailwindcss/vite":"^4.1.4","@tanstack/react-query":"^5.59.20",classnames:"^2.5.1",dayjs:"^1.11.13",formik:"^2.4.6","framer-motion":"^12.7.4","lucide-react":"^0.511.0",react:"^18.3.1","react-dom":"^18.3.1","react-dropzone":"^14.3.8","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},tE={"@biomejs/biome":"^1.8.3","@types/node":"^22.5.4","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react-swc":"^3.5.0",globals:"^15.9.0",husky:"^9.1.5",tailwindcss:"^4.1.4",typescript:"^5.5.3",vite:"^5.4.1"},gb={name:q2,private:!1,version:G2,type:Y2,apiURL:Q2,wsURL:K2,files:X2,main:Z2,scripts:J2,dependencies:eE,devDependencies:tE,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},vb=gb.apiURL,nE=gb.wsURL,rE=e=>[{limit:Number.parseInt(e.headers.get("X-Ratelimit-Limit")||"0"),remaining:Number.parseInt(e.headers.get("X-Ratelimit-Remaining")||"0"),reset:Number.parseInt(e.headers.get("X-Ratelimit-Reset")||"0"),retryAfter:Number.parseInt(e.headers.get("Retry-After")||"0")},429],iE=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],sE={429:rE,404:iE};async function jr(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${vb}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>new Response(null,{status:500}));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{}const o=sE[r.status];return o?o(r,s):[{},r.status]}const i=r.headers.get("Content-Type");return i&&i.includes("application/json")?[await r.json(),r.status]:[await r.text(),r.status]}const Ln=e=>[200,201,204].includes(e),oE=(e,{arrayWithBrackets:t=!1,arrayWithBracketAndIndex:n=!0}={})=>{const r=new FormData;for(const[i,s]of Object.entries(e)){if(Array.isArray(s)){for(const o in s)t?r.append(`${i}[]`,s[o]):n?r.append(`${i}[${o}]`,s[o]):r.append(i,s[o]);continue}typeof s<"u"&&s!==null&&r.append(i,s)}return r};var Po=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ss=typeof window>"u"||"Deno"in globalThis;function pn(){}function aE(e,t){return typeof e=="function"?e(t):e}function fp(e){return typeof e=="number"&&e>=0&&e!==1/0}function yb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Xs(e,t){return typeof e=="function"?e(t):e}function Mn(e,t){return typeof e=="function"?e(t):e}function Kv(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==wm(o,t.options))return!1}else if(!Ia(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function Xv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(os(t.options.mutationKey)!==os(s))return!1}else if(!Ia(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function wm(e,t){return((t==null?void 0:t.queryKeyHashFn)||os)(e)}function os(e){return JSON.stringify(e,(t,n)=>pp(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ia(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Ia(e[n],t[n])):!1}function xb(e,t){if(e===t)return e;const n=Zv(e)&&Zv(t);if(n||pp(e)&&pp(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let c=0;c<o;c++){const d=n?c:s[c];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=xb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function qu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Zv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function pp(e){if(!Jv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Jv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Jv(e){return Object.prototype.toString.call(e)==="[object Object]"}function lE(e){return new Promise(t=>{setTimeout(t,e)})}function hp(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?xb(e,t):t}function uE(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function cE(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var bm=Symbol();function wb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===bm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var zi,Br,Js,qx,dE=(qx=class extends Po{constructor(){super();ue(this,zi);ue(this,Br);ue(this,Js);ee(this,Js,t=>{if(!ss&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){E(this,Br)||this.setEventListener(E(this,Js))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,Br))==null||t.call(this),ee(this,Br,void 0))}setEventListener(t){var n;ee(this,Js,t),(n=E(this,Br))==null||n.call(this),ee(this,Br,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){E(this,zi)!==t&&(ee(this,zi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof E(this,zi)=="boolean"?E(this,zi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},zi=new WeakMap,Br=new WeakMap,Js=new WeakMap,qx),Cm=new dE,eo,zr,to,Gx,fE=(Gx=class extends Po{constructor(){super();ue(this,eo,!0);ue(this,zr);ue(this,to);ee(this,to,t=>{if(!ss&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){E(this,zr)||this.setEventListener(E(this,to))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,zr))==null||t.call(this),ee(this,zr,void 0))}setEventListener(t){var n;ee(this,to,t),(n=E(this,zr))==null||n.call(this),ee(this,zr,t(this.setOnline.bind(this)))}setOnline(t){E(this,eo)!==t&&(ee(this,eo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return E(this,eo)}},eo=new WeakMap,zr=new WeakMap,to=new WeakMap,Gx),Gu=new fE;function mp(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function pE(e){return Math.min(1e3*2**e,3e4)}function bb(e){return(e??"online")==="online"?Gu.isOnline():!0}var Cb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Id(e){return e instanceof Cb}function kb(e){let t=!1,n=0,r=!1,i;const s=mp(),o=g=>{var b;r||(f(new Cb(g)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Cm.isFocused()&&(e.networkMode==="always"||Gu.isOnline())&&e.canRun(),d=()=>bb(e.networkMode)&&e.canRun(),u=g=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,g),i==null||i(),s.resolve(g))},f=g=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,g),i==null||i(),s.reject(g))},m=()=>new Promise(g=>{var b;i=x=>{(r||c())&&g(x)},(b=e.onPause)==null||b.call(e)}).then(()=>{var g;i=void 0,r||(g=e.onContinue)==null||g.call(e)}),h=()=>{if(r)return;let g;const b=n===0?e.initialPromise:void 0;try{g=b??e.fn()}catch(x){g=Promise.reject(x)}Promise.resolve(g).then(u).catch(x=>{var T;if(r)return;const y=e.retry??(ss?0:3),w=e.retryDelay??pE,j=typeof w=="function"?w(n,x):w,k=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,x);if(t||!k){f(x);return}n++,(T=e.onFail)==null||T.call(e,n,x),lE(j).then(()=>c()?void 0:m()).then(()=>{t?f(x):h()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),s)}}function hE(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var ot=hE(),Vi,Yx,Sb=(Yx=class{constructor(){ue(this,Vi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fp(this.gcTime)&&ee(this,Vi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ss?1/0:5*60*1e3))}clearGcTimeout(){E(this,Vi)&&(clearTimeout(E(this,Vi)),ee(this,Vi,void 0))}},Vi=new WeakMap,Yx),no,ro,fn,Tt,Za,Ui,An,dr,Qx,mE=(Qx=class extends Sb{constructor(t){super();ue(this,An);ue(this,no);ue(this,ro);ue(this,fn);ue(this,Tt);ue(this,Za);ue(this,Ui);ee(this,Ui,!1),ee(this,Za,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,fn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,no,gE(this.options)),this.state=t.state??E(this,no),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=E(this,Tt))==null?void 0:t.promise}setOptions(t){this.options={...E(this,Za),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,fn).remove(this)}setData(t,n){const r=hp(this.state.data,t,this.options);return ge(this,An,dr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ge(this,An,dr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=E(this,Tt))==null?void 0:r.promise;return(i=E(this,Tt))==null||i.cancel(t),n?n.then(pn).catch(pn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,no))}isActive(){return this.observers.some(t=>Mn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===bm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!yb(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,Tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,Tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),E(this,fn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(E(this,Tt)&&(E(this,Ui)?E(this,Tt).cancel({revert:!0}):E(this,Tt).cancelRetry()),this.scheduleGc()),E(this,fn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ge(this,An,dr).call(this,{type:"invalidate"})}fetch(t,n){var l,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(E(this,Tt))return E(this,Tt).continueRetry(),E(this,Tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(f=>f.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(ee(this,Ui,!0),r.signal)})},s=()=>{const u=wb(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),ee(this,Ui,!1),this.options.persister?this.options.persister(u,f,this):u(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),ee(this,ro,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&ge(this,An,dr).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=u=>{var f,m,h,g;Id(u)&&u.silent||ge(this,An,dr).call(this,{type:"error",error:u}),Id(u)||((m=(f=E(this,fn).config).onError)==null||m.call(f,u,this),(g=(h=E(this,fn).config).onSettled)==null||g.call(h,this.state.data,u,this)),this.scheduleGc()};return ee(this,Tt,kb({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var f,m,h,g;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(b){a(b);return}(m=(f=E(this,fn).config).onSuccess)==null||m.call(f,u,this),(g=(h=E(this,fn).config).onSettled)==null||g.call(h,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,f)=>{ge(this,An,dr).call(this,{type:"failed",failureCount:u,error:f})},onPause:()=>{ge(this,An,dr).call(this,{type:"pause"})},onContinue:()=>{ge(this,An,dr).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),E(this,Tt).start()}},no=new WeakMap,ro=new WeakMap,fn=new WeakMap,Tt=new WeakMap,Za=new WeakMap,Ui=new WeakMap,An=new WeakSet,dr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Tb(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Id(i)&&i.revert&&E(this,ro)?{...E(this,ro),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ot.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),E(this,fn).notify({query:this,type:"updated",action:t})})},Qx);function Tb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function gE(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Gn,Kx,vE=(Kx=class extends Po{constructor(t={}){super();ue(this,Gn);this.config=t,ee(this,Gn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??wm(i,n);let o=this.get(s);return o||(o=new mE({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){E(this,Gn).has(t.queryHash)||(E(this,Gn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=E(this,Gn).get(t.queryHash);n&&(t.destroy(),n===t&&E(this,Gn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ot.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return E(this,Gn).get(t)}getAll(){return[...E(this,Gn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Kv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Kv(t,r)):n}notify(t){ot.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ot.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ot.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Gn=new WeakMap,Kx),Yn,Rt,Hi,Qn,Mr,Xx,yE=(Xx=class extends Sb{constructor(t){super();ue(this,Qn);ue(this,Yn);ue(this,Rt);ue(this,Hi);this.mutationId=t.mutationId,ee(this,Rt,t.mutationCache),ee(this,Yn,[]),this.state=t.state||_b(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){E(this,Yn).includes(t)||(E(this,Yn).push(t),this.clearGcTimeout(),E(this,Rt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,Yn,E(this,Yn).filter(n=>n!==t)),this.scheduleGc(),E(this,Rt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){E(this,Yn).length||(this.state.status==="pending"?this.scheduleGc():E(this,Rt).remove(this))}continue(){var t;return((t=E(this,Hi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,d,u,f,m,h,g,b,x,y,w,j,k,T,A;ee(this,Hi,kb({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,F)=>{ge(this,Qn,Mr).call(this,{type:"failed",failureCount:S,error:F})},onPause:()=>{ge(this,Qn,Mr).call(this,{type:"pause"})},onContinue:()=>{ge(this,Qn,Mr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,Rt).canRun(this)}));const n=this.state.status==="pending",r=!E(this,Hi).canStart();try{if(!n){ge(this,Qn,Mr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=E(this,Rt).config).onMutate)==null?void 0:s.call(i,t,this));const F=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));F!==this.state.context&&ge(this,Qn,Mr).call(this,{type:"pending",context:F,variables:t,isPaused:r})}const S=await E(this,Hi).start();return await((c=(l=E(this,Rt).config).onSuccess)==null?void 0:c.call(l,S,t,this.state.context,this)),await((u=(d=this.options).onSuccess)==null?void 0:u.call(d,S,t,this.state.context)),await((m=(f=E(this,Rt).config).onSettled)==null?void 0:m.call(f,S,null,this.state.variables,this.state.context,this)),await((g=(h=this.options).onSettled)==null?void 0:g.call(h,S,null,t,this.state.context)),ge(this,Qn,Mr).call(this,{type:"success",data:S}),S}catch(S){try{throw await((x=(b=E(this,Rt).config).onError)==null?void 0:x.call(b,S,t,this.state.context,this)),await((w=(y=this.options).onError)==null?void 0:w.call(y,S,t,this.state.context)),await((k=(j=E(this,Rt).config).onSettled)==null?void 0:k.call(j,void 0,S,this.state.variables,this.state.context,this)),await((A=(T=this.options).onSettled)==null?void 0:A.call(T,void 0,S,t,this.state.context)),S}finally{ge(this,Qn,Mr).call(this,{type:"error",error:S})}}finally{E(this,Rt).runNext(this)}}},Yn=new WeakMap,Rt=new WeakMap,Hi=new WeakMap,Qn=new WeakSet,Mr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ot.batch(()=>{E(this,Yn).forEach(r=>{r.onMutationUpdate(t)}),E(this,Rt).notify({mutation:this,type:"updated",action:t})})},Xx);function _b(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Kt,Ja,Zx,xE=(Zx=class extends Po{constructor(t={}){super();ue(this,Kt);ue(this,Ja);this.config=t,ee(this,Kt,new Map),ee(this,Ja,Date.now())}build(t,n,r){const i=new yE({mutationCache:this,mutationId:++wl(this,Ja)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Ll(t),r=E(this,Kt).get(n)??[];r.push(t),E(this,Kt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Ll(t);if(E(this,Kt).has(n)){const i=(r=E(this,Kt).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?E(this,Kt).delete(n):E(this,Kt).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=E(this,Kt).get(Ll(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=E(this,Kt).get(Ll(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){ot.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...E(this,Kt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Xv(n,r))}findAll(t={}){return this.getAll().filter(n=>Xv(t,n))}notify(t){ot.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ot.batch(()=>Promise.all(t.map(n=>n.continue().catch(pn))))}},Kt=new WeakMap,Ja=new WeakMap,Zx);function Ll(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function ey(e){return{onFetch:(t,n)=>{var d,u,f,m,h;const r=t.options,i=(f=(u=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:u.fetchMore)==null?void 0:f.direction,s=((m=t.state.data)==null?void 0:m.pages)||[],o=((h=t.state.data)==null?void 0:h.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},x=wb(t.options,t.fetchOptions),y=async(w,j,k)=>{if(g)return Promise.reject();if(j==null&&w.pages.length)return Promise.resolve(w);const T={queryKey:t.queryKey,pageParam:j,direction:k?"backward":"forward",meta:t.options.meta};b(T);const A=await x(T),{maxPages:S}=t.options,F=k?cE:uE;return{pages:F(w.pages,A,S),pageParams:F(w.pageParams,j,S)}};if(i&&s.length){const w=i==="backward",j=w?wE:ty,k={pages:s,pageParams:o},T=j(r,k);a=await y(k,T,w)}else{const w=e??s.length;do{const j=l===0?o[0]??r.initialPageParam:ty(r,a);if(l>0&&j==null)break;a=await y(a,j),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var g,b;return(b=(g=t.options).persister)==null?void 0:b.call(g,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function ty(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function wE(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ge,Vr,Ur,io,so,Hr,oo,ao,Jx,bE=(Jx=class{constructor(e={}){ue(this,Ge);ue(this,Vr);ue(this,Ur);ue(this,io);ue(this,so);ue(this,Hr);ue(this,oo);ue(this,ao);ee(this,Ge,e.queryCache||new vE),ee(this,Vr,e.mutationCache||new xE),ee(this,Ur,e.defaultOptions||{}),ee(this,io,new Map),ee(this,so,new Map),ee(this,Hr,0)}mount(){wl(this,Hr)._++,E(this,Hr)===1&&(ee(this,oo,Cm.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Ge).onFocus())})),ee(this,ao,Gu.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Ge).onOnline())})))}unmount(){var e,t;wl(this,Hr)._--,E(this,Hr)===0&&((e=E(this,oo))==null||e.call(this),ee(this,oo,void 0),(t=E(this,ao))==null||t.call(this),ee(this,ao,void 0))}isFetching(e){return E(this,Ge).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return E(this,Vr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,Ge).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=E(this,Ge).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Xs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return E(this,Ge).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=E(this,Ge).get(r.queryHash),s=i==null?void 0:i.state.data,o=aE(t,s);if(o!==void 0)return E(this,Ge).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return ot.batch(()=>E(this,Ge).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,Ge).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=E(this,Ge);ot.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=E(this,Ge),r={type:"active",...e};return ot.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ot.batch(()=>E(this,Ge).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(pn).catch(pn)}invalidateQueries(e,t={}){return ot.batch(()=>{if(E(this,Ge).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ot.batch(()=>E(this,Ge).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(pn)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(pn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=E(this,Ge).build(this,t);return n.isStaleByTime(Xs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(pn).catch(pn)}fetchInfiniteQuery(e){return e.behavior=ey(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(pn).catch(pn)}ensureInfiniteQueryData(e){return e.behavior=ey(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Gu.isOnline()?E(this,Vr).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,Ge)}getMutationCache(){return E(this,Vr)}getDefaultOptions(){return E(this,Ur)}setDefaultOptions(e){ee(this,Ur,e)}setQueryDefaults(e,t){E(this,io).set(os(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...E(this,io).values()],n={};return t.forEach(r=>{Ia(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){E(this,so).set(os(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...E(this,so).values()];let n={};return t.forEach(r=>{Ia(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...E(this,Ur).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===bm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...E(this,Ur).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(this,Ge).clear(),E(this,Vr).clear()}},Ge=new WeakMap,Vr=new WeakMap,Ur=new WeakMap,io=new WeakMap,so=new WeakMap,Hr=new WeakMap,oo=new WeakMap,ao=new WeakMap,Jx),Lt,we,el,Pt,Wi,lo,Wr,Kn,tl,uo,co,qi,Gi,qr,fo,_e,ea,gp,vp,yp,xp,wp,bp,Cp,Eb,e1,CE=(e1=class extends Po{constructor(t,n){super();ue(this,_e);ue(this,Lt);ue(this,we);ue(this,el);ue(this,Pt);ue(this,Wi);ue(this,lo);ue(this,Wr);ue(this,Kn);ue(this,tl);ue(this,uo);ue(this,co);ue(this,qi);ue(this,Gi);ue(this,qr);ue(this,fo,new Set);this.options=n,ee(this,Lt,t),ee(this,Kn,null),ee(this,Wr,mp()),this.options.experimental_prefetchInRender||E(this,Wr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,we).addObserver(this),ny(E(this,we),this.options)?ge(this,_e,ea).call(this):this.updateResult(),ge(this,_e,xp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return kp(E(this,we),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return kp(E(this,we),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ge(this,_e,wp).call(this),ge(this,_e,bp).call(this),E(this,we).removeObserver(this)}setOptions(t,n){const r=this.options,i=E(this,we);if(this.options=E(this,Lt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Mn(this.options.enabled,E(this,we))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ge(this,_e,Cp).call(this),E(this,we).setOptions(this.options),r._defaulted&&!qu(this.options,r)&&E(this,Lt).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,we),observer:this});const s=this.hasListeners();s&&ry(E(this,we),i,this.options,r)&&ge(this,_e,ea).call(this),this.updateResult(n),s&&(E(this,we)!==i||Mn(this.options.enabled,E(this,we))!==Mn(r.enabled,E(this,we))||Xs(this.options.staleTime,E(this,we))!==Xs(r.staleTime,E(this,we)))&&ge(this,_e,gp).call(this);const o=ge(this,_e,vp).call(this);s&&(E(this,we)!==i||Mn(this.options.enabled,E(this,we))!==Mn(r.enabled,E(this,we))||o!==E(this,qr))&&ge(this,_e,yp).call(this,o)}getOptimisticResult(t){const n=E(this,Lt).getQueryCache().build(E(this,Lt),t),r=this.createResult(n,t);return SE(this,r)&&(ee(this,Pt,r),ee(this,lo,this.options),ee(this,Wi,E(this,we).state)),r}getCurrentResult(){return E(this,Pt)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){E(this,fo).add(t)}getCurrentQuery(){return E(this,we)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=E(this,Lt).defaultQueryOptions(t),r=E(this,Lt).getQueryCache().build(E(this,Lt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ge(this,_e,ea).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,Pt)))}createResult(t,n){var S;const r=E(this,we),i=this.options,s=E(this,Pt),o=E(this,Wi),a=E(this,lo),c=t!==r?t.state:E(this,el),{state:d}=t;let u={...d},f=!1,m;if(n._optimisticResults){const F=this.hasListeners(),N=!F&&ny(t,n),O=F&&ry(t,r,n,i);(N||O)&&(u={...u,...Tb(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:g,status:b}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===E(this,tl))m=E(this,uo);else try{ee(this,tl,n.select),m=n.select(u.data),m=hp(s==null?void 0:s.data,m,n),ee(this,uo,m),ee(this,Kn,null)}catch(F){ee(this,Kn,F)}else m=u.data;if(n.placeholderData!==void 0&&m===void 0&&b==="pending"){let F;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))F=s.data;else if(F=typeof n.placeholderData=="function"?n.placeholderData((S=E(this,co))==null?void 0:S.state.data,E(this,co)):n.placeholderData,n.select&&F!==void 0)try{F=n.select(F),ee(this,Kn,null)}catch(N){ee(this,Kn,N)}F!==void 0&&(b="success",m=hp(s==null?void 0:s.data,F,n),f=!0)}E(this,Kn)&&(h=E(this,Kn),m=E(this,uo),g=Date.now(),b="error");const x=u.fetchStatus==="fetching",y=b==="pending",w=b==="error",j=y&&x,k=m!==void 0,A={status:b,fetchStatus:u.fetchStatus,isPending:y,isSuccess:b==="success",isError:w,isInitialLoading:j,isLoading:j,data:m,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:g,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:x,isRefetching:x&&!y,isLoadingError:w&&!k,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&k,isStale:km(t,n),refetch:this.refetch,promise:E(this,Wr)};if(this.options.experimental_prefetchInRender){const F=Q=>{A.status==="error"?Q.reject(A.error):A.data!==void 0&&Q.resolve(A.data)},N=()=>{const Q=ee(this,Wr,A.promise=mp());F(Q)},O=E(this,Wr);switch(O.status){case"pending":t.queryHash===r.queryHash&&F(O);break;case"fulfilled":(A.status==="error"||A.data!==O.value)&&N();break;case"rejected":(A.status!=="error"||A.error!==O.reason)&&N();break}}return A}updateResult(t){const n=E(this,Pt),r=this.createResult(E(this,we),this.options);if(ee(this,Wi,E(this,we).state),ee(this,lo,this.options),E(this,Wi).data!==void 0&&ee(this,co,E(this,we)),qu(r,n))return;ee(this,Pt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!E(this,fo).size)return!0;const l=new Set(a??E(this,fo));return this.options.throwOnError&&l.add("error"),Object.keys(E(this,Pt)).some(c=>{const d=c;return E(this,Pt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),ge(this,_e,Eb).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ge(this,_e,xp).call(this)}},Lt=new WeakMap,we=new WeakMap,el=new WeakMap,Pt=new WeakMap,Wi=new WeakMap,lo=new WeakMap,Wr=new WeakMap,Kn=new WeakMap,tl=new WeakMap,uo=new WeakMap,co=new WeakMap,qi=new WeakMap,Gi=new WeakMap,qr=new WeakMap,fo=new WeakMap,_e=new WeakSet,ea=function(t){ge(this,_e,Cp).call(this);let n=E(this,we).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(pn)),n},gp=function(){ge(this,_e,wp).call(this);const t=Xs(this.options.staleTime,E(this,we));if(ss||E(this,Pt).isStale||!fp(t))return;const r=yb(E(this,Pt).dataUpdatedAt,t)+1;ee(this,qi,setTimeout(()=>{E(this,Pt).isStale||this.updateResult()},r))},vp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,we)):this.options.refetchInterval)??!1},yp=function(t){ge(this,_e,bp).call(this),ee(this,qr,t),!(ss||Mn(this.options.enabled,E(this,we))===!1||!fp(E(this,qr))||E(this,qr)===0)&&ee(this,Gi,setInterval(()=>{(this.options.refetchIntervalInBackground||Cm.isFocused())&&ge(this,_e,ea).call(this)},E(this,qr)))},xp=function(){ge(this,_e,gp).call(this),ge(this,_e,yp).call(this,ge(this,_e,vp).call(this))},wp=function(){E(this,qi)&&(clearTimeout(E(this,qi)),ee(this,qi,void 0))},bp=function(){E(this,Gi)&&(clearInterval(E(this,Gi)),ee(this,Gi,void 0))},Cp=function(){const t=E(this,Lt).getQueryCache().build(E(this,Lt),this.options);if(t===E(this,we))return;const n=E(this,we);ee(this,we,t),ee(this,el,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Eb=function(t){ot.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(E(this,Pt))}),E(this,Lt).getQueryCache().notify({query:E(this,we),type:"observerResultsUpdated"})})},e1);function kE(e,t){return Mn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ny(e,t){return kE(e,t)||e.state.data!==void 0&&kp(e,t,t.refetchOnMount)}function kp(e,t,n){if(Mn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&km(e,t)}return!1}function ry(e,t,n,r){return(e!==t||Mn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&km(e,n)}function km(e,t){return Mn(t.enabled,e)!==!1&&e.isStaleByTime(Xs(t.staleTime,e))}function SE(e,t){return!qu(e.getCurrentResult(),t)}var Gr,Yr,$t,mr,wr,uu,Sp,t1,TE=(t1=class extends Po{constructor(t,n){super();ue(this,wr);ue(this,Gr);ue(this,Yr);ue(this,$t);ue(this,mr);ee(this,Gr,t),this.setOptions(n),this.bindMethods(),ge(this,wr,uu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=E(this,Gr).defaultMutationOptions(t),qu(this.options,n)||E(this,Gr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:E(this,$t),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&os(n.mutationKey)!==os(this.options.mutationKey)?this.reset():((r=E(this,$t))==null?void 0:r.state.status)==="pending"&&E(this,$t).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=E(this,$t))==null||t.removeObserver(this)}onMutationUpdate(t){ge(this,wr,uu).call(this),ge(this,wr,Sp).call(this,t)}getCurrentResult(){return E(this,Yr)}reset(){var t;(t=E(this,$t))==null||t.removeObserver(this),ee(this,$t,void 0),ge(this,wr,uu).call(this),ge(this,wr,Sp).call(this)}mutate(t,n){var r;return ee(this,mr,n),(r=E(this,$t))==null||r.removeObserver(this),ee(this,$t,E(this,Gr).getMutationCache().build(E(this,Gr),this.options)),E(this,$t).addObserver(this),E(this,$t).execute(t)}},Gr=new WeakMap,Yr=new WeakMap,$t=new WeakMap,mr=new WeakMap,wr=new WeakSet,uu=function(){var n;const t=((n=E(this,$t))==null?void 0:n.state)??_b();ee(this,Yr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Sp=function(t){ot.batch(()=>{var n,r,i,s,o,a,l,c;if(E(this,mr)&&this.hasListeners()){const d=E(this,Yr).variables,u=E(this,Yr).context;(t==null?void 0:t.type)==="success"?((r=(n=E(this,mr)).onSuccess)==null||r.call(n,t.data,d,u),(s=(i=E(this,mr)).onSettled)==null||s.call(i,t.data,null,d,u)):(t==null?void 0:t.type)==="error"&&((a=(o=E(this,mr)).onError)==null||a.call(o,t.error,d,u),(c=(l=E(this,mr)).onSettled)==null||c.call(l,void 0,t.error,d,u))}this.listeners.forEach(d=>{d(E(this,Yr))})})},t1),jb=v.createContext(void 0),Ab=e=>{const t=v.useContext(jb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_E=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(jb.Provider,{value:e,children:t})),Rb=v.createContext(!1),EE=()=>v.useContext(Rb);Rb.Provider;function jE(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var AE=v.createContext(jE()),RE=()=>v.useContext(AE);function Pb(e,t){return typeof e=="function"?e(...t):!!e}function Tp(){}var PE=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},OE=e=>{v.useEffect(()=>{e.clearReset()},[e])},ME=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&Pb(n,[e.error,r]),DE=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},NE=(e,t)=>e.isLoading&&e.isFetching&&!t,FE=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,iy=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function IE(e,t,n){var d,u,f,m,h;const r=Ab(),i=EE(),s=RE(),o=r.defaultQueryOptions(e);(u=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||u.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",DE(o),PE(o,s),OE(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(g=>{const b=i?Tp:l.subscribe(ot.batchCalls(g));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),FE(o,c))throw iy(o,l,s);if(ME({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((m=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||m.call(f,o,c),o.experimental_prefetchInRender&&!ss&&NE(c,i)){const g=a?iy(o,l,s):(h=r.getQueryCache().get(o.queryHash))==null?void 0:h.promise;g==null||g.catch(Tp).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function Ob(e,t){return IE(e,CE)}function Sm(e,t){const n=Ab(),[r]=v.useState(()=>new TE(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(ot.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(Tp)},[r]);if(i.error&&Pb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const LE=(e,t)=>Ob({queryKey:["widgets",e,t],queryFn:()=>$E(e,t),retry:!1,throwOnError:!1}),$E=async(e,t)=>{const n=`widgets/with-link/${e}${t?`?device_id=${t}`:""}`,[r,i]=await jr(n);if(i===204)throw new Error("User is banned");return r};var C=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.MessageAgentBackground="widget_message_agent_background",e.MessageAgentText="widget_message_agent_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e.CloseButtonBackground="widget_close_button_background",e.CloseButtonText="widget_close_button_text",e.CloseButtonHover="widget_close_button_hover",e.IconColor="widget_icon_color",e.IconBackground="widget_icon_background",e.ErrorBackground="widget_error_background",e.ErrorText="widget_error_text",e.ErrorBorder="widget_error_border",e.SuccessBackground="widget_success_background",e.SuccessText="widget_success_text",e.SuccessBorder="widget_success_border",e.WarningBackground="widget_warning_background",e.WarningText="widget_warning_text",e.WarningBorder="widget_warning_border",e.LinkColor="widget_link_color",e.LinkHoverColor="widget_link_hover_color",e.DividerColor="widget_divider_color",e.ShadowColor="widget_shadow_color",e.StarActiveColor="widget_star_active_color",e.StarInactiveColor="widget_star_inactive_color",e.ModalOverlayColor="widget_modal_overlay_color",e.ChatCloseConfirmText="widget_chat_close_confirm_text",e.RatingHeaderBackground="widget_rating_header_background",e.RatingHeaderText="widget_rating_header_text",e.RatingSuccessBackground="widget_rating_success_background",e.RatingSuccessText="widget_rating_success_text",e.RatingRateConversationText="widget_rating_rate_conversation_text",e))(C||{}),ne=(e=>(e.TooltipDefault="tooltip_default",e.TooltipActive="tooltip_active",e.CloseButtonAria="close_button_aria",e.MessagePlaceholder="message_placeholder",e.FileUploadDisabled="file_upload_disabled",e.NewMessagesNotification="new_messages_notification",e.ChatCloseConfirm="chat_close_confirm",e.ChatCloseWarning="chat_close_warning",e.ChatSettings="chat_settings",e.ChatEndConversation="chat_end_conversation",e.CancelAction="cancel_action",e.CloseAction="close_action",e.QuickActions="quick_actions",e.GreetingStartChat="greeting_start_chat",e.RateLimitMessage="rate_limit_message",e.RatingHeaderEvaluate="rating_header_evaluate",e.RatingHeaderThanks="rating_header_thanks",e.RatingDescription="rating_description",e.RatingRateConversation="rating_rate_conversation",e.RatingComment="rating_comment",e.RatingCommentPlaceholder="rating_comment_placeholder",e.RatingSubmit="rating_submit",e.RatingNewConversation="rating_new_conversation",e.RatingThankYouTitle="rating_thank_you_title",e.RatingThankYouDescription="rating_thank_you_description",e.RatingCountdown="rating_countdown",e.RatingMinimumError="rating_minimum_error",e.RatingYourScore="rating_your_score",e.PoweredBy="powered_by",e))(ne||{});function BE(e){return!!e&&typeof e.public_id=="string"&&typeof e.link_id=="string"&&typeof e.name=="string"&&typeof e.is_browser_notification_enabled=="boolean"&&typeof e.is_hidden_on_offline=="boolean"&&typeof e.is_upload_disabled=="boolean"}/**
|
|
40
|
+
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function Md(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Zf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var wE=typeof WeakMap=="function"?WeakMap:Map;function Bw(e,t,n){n=xr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vu||(Vu=!0,lp=r),Zf(e,t)},n}function zw(e,t,n){n=xr(-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(){Zf(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Zf(e,t),typeof r!="function"&&(ii===null?ii=new Set([this]):ii.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Pv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new wE;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=DE.bind(null,e,t,n),t.then(e,e))}function Ov(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 Mv(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=xr(-1,1),t.tag=2,ri(n,t,1))),n.lanes|=1),e)}var bE=Er.ReactCurrentOwner,Ut=!1;function Ot(e,t,n,r){t.child=e===null?gw(t,null,n,r):vo(t,e.child,n,r)}function Dv(e,t,n,r,i){n=n.render;var s=t.ref;return Ks(t,i),r=im(e,t,n,r,s,i),n=sm(),e!==null&&!Ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Sr(e,t,i)):(Le&&n&&qh(t),t.flags|=1,Ot(e,t,r,i),t.child)}function Nv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!mm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Vw(e,t,s,r,i)):(e=uu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:ja,n(o,r)&&e.ref===t.ref)return Sr(e,t,i)}return t.flags|=1,e=oi(s,r),e.ref=t.ref,e.return=t,t.child=e}function Vw(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(ja(s,r)&&e.ref===t.ref)if(Ut=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Ut=!0);else return t.lanes=e.lanes,Sr(e,t,i)}return Jf(e,t,n,r,i)}function Uw(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oe($s,Xt),Xt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oe($s,Xt),Xt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Oe($s,Xt),Xt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Oe($s,Xt),Xt|=r;return Ot(e,t,i,n),t.child}function Hw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Jf(e,t,n,r,i){var s=Wt(n)?es:At.current;return s=mo(t,s),Ks(t,i),n=im(e,t,n,r,s,i),r=sm(),e!==null&&!Ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Sr(e,t,i)):(Le&&r&&qh(t),t.flags|=1,Ot(e,t,n,i),t.child)}function Fv(e,t,n,r,i){if(Wt(n)){var s=!0;Ou(t)}else s=!1;if(Ks(t,i),t.stateNode===null)ou(e,t),$w(t,n,r),Xf(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=wn(c):(c=Wt(n)?es:At.current,c=mo(t,c));var d=n.getDerivedStateFromProps,u=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Rv(t,o,r,c),Fr=!1;var f=t.memoizedState;o.state=f,Iu(t,r,o,i),l=t.memoizedState,a!==r||f!==l||Ht.current||Fr?(typeof d=="function"&&(Kf(t,n,d,r),l=t.memoizedState),(a=Fr||Av(t,n,a,r,f,l,c))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,yw(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:En(t.type,a),o.props=c,u=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=wn(l):(l=Wt(n)?es:At.current,l=mo(t,l));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||f!==l)&&Rv(t,o,r,l),Fr=!1,f=t.memoizedState,o.state=f,Iu(t,r,o,i);var h=t.memoizedState;a!==u||f!==h||Ht.current||Fr?(typeof m=="function"&&(Kf(t,n,m,r),h=t.memoizedState),(c=Fr||Av(t,n,c,r,f,h,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,h,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,h,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ep(e,t,n,r,s,i)}function ep(e,t,n,r,i,s){Hw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&bv(t,n,!1),Sr(e,t,s);r=t.stateNode,bE.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=vo(t,e.child,null,s),t.child=vo(t,null,a,s)):Ot(e,t,a,s),t.memoizedState=r.state,i&&bv(t,n,!0),t.child}function Ww(e){var t=e.stateNode;t.pendingContext?wv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wv(e,t.context,!1),em(e,t.containerInfo)}function Iv(e,t,n,r,i){return go(),Yh(i),t.flags|=256,Ot(e,t,n,r),t.child}var tp={dehydrated:null,treeContext:null,retryLane:0};function np(e){return{baseLanes:e,cachePool:null,transitions:null}}function qw(e,t,n){var r=t.pendingProps,i=ze.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Oe(ze,i&1),e===null)return Yf(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):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=kc(o,r,0,null),e=Qi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=np(n),t.memoizedState=tp,e):lm(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return CE(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=oi(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=oi(a,s):(s=Qi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?np(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=tp,r}return s=e.child,e=s.sibling,r=oi(s,{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 lm(e,t){return t=kc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Nl(e,t,n,r){return r!==null&&Yh(r),vo(t,e.child,null,n),e=lm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function CE(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Md(Error(G(422))),Nl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=kc({mode:"visible",children:r.children},i,0,null),s=Qi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&vo(t,e.child,null,o),t.child.memoizedState=np(o),t.memoizedState=tp,s);if(!(t.mode&1))return Nl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(G(419)),r=Md(s,r,void 0),Nl(e,t,o,r)}if(a=(o&e.childLanes)!==0,Ut||a){if(r=ht,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,kr(e,i),In(r,e,i,-1))}return hm(),r=Md(Error(G(421))),Nl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=NE.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Zt=ni(i.nextSibling),tn=t,Le=!0,On=null,e!==null&&(hn[mn++]=gr,hn[mn++]=vr,hn[mn++]=ts,gr=e.id,vr=e.overflow,ts=t),t=lm(t,r.children),t.flags|=4096,t)}function Lv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qf(e.return,t,n)}function Dd(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Gw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Ot(e,t,r.children,n),r=ze.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&&Lv(e,n,t);else if(e.tag===19)Lv(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(Oe(ze,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&&Lu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dd(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Lu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dd(t,!0,n,null,s);break;case"together":Dd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ou(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Sr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),rs|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(G(153));if(t.child!==null){for(e=t.child,n=oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function kE(e,t,n){switch(t.tag){case 3:Ww(t),go();break;case 5:xw(t);break;case 1:Wt(t.type)&&Ou(t);break;case 4:em(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Oe(Nu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Oe(ze,ze.current&1),t.flags|=128,null):n&t.child.childLanes?qw(e,t,n):(Oe(ze,ze.current&1),e=Sr(e,t,n),e!==null?e.sibling:null);Oe(ze,ze.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Gw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Oe(ze,ze.current),r)break;return null;case 22:case 23:return t.lanes=0,Uw(e,t,n)}return Sr(e,t,n)}var Yw,rp,Qw,Kw;Yw=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}};rp=function(){};Qw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Fi(er.current);var s=null;switch(n){case"input":i=Tf(e,i),r=Tf(e,r),s=[];break;case"select":i=We({},i,{value:void 0}),r=We({},r,{value:void 0}),s=[];break;case"textarea":i=jf(e,i),r=jf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ru)}Rf(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ba.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ba.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&De("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Kw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Wo(e,t){if(!Le)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 St(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 SE(e,t,n){var r=t.pendingProps;switch(Gh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(t),null;case 1:return Wt(t.type)&&Pu(),St(t),null;case 3:return r=t.stateNode,yo(),Fe(Ht),Fe(At),nm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ml(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,On!==null&&(dp(On),On=null))),rp(e,t),St(t),null;case 5:tm(t);var i=Fi(Ma.current);if(n=t.type,e!==null&&t.stateNode!=null)Qw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(G(166));return St(t),null}if(e=Fi(er.current),Ml(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Xn]=t,r[Pa]=s,e=(t.mode&1)!==0,n){case"dialog":De("cancel",r),De("close",r);break;case"iframe":case"object":case"embed":De("load",r);break;case"video":case"audio":for(i=0;i<Jo.length;i++)De(Jo[i],r);break;case"source":De("error",r);break;case"img":case"image":case"link":De("error",r),De("load",r);break;case"details":De("toggle",r);break;case"input":Gg(r,s),De("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},De("invalid",r);break;case"textarea":Qg(r,s),De("invalid",r)}Rf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Ol(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Ol(r.textContent,a,e),i=["children",""+a]):ba.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&De("scroll",r)}switch(n){case"input":Sl(r),Yg(r,s,!0);break;case"textarea":Sl(r),Kg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ru)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=S1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Xn]=t,e[Pa]=r,Yw(e,t,!1,!1),t.stateNode=e;e:{switch(o=Pf(n,r),n){case"dialog":De("cancel",e),De("close",e),i=r;break;case"iframe":case"object":case"embed":De("load",e),i=r;break;case"video":case"audio":for(i=0;i<Jo.length;i++)De(Jo[i],e);i=r;break;case"source":De("error",e),i=r;break;case"img":case"image":case"link":De("error",e),De("load",e),i=r;break;case"details":De("toggle",e),i=r;break;case"input":Gg(e,r),i=Tf(e,r),De("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=We({},r,{value:void 0}),De("invalid",e);break;case"textarea":Qg(e,r),i=jf(e,r),De("invalid",e);break;default:i=r}Rf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?E1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&T1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ca(e,l):typeof l=="number"&&Ca(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ba.hasOwnProperty(s)?l!=null&&s==="onScroll"&&De("scroll",e):l!=null&&Oh(e,s,l,o))}switch(n){case"input":Sl(e),Yg(e,r,!1);break;case"textarea":Sl(e),Kg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+fi(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?qs(e,!!r.multiple,s,!1):r.defaultValue!=null&&qs(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ru)}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 St(t),null;case 6:if(e&&t.stateNode!=null)Kw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(G(166));if(n=Fi(Ma.current),Fi(er.current),Ml(t)){if(r=t.stateNode,n=t.memoizedProps,r[Xn]=t,(s=r.nodeValue!==n)&&(e=tn,e!==null))switch(e.tag){case 3:Ol(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ol(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Xn]=t,t.stateNode=r}return St(t),null;case 13:if(Fe(ze),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Le&&Zt!==null&&t.mode&1&&!(t.flags&128))hw(),go(),t.flags|=98560,s=!1;else if(s=Ml(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(G(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(G(317));s[Xn]=t}else go(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;St(t),s=!1}else On!==null&&(dp(On),On=null),s=!0;if(!s)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||ze.current&1?lt===0&&(lt=3):hm())),t.updateQueue!==null&&(t.flags|=4),St(t),null);case 4:return yo(),rp(e,t),e===null&&Aa(t.stateNode.containerInfo),St(t),null;case 10:return Xh(t.type._context),St(t),null;case 17:return Wt(t.type)&&Pu(),St(t),null;case 19:if(Fe(ze),s=t.memoizedState,s===null)return St(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Wo(s,!1);else{if(lt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Lu(e),o!==null){for(t.flags|=128,Wo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Oe(ze,ze.current&1|2),t.child}e=e.sibling}s.tail!==null&&et()>wo&&(t.flags|=128,r=!0,Wo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Lu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Le)return St(t),null}else 2*et()-s.renderingStartTime>wo&&n!==1073741824&&(t.flags|=128,r=!0,Wo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=et(),t.sibling=null,n=ze.current,Oe(ze,r?n&1|2:n&1),t):(St(t),null);case 22:case 23:return pm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Xt&1073741824&&(St(t),t.subtreeFlags&6&&(t.flags|=8192)):St(t),null;case 24:return null;case 25:return null}throw Error(G(156,t.tag))}function TE(e,t){switch(Gh(t),t.tag){case 1:return Wt(t.type)&&Pu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yo(),Fe(Ht),Fe(At),nm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return tm(t),null;case 13:if(Fe(ze),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));go()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fe(ze),null;case 4:return yo(),null;case 10:return Xh(t.type._context),null;case 22:case 23:return pm(),null;case 24:return null;default:return null}}var Fl=!1,Et=!1,_E=typeof WeakSet=="function"?WeakSet:Set,te=null;function Ls(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Qe(e,t,r)}else n.current=null}function ip(e,t,n){try{n()}catch(r){Qe(e,t,r)}}var $v=!1;function EE(e,t){if(zf=Eu,e=tw(),Wh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,d=0,u=e,f=null;t:for(;;){for(var m;u!==n||i!==0&&u.nodeType!==3||(a=o+i),u!==s||r!==0&&u.nodeType!==3||(l=o+r),u.nodeType===3&&(o+=u.nodeValue.length),(m=u.firstChild)!==null;)f=u,u=m;for(;;){if(u===e)break t;if(f===n&&++c===i&&(a=o),f===s&&++d===r&&(l=o),(m=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vf={focusedElem:e,selectionRange:n},Eu=!1,te=t;te!==null;)if(t=te,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,te=e;else for(;te!==null;){t=te;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,b=h.memoizedState,x=t.stateNode,y=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:En(t.type,g),b);x.__reactInternalSnapshotBeforeUpdate=y}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(G(163))}}catch(j){Qe(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,te=e;break}te=t.return}return h=$v,$v=!1,h}function da(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&ip(t,n,s)}i=i.next}while(i!==r)}}function bc(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 sp(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 Xw(e){var t=e.alternate;t!==null&&(e.alternate=null,Xw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xn],delete t[Pa],delete t[Wf],delete t[uE],delete t[cE])),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 Zw(e){return e.tag===5||e.tag===3||e.tag===4}function Bv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zw(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 op(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=Ru));else if(r!==4&&(e=e.child,e!==null))for(op(e,t,n),e=e.sibling;e!==null;)op(e,t,n),e=e.sibling}function ap(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(ap(e,t,n),e=e.sibling;e!==null;)ap(e,t,n),e=e.sibling}var yt=null,Rn=!1;function Or(e,t,n){for(n=n.child;n!==null;)Jw(e,t,n),n=n.sibling}function Jw(e,t,n){if(Jn&&typeof Jn.onCommitFiberUnmount=="function")try{Jn.onCommitFiberUnmount(pc,n)}catch{}switch(n.tag){case 5:Et||Ls(n,t);case 6:var r=yt,i=Rn;yt=null,Or(e,t,n),yt=r,Rn=i,yt!==null&&(Rn?(e=yt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):yt.removeChild(n.stateNode));break;case 18:yt!==null&&(Rn?(e=yt,n=n.stateNode,e.nodeType===8?Ed(e.parentNode,n):e.nodeType===1&&Ed(e,n),_a(e)):Ed(yt,n.stateNode));break;case 4:r=yt,i=Rn,yt=n.stateNode.containerInfo,Rn=!0,Or(e,t,n),yt=r,Rn=i;break;case 0:case 11:case 14:case 15:if(!Et&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&ip(n,t,o),i=i.next}while(i!==r)}Or(e,t,n);break;case 1:if(!Et&&(Ls(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Qe(n,t,a)}Or(e,t,n);break;case 21:Or(e,t,n);break;case 22:n.mode&1?(Et=(r=Et)||n.memoizedState!==null,Or(e,t,n),Et=r):Or(e,t,n);break;default:Or(e,t,n)}}function zv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _E),t.forEach(function(r){var i=FE.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Sn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:yt=a.stateNode,Rn=!1;break e;case 3:yt=a.stateNode.containerInfo,Rn=!0;break e;case 4:yt=a.stateNode.containerInfo,Rn=!0;break e}a=a.return}if(yt===null)throw Error(G(160));Jw(s,o,i),yt=null,Rn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Qe(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)eb(t,e),t=t.sibling}function eb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Sn(t,e),Vn(e),r&4){try{da(3,e,e.return),bc(3,e)}catch(g){Qe(e,e.return,g)}try{da(5,e,e.return)}catch(g){Qe(e,e.return,g)}}break;case 1:Sn(t,e),Vn(e),r&512&&n!==null&&Ls(n,n.return);break;case 5:if(Sn(t,e),Vn(e),r&512&&n!==null&&Ls(n,n.return),e.flags&32){var i=e.stateNode;try{Ca(i,"")}catch(g){Qe(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&C1(i,s),Pf(a,o);var c=Pf(a,s);for(o=0;o<l.length;o+=2){var d=l[o],u=l[o+1];d==="style"?E1(i,u):d==="dangerouslySetInnerHTML"?T1(i,u):d==="children"?Ca(i,u):Oh(i,d,u,c)}switch(a){case"input":_f(i,s);break;case"textarea":k1(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?qs(i,!!s.multiple,m,!1):f!==!!s.multiple&&(s.defaultValue!=null?qs(i,!!s.multiple,s.defaultValue,!0):qs(i,!!s.multiple,s.multiple?[]:"",!1))}i[Pa]=s}catch(g){Qe(e,e.return,g)}}break;case 6:if(Sn(t,e),Vn(e),r&4){if(e.stateNode===null)throw Error(G(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(g){Qe(e,e.return,g)}}break;case 3:if(Sn(t,e),Vn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{_a(t.containerInfo)}catch(g){Qe(e,e.return,g)}break;case 4:Sn(t,e),Vn(e);break;case 13:Sn(t,e),Vn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(dm=et())),r&4&&zv(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Et=(c=Et)||d,Sn(t,e),Et=c):Sn(t,e),Vn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(te=e,d=e.child;d!==null;){for(u=te=d;te!==null;){switch(f=te,m=f.child,f.tag){case 0:case 11:case 14:case 15:da(4,f,f.return);break;case 1:Ls(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(g){Qe(r,n,g)}}break;case 5:Ls(f,f.return);break;case 22:if(f.memoizedState!==null){Uv(u);continue}}m!==null?(m.return=f,te=m):Uv(u)}d=d.sibling}e:for(d=null,u=e;;){if(u.tag===5){if(d===null){d=u;try{i=u.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=u.stateNode,l=u.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=_1("display",o))}catch(g){Qe(e,e.return,g)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(g){Qe(e,e.return,g)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:Sn(t,e),Vn(e),r&4&&zv(e);break;case 21:break;default:Sn(t,e),Vn(e)}}function Vn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Zw(n)){var r=n;break e}n=n.return}throw Error(G(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ca(i,""),r.flags&=-33);var s=Bv(e);ap(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Bv(e);op(e,a,o);break;default:throw Error(G(161))}}catch(l){Qe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jE(e,t,n){te=e,tb(e)}function tb(e,t,n){for(var r=(e.mode&1)!==0;te!==null;){var i=te,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Fl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||Et;a=Fl;var c=Et;if(Fl=o,(Et=l)&&!c)for(te=i;te!==null;)o=te,l=o.child,o.tag===22&&o.memoizedState!==null?Hv(i):l!==null?(l.return=o,te=l):Hv(i);for(;s!==null;)te=s,tb(s),s=s.sibling;te=i,Fl=a,Et=c}Vv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,te=s):Vv(e)}}function Vv(e){for(;te!==null;){var t=te;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Et||bc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Et)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:En(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&_v(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}_v(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var u=d.dehydrated;u!==null&&_a(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(G(163))}Et||t.flags&512&&sp(t)}catch(f){Qe(t,t.return,f)}}if(t===e){te=null;break}if(n=t.sibling,n!==null){n.return=t.return,te=n;break}te=t.return}}function Uv(e){for(;te!==null;){var t=te;if(t===e){te=null;break}var n=t.sibling;if(n!==null){n.return=t.return,te=n;break}te=t.return}}function Hv(e){for(;te!==null;){var t=te;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{bc(4,t)}catch(l){Qe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Qe(t,i,l)}}var s=t.return;try{sp(t)}catch(l){Qe(t,s,l)}break;case 5:var o=t.return;try{sp(t)}catch(l){Qe(t,o,l)}}}catch(l){Qe(t,t.return,l)}if(t===e){te=null;break}var a=t.sibling;if(a!==null){a.return=t.return,te=a;break}te=t.return}}var AE=Math.ceil,zu=Er.ReactCurrentDispatcher,um=Er.ReactCurrentOwner,yn=Er.ReactCurrentBatchConfig,ke=0,ht=null,nt=null,wt=0,Xt=0,$s=xi(0),lt=0,Ia=null,rs=0,Cc=0,cm=0,fa=null,zt=null,dm=0,wo=1/0,fr=null,Vu=!1,lp=null,ii=null,Il=!1,Kr=null,Uu=0,pa=0,up=null,au=-1,lu=0;function Dt(){return ke&6?et():au!==-1?au:au=et()}function si(e){return e.mode&1?ke&2&&wt!==0?wt&-wt:fE.transition!==null?(lu===0&&(lu=$1()),lu):(e=Ee,e!==0||(e=window.event,e=e===void 0?16:q1(e.type)),e):1}function In(e,t,n,r){if(50<pa)throw pa=0,up=null,Error(G(185));il(e,n,r),(!(ke&2)||e!==ht)&&(e===ht&&(!(ke&2)&&(Cc|=n),lt===4&&$r(e,wt)),qt(e,r),n===1&&ke===0&&!(t.mode&1)&&(wo=et()+500,yc&&wi()))}function qt(e,t){var n=e.callbackNode;f_(e,t);var r=_u(e,e===ht?wt:0);if(r===0)n!==null&&Jg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Jg(n),t===1)e.tag===0?dE(Wv.bind(null,e)):dw(Wv.bind(null,e)),aE(function(){!(ke&6)&&wi()}),n=null;else{switch(B1(r)){case 1:n=Ih;break;case 4:n=I1;break;case 16:n=Tu;break;case 536870912:n=L1;break;default:n=Tu}n=ub(n,nb.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function nb(e,t){if(au=-1,lu=0,ke&6)throw Error(G(327));var n=e.callbackNode;if(Xs()&&e.callbackNode!==n)return null;var r=_u(e,e===ht?wt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Hu(e,r);else{t=r;var i=ke;ke|=2;var s=ib();(ht!==e||wt!==t)&&(fr=null,wo=et()+500,Yi(e,t));do try{OE();break}catch(a){rb(e,a)}while(!0);Kh(),zu.current=s,ke=i,nt!==null?t=0:(ht=null,wt=0,t=lt)}if(t!==0){if(t===2&&(i=Ff(e),i!==0&&(r=i,t=cp(e,i))),t===1)throw n=Ia,Yi(e,0),$r(e,r),qt(e,et()),n;if(t===6)$r(e,r);else{if(i=e.current.alternate,!(r&30)&&!RE(i)&&(t=Hu(e,r),t===2&&(s=Ff(e),s!==0&&(r=s,t=cp(e,s))),t===1))throw n=Ia,Yi(e,0),$r(e,r),qt(e,et()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(G(345));case 2:Ai(e,zt,fr);break;case 3:if($r(e,r),(r&130023424)===r&&(t=dm+500-et(),10<t)){if(_u(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Dt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Hf(Ai.bind(null,e,zt,fr),t);break}Ai(e,zt,fr);break;case 4:if($r(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Fn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=et()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*AE(r/1960))-r,10<r){e.timeoutHandle=Hf(Ai.bind(null,e,zt,fr),r);break}Ai(e,zt,fr);break;case 5:Ai(e,zt,fr);break;default:throw Error(G(329))}}}return qt(e,et()),e.callbackNode===n?nb.bind(null,e):null}function cp(e,t){var n=fa;return e.current.memoizedState.isDehydrated&&(Yi(e,t).flags|=256),e=Hu(e,t),e!==2&&(t=zt,zt=n,t!==null&&dp(t)),e}function dp(e){zt===null?zt=e:zt.push.apply(zt,e)}function RE(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],s=i.getSnapshot;i=i.value;try{if(!$n(s(),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 $r(e,t){for(t&=~cm,t&=~Cc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Fn(t),r=1<<n;e[n]=-1,t&=~r}}function Wv(e){if(ke&6)throw Error(G(327));Xs();var t=_u(e,0);if(!(t&1))return qt(e,et()),null;var n=Hu(e,t);if(e.tag!==0&&n===2){var r=Ff(e);r!==0&&(t=r,n=cp(e,r))}if(n===1)throw n=Ia,Yi(e,0),$r(e,t),qt(e,et()),n;if(n===6)throw Error(G(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ai(e,zt,fr),qt(e,et()),null}function fm(e,t){var n=ke;ke|=1;try{return e(t)}finally{ke=n,ke===0&&(wo=et()+500,yc&&wi())}}function is(e){Kr!==null&&Kr.tag===0&&!(ke&6)&&Xs();var t=ke;ke|=1;var n=yn.transition,r=Ee;try{if(yn.transition=null,Ee=1,e)return e()}finally{Ee=r,yn.transition=n,ke=t,!(ke&6)&&wi()}}function pm(){Xt=$s.current,Fe($s)}function Yi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,oE(n)),nt!==null)for(n=nt.return;n!==null;){var r=n;switch(Gh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Pu();break;case 3:yo(),Fe(Ht),Fe(At),nm();break;case 5:tm(r);break;case 4:yo();break;case 13:Fe(ze);break;case 19:Fe(ze);break;case 10:Xh(r.type._context);break;case 22:case 23:pm()}n=n.return}if(ht=e,nt=e=oi(e.current,null),wt=Xt=t,lt=0,Ia=null,cm=Cc=rs=0,zt=fa=null,Ni!==null){for(t=0;t<Ni.length;t++)if(n=Ni[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Ni=null}return e}function rb(e,t){do{var n=nt;try{if(Kh(),iu.current=Bu,$u){for(var r=Ue.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}$u=!1}if(ns=0,ft=st=Ue=null,ca=!1,Da=0,um.current=null,n===null||n.return===null){lt=1,Ia=t,nt=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=wt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,u=d.tag;if(!(d.mode&1)&&(u===0||u===11||u===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Ov(o);if(m!==null){m.flags&=-257,Mv(m,o,a,s,t),m.mode&1&&Pv(s,c,t),t=m,l=c;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break e}else{if(!(t&1)){Pv(s,c,t),hm();break e}l=Error(G(426))}}else if(Le&&a.mode&1){var b=Ov(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Mv(b,o,a,s,t),Yh(xo(l,a));break e}}s=l=xo(l,a),lt!==4&&(lt=2),fa===null?fa=[s]:fa.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var x=Bw(s,l,t);Tv(s,x);break e;case 1:a=l;var y=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof y.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(ii===null||!ii.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var j=zw(s,a,t);Tv(s,j);break e}}s=s.return}while(s!==null)}ob(n)}catch(k){t=k,nt===n&&n!==null&&(nt=n=n.return);continue}break}while(!0)}function ib(){var e=zu.current;return zu.current=Bu,e===null?Bu:e}function hm(){(lt===0||lt===3||lt===2)&&(lt=4),ht===null||!(rs&268435455)&&!(Cc&268435455)||$r(ht,wt)}function Hu(e,t){var n=ke;ke|=2;var r=ib();(ht!==e||wt!==t)&&(fr=null,Yi(e,t));do try{PE();break}catch(i){rb(e,i)}while(!0);if(Kh(),ke=n,zu.current=r,nt!==null)throw Error(G(261));return ht=null,wt=0,lt}function PE(){for(;nt!==null;)sb(nt)}function OE(){for(;nt!==null&&!r_();)sb(nt)}function sb(e){var t=lb(e.alternate,e,Xt);e.memoizedProps=e.pendingProps,t===null?ob(e):nt=t,um.current=null}function ob(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=TE(n,t),n!==null){n.flags&=32767,nt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{lt=6,nt=null;return}}else if(n=SE(n,t,Xt),n!==null){nt=n;return}if(t=t.sibling,t!==null){nt=t;return}nt=t=e}while(t!==null);lt===0&&(lt=5)}function Ai(e,t,n){var r=Ee,i=yn.transition;try{yn.transition=null,Ee=1,ME(e,t,n,r)}finally{yn.transition=i,Ee=r}return null}function ME(e,t,n,r){do Xs();while(Kr!==null);if(ke&6)throw Error(G(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(G(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(p_(e,s),e===ht&&(nt=ht=null,wt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Il||(Il=!0,ub(Tu,function(){return Xs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=yn.transition,yn.transition=null;var o=Ee;Ee=1;var a=ke;ke|=4,um.current=null,EE(e,n),eb(n,e),J_(Vf),Eu=!!zf,Vf=zf=null,e.current=n,jE(n),i_(),ke=a,Ee=o,yn.transition=s}else e.current=n;if(Il&&(Il=!1,Kr=e,Uu=i),s=e.pendingLanes,s===0&&(ii=null),a_(n.stateNode),qt(e,et()),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(Vu)throw Vu=!1,e=lp,lp=null,e;return Uu&1&&e.tag!==0&&Xs(),s=e.pendingLanes,s&1?e===up?pa++:(pa=0,up=e):pa=0,wi(),null}function Xs(){if(Kr!==null){var e=B1(Uu),t=yn.transition,n=Ee;try{if(yn.transition=null,Ee=16>e?16:e,Kr===null)var r=!1;else{if(e=Kr,Kr=null,Uu=0,ke&6)throw Error(G(331));var i=ke;for(ke|=4,te=e.current;te!==null;){var s=te,o=s.child;if(te.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(te=c;te!==null;){var d=te;switch(d.tag){case 0:case 11:case 15:da(8,d,s)}var u=d.child;if(u!==null)u.return=d,te=u;else for(;te!==null;){d=te;var f=d.sibling,m=d.return;if(Xw(d),d===c){te=null;break}if(f!==null){f.return=m,te=f;break}te=m}}}var h=s.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(g!==null)}}te=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,te=o;else e:for(;te!==null;){if(s=te,s.flags&2048)switch(s.tag){case 0:case 11:case 15:da(9,s,s.return)}var x=s.sibling;if(x!==null){x.return=s.return,te=x;break e}te=s.return}}var y=e.current;for(te=y;te!==null;){o=te;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,te=w;else e:for(o=y;te!==null;){if(a=te,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:bc(9,a)}}catch(k){Qe(a,a.return,k)}if(a===o){te=null;break e}var j=a.sibling;if(j!==null){j.return=a.return,te=j;break e}te=a.return}}if(ke=i,wi(),Jn&&typeof Jn.onPostCommitFiberRoot=="function")try{Jn.onPostCommitFiberRoot(pc,e)}catch{}r=!0}return r}finally{Ee=n,yn.transition=t}}return!1}function qv(e,t,n){t=xo(n,t),t=Bw(e,t,1),e=ri(e,t,1),t=Dt(),e!==null&&(il(e,1,t),qt(e,t))}function Qe(e,t,n){if(e.tag===3)qv(e,e,n);else for(;t!==null;){if(t.tag===3){qv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ii===null||!ii.has(r))){e=xo(n,e),e=zw(t,e,1),t=ri(t,e,1),e=Dt(),t!==null&&(il(t,1,e),qt(t,e));break}}t=t.return}}function DE(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Dt(),e.pingedLanes|=e.suspendedLanes&n,ht===e&&(wt&n)===n&&(lt===4||lt===3&&(wt&130023424)===wt&&500>et()-dm?Yi(e,0):cm|=n),qt(e,t)}function ab(e,t){t===0&&(e.mode&1?(t=El,El<<=1,!(El&130023424)&&(El=4194304)):t=1);var n=Dt();e=kr(e,t),e!==null&&(il(e,t,n),qt(e,n))}function NE(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ab(e,n)}function FE(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(G(314))}r!==null&&r.delete(t),ab(e,n)}var lb;lb=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ht.current)Ut=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ut=!1,kE(e,t,n);Ut=!!(e.flags&131072)}else Ut=!1,Le&&t.flags&1048576&&fw(t,Du,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ou(e,t),e=t.pendingProps;var i=mo(t,At.current);Ks(t,n),i=im(null,t,r,e,i,n);var s=sm();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,Wt(r)?(s=!0,Ou(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Jh(t),i.updater=wc,t.stateNode=i,i._reactInternals=t,Xf(t,r,e,n),t=ep(null,t,r,!0,s,n)):(t.tag=0,Le&&s&&qh(t),Ot(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ou(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=LE(r),e=En(r,e),i){case 0:t=Jf(null,t,r,e,n);break e;case 1:t=Fv(null,t,r,e,n);break e;case 11:t=Dv(null,t,r,e,n);break e;case 14:t=Nv(null,t,r,En(r.type,e),n);break e}throw Error(G(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:En(r,i),Jf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:En(r,i),Fv(e,t,r,i,n);case 3:e:{if(Ww(t),e===null)throw Error(G(387));r=t.pendingProps,s=t.memoizedState,i=s.element,yw(e,t),Iu(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=xo(Error(G(423)),t),t=Iv(e,t,r,n,i);break e}else if(r!==i){i=xo(Error(G(424)),t),t=Iv(e,t,r,n,i);break e}else for(Zt=ni(t.stateNode.containerInfo.firstChild),tn=t,Le=!0,On=null,n=gw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(go(),r===i){t=Sr(e,t,n);break e}Ot(e,t,r,n)}t=t.child}return t;case 5:return xw(t),e===null&&Yf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Uf(r,i)?o=null:s!==null&&Uf(r,s)&&(t.flags|=32),Hw(e,t),Ot(e,t,o,n),t.child;case 6:return e===null&&Yf(t),null;case 13:return qw(e,t,n);case 4:return em(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=vo(t,null,r,n):Ot(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:En(r,i),Dv(e,t,r,i,n);case 7:return Ot(e,t,t.pendingProps,n),t.child;case 8:return Ot(e,t,t.pendingProps.children,n),t.child;case 12:return Ot(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,Oe(Nu,r._currentValue),r._currentValue=o,s!==null)if($n(s.value,o)){if(s.children===i.children&&!Ht.current){t=Sr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=xr(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Qf(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(G(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Qf(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Ot(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ks(t,n),i=wn(i),r=r(i),t.flags|=1,Ot(e,t,r,n),t.child;case 14:return r=t.type,i=En(r,t.pendingProps),i=En(r.type,i),Nv(e,t,r,i,n);case 15:return Vw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:En(r,i),ou(e,t),t.tag=1,Wt(r)?(e=!0,Ou(t)):e=!1,Ks(t,n),$w(t,r,i),Xf(t,r,i,n),ep(null,t,r,!0,e,n);case 19:return Gw(e,t,n);case 22:return Uw(e,t,n)}throw Error(G(156,t.tag))};function ub(e,t){return F1(e,t)}function IE(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 vn(e,t,n,r){return new IE(e,t,n,r)}function mm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function LE(e){if(typeof e=="function")return mm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Dh)return 11;if(e===Nh)return 14}return 2}function oi(e,t){var n=e.alternate;return n===null?(n=vn(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 uu(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")mm(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case As:return Qi(n.children,i,s,t);case Mh:o=8,i|=8;break;case bf:return e=vn(12,n,t,i|2),e.elementType=bf,e.lanes=s,e;case Cf:return e=vn(13,n,t,i),e.elementType=Cf,e.lanes=s,e;case kf:return e=vn(19,n,t,i),e.elementType=kf,e.lanes=s,e;case x1:return kc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case v1:o=10;break e;case y1:o=9;break e;case Dh:o=11;break e;case Nh:o=14;break e;case Nr:o=16,r=null;break e}throw Error(G(130,e==null?e:typeof e,""))}return t=vn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Qi(e,t,n,r){return e=vn(7,e,r,t),e.lanes=n,e}function kc(e,t,n,r){return e=vn(22,e,r,t),e.elementType=x1,e.lanes=n,e.stateNode={isHidden:!1},e}function Nd(e,t,n){return e=vn(6,e,null,t),e.lanes=n,e}function Fd(e,t,n){return t=vn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $E(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=gd(0),this.expirationTimes=gd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gm(e,t,n,r,i,s,o,a,l){return e=new $E(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=vn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jh(s),e}function BE(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:js,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function cb(e){if(!e)return pi;e=e._reactInternals;e:{if(cs(e)!==e||e.tag!==1)throw Error(G(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Wt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(G(171))}if(e.tag===1){var n=e.type;if(Wt(n))return cw(e,n,t)}return t}function db(e,t,n,r,i,s,o,a,l){return e=gm(n,r,!0,e,i,s,o,a,l),e.context=cb(null),n=e.current,r=Dt(),i=si(n),s=xr(r,i),s.callback=t??null,ri(n,s,i),e.current.lanes=i,il(e,i,r),qt(e,r),e}function Sc(e,t,n,r){var i=t.current,s=Dt(),o=si(i);return n=cb(n),t.context===null?t.context=n:t.pendingContext=n,t=xr(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ri(i,t,o),e!==null&&(In(e,i,o,s),ru(e,i,o)),o}function Wu(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 Gv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vm(e,t){Gv(e,t),(e=e.alternate)&&Gv(e,t)}function zE(){return null}var fb=typeof reportError=="function"?reportError:function(e){console.error(e)};function ym(e){this._internalRoot=e}Tc.prototype.render=ym.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));Sc(e,t,null,null)};Tc.prototype.unmount=ym.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;is(function(){Sc(null,e,null,null)}),t[Cr]=null}};function Tc(e){this._internalRoot=e}Tc.prototype.unstable_scheduleHydration=function(e){if(e){var t=U1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lr.length&&t!==0&&t<Lr[n].priority;n++);Lr.splice(n,0,e),n===0&&W1(e)}};function xm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Yv(){}function VE(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Wu(o);s.call(c)}}var o=db(t,r,e,0,null,!1,!1,"",Yv);return e._reactRootContainer=o,e[Cr]=o.current,Aa(e.nodeType===8?e.parentNode:e),is(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=Wu(l);a.call(c)}}var l=gm(e,0,!1,null,null,!1,!1,"",Yv);return e._reactRootContainer=l,e[Cr]=l.current,Aa(e.nodeType===8?e.parentNode:e),is(function(){Sc(t,l,n,r)}),l}function Ec(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=Wu(o);a.call(l)}}Sc(t,o,e,i)}else o=VE(n,t,e,i,r);return Wu(o)}z1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Zo(t.pendingLanes);n!==0&&(Lh(t,n|1),qt(t,et()),!(ke&6)&&(wo=et()+500,wi()))}break;case 13:is(function(){var r=kr(e,1);if(r!==null){var i=Dt();In(r,e,1,i)}}),vm(e,1)}};$h=function(e){if(e.tag===13){var t=kr(e,134217728);if(t!==null){var n=Dt();In(t,e,134217728,n)}vm(e,134217728)}};V1=function(e){if(e.tag===13){var t=si(e),n=kr(e,t);if(n!==null){var r=Dt();In(n,e,t,r)}vm(e,t)}};U1=function(){return Ee};H1=function(e,t){var n=Ee;try{return Ee=e,t()}finally{Ee=n}};Mf=function(e,t,n){switch(t){case"input":if(_f(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=vc(r);if(!i)throw Error(G(90));b1(r),_f(r,i)}}}break;case"textarea":k1(e,n);break;case"select":t=n.value,t!=null&&qs(e,!!n.multiple,t,!1)}};R1=fm;P1=is;var UE={usingClientEntryPoint:!1,Events:[ol,Ms,vc,j1,A1,fm]},qo={findFiberByHostInstance:Di,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},HE={bundleType:qo.bundleType,version:qo.version,rendererPackageName:qo.rendererPackageName,rendererConfig:qo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Er.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=D1(e),e===null?null:e.stateNode},findFiberByHostInstance:qo.findFiberByHostInstance||zE,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 Ll=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ll.isDisabled&&Ll.supportsFiber)try{pc=Ll.inject(HE),Jn=Ll}catch{}}rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=UE;rn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!xm(t))throw Error(G(200));return BE(e,t,null,n)};rn.createRoot=function(e,t){if(!xm(e))throw Error(G(299));var n=!1,r="",i=fb;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=gm(e,1,!1,null,null,n,!1,r,i),e[Cr]=t.current,Aa(e.nodeType===8?e.parentNode:e),new ym(t)};rn.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(G(188)):(e=Object.keys(e).join(","),Error(G(268,e)));return e=D1(t),e=e===null?null:e.stateNode,e};rn.flushSync=function(e){return is(e)};rn.hydrate=function(e,t,n){if(!_c(t))throw Error(G(200));return Ec(null,e,t,!0,n)};rn.hydrateRoot=function(e,t,n){if(!xm(e))throw Error(G(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=fb;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=db(t,null,e,1,n??null,i,!1,s,o),e[Cr]=t.current,Aa(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 Tc(t)};rn.render=function(e,t,n){if(!_c(t))throw Error(G(200));return Ec(null,e,t,!1,n)};rn.unmountComponentAtNode=function(e){if(!_c(e))throw Error(G(40));return e._reactRootContainer?(is(function(){Ec(null,null,e,!1,function(){e._reactRootContainer=null,e[Cr]=null})}),!0):!1};rn.unstable_batchedUpdates=fm;rn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!_c(n))throw Error(G(200));if(e==null||e._reactInternals===void 0)throw Error(G(38));return Ec(e,t,n,!1,r)};rn.version="18.3.1-next-f1338f8080-20240426";function pb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(pb)}catch(e){console.error(e)}}pb(),p1.exports=rn;var hb=p1.exports;const WE=_r(hb);var mb,Qv=hb;mb=Qv.createRoot,Qv.hydrateRoot;const qE="@alfatech/livechat",GE="v2025.01.14.4",YE="module",QE="https://api-live.alfatek.dev",KE="wss://api-live.alfatek.dev",XE=["dist","README.md","component/chatier.js"],ZE="dist/widget.js",JE={dev:"vite",dev2:"vite --config vite.config.2.ts",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},e2={"@headlessui/react":"^2.2.2","@tailwindcss/vite":"^4.1.4","@tanstack/react-query":"^5.59.20",classnames:"^2.5.1",dayjs:"^1.11.13",formik:"^2.4.6","framer-motion":"^12.7.4","lucide-react":"^0.511.0",react:"^18.3.1","react-dom":"^18.3.1","react-dropzone":"^14.3.8","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},t2={"@biomejs/biome":"^1.8.3","@types/node":"^22.5.4","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react-swc":"^3.5.0",globals:"^15.9.0",husky:"^9.1.5",tailwindcss:"^4.1.4",typescript:"^5.5.3",vite:"^5.4.1"},gb={name:qE,private:!1,version:GE,type:YE,apiURL:QE,wsURL:KE,files:XE,main:ZE,scripts:JE,dependencies:e2,devDependencies:t2,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},vb=gb.apiURL,n2=gb.wsURL,r2=e=>[{limit:Number.parseInt(e.headers.get("X-Ratelimit-Limit")||"0"),remaining:Number.parseInt(e.headers.get("X-Ratelimit-Remaining")||"0"),reset:Number.parseInt(e.headers.get("X-Ratelimit-Reset")||"0"),retryAfter:Number.parseInt(e.headers.get("Retry-After")||"0")},429],i2=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],s2={429:r2,404:i2};async function jr(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${vb}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>new Response(null,{status:500}));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{}const o=s2[r.status];return o?o(r,s):[{},r.status]}const i=r.headers.get("Content-Type");return i&&i.includes("application/json")?[await r.json(),r.status]:[await r.text(),r.status]}const Ln=e=>[200,201,204].includes(e),o2=(e,{arrayWithBrackets:t=!1,arrayWithBracketAndIndex:n=!0}={})=>{const r=new FormData;for(const[i,s]of Object.entries(e)){if(Array.isArray(s)){for(const o in s)t?r.append(`${i}[]`,s[o]):n?r.append(`${i}[${o}]`,s[o]):r.append(i,s[o]);continue}typeof s<"u"&&s!==null&&r.append(i,s)}return r};var Oo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ss=typeof window>"u"||"Deno"in globalThis;function pn(){}function a2(e,t){return typeof e=="function"?e(t):e}function fp(e){return typeof e=="number"&&e>=0&&e!==1/0}function yb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Zs(e,t){return typeof e=="function"?e(t):e}function Mn(e,t){return typeof e=="function"?e(t):e}function Kv(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==wm(o,t.options))return!1}else if(!La(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function Xv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(os(t.options.mutationKey)!==os(s))return!1}else if(!La(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function wm(e,t){return((t==null?void 0:t.queryKeyHashFn)||os)(e)}function os(e){return JSON.stringify(e,(t,n)=>pp(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function La(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!La(e[n],t[n])):!1}function xb(e,t){if(e===t)return e;const n=Zv(e)&&Zv(t);if(n||pp(e)&&pp(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let c=0;c<o;c++){const d=n?c:s[c];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=xb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function qu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Zv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function pp(e){if(!Jv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Jv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Jv(e){return Object.prototype.toString.call(e)==="[object Object]"}function l2(e){return new Promise(t=>{setTimeout(t,e)})}function hp(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?xb(e,t):t}function u2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function c2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var bm=Symbol();function wb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===bm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var zi,Br,eo,qx,d2=(qx=class extends Oo{constructor(){super();ue(this,zi);ue(this,Br);ue(this,eo);ee(this,eo,t=>{if(!ss&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){E(this,Br)||this.setEventListener(E(this,eo))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,Br))==null||t.call(this),ee(this,Br,void 0))}setEventListener(t){var n;ee(this,eo,t),(n=E(this,Br))==null||n.call(this),ee(this,Br,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){E(this,zi)!==t&&(ee(this,zi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof E(this,zi)=="boolean"?E(this,zi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},zi=new WeakMap,Br=new WeakMap,eo=new WeakMap,qx),Cm=new d2,to,zr,no,Gx,f2=(Gx=class extends Oo{constructor(){super();ue(this,to,!0);ue(this,zr);ue(this,no);ee(this,no,t=>{if(!ss&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){E(this,zr)||this.setEventListener(E(this,no))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,zr))==null||t.call(this),ee(this,zr,void 0))}setEventListener(t){var n;ee(this,no,t),(n=E(this,zr))==null||n.call(this),ee(this,zr,t(this.setOnline.bind(this)))}setOnline(t){E(this,to)!==t&&(ee(this,to,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return E(this,to)}},to=new WeakMap,zr=new WeakMap,no=new WeakMap,Gx),Gu=new f2;function mp(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function p2(e){return Math.min(1e3*2**e,3e4)}function bb(e){return(e??"online")==="online"?Gu.isOnline():!0}var Cb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Id(e){return e instanceof Cb}function kb(e){let t=!1,n=0,r=!1,i;const s=mp(),o=g=>{var b;r||(f(new Cb(g)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Cm.isFocused()&&(e.networkMode==="always"||Gu.isOnline())&&e.canRun(),d=()=>bb(e.networkMode)&&e.canRun(),u=g=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,g),i==null||i(),s.resolve(g))},f=g=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,g),i==null||i(),s.reject(g))},m=()=>new Promise(g=>{var b;i=x=>{(r||c())&&g(x)},(b=e.onPause)==null||b.call(e)}).then(()=>{var g;i=void 0,r||(g=e.onContinue)==null||g.call(e)}),h=()=>{if(r)return;let g;const b=n===0?e.initialPromise:void 0;try{g=b??e.fn()}catch(x){g=Promise.reject(x)}Promise.resolve(g).then(u).catch(x=>{var T;if(r)return;const y=e.retry??(ss?0:3),w=e.retryDelay??p2,j=typeof w=="function"?w(n,x):w,k=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,x);if(t||!k){f(x);return}n++,(T=e.onFail)==null||T.call(e,n,x),l2(j).then(()=>c()?void 0:m()).then(()=>{t?f(x):h()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),s)}}function h2(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var ot=h2(),Vi,Yx,Sb=(Yx=class{constructor(){ue(this,Vi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fp(this.gcTime)&&ee(this,Vi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ss?1/0:5*60*1e3))}clearGcTimeout(){E(this,Vi)&&(clearTimeout(E(this,Vi)),ee(this,Vi,void 0))}},Vi=new WeakMap,Yx),ro,io,fn,Tt,Ja,Ui,An,dr,Qx,m2=(Qx=class extends Sb{constructor(t){super();ue(this,An);ue(this,ro);ue(this,io);ue(this,fn);ue(this,Tt);ue(this,Ja);ue(this,Ui);ee(this,Ui,!1),ee(this,Ja,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,fn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,ro,g2(this.options)),this.state=t.state??E(this,ro),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=E(this,Tt))==null?void 0:t.promise}setOptions(t){this.options={...E(this,Ja),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,fn).remove(this)}setData(t,n){const r=hp(this.state.data,t,this.options);return ge(this,An,dr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ge(this,An,dr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=E(this,Tt))==null?void 0:r.promise;return(i=E(this,Tt))==null||i.cancel(t),n?n.then(pn).catch(pn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,ro))}isActive(){return this.observers.some(t=>Mn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===bm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!yb(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,Tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,Tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),E(this,fn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(E(this,Tt)&&(E(this,Ui)?E(this,Tt).cancel({revert:!0}):E(this,Tt).cancelRetry()),this.scheduleGc()),E(this,fn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ge(this,An,dr).call(this,{type:"invalidate"})}fetch(t,n){var l,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(E(this,Tt))return E(this,Tt).continueRetry(),E(this,Tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(f=>f.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(ee(this,Ui,!0),r.signal)})},s=()=>{const u=wb(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),ee(this,Ui,!1),this.options.persister?this.options.persister(u,f,this):u(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),ee(this,io,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&ge(this,An,dr).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=u=>{var f,m,h,g;Id(u)&&u.silent||ge(this,An,dr).call(this,{type:"error",error:u}),Id(u)||((m=(f=E(this,fn).config).onError)==null||m.call(f,u,this),(g=(h=E(this,fn).config).onSettled)==null||g.call(h,this.state.data,u,this)),this.scheduleGc()};return ee(this,Tt,kb({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var f,m,h,g;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(b){a(b);return}(m=(f=E(this,fn).config).onSuccess)==null||m.call(f,u,this),(g=(h=E(this,fn).config).onSettled)==null||g.call(h,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,f)=>{ge(this,An,dr).call(this,{type:"failed",failureCount:u,error:f})},onPause:()=>{ge(this,An,dr).call(this,{type:"pause"})},onContinue:()=>{ge(this,An,dr).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),E(this,Tt).start()}},ro=new WeakMap,io=new WeakMap,fn=new WeakMap,Tt=new WeakMap,Ja=new WeakMap,Ui=new WeakMap,An=new WeakSet,dr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Tb(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Id(i)&&i.revert&&E(this,io)?{...E(this,io),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ot.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),E(this,fn).notify({query:this,type:"updated",action:t})})},Qx);function Tb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function g2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Gn,Kx,v2=(Kx=class extends Oo{constructor(t={}){super();ue(this,Gn);this.config=t,ee(this,Gn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??wm(i,n);let o=this.get(s);return o||(o=new m2({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){E(this,Gn).has(t.queryHash)||(E(this,Gn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=E(this,Gn).get(t.queryHash);n&&(t.destroy(),n===t&&E(this,Gn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ot.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return E(this,Gn).get(t)}getAll(){return[...E(this,Gn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Kv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Kv(t,r)):n}notify(t){ot.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ot.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ot.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Gn=new WeakMap,Kx),Yn,Rt,Hi,Qn,Mr,Xx,y2=(Xx=class extends Sb{constructor(t){super();ue(this,Qn);ue(this,Yn);ue(this,Rt);ue(this,Hi);this.mutationId=t.mutationId,ee(this,Rt,t.mutationCache),ee(this,Yn,[]),this.state=t.state||_b(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){E(this,Yn).includes(t)||(E(this,Yn).push(t),this.clearGcTimeout(),E(this,Rt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,Yn,E(this,Yn).filter(n=>n!==t)),this.scheduleGc(),E(this,Rt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){E(this,Yn).length||(this.state.status==="pending"?this.scheduleGc():E(this,Rt).remove(this))}continue(){var t;return((t=E(this,Hi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,d,u,f,m,h,g,b,x,y,w,j,k,T,A;ee(this,Hi,kb({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,F)=>{ge(this,Qn,Mr).call(this,{type:"failed",failureCount:S,error:F})},onPause:()=>{ge(this,Qn,Mr).call(this,{type:"pause"})},onContinue:()=>{ge(this,Qn,Mr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,Rt).canRun(this)}));const n=this.state.status==="pending",r=!E(this,Hi).canStart();try{if(!n){ge(this,Qn,Mr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=E(this,Rt).config).onMutate)==null?void 0:s.call(i,t,this));const F=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));F!==this.state.context&&ge(this,Qn,Mr).call(this,{type:"pending",context:F,variables:t,isPaused:r})}const S=await E(this,Hi).start();return await((c=(l=E(this,Rt).config).onSuccess)==null?void 0:c.call(l,S,t,this.state.context,this)),await((u=(d=this.options).onSuccess)==null?void 0:u.call(d,S,t,this.state.context)),await((m=(f=E(this,Rt).config).onSettled)==null?void 0:m.call(f,S,null,this.state.variables,this.state.context,this)),await((g=(h=this.options).onSettled)==null?void 0:g.call(h,S,null,t,this.state.context)),ge(this,Qn,Mr).call(this,{type:"success",data:S}),S}catch(S){try{throw await((x=(b=E(this,Rt).config).onError)==null?void 0:x.call(b,S,t,this.state.context,this)),await((w=(y=this.options).onError)==null?void 0:w.call(y,S,t,this.state.context)),await((k=(j=E(this,Rt).config).onSettled)==null?void 0:k.call(j,void 0,S,this.state.variables,this.state.context,this)),await((A=(T=this.options).onSettled)==null?void 0:A.call(T,void 0,S,t,this.state.context)),S}finally{ge(this,Qn,Mr).call(this,{type:"error",error:S})}}finally{E(this,Rt).runNext(this)}}},Yn=new WeakMap,Rt=new WeakMap,Hi=new WeakMap,Qn=new WeakSet,Mr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ot.batch(()=>{E(this,Yn).forEach(r=>{r.onMutationUpdate(t)}),E(this,Rt).notify({mutation:this,type:"updated",action:t})})},Xx);function _b(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Kt,el,Zx,x2=(Zx=class extends Oo{constructor(t={}){super();ue(this,Kt);ue(this,el);this.config=t,ee(this,Kt,new Map),ee(this,el,Date.now())}build(t,n,r){const i=new y2({mutationCache:this,mutationId:++bl(this,el)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=$l(t),r=E(this,Kt).get(n)??[];r.push(t),E(this,Kt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=$l(t);if(E(this,Kt).has(n)){const i=(r=E(this,Kt).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?E(this,Kt).delete(n):E(this,Kt).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=E(this,Kt).get($l(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=E(this,Kt).get($l(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){ot.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...E(this,Kt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Xv(n,r))}findAll(t={}){return this.getAll().filter(n=>Xv(t,n))}notify(t){ot.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ot.batch(()=>Promise.all(t.map(n=>n.continue().catch(pn))))}},Kt=new WeakMap,el=new WeakMap,Zx);function $l(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function ey(e){return{onFetch:(t,n)=>{var d,u,f,m,h;const r=t.options,i=(f=(u=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:u.fetchMore)==null?void 0:f.direction,s=((m=t.state.data)==null?void 0:m.pages)||[],o=((h=t.state.data)==null?void 0:h.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},x=wb(t.options,t.fetchOptions),y=async(w,j,k)=>{if(g)return Promise.reject();if(j==null&&w.pages.length)return Promise.resolve(w);const T={queryKey:t.queryKey,pageParam:j,direction:k?"backward":"forward",meta:t.options.meta};b(T);const A=await x(T),{maxPages:S}=t.options,F=k?c2:u2;return{pages:F(w.pages,A,S),pageParams:F(w.pageParams,j,S)}};if(i&&s.length){const w=i==="backward",j=w?w2:ty,k={pages:s,pageParams:o},T=j(r,k);a=await y(k,T,w)}else{const w=e??s.length;do{const j=l===0?o[0]??r.initialPageParam:ty(r,a);if(l>0&&j==null)break;a=await y(a,j),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var g,b;return(b=(g=t.options).persister)==null?void 0:b.call(g,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function ty(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function w2(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ge,Vr,Ur,so,oo,Hr,ao,lo,Jx,b2=(Jx=class{constructor(e={}){ue(this,Ge);ue(this,Vr);ue(this,Ur);ue(this,so);ue(this,oo);ue(this,Hr);ue(this,ao);ue(this,lo);ee(this,Ge,e.queryCache||new v2),ee(this,Vr,e.mutationCache||new x2),ee(this,Ur,e.defaultOptions||{}),ee(this,so,new Map),ee(this,oo,new Map),ee(this,Hr,0)}mount(){bl(this,Hr)._++,E(this,Hr)===1&&(ee(this,ao,Cm.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Ge).onFocus())})),ee(this,lo,Gu.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Ge).onOnline())})))}unmount(){var e,t;bl(this,Hr)._--,E(this,Hr)===0&&((e=E(this,ao))==null||e.call(this),ee(this,ao,void 0),(t=E(this,lo))==null||t.call(this),ee(this,lo,void 0))}isFetching(e){return E(this,Ge).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return E(this,Vr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,Ge).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=E(this,Ge).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Zs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return E(this,Ge).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=E(this,Ge).get(r.queryHash),s=i==null?void 0:i.state.data,o=a2(t,s);if(o!==void 0)return E(this,Ge).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return ot.batch(()=>E(this,Ge).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,Ge).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=E(this,Ge);ot.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=E(this,Ge),r={type:"active",...e};return ot.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ot.batch(()=>E(this,Ge).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(pn).catch(pn)}invalidateQueries(e,t={}){return ot.batch(()=>{if(E(this,Ge).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ot.batch(()=>E(this,Ge).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(pn)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(pn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=E(this,Ge).build(this,t);return n.isStaleByTime(Zs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(pn).catch(pn)}fetchInfiniteQuery(e){return e.behavior=ey(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(pn).catch(pn)}ensureInfiniteQueryData(e){return e.behavior=ey(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Gu.isOnline()?E(this,Vr).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,Ge)}getMutationCache(){return E(this,Vr)}getDefaultOptions(){return E(this,Ur)}setDefaultOptions(e){ee(this,Ur,e)}setQueryDefaults(e,t){E(this,so).set(os(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...E(this,so).values()],n={};return t.forEach(r=>{La(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){E(this,oo).set(os(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...E(this,oo).values()];let n={};return t.forEach(r=>{La(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...E(this,Ur).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===bm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...E(this,Ur).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(this,Ge).clear(),E(this,Vr).clear()}},Ge=new WeakMap,Vr=new WeakMap,Ur=new WeakMap,so=new WeakMap,oo=new WeakMap,Hr=new WeakMap,ao=new WeakMap,lo=new WeakMap,Jx),Lt,we,tl,Pt,Wi,uo,Wr,Kn,nl,co,fo,qi,Gi,qr,po,_e,ea,gp,vp,yp,xp,wp,bp,Cp,Eb,e1,C2=(e1=class extends Oo{constructor(t,n){super();ue(this,_e);ue(this,Lt);ue(this,we);ue(this,tl);ue(this,Pt);ue(this,Wi);ue(this,uo);ue(this,Wr);ue(this,Kn);ue(this,nl);ue(this,co);ue(this,fo);ue(this,qi);ue(this,Gi);ue(this,qr);ue(this,po,new Set);this.options=n,ee(this,Lt,t),ee(this,Kn,null),ee(this,Wr,mp()),this.options.experimental_prefetchInRender||E(this,Wr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,we).addObserver(this),ny(E(this,we),this.options)?ge(this,_e,ea).call(this):this.updateResult(),ge(this,_e,xp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return kp(E(this,we),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return kp(E(this,we),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ge(this,_e,wp).call(this),ge(this,_e,bp).call(this),E(this,we).removeObserver(this)}setOptions(t,n){const r=this.options,i=E(this,we);if(this.options=E(this,Lt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Mn(this.options.enabled,E(this,we))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ge(this,_e,Cp).call(this),E(this,we).setOptions(this.options),r._defaulted&&!qu(this.options,r)&&E(this,Lt).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,we),observer:this});const s=this.hasListeners();s&&ry(E(this,we),i,this.options,r)&&ge(this,_e,ea).call(this),this.updateResult(n),s&&(E(this,we)!==i||Mn(this.options.enabled,E(this,we))!==Mn(r.enabled,E(this,we))||Zs(this.options.staleTime,E(this,we))!==Zs(r.staleTime,E(this,we)))&&ge(this,_e,gp).call(this);const o=ge(this,_e,vp).call(this);s&&(E(this,we)!==i||Mn(this.options.enabled,E(this,we))!==Mn(r.enabled,E(this,we))||o!==E(this,qr))&&ge(this,_e,yp).call(this,o)}getOptimisticResult(t){const n=E(this,Lt).getQueryCache().build(E(this,Lt),t),r=this.createResult(n,t);return S2(this,r)&&(ee(this,Pt,r),ee(this,uo,this.options),ee(this,Wi,E(this,we).state)),r}getCurrentResult(){return E(this,Pt)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){E(this,po).add(t)}getCurrentQuery(){return E(this,we)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=E(this,Lt).defaultQueryOptions(t),r=E(this,Lt).getQueryCache().build(E(this,Lt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ge(this,_e,ea).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,Pt)))}createResult(t,n){var S;const r=E(this,we),i=this.options,s=E(this,Pt),o=E(this,Wi),a=E(this,uo),c=t!==r?t.state:E(this,tl),{state:d}=t;let u={...d},f=!1,m;if(n._optimisticResults){const F=this.hasListeners(),N=!F&&ny(t,n),O=F&&ry(t,r,n,i);(N||O)&&(u={...u,...Tb(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:g,status:b}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===E(this,nl))m=E(this,co);else try{ee(this,nl,n.select),m=n.select(u.data),m=hp(s==null?void 0:s.data,m,n),ee(this,co,m),ee(this,Kn,null)}catch(F){ee(this,Kn,F)}else m=u.data;if(n.placeholderData!==void 0&&m===void 0&&b==="pending"){let F;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))F=s.data;else if(F=typeof n.placeholderData=="function"?n.placeholderData((S=E(this,fo))==null?void 0:S.state.data,E(this,fo)):n.placeholderData,n.select&&F!==void 0)try{F=n.select(F),ee(this,Kn,null)}catch(N){ee(this,Kn,N)}F!==void 0&&(b="success",m=hp(s==null?void 0:s.data,F,n),f=!0)}E(this,Kn)&&(h=E(this,Kn),m=E(this,co),g=Date.now(),b="error");const x=u.fetchStatus==="fetching",y=b==="pending",w=b==="error",j=y&&x,k=m!==void 0,A={status:b,fetchStatus:u.fetchStatus,isPending:y,isSuccess:b==="success",isError:w,isInitialLoading:j,isLoading:j,data:m,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:g,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:x,isRefetching:x&&!y,isLoadingError:w&&!k,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&k,isStale:km(t,n),refetch:this.refetch,promise:E(this,Wr)};if(this.options.experimental_prefetchInRender){const F=Q=>{A.status==="error"?Q.reject(A.error):A.data!==void 0&&Q.resolve(A.data)},N=()=>{const Q=ee(this,Wr,A.promise=mp());F(Q)},O=E(this,Wr);switch(O.status){case"pending":t.queryHash===r.queryHash&&F(O);break;case"fulfilled":(A.status==="error"||A.data!==O.value)&&N();break;case"rejected":(A.status!=="error"||A.error!==O.reason)&&N();break}}return A}updateResult(t){const n=E(this,Pt),r=this.createResult(E(this,we),this.options);if(ee(this,Wi,E(this,we).state),ee(this,uo,this.options),E(this,Wi).data!==void 0&&ee(this,fo,E(this,we)),qu(r,n))return;ee(this,Pt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!E(this,po).size)return!0;const l=new Set(a??E(this,po));return this.options.throwOnError&&l.add("error"),Object.keys(E(this,Pt)).some(c=>{const d=c;return E(this,Pt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),ge(this,_e,Eb).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ge(this,_e,xp).call(this)}},Lt=new WeakMap,we=new WeakMap,tl=new WeakMap,Pt=new WeakMap,Wi=new WeakMap,uo=new WeakMap,Wr=new WeakMap,Kn=new WeakMap,nl=new WeakMap,co=new WeakMap,fo=new WeakMap,qi=new WeakMap,Gi=new WeakMap,qr=new WeakMap,po=new WeakMap,_e=new WeakSet,ea=function(t){ge(this,_e,Cp).call(this);let n=E(this,we).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(pn)),n},gp=function(){ge(this,_e,wp).call(this);const t=Zs(this.options.staleTime,E(this,we));if(ss||E(this,Pt).isStale||!fp(t))return;const r=yb(E(this,Pt).dataUpdatedAt,t)+1;ee(this,qi,setTimeout(()=>{E(this,Pt).isStale||this.updateResult()},r))},vp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,we)):this.options.refetchInterval)??!1},yp=function(t){ge(this,_e,bp).call(this),ee(this,qr,t),!(ss||Mn(this.options.enabled,E(this,we))===!1||!fp(E(this,qr))||E(this,qr)===0)&&ee(this,Gi,setInterval(()=>{(this.options.refetchIntervalInBackground||Cm.isFocused())&&ge(this,_e,ea).call(this)},E(this,qr)))},xp=function(){ge(this,_e,gp).call(this),ge(this,_e,yp).call(this,ge(this,_e,vp).call(this))},wp=function(){E(this,qi)&&(clearTimeout(E(this,qi)),ee(this,qi,void 0))},bp=function(){E(this,Gi)&&(clearInterval(E(this,Gi)),ee(this,Gi,void 0))},Cp=function(){const t=E(this,Lt).getQueryCache().build(E(this,Lt),this.options);if(t===E(this,we))return;const n=E(this,we);ee(this,we,t),ee(this,tl,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Eb=function(t){ot.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(E(this,Pt))}),E(this,Lt).getQueryCache().notify({query:E(this,we),type:"observerResultsUpdated"})})},e1);function k2(e,t){return Mn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ny(e,t){return k2(e,t)||e.state.data!==void 0&&kp(e,t,t.refetchOnMount)}function kp(e,t,n){if(Mn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&km(e,t)}return!1}function ry(e,t,n,r){return(e!==t||Mn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&km(e,n)}function km(e,t){return Mn(t.enabled,e)!==!1&&e.isStaleByTime(Zs(t.staleTime,e))}function S2(e,t){return!qu(e.getCurrentResult(),t)}var Gr,Yr,$t,mr,wr,cu,Sp,t1,T2=(t1=class extends Oo{constructor(t,n){super();ue(this,wr);ue(this,Gr);ue(this,Yr);ue(this,$t);ue(this,mr);ee(this,Gr,t),this.setOptions(n),this.bindMethods(),ge(this,wr,cu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=E(this,Gr).defaultMutationOptions(t),qu(this.options,n)||E(this,Gr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:E(this,$t),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&os(n.mutationKey)!==os(this.options.mutationKey)?this.reset():((r=E(this,$t))==null?void 0:r.state.status)==="pending"&&E(this,$t).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=E(this,$t))==null||t.removeObserver(this)}onMutationUpdate(t){ge(this,wr,cu).call(this),ge(this,wr,Sp).call(this,t)}getCurrentResult(){return E(this,Yr)}reset(){var t;(t=E(this,$t))==null||t.removeObserver(this),ee(this,$t,void 0),ge(this,wr,cu).call(this),ge(this,wr,Sp).call(this)}mutate(t,n){var r;return ee(this,mr,n),(r=E(this,$t))==null||r.removeObserver(this),ee(this,$t,E(this,Gr).getMutationCache().build(E(this,Gr),this.options)),E(this,$t).addObserver(this),E(this,$t).execute(t)}},Gr=new WeakMap,Yr=new WeakMap,$t=new WeakMap,mr=new WeakMap,wr=new WeakSet,cu=function(){var n;const t=((n=E(this,$t))==null?void 0:n.state)??_b();ee(this,Yr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Sp=function(t){ot.batch(()=>{var n,r,i,s,o,a,l,c;if(E(this,mr)&&this.hasListeners()){const d=E(this,Yr).variables,u=E(this,Yr).context;(t==null?void 0:t.type)==="success"?((r=(n=E(this,mr)).onSuccess)==null||r.call(n,t.data,d,u),(s=(i=E(this,mr)).onSettled)==null||s.call(i,t.data,null,d,u)):(t==null?void 0:t.type)==="error"&&((a=(o=E(this,mr)).onError)==null||a.call(o,t.error,d,u),(c=(l=E(this,mr)).onSettled)==null||c.call(l,void 0,t.error,d,u))}this.listeners.forEach(d=>{d(E(this,Yr))})})},t1),jb=v.createContext(void 0),Ab=e=>{const t=v.useContext(jb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_2=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(jb.Provider,{value:e,children:t})),Rb=v.createContext(!1),E2=()=>v.useContext(Rb);Rb.Provider;function j2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var A2=v.createContext(j2()),R2=()=>v.useContext(A2);function Pb(e,t){return typeof e=="function"?e(...t):!!e}function Tp(){}var P2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},O2=e=>{v.useEffect(()=>{e.clearReset()},[e])},M2=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&Pb(n,[e.error,r]),D2=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},N2=(e,t)=>e.isLoading&&e.isFetching&&!t,F2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,iy=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function I2(e,t,n){var d,u,f,m,h;const r=Ab(),i=E2(),s=R2(),o=r.defaultQueryOptions(e);(u=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||u.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",D2(o),P2(o,s),O2(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(g=>{const b=i?Tp:l.subscribe(ot.batchCalls(g));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),F2(o,c))throw iy(o,l,s);if(M2({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((m=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||m.call(f,o,c),o.experimental_prefetchInRender&&!ss&&N2(c,i)){const g=a?iy(o,l,s):(h=r.getQueryCache().get(o.queryHash))==null?void 0:h.promise;g==null||g.catch(Tp).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function Ob(e,t){return I2(e,C2)}function Sm(e,t){const n=Ab(),[r]=v.useState(()=>new T2(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(ot.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(Tp)},[r]);if(i.error&&Pb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const L2=(e,t)=>Ob({queryKey:["widgets",e,t],queryFn:()=>$2(e,t),retry:!1,throwOnError:!1}),$2=async(e,t)=>{const n=`widgets/with-link/${e}${t?`?device_id=${t}`:""}`,[r,i]=await jr(n);if(i===204)throw new Error("User is banned");return r};var C=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.MessageAgentBackground="widget_message_agent_background",e.MessageAgentText="widget_message_agent_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e.CloseButtonBackground="widget_close_button_background",e.CloseButtonText="widget_close_button_text",e.CloseButtonHover="widget_close_button_hover",e.IconColor="widget_icon_color",e.IconBackground="widget_icon_background",e.ErrorBackground="widget_error_background",e.ErrorText="widget_error_text",e.ErrorBorder="widget_error_border",e.SuccessBackground="widget_success_background",e.SuccessText="widget_success_text",e.SuccessBorder="widget_success_border",e.WarningBackground="widget_warning_background",e.WarningText="widget_warning_text",e.WarningBorder="widget_warning_border",e.LinkColor="widget_link_color",e.LinkHoverColor="widget_link_hover_color",e.DividerColor="widget_divider_color",e.ShadowColor="widget_shadow_color",e.StarActiveColor="widget_star_active_color",e.StarInactiveColor="widget_star_inactive_color",e.ModalOverlayColor="widget_modal_overlay_color",e.ChatCloseConfirmText="widget_chat_close_confirm_text",e.RatingHeaderBackground="widget_rating_header_background",e.RatingHeaderText="widget_rating_header_text",e.RatingSuccessBackground="widget_rating_success_background",e.RatingSuccessText="widget_rating_success_text",e.RatingRateConversationText="widget_rating_rate_conversation_text",e))(C||{}),ne=(e=>(e.TooltipDefault="tooltip_default",e.TooltipActive="tooltip_active",e.CloseButtonAria="close_button_aria",e.MessagePlaceholder="message_placeholder",e.FileUploadDisabled="file_upload_disabled",e.NewMessagesNotification="new_messages_notification",e.ChatCloseConfirm="chat_close_confirm",e.ChatCloseWarning="chat_close_warning",e.ChatSettings="chat_settings",e.ChatEndConversation="chat_end_conversation",e.CancelAction="cancel_action",e.CloseAction="close_action",e.QuickActions="quick_actions",e.GreetingStartChat="greeting_start_chat",e.RateLimitMessage="rate_limit_message",e.RatingHeaderEvaluate="rating_header_evaluate",e.RatingHeaderThanks="rating_header_thanks",e.RatingDescription="rating_description",e.RatingRateConversation="rating_rate_conversation",e.RatingComment="rating_comment",e.RatingCommentPlaceholder="rating_comment_placeholder",e.RatingSubmit="rating_submit",e.RatingNewConversation="rating_new_conversation",e.RatingThankYouTitle="rating_thank_you_title",e.RatingThankYouDescription="rating_thank_you_description",e.RatingCountdown="rating_countdown",e.RatingMinimumError="rating_minimum_error",e.RatingYourScore="rating_your_score",e.PoweredBy="powered_by",e))(ne||{});function B2(e){return!!e&&typeof e.public_id=="string"&&typeof e.link_id=="string"&&typeof e.name=="string"&&typeof e.is_browser_notification_enabled=="boolean"&&typeof e.is_hidden_on_offline=="boolean"&&typeof e.is_upload_disabled=="boolean"}/**
|
|
41
41
|
* @remix-run/router v1.21.0
|
|
42
42
|
*
|
|
43
43
|
* Copyright (c) Remix Software Inc.
|
|
@@ -46,7 +46,7 @@ Error generating stack: `+s.message+`
|
|
|
46
46
|
* LICENSE.md file in the root directory of this source tree.
|
|
47
47
|
*
|
|
48
48
|
* @license MIT
|
|
49
|
-
*/function Yu(){return Yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yu.apply(this,arguments)}var Xr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Xr||(Xr={}));function
|
|
49
|
+
*/function Yu(){return Yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yu.apply(this,arguments)}var Xr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Xr||(Xr={}));function z2(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((m,h)=>d(m,typeof m=="string"?null:m.state,h===0?"default":void 0));let s=l(n??i.length-1),o=Xr.Pop,a=null;function l(m){return Math.min(Math.max(m,0),i.length-1)}function c(){return i[s]}function d(m,h,g){h===void 0&&(h=null);let b=U2(i?c().pathname:"/",m,h,g);return Tm(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(m)),b}function u(m){return typeof m=="string"?m:_p(m)}return{get index(){return s},get action(){return o},get location(){return c()},createHref:u,createURL(m){return new URL(u(m),"http://localhost")},encodeLocation(m){let h=typeof m=="string"?ds(m):m;return{pathname:h.pathname||"",search:h.search||"",hash:h.hash||""}},push(m,h){o=Xr.Push;let g=d(m,h);s+=1,i.splice(s,i.length,g),r&&a&&a({action:o,location:g,delta:1})},replace(m,h){o=Xr.Replace;let g=d(m,h);i[s]=g,r&&a&&a({action:o,location:g,delta:0})},go(m){o=Xr.Pop;let h=l(s+m),g=i[h];s=h,a&&a({action:o,location:g,delta:m})},listen(m){return a=m,()=>{a=null}}}}function ut(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Tm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function V2(){return Math.random().toString(36).substr(2,8)}function U2(e,t,n,r){return n===void 0&&(n=null),Yu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ds(t):t,{state:n,key:t&&t.key||r||V2()})}function _p(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ds(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var sy;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(sy||(sy={}));function H2(e,t,n){return n===void 0&&(n="/"),W2(e,t,n,!1)}function W2(e,t,n,r){let i=typeof t=="string"?ds(t):t,s=_m(i.pathname||"/",n);if(s==null)return null;let o=Mb(e);q2(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=rj(s);a=tj(o[l],c,r)}return a}function Mb(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(ut(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=ai([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(ut(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Mb(s.children,t,d,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:J2(c,s.index),routesMeta:d})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of Db(s.path))i(s,o,l)}),t}function Db(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=Db(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function q2(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ej(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const G2=/^:[\w-]+$/,Y2=3,Q2=2,K2=1,X2=10,Z2=-2,oy=e=>e==="*";function J2(e,t){let n=e.split("/"),r=n.length;return n.some(oy)&&(r+=Z2),t&&(r+=Q2),n.filter(i=>!oy(i)).reduce((i,s)=>i+(G2.test(s)?Y2:s===""?K2:X2),r)}function ej(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function tj(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,d=s==="/"?t:t.slice(s.length)||"/",u=ay({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),f=l.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=ay({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:ai([s,u.pathname]),pathnameBase:aj(ai([s,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(s=ai([s,u.pathnameBase]))}return o}function ay(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=nj(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,d,u)=>{let{paramName:f,isOptional:m}=d;if(f==="*"){let g=a[u]||"";o=s.slice(0,s.length-g.length).replace(/(.)\/+$/,"$1")}const h=a[u];return m&&!h?c[f]=void 0:c[f]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:e}}function nj(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Tm(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function rj(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Tm(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function _m(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function ij(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ds(e):e;return{pathname:n?n.startsWith("/")?n:sj(n,t):t,search:lj(r),hash:uj(i)}}function sj(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Ld(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function oj(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Nb(e,t){let n=oj(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Fb(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ds(e):(i=Yu({},e),ut(!i.pathname||!i.pathname.includes("?"),Ld("?","pathname","search",i)),ut(!i.pathname||!i.pathname.includes("#"),Ld("#","pathname","hash",i)),ut(!i.search||!i.search.includes("#"),Ld("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let u=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),u-=1;i.pathname=f.join("/")}a=u>=0?t[u]:"/"}let l=ij(i,a),c=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const ai=e=>e.join("/").replace(/\/\/+/g,"/"),aj=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),lj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,uj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function cj(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ib=["post","put","patch","delete"];new Set(Ib);const dj=["get",...Ib];new Set(dj);/**
|
|
50
50
|
* React Router v6.28.0
|
|
51
51
|
*
|
|
52
52
|
* Copyright (c) Remix Software Inc.
|
|
@@ -55,7 +55,7 @@ Error generating stack: `+s.message+`
|
|
|
55
55
|
* LICENSE.md file in the root directory of this source tree.
|
|
56
56
|
*
|
|
57
57
|
* @license MIT
|
|
58
|
-
*/function
|
|
58
|
+
*/function $a(){return $a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$a.apply(this,arguments)}const Em=v.createContext(null),fj=v.createContext(null),fs=v.createContext(null),jc=v.createContext(null),ps=v.createContext({outlet:null,matches:[],isDataRoute:!1}),Lb=v.createContext(null);function pj(e,t){let{relative:n}=t===void 0?{}:t;ll()||ut(!1);let{basename:r,navigator:i}=v.useContext(fs),{hash:s,pathname:o,search:a}=zb(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:ai([r,o])),i.createHref({pathname:l,search:a,hash:s})}function ll(){return v.useContext(jc)!=null}function ul(){return ll()||ut(!1),v.useContext(jc).location}function $b(e){v.useContext(fs).static||v.useLayoutEffect(e)}function Bb(){let{isDataRoute:e}=v.useContext(ps);return e?_j():hj()}function hj(){ll()||ut(!1);let e=v.useContext(Em),{basename:t,future:n,navigator:r}=v.useContext(fs),{matches:i}=v.useContext(ps),{pathname:s}=ul(),o=JSON.stringify(Nb(i,n.v7_relativeSplatPath)),a=v.useRef(!1);return $b(()=>{a.current=!0}),v.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let u=Fb(c,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:ai([t,u.pathname])),(d.replace?r.replace:r.push)(u,d.state,d)},[t,r,o,s,e])}function zb(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(fs),{matches:i}=v.useContext(ps),{pathname:s}=ul(),o=JSON.stringify(Nb(i,r.v7_relativeSplatPath));return v.useMemo(()=>Fb(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function mj(e,t){return gj(e,t)}function gj(e,t,n,r){ll()||ut(!1);let{navigator:i}=v.useContext(fs),{matches:s}=v.useContext(ps),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=ul(),d;if(t){var u;let b=typeof t=="string"?ds(t):t;l==="/"||(u=b.pathname)!=null&&u.startsWith(l)||ut(!1),d=b}else d=c;let f=d.pathname||"/",m=f;if(l!=="/"){let b=l.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let h=H2(e,{pathname:m}),g=bj(h&&h.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:ai([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:ai([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&g?v.createElement(jc.Provider,{value:{location:$a({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Xr.Pop}},g):g}function vj(){let e=Tj(),t=cj(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:i},n):null,null)}const yj=v.createElement(vj,null);class xj extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?v.createElement(ps.Provider,{value:this.props.routeContext},v.createElement(Lb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function wj(e){let{routeContext:t,match:n,children:r}=e,i=v.useContext(Em);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(ps.Provider,{value:t},r)}function bj(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let d=o.findIndex(u=>u.route.id&&(a==null?void 0:a[u.route.id])!==void 0);d>=0||ut(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let u=o[d];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(c=d),u.route.id){let{loaderData:f,errors:m}=n,h=u.route.loader&&f[u.route.id]===void 0&&(!m||m[u.route.id]===void 0);if(u.route.lazy||h){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,u,f)=>{let m,h=!1,g=null,b=null;n&&(m=a&&u.route.id?a[u.route.id]:void 0,g=u.route.errorElement||yj,l&&(c<0&&f===0?(h=!0,b=null):c===f&&(h=!0,b=u.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,f+1)),y=()=>{let w;return m?w=g:h?w=b:u.route.Component?w=v.createElement(u.route.Component,null):u.route.element?w=u.route.element:w=d,v.createElement(wj,{match:u,routeContext:{outlet:d,matches:x,isDataRoute:n!=null},children:w})};return n&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?v.createElement(xj,{location:n.location,revalidation:n.revalidation,component:g,error:m,children:y(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):y()},null)}var Vb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Vb||{}),Qu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Qu||{});function Cj(e){let t=v.useContext(Em);return t||ut(!1),t}function kj(e){let t=v.useContext(fj);return t||ut(!1),t}function Sj(e){let t=v.useContext(ps);return t||ut(!1),t}function Ub(e){let t=Sj(),n=t.matches[t.matches.length-1];return n.route.id||ut(!1),n.route.id}function Tj(){var e;let t=v.useContext(Lb),n=kj(Qu.UseRouteError),r=Ub(Qu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function _j(){let{router:e}=Cj(Vb.UseNavigateStable),t=Ub(Qu.UseNavigateStable),n=v.useRef(!1);return $b(()=>{n.current=!0}),v.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,$a({fromRouteId:t},s)))},[e,t])}const ly={};function Ej(e,t){ly[t]||(ly[t]=!0,console.warn(t))}const uy=(e,t,n)=>Ej(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function jj(e,t){e!=null&&e.v7_startTransition||uy("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&!t&&uy("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const Aj="startTransition",cy=xf[Aj];function Rj(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=v.useRef();o.current==null&&(o.current=z2({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,c]=v.useState({action:a.action,location:a.location}),{v7_startTransition:d}=s||{},u=v.useCallback(f=>{d&&cy?cy(()=>c(f)):c(f)},[c,d]);return v.useLayoutEffect(()=>a.listen(u),[a,u]),v.useEffect(()=>jj(s),[s]),v.createElement(Pj,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function Ep(e){ut(!1)}function Pj(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Xr.Pop,navigator:s,static:o=!1,future:a}=e;ll()&&ut(!1);let l=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:l,navigator:s,static:o,future:$a({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=ds(r));let{pathname:d="/",search:u="",hash:f="",state:m=null,key:h="default"}=r,g=v.useMemo(()=>{let b=_m(d,l);return b==null?null:{location:{pathname:b,search:u,hash:f,state:m,key:h},navigationType:i}},[l,d,u,f,m,h,i]);return g==null?null:v.createElement(fs.Provider,{value:c},v.createElement(jc.Provider,{children:n,value:g}))}function Oj(e){let{children:t,location:n}=e;return mj(jp(t),n)}new Promise(()=>{});function jp(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,i)=>{if(!v.isValidElement(r))return;let s=[...t,i];if(r.type===v.Fragment){n.push.apply(n,jp(r.props.children,s));return}r.type!==Ep&&ut(!1),!r.props.index||!r.props.children||ut(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=jp(r.props.children,s)),n.push(o)}),n}/**
|
|
59
59
|
* React Router DOM v6.28.0
|
|
60
60
|
*
|
|
61
61
|
* Copyright (c) Remix Software Inc.
|
|
@@ -64,11 +64,11 @@ Error generating stack: `+s.message+`
|
|
|
64
64
|
* LICENSE.md file in the root directory of this source tree.
|
|
65
65
|
*
|
|
66
66
|
* @license MIT
|
|
67
|
-
*/function Ap(){return Ap=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ap.apply(this,arguments)}function Mj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Dj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Nj(e,t){return e.button===0&&(!t||t==="_self")&&!Dj(e)}const Fj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Ij="6";try{window.__reactRouterVersion=Ij}catch{}const Lj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$j=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Bj=v.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:d,viewTransition:u}=t,f=Mj(t,Fj),{basename:m}=v.useContext(fs),h,g=!1;if(typeof c=="string"&&$j.test(c)&&(h=c,Lj))try{let w=new URL(window.location.href),j=c.startsWith("//")?new URL(w.protocol+c):new URL(c),k=_m(j.pathname,m);j.origin===w.origin&&k!=null?c=k+j.search+j.hash:g=!0}catch{}let b=pj(c,{relative:i}),x=zj(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:u});function y(w){r&&r(w),w.defaultPrevented||x(w)}return v.createElement("a",Ap({},f,{href:h||b,onClick:g||s?r:y,ref:n,target:l}))});var dy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(dy||(dy={}));var fy;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fy||(fy={}));function zj(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=Bb(),c=
|
|
67
|
+
*/function Ap(){return Ap=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ap.apply(this,arguments)}function Mj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Dj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Nj(e,t){return e.button===0&&(!t||t==="_self")&&!Dj(e)}const Fj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Ij="6";try{window.__reactRouterVersion=Ij}catch{}const Lj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$j=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Bj=v.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:d,viewTransition:u}=t,f=Mj(t,Fj),{basename:m}=v.useContext(fs),h,g=!1;if(typeof c=="string"&&$j.test(c)&&(h=c,Lj))try{let w=new URL(window.location.href),j=c.startsWith("//")?new URL(w.protocol+c):new URL(c),k=_m(j.pathname,m);j.origin===w.origin&&k!=null?c=k+j.search+j.hash:g=!0}catch{}let b=pj(c,{relative:i}),x=zj(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:u});function y(w){r&&r(w),w.defaultPrevented||x(w)}return v.createElement("a",Ap({},f,{href:h||b,onClick:g||s?r:y,ref:n,target:l}))});var dy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(dy||(dy={}));var fy;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fy||(fy={}));function zj(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=Bb(),c=ul(),d=zb(e,{relative:o});return v.useCallback(u=>{if(Nj(u,n)){u.preventDefault();let f=r!==void 0?r:_p(c)===_p(d);l(e,{replace:f,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[c,l,d,r,i,n,e,s,o,a])}var Hb={exports:{}};/*!
|
|
68
68
|
Copyright (c) 2018 Jed Watson.
|
|
69
69
|
Licensed under the MIT License (MIT), see
|
|
70
70
|
http://jedwatson.github.io/classnames
|
|
71
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Hb);var Vj=Hb.exports;const Ie=_r(Vj);function Uj(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Hj=e=>{switch(e){case"success":return Gj;case"info":return Qj;case"warning":return Yj;case"error":return Kj;default:return null}},Wj=Array(12).fill(0),qj=({visible:e,className:t})=>W.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},W.createElement("div",{className:"sonner-spinner"},Wj.map((n,r)=>W.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Gj=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Yj=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Qj=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Kj=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Xj=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},W.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),W.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Zj=()=>{const[e,t]=W.useState(document.hidden);return W.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Rp=1;class Jj{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Rp++,o=this.toasts.find(l=>l.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...i,dismissible:a,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0}))),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,o;const a=i.then(async c=>{if(o=["resolve",c],W.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(tA(c)&&!c.ok){s=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,m=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:f,...m})}else if(c instanceof Error){s=!1;const u=typeof n.error=="function"?await n.error(c):n.error,f=typeof n.description=="function"?await n.description(c):n.description,m=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:f,...m})}else if(n.success!==void 0){s=!1;const u=typeof n.success=="function"?await n.success(c):n.success,f=typeof n.description=="function"?await n.description(c):n.description,m=typeof u=="object"?u:{message:u};this.create({id:r,type:"success",description:f,...m})}}).catch(async c=>{if(o=["reject",c],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description,f=typeof d=="object"?d:{message:d};this.create({id:r,type:"error",description:u,...f})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,d)=>a.then(()=>o[0]==="reject"?d(o[1]):c(o[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Rp++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Bt=new Jj,eA=(e,t)=>{const n=(t==null?void 0:t.id)||Rp++;return Bt.addToast({title:e,...t,id:n}),n},tA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",nA=eA,rA=()=>Bt.toasts,iA=()=>Bt.getActiveToasts(),Wb=Object.assign(nA,{success:Bt.success,info:Bt.info,warning:Bt.warning,error:Bt.error,custom:Bt.custom,message:Bt.message,promise:Bt.promise,dismiss:Bt.dismiss,loading:Bt.loading},{getHistory:rA,getToasts:iA});Uj("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function $l(e){return e.label!==void 0}const sA=3,oA="24px",aA="16px",py=4e3,lA=356,uA=14,cA=45,dA=200;function Un(...e){return e.filter(Boolean).join(" ")}function fA(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const pA=e=>{var t,n,r,i,s,o,a,l,c;const{invert:d,toast:u,unstyled:f,interacting:m,setHeights:h,visibleToasts:g,heights:b,index:x,toasts:y,expanded:w,removeToast:j,defaultRichColors:k,closeButton:T,style:A,cancelButtonStyle:S,actionButtonStyle:F,className:N="",descriptionClassName:O="",duration:Q,position:J,gap:U,expandByDefault:$,classNames:_,icons:I,closeButtonAriaLabel:R="Close toast"}=e,[P,D]=W.useState(null),[B,V]=W.useState(null),[Y,z]=W.useState(!1),[Z,K]=W.useState(!1),[ae,G]=W.useState(!1),[se,pe]=W.useState(!1),[Te,le]=W.useState(!1),[Ke,Xe]=W.useState(0),[qe,oe]=W.useState(0),fe=W.useRef(u.duration||Q||py),Ae=W.useRef(null),$e=W.useRef(null),Gt=x===0,ki=x+1<=g,M=u.type,X=u.dismissible!==!1,L=u.className||"",H=u.descriptionClassName||"",re=W.useMemo(()=>b.findIndex(me=>me.toastId===u.id)||0,[b,u.id]),ce=W.useMemo(()=>{var me;return(me=u.closeButton)!=null?me:T},[u.closeButton,T]),xe=W.useMemo(()=>u.duration||Q||py,[u.duration,Q]),it=W.useRef(0),gt=W.useRef(0),Bn=W.useRef(0),an=W.useRef(null),[ks,ur]=J.split("-"),Pr=W.useMemo(()=>b.reduce((me,ut,Ct)=>Ct>=re?me:me+ut.height,0),[b,re]),Ss=Zj(),Lo=u.invert||d,Si=M==="loading";gt.current=W.useMemo(()=>re*U+Pr,[re,Pr]),W.useEffect(()=>{fe.current=xe},[xe]),W.useEffect(()=>{z(!0)},[]),W.useEffect(()=>{const me=$e.current;if(me){const ut=me.getBoundingClientRect().height;return oe(ut),h(Ct=>[{toastId:u.id,height:ut,position:u.position},...Ct]),()=>h(Ct=>Ct.filter(Yt=>Yt.toastId!==u.id))}},[h,u.id]),W.useLayoutEffect(()=>{if(!Y)return;const me=$e.current,ut=me.style.height;me.style.height="auto";const Ct=me.getBoundingClientRect().height;me.style.height=ut,oe(Ct),h(Yt=>Yt.find(vt=>vt.toastId===u.id)?Yt.map(vt=>vt.toastId===u.id?{...vt,height:Ct}:vt):[{toastId:u.id,height:Ct,position:u.position},...Yt])},[Y,u.title,u.description,h,u.id]);const zn=W.useCallback(()=>{K(!0),Xe(gt.current),h(me=>me.filter(ut=>ut.toastId!==u.id)),setTimeout(()=>{j(u)},dA)},[u,j,h,gt]);W.useEffect(()=>{if(u.promise&&M==="loading"||u.duration===1/0||u.type==="loading")return;let me;return w||m||Ss?(()=>{if(Bn.current<it.current){const Yt=new Date().getTime()-it.current;fe.current=fe.current-Yt}Bn.current=new Date().getTime()})():(()=>{fe.current!==1/0&&(it.current=new Date().getTime(),me=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),zn()},fe.current))})(),()=>clearTimeout(me)},[w,m,u,M,Ss,zn]),W.useEffect(()=>{u.delete&&zn()},[zn,u.delete]);function vT(){var me;if(I!=null&&I.loading){var ut;return W.createElement("div",{className:Un(_==null?void 0:_.loader,u==null||(ut=u.classNames)==null?void 0:ut.loader,"sonner-loader"),"data-visible":M==="loading"},I.loading)}return W.createElement(qj,{className:Un(_==null?void 0:_.loader,u==null||(me=u.classNames)==null?void 0:me.loader),visible:M==="loading"})}var Ig,Lg;return W.createElement("li",{tabIndex:0,ref:$e,className:Un(N,L,_==null?void 0:_.toast,u==null||(t=u.classNames)==null?void 0:t.toast,_==null?void 0:_.default,_==null?void 0:_[M],u==null||(n=u.classNames)==null?void 0:n[M]),"data-sonner-toast":"","data-rich-colors":(Ig=u.richColors)!=null?Ig:k,"data-styled":!(u.jsx||u.unstyled||f),"data-mounted":Y,"data-promise":!!u.promise,"data-swiped":Te,"data-removed":Z,"data-visible":ki,"data-y-position":ks,"data-x-position":ur,"data-index":x,"data-front":Gt,"data-swiping":ae,"data-dismissible":X,"data-type":M,"data-invert":Lo,"data-swipe-out":se,"data-swipe-direction":B,"data-expanded":!!(w||$&&Y),style:{"--index":x,"--toasts-before":x,"--z-index":y.length-x,"--offset":`${Z?Ke:gt.current}px`,"--initial-height":$?"auto":`${qe}px`,...A,...u.style},onDragEnd:()=>{G(!1),D(null),an.current=null},onPointerDown:me=>{Si||!X||(Ae.current=new Date,Xe(gt.current),me.target.setPointerCapture(me.pointerId),me.target.tagName!=="BUTTON"&&(G(!0),an.current={x:me.clientX,y:me.clientY}))},onPointerUp:()=>{var me,ut,Ct;if(se||!X)return;an.current=null;const Yt=Number(((me=$e.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),yl=Number(((ut=$e.current)==null?void 0:ut.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),vt=new Date().getTime()-((Ct=Ae.current)==null?void 0:Ct.getTime()),ln=P==="x"?Yt:yl,xl=Math.abs(ln)/vt;if(Math.abs(ln)>=cA||xl>.11){Xe(gt.current),u.onDismiss==null||u.onDismiss.call(u,u),V(P==="x"?Yt>0?"right":"left":yl>0?"down":"up"),zn(),pe(!0);return}else{var Cn,kn;(Cn=$e.current)==null||Cn.style.setProperty("--swipe-amount-x","0px"),(kn=$e.current)==null||kn.style.setProperty("--swipe-amount-y","0px")}le(!1),G(!1),D(null)},onPointerMove:me=>{var ut,Ct,Yt;if(!an.current||!X||((ut=window.getSelection())==null?void 0:ut.toString().length)>0)return;const vt=me.clientY-an.current.y,ln=me.clientX-an.current.x;var xl;const Cn=(xl=e.swipeDirections)!=null?xl:fA(J);!P&&(Math.abs(ln)>1||Math.abs(vt)>1)&&D(Math.abs(ln)>Math.abs(vt)?"x":"y");let kn={x:0,y:0};const $g=Ti=>1/(1.5+Math.abs(Ti)/20);if(P==="y"){if(Cn.includes("top")||Cn.includes("bottom"))if(Cn.includes("top")&&vt<0||Cn.includes("bottom")&&vt>0)kn.y=vt;else{const Ti=vt*$g(vt);kn.y=Math.abs(Ti)<Math.abs(vt)?Ti:vt}}else if(P==="x"&&(Cn.includes("left")||Cn.includes("right")))if(Cn.includes("left")&&ln<0||Cn.includes("right")&&ln>0)kn.x=ln;else{const Ti=ln*$g(ln);kn.x=Math.abs(Ti)<Math.abs(ln)?Ti:ln}(Math.abs(kn.x)>0||Math.abs(kn.y)>0)&&le(!0),(Ct=$e.current)==null||Ct.style.setProperty("--swipe-amount-x",`${kn.x}px`),(Yt=$e.current)==null||Yt.style.setProperty("--swipe-amount-y",`${kn.y}px`)}},ce&&!u.jsx&&M!=="loading"?W.createElement("button",{"aria-label":R,"data-disabled":Si,"data-close-button":!0,onClick:Si||!X?()=>{}:()=>{zn(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Un(_==null?void 0:_.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(Lg=I==null?void 0:I.close)!=null?Lg:Xj):null,M||u.icon||u.promise?W.createElement("div",{"data-icon":"",className:Un(_==null?void 0:_.icon,u==null||(i=u.classNames)==null?void 0:i.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||vT():null,u.type!=="loading"?u.icon||(I==null?void 0:I[M])||Hj(M):null):null,W.createElement("div",{"data-content":"",className:Un(_==null?void 0:_.content,u==null||(s=u.classNames)==null?void 0:s.content)},W.createElement("div",{"data-title":"",className:Un(_==null?void 0:_.title,u==null||(o=u.classNames)==null?void 0:o.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?W.createElement("div",{"data-description":"",className:Un(O,H,_==null?void 0:_.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),W.isValidElement(u.cancel)?u.cancel:u.cancel&&$l(u.cancel)?W.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||S,onClick:me=>{$l(u.cancel)&&X&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,me),zn())},className:Un(_==null?void 0:_.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,W.isValidElement(u.action)?u.action:u.action&&$l(u.action)?W.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||F,onClick:me=>{$l(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,me),!me.defaultPrevented&&zn())},className:Un(_==null?void 0:_.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function hy(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function hA(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?aA:oA;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}const mA=W.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:c,mobileOffset:d,theme:u="light",richColors:f,duration:m,style:h,visibleToasts:g=sA,toastOptions:b,dir:x=hy(),gap:y=uA,icons:w,containerAriaLabel:j="Notifications"}=t,[k,T]=W.useState([]),A=W.useMemo(()=>Array.from(new Set([i].concat(k.filter(B=>B.position).map(B=>B.position)))),[k,i]),[S,F]=W.useState([]),[N,O]=W.useState(!1),[Q,J]=W.useState(!1),[U,$]=W.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),_=W.useRef(null),I=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=W.useRef(null),P=W.useRef(!1),D=W.useCallback(B=>{T(V=>{var Y;return(Y=V.find(z=>z.id===B.id))!=null&&Y.delete||Bt.dismiss(B.id),V.filter(({id:z})=>z!==B.id)})},[]);return W.useEffect(()=>Bt.subscribe(B=>{if(B.dismiss){const V=k.map(Y=>Y.id===B.id?{...Y,delete:!0}:Y);requestAnimationFrame(()=>{T(V)});return}setTimeout(()=>{W2.flushSync(()=>{T(V=>{const Y=V.findIndex(z=>z.id===B.id);return Y!==-1?[...V.slice(0,Y),{...V[Y],...B},...V.slice(Y+1)]:[B,...V]})})})}),[k]),W.useEffect(()=>{if(u!=="system"){$(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:V})=>{$(V?"dark":"light")})}catch{B.addListener(({matches:Y})=>{try{$(Y?"dark":"light")}catch(z){console.error(z)}})}},[u]),W.useEffect(()=>{k.length<=1&&O(!1)},[k]),W.useEffect(()=>{const B=V=>{var Y;if(s.every(K=>V[K]||V.code===K)){var Z;O(!0),(Z=_.current)==null||Z.focus()}V.code==="Escape"&&(document.activeElement===_.current||(Y=_.current)!=null&&Y.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[s]),W.useEffect(()=>{if(_.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,P.current=!1)}},[_.current]),W.createElement("section",{ref:n,"aria-label":`${j} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((B,V)=>{var Y;const[z,Z]=B.split("-");return k.length?W.createElement("ol",{key:B,dir:x==="auto"?hy():x,tabIndex:-1,ref:_,className:l,"data-sonner-toaster":!0,"data-sonner-theme":U,"data-y-position":z,"data-lifted":N&&k.length>1&&!o,"data-x-position":Z,style:{"--front-toast-height":`${((Y=S[0])==null?void 0:Y.height)||0}px`,"--width":`${lA}px`,"--gap":`${y}px`,...h,...hA(c,d)},onBlur:K=>{P.current&&!K.currentTarget.contains(K.relatedTarget)&&(P.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:K=>{K.target instanceof HTMLElement&&K.target.dataset.dismissible==="false"||P.current||(P.current=!0,R.current=K.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{Q||O(!1)},onDragEnd:()=>O(!1),onPointerDown:K=>{K.target instanceof HTMLElement&&K.target.dataset.dismissible==="false"||J(!0)},onPointerUp:()=>J(!1)},k.filter(K=>!K.position&&V===0||K.position===B).map((K,ae)=>{var G,se;return W.createElement(pA,{key:K.id,icons:w,index:ae,toast:K,defaultRichColors:f,duration:(G=b==null?void 0:b.duration)!=null?G:m,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:g,closeButton:(se=b==null?void 0:b.closeButton)!=null?se:a,interacting:Q,position:B,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:D,toasts:k.filter(pe=>pe.position==K.position),heights:S.filter(pe=>pe.position==K.position),setHeights:F,expandByDefault:o,gap:y,expanded:N,swipeDirections:t.swipeDirections})})):null}))});function Zn(e){return Wb.custom(t=>p.jsx(gA,{id:t,title:e.title,description:e.description,variant:e.variant}))}const $d={success:{bg:"bg-green-100 border-green-200",text:"text-green-800"},error:{bg:"bg-red-100 border-red-200",text:"text-red-800"},warning:{bg:"bg-orange-100 border-orange-200",text:"text-orange-800"},info:{bg:"bg-blue-100 border-blue-200",text:"text-blue-800"}};function gA(e){const{title:t,description:n,button:r,id:i,variant:s}=e;return p.jsxs("div",{className:Ie("flex rounded-lg shadow-lg ring-1 ring-black/5 w-full md:max-w-[364px] items-center p-3 backdrop-blur-sm border mb-2",$d[s||"info"].bg),children:[p.jsx("div",{className:"flex flex-1 items-center",children:p.jsxs("div",{className:"w-full",children:[t&&p.jsx("p",{className:Ie("text-sm font-medium",$d[s||"info"].text),children:t}),p.jsx("p",{className:Ie("text-sm",$d[s||"info"].text,{"mt-1":!!t}),children:n})]})}),r&&p.jsx("div",{className:"ml-5 shrink-0 rounded-md text-sm font-medium text-indigo-600 hover:text-indigo-500 focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:outline-hidden",children:p.jsx("button",{className:"rounded bg-indigo-50 px-3 py-1 text-sm font-semibold text-indigo-600 hover:bg-indigo-100",onClick:()=>{r.onClick(),Wb.dismiss(i)},children:r.label})})]})}function vA(e){return Array.isArray(e)&&e[0].field!==void 0}const wo=(e,t)=>{var n;if(vA(e)){for(const r of e)(n=t==null?void 0:t.form)==null||n.setFieldError(r.field,r.message);return}if(e&&e.message){t!=null&&t.noToast||Zn({description:e.message,variant:"error"});return}if(e&&e.error){t!=null&&t.noToast||Zn({description:e.error,variant:"error"});return}},yA=[{code:429,text:"Çok fazla istek gönderdiniz. Lütfen biraz bekleyin"},{code:401,text:"Bu işlemi yapabilmek için giriş yapmalısınız"},{code:403,text:"Bu işlemi yapabilmek için yetkiniz yok"},{code:500,text:"Sunucu hatası oluştu"},{code:422,text:"Form doğrulaması başarısız oldu"},{code:413,text:"Yüklenen dosya boyutu izin verilen sınırı aştı"}],xA=[{code:"FST_REQ_FILE_TOO_LARGE",text:"Yüklenen dosya boyutu izin verilen sınırı aştı"}],wA=(e,t)=>{if(Ln(t))return!1;if(e===null)return Zn({description:"Bir hata oluştu",variant:"error"}),!0;if(typeof e=="object"&&e){const r=e.code;if(r){const i=xA.find(s=>s.code===r);if(i)return Zn({description:i.text,variant:"error"}),!0}if(e.message)return Zn({description:e.message,variant:"error"}),!0}const n=yA.find(r=>r.code===t);return Zn({description:n?n.text:"Bir hata oluştu",variant:"error"}),!0},bA={xs:{default:"!p-1",rounded:"!p-1"},sm:{default:"text-xs px-2.5 py-1.5",rounded:"p-1.5"},md:{default:"text-sm px-3 py-2",rounded:"p-2"},lg:{default:"text-sm px-4 py-2.5",rounded:"p-2.5"},xl:{default:"text-base px-5 py-3",rounded:"p-3"}},my={primary:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},secondary:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},danger:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},success:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},warning:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"}},jm=v.createContext({});function Ac(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const Am=typeof window<"u",qb=Am?v.useLayoutEffect:v.useEffect,Rc=v.createContext(null),Rm=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class CA extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function kA({children:e,isPresent:t,anchorX:n}){const r=v.useId(),i=v.useRef(null),s=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=v.useContext(Rm);return v.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:d,right:u}=s.current;if(t||!i.current||!a||!l)return;const f=n==="left"?`left: ${d}`:`right: ${u}`;i.current.dataset.motionPopId=r;const m=document.createElement("style");return o&&(m.nonce=o),document.head.appendChild(m),m.sheet&&m.sheet.insertRule(`
|
|
71
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Hb);var Vj=Hb.exports;const Ie=_r(Vj);function Uj(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Hj=e=>{switch(e){case"success":return Gj;case"info":return Qj;case"warning":return Yj;case"error":return Kj;default:return null}},Wj=Array(12).fill(0),qj=({visible:e,className:t})=>W.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},W.createElement("div",{className:"sonner-spinner"},Wj.map((n,r)=>W.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Gj=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Yj=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Qj=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Kj=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Xj=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},W.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),W.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Zj=()=>{const[e,t]=W.useState(document.hidden);return W.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Rp=1;class Jj{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Rp++,o=this.toasts.find(l=>l.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...i,dismissible:a,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0}))),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,o;const a=i.then(async c=>{if(o=["resolve",c],W.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(tA(c)&&!c.ok){s=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,m=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:f,...m})}else if(c instanceof Error){s=!1;const u=typeof n.error=="function"?await n.error(c):n.error,f=typeof n.description=="function"?await n.description(c):n.description,m=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:f,...m})}else if(n.success!==void 0){s=!1;const u=typeof n.success=="function"?await n.success(c):n.success,f=typeof n.description=="function"?await n.description(c):n.description,m=typeof u=="object"?u:{message:u};this.create({id:r,type:"success",description:f,...m})}}).catch(async c=>{if(o=["reject",c],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description,f=typeof d=="object"?d:{message:d};this.create({id:r,type:"error",description:u,...f})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,d)=>a.then(()=>o[0]==="reject"?d(o[1]):c(o[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Rp++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Bt=new Jj,eA=(e,t)=>{const n=(t==null?void 0:t.id)||Rp++;return Bt.addToast({title:e,...t,id:n}),n},tA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",nA=eA,rA=()=>Bt.toasts,iA=()=>Bt.getActiveToasts(),Wb=Object.assign(nA,{success:Bt.success,info:Bt.info,warning:Bt.warning,error:Bt.error,custom:Bt.custom,message:Bt.message,promise:Bt.promise,dismiss:Bt.dismiss,loading:Bt.loading},{getHistory:rA,getToasts:iA});Uj("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Bl(e){return e.label!==void 0}const sA=3,oA="24px",aA="16px",py=4e3,lA=356,uA=14,cA=45,dA=200;function Un(...e){return e.filter(Boolean).join(" ")}function fA(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const pA=e=>{var t,n,r,i,s,o,a,l,c;const{invert:d,toast:u,unstyled:f,interacting:m,setHeights:h,visibleToasts:g,heights:b,index:x,toasts:y,expanded:w,removeToast:j,defaultRichColors:k,closeButton:T,style:A,cancelButtonStyle:S,actionButtonStyle:F,className:N="",descriptionClassName:O="",duration:Q,position:J,gap:U,expandByDefault:$,classNames:_,icons:I,closeButtonAriaLabel:R="Close toast"}=e,[P,D]=W.useState(null),[B,V]=W.useState(null),[Y,z]=W.useState(!1),[Z,K]=W.useState(!1),[ae,q]=W.useState(!1),[se,pe]=W.useState(!1),[Te,le]=W.useState(!1),[Ke,Xe]=W.useState(0),[qe,oe]=W.useState(0),fe=W.useRef(u.duration||Q||py),Ae=W.useRef(null),$e=W.useRef(null),Gt=x===0,ki=x+1<=g,M=u.type,X=u.dismissible!==!1,L=u.className||"",H=u.descriptionClassName||"",re=W.useMemo(()=>b.findIndex(me=>me.toastId===u.id)||0,[b,u.id]),ce=W.useMemo(()=>{var me;return(me=u.closeButton)!=null?me:T},[u.closeButton,T]),xe=W.useMemo(()=>u.duration||Q||py,[u.duration,Q]),it=W.useRef(0),gt=W.useRef(0),Bn=W.useRef(0),an=W.useRef(null),[Ss,ur]=J.split("-"),Pr=W.useMemo(()=>b.reduce((me,ct,Ct)=>Ct>=re?me:me+ct.height,0),[b,re]),Ts=Zj(),Lo=u.invert||d,Si=M==="loading";gt.current=W.useMemo(()=>re*U+Pr,[re,Pr]),W.useEffect(()=>{fe.current=xe},[xe]),W.useEffect(()=>{z(!0)},[]),W.useEffect(()=>{const me=$e.current;if(me){const ct=me.getBoundingClientRect().height;return oe(ct),h(Ct=>[{toastId:u.id,height:ct,position:u.position},...Ct]),()=>h(Ct=>Ct.filter(Yt=>Yt.toastId!==u.id))}},[h,u.id]),W.useLayoutEffect(()=>{if(!Y)return;const me=$e.current,ct=me.style.height;me.style.height="auto";const Ct=me.getBoundingClientRect().height;me.style.height=ct,oe(Ct),h(Yt=>Yt.find(vt=>vt.toastId===u.id)?Yt.map(vt=>vt.toastId===u.id?{...vt,height:Ct}:vt):[{toastId:u.id,height:Ct,position:u.position},...Yt])},[Y,u.title,u.description,h,u.id]);const zn=W.useCallback(()=>{K(!0),Xe(gt.current),h(me=>me.filter(ct=>ct.toastId!==u.id)),setTimeout(()=>{j(u)},dA)},[u,j,h,gt]);W.useEffect(()=>{if(u.promise&&M==="loading"||u.duration===1/0||u.type==="loading")return;let me;return w||m||Ts?(()=>{if(Bn.current<it.current){const Yt=new Date().getTime()-it.current;fe.current=fe.current-Yt}Bn.current=new Date().getTime()})():(()=>{fe.current!==1/0&&(it.current=new Date().getTime(),me=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),zn()},fe.current))})(),()=>clearTimeout(me)},[w,m,u,M,Ts,zn]),W.useEffect(()=>{u.delete&&zn()},[zn,u.delete]);function vT(){var me;if(I!=null&&I.loading){var ct;return W.createElement("div",{className:Un(_==null?void 0:_.loader,u==null||(ct=u.classNames)==null?void 0:ct.loader,"sonner-loader"),"data-visible":M==="loading"},I.loading)}return W.createElement(qj,{className:Un(_==null?void 0:_.loader,u==null||(me=u.classNames)==null?void 0:me.loader),visible:M==="loading"})}var Ig,Lg;return W.createElement("li",{tabIndex:0,ref:$e,className:Un(N,L,_==null?void 0:_.toast,u==null||(t=u.classNames)==null?void 0:t.toast,_==null?void 0:_.default,_==null?void 0:_[M],u==null||(n=u.classNames)==null?void 0:n[M]),"data-sonner-toast":"","data-rich-colors":(Ig=u.richColors)!=null?Ig:k,"data-styled":!(u.jsx||u.unstyled||f),"data-mounted":Y,"data-promise":!!u.promise,"data-swiped":Te,"data-removed":Z,"data-visible":ki,"data-y-position":Ss,"data-x-position":ur,"data-index":x,"data-front":Gt,"data-swiping":ae,"data-dismissible":X,"data-type":M,"data-invert":Lo,"data-swipe-out":se,"data-swipe-direction":B,"data-expanded":!!(w||$&&Y),style:{"--index":x,"--toasts-before":x,"--z-index":y.length-x,"--offset":`${Z?Ke:gt.current}px`,"--initial-height":$?"auto":`${qe}px`,...A,...u.style},onDragEnd:()=>{q(!1),D(null),an.current=null},onPointerDown:me=>{Si||!X||(Ae.current=new Date,Xe(gt.current),me.target.setPointerCapture(me.pointerId),me.target.tagName!=="BUTTON"&&(q(!0),an.current={x:me.clientX,y:me.clientY}))},onPointerUp:()=>{var me,ct,Ct;if(se||!X)return;an.current=null;const Yt=Number(((me=$e.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),xl=Number(((ct=$e.current)==null?void 0:ct.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),vt=new Date().getTime()-((Ct=Ae.current)==null?void 0:Ct.getTime()),ln=P==="x"?Yt:xl,wl=Math.abs(ln)/vt;if(Math.abs(ln)>=cA||wl>.11){Xe(gt.current),u.onDismiss==null||u.onDismiss.call(u,u),V(P==="x"?Yt>0?"right":"left":xl>0?"down":"up"),zn(),pe(!0);return}else{var Cn,kn;(Cn=$e.current)==null||Cn.style.setProperty("--swipe-amount-x","0px"),(kn=$e.current)==null||kn.style.setProperty("--swipe-amount-y","0px")}le(!1),q(!1),D(null)},onPointerMove:me=>{var ct,Ct,Yt;if(!an.current||!X||((ct=window.getSelection())==null?void 0:ct.toString().length)>0)return;const vt=me.clientY-an.current.y,ln=me.clientX-an.current.x;var wl;const Cn=(wl=e.swipeDirections)!=null?wl:fA(J);!P&&(Math.abs(ln)>1||Math.abs(vt)>1)&&D(Math.abs(ln)>Math.abs(vt)?"x":"y");let kn={x:0,y:0};const $g=Ti=>1/(1.5+Math.abs(Ti)/20);if(P==="y"){if(Cn.includes("top")||Cn.includes("bottom"))if(Cn.includes("top")&&vt<0||Cn.includes("bottom")&&vt>0)kn.y=vt;else{const Ti=vt*$g(vt);kn.y=Math.abs(Ti)<Math.abs(vt)?Ti:vt}}else if(P==="x"&&(Cn.includes("left")||Cn.includes("right")))if(Cn.includes("left")&&ln<0||Cn.includes("right")&&ln>0)kn.x=ln;else{const Ti=ln*$g(ln);kn.x=Math.abs(Ti)<Math.abs(ln)?Ti:ln}(Math.abs(kn.x)>0||Math.abs(kn.y)>0)&&le(!0),(Ct=$e.current)==null||Ct.style.setProperty("--swipe-amount-x",`${kn.x}px`),(Yt=$e.current)==null||Yt.style.setProperty("--swipe-amount-y",`${kn.y}px`)}},ce&&!u.jsx&&M!=="loading"?W.createElement("button",{"aria-label":R,"data-disabled":Si,"data-close-button":!0,onClick:Si||!X?()=>{}:()=>{zn(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Un(_==null?void 0:_.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(Lg=I==null?void 0:I.close)!=null?Lg:Xj):null,M||u.icon||u.promise?W.createElement("div",{"data-icon":"",className:Un(_==null?void 0:_.icon,u==null||(i=u.classNames)==null?void 0:i.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||vT():null,u.type!=="loading"?u.icon||(I==null?void 0:I[M])||Hj(M):null):null,W.createElement("div",{"data-content":"",className:Un(_==null?void 0:_.content,u==null||(s=u.classNames)==null?void 0:s.content)},W.createElement("div",{"data-title":"",className:Un(_==null?void 0:_.title,u==null||(o=u.classNames)==null?void 0:o.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?W.createElement("div",{"data-description":"",className:Un(O,H,_==null?void 0:_.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),W.isValidElement(u.cancel)?u.cancel:u.cancel&&Bl(u.cancel)?W.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||S,onClick:me=>{Bl(u.cancel)&&X&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,me),zn())},className:Un(_==null?void 0:_.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,W.isValidElement(u.action)?u.action:u.action&&Bl(u.action)?W.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||F,onClick:me=>{Bl(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,me),!me.defaultPrevented&&zn())},className:Un(_==null?void 0:_.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function hy(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function hA(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?aA:oA;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}const mA=W.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:c,mobileOffset:d,theme:u="light",richColors:f,duration:m,style:h,visibleToasts:g=sA,toastOptions:b,dir:x=hy(),gap:y=uA,icons:w,containerAriaLabel:j="Notifications"}=t,[k,T]=W.useState([]),A=W.useMemo(()=>Array.from(new Set([i].concat(k.filter(B=>B.position).map(B=>B.position)))),[k,i]),[S,F]=W.useState([]),[N,O]=W.useState(!1),[Q,J]=W.useState(!1),[U,$]=W.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),_=W.useRef(null),I=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=W.useRef(null),P=W.useRef(!1),D=W.useCallback(B=>{T(V=>{var Y;return(Y=V.find(z=>z.id===B.id))!=null&&Y.delete||Bt.dismiss(B.id),V.filter(({id:z})=>z!==B.id)})},[]);return W.useEffect(()=>Bt.subscribe(B=>{if(B.dismiss){const V=k.map(Y=>Y.id===B.id?{...Y,delete:!0}:Y);requestAnimationFrame(()=>{T(V)});return}setTimeout(()=>{WE.flushSync(()=>{T(V=>{const Y=V.findIndex(z=>z.id===B.id);return Y!==-1?[...V.slice(0,Y),{...V[Y],...B},...V.slice(Y+1)]:[B,...V]})})})}),[k]),W.useEffect(()=>{if(u!=="system"){$(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:V})=>{$(V?"dark":"light")})}catch{B.addListener(({matches:Y})=>{try{$(Y?"dark":"light")}catch(z){console.error(z)}})}},[u]),W.useEffect(()=>{k.length<=1&&O(!1)},[k]),W.useEffect(()=>{const B=V=>{var Y;if(s.every(K=>V[K]||V.code===K)){var Z;O(!0),(Z=_.current)==null||Z.focus()}V.code==="Escape"&&(document.activeElement===_.current||(Y=_.current)!=null&&Y.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[s]),W.useEffect(()=>{if(_.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,P.current=!1)}},[_.current]),W.createElement("section",{ref:n,"aria-label":`${j} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((B,V)=>{var Y;const[z,Z]=B.split("-");return k.length?W.createElement("ol",{key:B,dir:x==="auto"?hy():x,tabIndex:-1,ref:_,className:l,"data-sonner-toaster":!0,"data-sonner-theme":U,"data-y-position":z,"data-lifted":N&&k.length>1&&!o,"data-x-position":Z,style:{"--front-toast-height":`${((Y=S[0])==null?void 0:Y.height)||0}px`,"--width":`${lA}px`,"--gap":`${y}px`,...h,...hA(c,d)},onBlur:K=>{P.current&&!K.currentTarget.contains(K.relatedTarget)&&(P.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:K=>{K.target instanceof HTMLElement&&K.target.dataset.dismissible==="false"||P.current||(P.current=!0,R.current=K.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{Q||O(!1)},onDragEnd:()=>O(!1),onPointerDown:K=>{K.target instanceof HTMLElement&&K.target.dataset.dismissible==="false"||J(!0)},onPointerUp:()=>J(!1)},k.filter(K=>!K.position&&V===0||K.position===B).map((K,ae)=>{var q,se;return W.createElement(pA,{key:K.id,icons:w,index:ae,toast:K,defaultRichColors:f,duration:(q=b==null?void 0:b.duration)!=null?q:m,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:g,closeButton:(se=b==null?void 0:b.closeButton)!=null?se:a,interacting:Q,position:B,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:D,toasts:k.filter(pe=>pe.position==K.position),heights:S.filter(pe=>pe.position==K.position),setHeights:F,expandByDefault:o,gap:y,expanded:N,swipeDirections:t.swipeDirections})})):null}))});function Zn(e){return Wb.custom(t=>p.jsx(gA,{id:t,title:e.title,description:e.description,variant:e.variant}))}const $d={success:{bg:"bg-green-100 border-green-200",text:"text-green-800"},error:{bg:"bg-red-100 border-red-200",text:"text-red-800"},warning:{bg:"bg-orange-100 border-orange-200",text:"text-orange-800"},info:{bg:"bg-blue-100 border-blue-200",text:"text-blue-800"}};function gA(e){const{title:t,description:n,button:r,id:i,variant:s}=e;return p.jsxs("div",{className:Ie("flex rounded-lg shadow-lg ring-1 ring-black/5 w-full md:max-w-[364px] items-center p-3 backdrop-blur-sm border mb-2",$d[s||"info"].bg),children:[p.jsx("div",{className:"flex flex-1 items-center",children:p.jsxs("div",{className:"w-full",children:[t&&p.jsx("p",{className:Ie("text-sm font-medium",$d[s||"info"].text),children:t}),p.jsx("p",{className:Ie("text-sm",$d[s||"info"].text,{"mt-1":!!t}),children:n})]})}),r&&p.jsx("div",{className:"ml-5 shrink-0 rounded-md text-sm font-medium text-indigo-600 hover:text-indigo-500 focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:outline-hidden",children:p.jsx("button",{className:"rounded bg-indigo-50 px-3 py-1 text-sm font-semibold text-indigo-600 hover:bg-indigo-100",onClick:()=>{r.onClick(),Wb.dismiss(i)},children:r.label})})]})}function vA(e){return Array.isArray(e)&&e[0].field!==void 0}const bo=(e,t)=>{var n;if(vA(e)){for(const r of e)(n=t==null?void 0:t.form)==null||n.setFieldError(r.field,r.message);return}if(e&&e.message){t!=null&&t.noToast||Zn({description:e.message,variant:"error"});return}if(e&&e.error){t!=null&&t.noToast||Zn({description:e.error,variant:"error"});return}},yA=[{code:429,text:"Çok fazla istek gönderdiniz. Lütfen biraz bekleyin"},{code:401,text:"Bu işlemi yapabilmek için giriş yapmalısınız"},{code:403,text:"Bu işlemi yapabilmek için yetkiniz yok"},{code:500,text:"Sunucu hatası oluştu"},{code:422,text:"Form doğrulaması başarısız oldu"},{code:413,text:"Yüklenen dosya boyutu izin verilen sınırı aştı"}],xA=[{code:"FST_REQ_FILE_TOO_LARGE",text:"Yüklenen dosya boyutu izin verilen sınırı aştı"}],wA=(e,t)=>{if(Ln(t))return!1;if(e===null)return Zn({description:"Bir hata oluştu",variant:"error"}),!0;if(typeof e=="object"&&e){const r=e.code;if(r){const i=xA.find(s=>s.code===r);if(i)return Zn({description:i.text,variant:"error"}),!0}if(e.message)return Zn({description:e.message,variant:"error"}),!0}const n=yA.find(r=>r.code===t);return Zn({description:n?n.text:"Bir hata oluştu",variant:"error"}),!0},bA={xs:{default:"!p-1",rounded:"!p-1"},sm:{default:"text-xs px-2.5 py-1.5",rounded:"p-1.5"},md:{default:"text-sm px-3 py-2",rounded:"p-2"},lg:{default:"text-sm px-4 py-2.5",rounded:"p-2.5"},xl:{default:"text-base px-5 py-3",rounded:"p-3"}},my={primary:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},secondary:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},danger:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},success:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},warning:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"}},jm=v.createContext({});function Ac(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const Am=typeof window<"u",qb=Am?v.useLayoutEffect:v.useEffect,Rc=v.createContext(null),Rm=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class CA extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function kA({children:e,isPresent:t,anchorX:n}){const r=v.useId(),i=v.useRef(null),s=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=v.useContext(Rm);return v.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:d,right:u}=s.current;if(t||!i.current||!a||!l)return;const f=n==="left"?`left: ${d}`:`right: ${u}`;i.current.dataset.motionPopId=r;const m=document.createElement("style");return o&&(m.nonce=o),document.head.appendChild(m),m.sheet&&m.sheet.insertRule(`
|
|
72
72
|
[data-motion-pop-id="${r}"] {
|
|
73
73
|
position: absolute !important;
|
|
74
74
|
width: ${a}px !important;
|
|
@@ -76,7 +76,7 @@ Error generating stack: `+s.message+`
|
|
|
76
76
|
${f}px !important;
|
|
77
77
|
top: ${c}px !important;
|
|
78
78
|
}
|
|
79
|
-
`),()=>{document.head.removeChild(m)}},[t]),p.jsx(CA,{isPresent:t,childRef:i,sizeRef:s,children:v.cloneElement(e,{ref:i})})}const SA=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Ac(TA),c=v.useId();let d=!0,u=v.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:f=>{l.set(f,!0);for(const m of l.values())if(!m)return;r&&r()},register:f=>(l.set(f,!1),()=>l.delete(f))}),[n,l,r]);return s&&d&&(u={...u}),v.useMemo(()=>{l.forEach((f,m)=>l.set(m,!1))},[n]),v.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=p.jsx(kA,{isPresent:n,anchorX:a,children:e})),p.jsx(Rc.Provider,{value:u,children:e})};function TA(){return new Map}function Gb(e=!0){const t=v.useContext(Rc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=v.useId();v.useEffect(()=>{if(e)return i(s)},[e]);const o=v.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Bl=e=>e.key||"";function gy(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const as=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,c]=Gb(o),d=v.useMemo(()=>gy(e),[e]),u=o&&!l?[]:d.map(Bl),f=v.useRef(!0),m=v.useRef(d),h=Ac(()=>new Map),[g,b]=v.useState(d),[x,y]=v.useState(d);qb(()=>{f.current=!1,m.current=d;for(let k=0;k<x.length;k++){const T=Bl(x[k]);u.includes(T)?h.delete(T):h.get(T)!==!0&&h.set(T,!1)}},[x,u.length,u.join("-")]);const w=[];if(d!==g){let k=[...d];for(let T=0;T<x.length;T++){const A=x[T],S=Bl(A);u.includes(S)||(k.splice(T,0,A),w.push(A))}return s==="wait"&&w.length&&(k=w),y(gy(k)),b(d),null}const{forceRender:j}=v.useContext(jm);return p.jsx(p.Fragment,{children:x.map(k=>{const T=Bl(k),A=o&&!l?!1:d===x||u.includes(T),S=()=>{if(h.has(T))h.set(T,!0);else return;let F=!0;h.forEach(N=>{N||(F=!1)}),F&&(j==null||j(),y(m.current),o&&(c==null||c()),r&&r())};return p.jsx(SA,{isPresent:A,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:A?void 0:S,anchorX:a,children:k},T)})})};function Pm(e,t){e.indexOf(t)===-1&&e.push(t)}function Om(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let Pp=()=>{};const Op={skipAnimations:!1,useManualTiming:!1};function Mm(e){let t;return()=>(t===void 0&&(t=e()),t)}const xn=e=>e,$a=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Dm{constructor(){this.subscriptions=[]}add(t){return Pm(this.subscriptions,t),()=>Om(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const tr=e=>e*1e3,nr=e=>e/1e3;function Yb(e,t){return t?e*(1e3/t):0}const _A=Mm(()=>window.ScrollTimeline!==void 0);class EA{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}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=>{if(_A()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].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]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class jA extends EA{then(t,n){return this.finished.finally(t).then(()=>{})}}const vy={value:null,addProjectionMetrics:null},Nm=e=>Array.isArray(e)&&typeof e[0]=="number",AA={};function RA(e,t){const n=Mm(e);return()=>AA[t]??n()}const Ba=RA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Qb=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(s/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},ta=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Mp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ta([0,.65,.55,1]),circOut:ta([.55,0,1,.45]),backIn:ta([.31,.01,.66,-.59]),backOut:ta([.33,1.53,.69,.99])};function Kb(e,t){if(e)return typeof e=="function"&&Ba()?Qb(e,t):Nm(e)?ta(e):Array.isArray(e)?e.map(n=>Kb(n,t)||Mp.easeOut):Mp[e]}function PA(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},c=void 0){const d={[t]:n};l&&(d.offset=l);const u=Kb(a,i);return Array.isArray(u)&&(d.easing=u),e.animate(d,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:c})}function Fm(e){return typeof e=="function"&&"applyToOptions"in e}function Im(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Ku=2e4;function Lm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ku;)t+=n,r=e.next(t);return t>=Ku?1/0:t}function OA(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Lm(r),Ku);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:nr(i)}}function Xb(e){return!!(typeof e=="function"&&Ba()||!e||typeof e=="string"&&(e in Mp||Ba())||Nm(e)||Array.isArray(e)&&e.every(Xb))}function yy(e,t){e.timeline=t,e.onfinish=null}const zl=["read","resolveKeyframes","update","preRender","render","postRender"];function MA(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(u){o.has(u)&&(d.schedule(u),e()),l++,u(a)}const d={schedule:(u,f=!1,m=!1)=>{const g=m&&i?n:r;return f&&o.add(u),g.has(u)||g.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),t&&vy.value&&vy.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(u))}};return d}const DA=40;function Zb(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=zl.reduce((x,y)=>(x[y]=MA(s,t?y:void 0),x),{}),{read:a,resolveKeyframes:l,update:c,preRender:d,render:u,postRender:f}=o,m=()=>{const x=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(x-i.timestamp,DA),1),i.timestamp=x,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),d.process(i),u.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},h=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:zl.reduce((x,y)=>{const w=o[y];return x[y]=(j,k=!1,T=!1)=>(n||h(),w.schedule(j,k,T)),x},{}),cancel:x=>{for(let y=0;y<zl.length;y++)o[zl[y]].cancel(x)},state:i,steps:o}}const{schedule:$m,cancel:zB}=Zb(queueMicrotask,!1),{schedule:Me,cancel:hi,state:xt,steps:Bd}=Zb(typeof requestAnimationFrame<"u"?requestAnimationFrame:xn,!0);let cu;function NA(){cu=void 0}const rr={now:()=>(cu===void 0&&rr.set(xt.isProcessing||Op.useManualTiming?xt.timestamp:performance.now()),cu),set:e=>{cu=e,queueMicrotask(NA)}},_n={x:!1,y:!1};function Jb(){return _n.x||_n.y}function FA(e){return e==="x"||e==="y"?_n[e]?null:(_n[e]=!0,()=>{_n[e]=!1}):_n.x||_n.y?null:(_n.x=_n.y=!0,()=>{_n.x=_n.y=!1})}function IA(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function eC(e,t){const n=IA(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function xy(e){return!(e.pointerType==="touch"||Jb())}function LA(e,t,n={}){const[r,i,s]=eC(e,n),o=a=>{if(!xy(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const d=u=>{xy(u)&&(c(u),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const tC=(e,t)=>t?e===t?!0:tC(e,t.parentElement):!1,Bm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,$A=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function BA(e){return $A.has(e.tagName)||e.tabIndex!==-1}const na=new WeakSet;function wy(e){return t=>{t.key==="Enter"&&e(t)}}function zd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const zA=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=wy(()=>{if(na.has(n))return;zd(n,"down");const i=wy(()=>{zd(n,"up")}),s=()=>zd(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function by(e){return Bm(e)&&!Jb()}function VA(e,t,n={}){const[r,i,s]=eC(e,n),o=a=>{const l=a.currentTarget;if(!by(a)||na.has(l))return;na.add(l);const c=t(l,a),d=(m,h)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",f),!(!by(m)||!na.has(l))&&(na.delete(l),typeof c=="function"&&c(m,{success:h}))},u=m=>{d(m,l===window||l===document||n.useGlobalTarget||tC(l,m.target))},f=m=>{d(m,!1)};window.addEventListener("pointerup",u,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",c=>zA(c,i)),!BA(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const Cy=30,UA=e=>!isNaN(parseFloat(e));class HA{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=rr.now();this.updatedAt!==s&&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=rr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=UA(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 Dm);const r=this.events[t].add(n);return t==="change"?()=>{r(),Me.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=rr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Cy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Cy);return Yb(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 za(e,t){return new HA(e,t)}const nC=v.createContext({strict:!1}),ky={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"]},bo={};for(const e in ky)bo[e]={isEnabled:t=>ky[e].some(n=>!!t[n])};function WA(e){for(const t in e)bo[t]={...bo[t],...e[t]}}const qA=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 Xu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qA.has(e)}let rC=e=>!Xu(e);function GA(e){e&&(rC=t=>t.startsWith("on")?!Xu(t):e(t))}try{GA(require("@emotion/is-prop-valid").default)}catch{}function YA(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(rC(i)||n===!0&&Xu(i)||!t&&!Xu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function QA(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))})}const Pc=v.createContext({});function Oc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Va(e){return typeof e=="string"||Array.isArray(e)}const zm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vm=["initial",...zm];function Mc(e){return Oc(e.animate)||Vm.some(t=>Va(e[t]))}function iC(e){return!!(Mc(e)||e.variants)}function KA(e,t){if(Mc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Va(n)?n:void 0,animate:Va(r)?r:void 0}}return e.inherit!==!1?t:{}}function XA(e){const{initial:t,animate:n}=KA(e,v.useContext(Pc));return v.useMemo(()=>({initial:t,animate:n}),[Sy(t),Sy(n)])}function Sy(e){return Array.isArray(e)?e.join(" "):e}const ZA=Symbol.for("motionComponentSymbol");function $s(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function JA(e,t,n){return v.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):$s(n)&&(n.current=r))},[t])}const Um=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),eR="framerAppearId",sC="data-"+Um(eR),oC=v.createContext({});function tR(e,t,n,r,i){var g,b;const{visualElement:s}=v.useContext(Pc),o=v.useContext(nC),a=v.useContext(Rc),l=v.useContext(Rm).reducedMotion,c=v.useRef(null);r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const d=c.current,u=v.useContext(oC);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&nR(c.current,n,i,u);const f=v.useRef(!1);v.useInsertionEffect(()=>{d&&f.current&&d.update(n,a)});const m=n[sC],h=v.useRef(!!m&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,m))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,m)));return qb(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),$m.render(d.render),h.current&&d.animationState&&d.animationState.animateChanges())}),v.useEffect(()=>{d&&(!h.current&&d.animationState&&d.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,m)}),h.current=!1))}),d}function nR(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:aC(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&$s(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c})}function aC(e){if(e)return e.options.allowProjection!==!1?e.projection:aC(e.parent)}function rR({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&WA(e);function s(a,l){let c;const d={...v.useContext(Rm),...a,layoutId:iR(a)},{isStatic:u}=d,f=XA(a),m=r(a,u);if(!u&&Am){sR();const h=oR(d);c=h.MeasureLayout,f.visualElement=tR(i,m,d,t,h.ProjectionNode)}return p.jsxs(Pc.Provider,{value:f,children:[c&&f.visualElement?p.jsx(c,{visualElement:f.visualElement,...d}):null,n(i,a,JA(m,f.visualElement,l),m,u,f.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=v.forwardRef(s);return o[ZA]=i,o}function iR({layoutId:e}){const t=v.useContext(jm).id;return t&&e!==void 0?t+"-"+e:e}function sR(e,t){v.useContext(nC).strict}function oR(e){const{drag:t,layout:n}=bo;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 lC=e=>t=>typeof t=="string"&&t.startsWith(e),Hm=lC("--"),aR=lC("var(--"),Wm=e=>aR(e)?lR.test(e.split("/*")[0].trim()):!1,lR=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ua={};function uR(e){for(const t in e)Ua[t]=e[t],Hm(t)&&(Ua[t].isCSSVariable=!0)}const Oo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hs=new Set(Oo);function uC(e,{layout:t,layoutId:n}){return hs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ua[e]||e==="opacity")}const jt=e=>!!(e&&e.getVelocity),cC=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Tr=(e,t,n)=>n>t?t:n<e?e:n,Mo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ha={...Mo,transform:e=>Tr(0,1,e)},Vl={...Mo,default:1},ul=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Dr=ul("deg"),ir=ul("%"),de=ul("px"),cR=ul("vh"),dR=ul("vw"),Ty={...ir,parse:e=>ir.parse(e)/100,transform:e=>ir.transform(e*100)},fR={borderWidth:de,borderTopWidth:de,borderRightWidth:de,borderBottomWidth:de,borderLeftWidth:de,borderRadius:de,radius:de,borderTopLeftRadius:de,borderTopRightRadius:de,borderBottomRightRadius:de,borderBottomLeftRadius:de,width:de,maxWidth:de,height:de,maxHeight:de,top:de,right:de,bottom:de,left:de,padding:de,paddingTop:de,paddingRight:de,paddingBottom:de,paddingLeft:de,margin:de,marginTop:de,marginRight:de,marginBottom:de,marginLeft:de,backgroundPositionX:de,backgroundPositionY:de},pR={rotate:Dr,rotateX:Dr,rotateY:Dr,rotateZ:Dr,scale:Vl,scaleX:Vl,scaleY:Vl,scaleZ:Vl,skew:Dr,skewX:Dr,skewY:Dr,distance:de,translateX:de,translateY:de,translateZ:de,x:de,y:de,z:de,perspective:de,transformPerspective:de,opacity:Ha,originX:Ty,originY:Ty,originZ:de},_y={...Mo,transform:Math.round},qm={...fR,...pR,zIndex:_y,size:de,fillOpacity:Ha,strokeOpacity:Ha,numOctaves:_y},hR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},mR=Oo.length;function gR(e,t,n){let r="",i=!0;for(let s=0;s<mR;s++){const o=Oo[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=cC(a,qm[o]);if(!l){i=!1;const d=hR[o]||o;r+=`${d}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Gm(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(hs.has(l)){o=!0;continue}else if(Hm(l)){i[l]=c;continue}else{const d=cC(c,qm[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=gR(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:d=0}=s;r.transformOrigin=`${l} ${c} ${d}`}}const Ym=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dC(e,t,n){for(const r in t)!jt(t[r])&&!uC(r,n)&&(e[r]=t[r])}function vR({transformTemplate:e},t){return v.useMemo(()=>{const n=Ym();return Gm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function yR(e,t){const n=e.style||{},r={};return dC(r,n,e),Object.assign(r,vR(e,t)),r}function xR(e,t){const n={},r=yR(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 wR=["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 Qm(e){return typeof e!="string"||e.includes("-")?!1:!!(wR.indexOf(e)>-1||/[A-Z]/u.test(e))}const bR={offset:"stroke-dashoffset",array:"stroke-dasharray"},CR={offset:"strokeDashoffset",array:"strokeDasharray"};function kR(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?bR:CR;e[s.offset]=de.transform(-r);const o=de.transform(t),a=de.transform(n);e[s.array]=`${o} ${a}`}function Ey(e,t,n){return typeof e=="string"?e:de.transform(t+n*e)}function SR(e,t,n){const r=Ey(t,e.x,e.width),i=Ey(n,e.y,e.height);return`${r} ${i}`}function Km(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},d,u){if(Gm(e,c,u),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m,dimensions:h}=e;f.transform&&(h&&(m.transform=f.transform),delete f.transform),h&&(i!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=SR(h,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&kR(f,o,a,l,!1)}const fC=()=>({...Ym(),attrs:{}}),Xm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function TR(e,t,n,r){const i=v.useMemo(()=>{const s=fC();return Km(s,t,Xm(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};dC(s,e.style,e),i.style={...s,...i.style}}return i}function _R(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Qm(n)?TR:xR)(r,s,o,n),c=YA(r,typeof n=="string",e),d=n!==v.Fragment?{...c,...l,ref:i}:{},{children:u}=r,f=v.useMemo(()=>jt(u)?u.get():u,[u]);return v.createElement(n,{...d,children:f})}}function jy(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Zm(e,t,n,r){if(typeof t=="function"){const[i,s]=jy(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=jy(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const Dp=e=>Array.isArray(e),ER=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),jR=e=>Dp(e)?e[e.length-1]||0:e;function du(e){const t=jt(e)?e.get():e;return ER(t)?t.toValue():t}function AR({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:RR(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const pC=e=>(t,n)=>{const r=v.useContext(Pc),i=v.useContext(Rc),s=()=>AR(e,t,r,i);return n?s():Ac(s)};function RR(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=du(s[f]);let{initial:o,animate:a}=e;const l=Mc(e),c=iC(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const u=d?a:o;if(u&&typeof u!="boolean"&&!Oc(u)){const f=Array.isArray(u)?u:[u];for(let m=0;m<f.length;m++){const h=Zm(e,f[m]);if(h){const{transitionEnd:g,transition:b,...x}=h;for(const y in x){let w=x[y];if(Array.isArray(w)){const j=d?w.length-1:0;w=w[j]}w!==null&&(i[y]=w)}for(const y in g)i[y]=g[y]}}}return i}function Jm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(jt(r[o])||t.style&&jt(t.style[o])||uC(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const PR={useVisualState:pC({scrapeMotionValuesFromProps:Jm,createRenderState:Ym})};function hC(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function mC(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const gC=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 vC(e,t,n,r){mC(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(gC.has(i)?i:Um(i),t.attrs[i])}function yC(e,t,n){const r=Jm(e,t,n);for(const i in e)if(jt(e[i])||jt(t[i])){const s=Oo.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const Ay=["x","y","width","height","cx","cy","r"],OR={useVisualState:pC({scrapeMotionValuesFromProps:yC,createRenderState:fC,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if(hs.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<Ay.length;a++){const l=Ay[a];e[l]!==t[l]&&(o=!0)}o&&Me.read(()=>{hC(n,r),Me.render(()=>{Km(r,i,Xm(n.tagName),e.transformTemplate),vC(n,r)})})}})};function MR(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Qm(r)?OR:PR,preloadedFeatures:e,useRender:_R(i),createVisualElement:t,Component:r};return rR(o)}}function Wa(e,t,n){const r=e.getProps();return Zm(r,t,n!==void 0?n:r.custom,e)}const xC=new Set(["width","height","top","left","right","bottom",...Oo]);function DR(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,za(n))}function NR(e,t){const n=Wa(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=jR(s[o]);DR(e,o,a)}}function FR(e){return!!(jt(e)&&e.add)}function Np(e,t){const n=e.getValue("willChange");if(FR(n))return n.add(t);if(!n&&Op.WillChange){const r=new Op.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function wC(e){return e.props[sC]}const bC=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,IR=1e-7,LR=12;function $R(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=bC(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>IR&&++a<LR);return o}function cl(e,t,n,r){if(e===t&&n===r)return xn;const i=s=>$R(s,0,1,e,n);return s=>s===0||s===1?s:bC(i(s),t,r)}const CC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kC=e=>t=>1-e(1-t),SC=cl(.33,1.53,.69,.99),eg=kC(SC),TC=CC(eg),_C=e=>(e*=2)<1?.5*eg(e):.5*(2-Math.pow(2,-10*(e-1))),tg=e=>1-Math.sin(Math.acos(e)),EC=kC(tg),jC=CC(tg),AC=e=>/^0[^.\s]+$/u.test(e);function BR(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||AC(e):!0}const pa=e=>Math.round(e*1e5)/1e5,ng=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zR(e){return e==null}const VR=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rg=(e,t)=>n=>!!(typeof n=="string"&&VR.test(n)&&n.startsWith(e)||t&&!zR(n)&&Object.prototype.hasOwnProperty.call(n,t)),RC=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(ng);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},UR=e=>Tr(0,255,e),Vd={...Mo,transform:e=>Math.round(UR(e))},Ii={test:rg("rgb","red"),parse:RC("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Vd.transform(e)+", "+Vd.transform(t)+", "+Vd.transform(n)+", "+pa(Ha.transform(r))+")"};function HR(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 Fp={test:rg("#"),parse:HR,transform:Ii.transform},Bs={test:rg("hsl","hue"),parse:RC("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ir.transform(pa(t))+", "+ir.transform(pa(n))+", "+pa(Ha.transform(r))+")"},_t={test:e=>Ii.test(e)||Fp.test(e)||Bs.test(e),parse:e=>Ii.test(e)?Ii.parse(e):Bs.test(e)?Bs.parse(e):Fp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ii.transform(e):Bs.transform(e)},WR=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qR(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ng))==null?void 0:t.length)||0)+(((n=e.match(WR))==null?void 0:n.length)||0)>0}const PC="number",OC="color",GR="var",YR="var(",Ry="${}",QR=/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 qa(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(QR,l=>(_t.test(l)?(r.color.push(s),i.push(OC),n.push(_t.parse(l))):l.startsWith(YR)?(r.var.push(s),i.push(GR),n.push(l)):(r.number.push(s),i.push(PC),n.push(parseFloat(l))),++s,Ry)).split(Ry);return{values:n,split:a,indexes:r,types:i}}function MC(e){return qa(e).values}function DC(e){const{split:t,types:n}=qa(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===PC?s+=pa(i[o]):a===OC?s+=_t.transform(i[o]):s+=i[o]}return s}}const KR=e=>typeof e=="number"?0:e;function XR(e){const t=MC(e);return DC(e)(t.map(KR))}const mi={test:qR,parse:MC,createTransformer:DC,getAnimatableNone:XR},ZR=new Set(["brightness","contrast","saturate","opacity"]);function JR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ng)||[];if(!r)return e;const i=n.replace(r,"");let s=ZR.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const eP=/\b([a-z-]*)\(.*?\)/gu,Ip={...mi,getAnimatableNone:e=>{const t=e.match(eP);return t?t.map(JR).join(" "):e}},tP={...qm,color:_t,backgroundColor:_t,outlineColor:_t,fill:_t,stroke:_t,borderColor:_t,borderTopColor:_t,borderRightColor:_t,borderBottomColor:_t,borderLeftColor:_t,filter:Ip,WebkitFilter:Ip},NC=e=>tP[e];function FC(e,t){let n=NC(e);return n!==Ip&&(n=mi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const nP=new Set(["auto","none","0"]);function rP(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!nP.has(s)&&qa(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=FC(n,i)}const Li=e=>e*180/Math.PI,Lp=e=>{const t=Li(Math.atan2(e[1],e[0]));return $p(t)},iP={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Lp,rotateZ:Lp,skewX:e=>Li(Math.atan(e[1])),skewY:e=>Li(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$p=e=>(e=e%360,e<0&&(e+=360),e),Py=Lp,Oy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),My=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),sP={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Oy,scaleY:My,scale:e=>(Oy(e)+My(e))/2,rotateX:e=>$p(Li(Math.atan2(e[6],e[5]))),rotateY:e=>$p(Li(Math.atan2(-e[2],e[0]))),rotateZ:Py,rotate:Py,skewX:e=>Li(Math.atan(e[4])),skewY:e=>Li(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Dy(e){return e.includes("scale")?1:0}function Bp(e,t){if(!e||e==="none")return Dy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=sP,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=iP,i=a}if(!i)return Dy(t);const s=r[t],o=i[1].split(",").map(aP);return typeof s=="function"?s(o):o[s]}const oP=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Bp(n,t)};function aP(e){return parseFloat(e.trim())}const Ny=e=>e===Mo||e===de,lP=new Set(["x","y","z"]),uP=Oo.filter(e=>!lP.has(e));function cP(e){const t=[];return uP.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Co={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Bp(t,"x"),y:(e,{transform:t})=>Bp(t,"y")};Co.translateX=Co.x;Co.translateY=Co.y;const Ki=new Set;let zp=!1,Vp=!1;function IC(){if(Vp){const e=Array.from(Ki).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=cP(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Vp=!1,zp=!1,Ki.forEach(e=>e.complete()),Ki.clear()}function LC(){Ki.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Vp=!0)})}function dP(){LC(),IC()}class ig{constructor(t,n,r,i,s,o=!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=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ki.add(this),zp||(zp=!0,Me.read(LC),Me.resolveKeyframes(IC))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ki.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ki.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const $C=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),fP=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pP(e){const t=fP.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function BC(e,t,n=1){const[r,i]=pP(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return $C(o)?parseFloat(o):o}return Wm(i)?BC(i,t,n+1):i}const zC=e=>t=>t.test(e),hP={test:e=>e==="auto",parse:e=>e},VC=[Mo,de,ir,Dr,dR,cR,hP],Fy=e=>VC.find(zC(e));class UC extends ig{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Wm(c))){const d=BC(c,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!xC.has(r)||t.length!==2)return;const[i,s]=t,o=Fy(i),a=Fy(s);if(o!==a)if(Ny(o)&&Ny(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)BR(t[i])&&r.push(i);r.length&&rP(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=Co[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 a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=Co[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Iy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(mi.test(e)||e==="0")&&!e.startsWith("url("));function mP(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 gP(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=Iy(i,t),a=Iy(s,t);return!o||!a?!1:mP(e)||(n==="spring"||Fm(n))&&r}const vP=e=>e!==null;function Dc(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(vP),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const yP=40;class HC{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=rr.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>yP?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&dP(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=rr.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!gP(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Dc(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Ve=(e,t,n)=>e+(t-e)*n;function Ud(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 xP({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Ud(l,a,e+1/3),s=Ud(l,a,e),o=Ud(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Zu(e,t){return n=>n>0?t:e}const Hd=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},wP=[Fp,Ii,Bs],bP=e=>wP.find(t=>t.test(e));function Ly(e){const t=bP(e);if(!t)return!1;let n=t.parse(e);return t===Bs&&(n=xP(n)),n}const $y=(e,t)=>{const n=Ly(e),r=Ly(t);if(!n||!r)return Zu(e,t);const i={...n};return s=>(i.red=Hd(n.red,r.red,s),i.green=Hd(n.green,r.green,s),i.blue=Hd(n.blue,r.blue,s),i.alpha=Ve(n.alpha,r.alpha,s),Ii.transform(i))},CP=(e,t)=>n=>t(e(n)),dl=(...e)=>e.reduce(CP),Up=new Set(["none","hidden"]);function kP(e,t){return Up.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function SP(e,t){return n=>Ve(e,t,n)}function sg(e){return typeof e=="number"?SP:typeof e=="string"?Wm(e)?Zu:_t.test(e)?$y:EP:Array.isArray(e)?WC:typeof e=="object"?_t.test(e)?$y:TP:Zu}function WC(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>sg(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function TP(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=sg(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function _P(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const EP=(e,t)=>{const n=mi.createTransformer(t),r=qa(e),i=qa(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?Up.has(e)&&!i.values.length||Up.has(t)&&!r.values.length?kP(e,t):dl(WC(_P(r,i),i.values),n):Zu(e,t)};function qC(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ve(e,t,n):sg(e)(e,t)}const jP=5;function GC(e,t,n){const r=Math.max(t-jP,0);return Yb(n-e(r),t-r)}const Ye={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Wd=.001;function AP({duration:e=Ye.duration,bounce:t=Ye.bounce,velocity:n=Ye.velocity,mass:r=Ye.mass}){let i,s,o=1-t;o=Tr(Ye.minDamping,Ye.maxDamping,o),e=Tr(Ye.minDuration,Ye.maxDuration,nr(e)),o<1?(i=c=>{const d=c*o,u=d*e,f=d-n,m=Hp(c,o),h=Math.exp(-u);return Wd-f/m*h},s=c=>{const u=c*o*e,f=u*n+n,m=Math.pow(o,2)*Math.pow(c,2)*e,h=Math.exp(-u),g=Hp(Math.pow(c,2),o);return(-i(c)+Wd>0?-1:1)*((f-m)*h)/g}):(i=c=>{const d=Math.exp(-c*e),u=(c-n)*e+1;return-Wd+d*u},s=c=>{const d=Math.exp(-c*e),u=(n-c)*(e*e);return d*u});const a=5/e,l=PP(i,s,a);if(e=tr(e),isNaN(l))return{stiffness:Ye.stiffness,damping:Ye.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const RP=12;function PP(e,t,n){let r=n;for(let i=1;i<RP;i++)r=r-e(r)/t(r);return r}function Hp(e,t){return e*Math.sqrt(1-t*t)}const OP=["duration","bounce"],MP=["stiffness","damping","mass"];function By(e,t){return t.some(n=>e[n]!==void 0)}function DP(e){let t={velocity:Ye.velocity,stiffness:Ye.stiffness,damping:Ye.damping,mass:Ye.mass,isResolvedFromDuration:!1,...e};if(!By(e,MP)&&By(e,OP))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Tr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ye.mass,stiffness:i,damping:s}}else{const n=AP(e);t={...t,...n,mass:Ye.mass},t.isResolvedFromDuration=!0}return t}function Ju(e=Ye.visualDuration,t=Ye.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:d,duration:u,velocity:f,isResolvedFromDuration:m}=DP({...n,velocity:-nr(n.velocity||0)}),h=f||0,g=c/(2*Math.sqrt(l*d)),b=o-s,x=nr(Math.sqrt(l/d)),y=Math.abs(b)<5;r||(r=y?Ye.restSpeed.granular:Ye.restSpeed.default),i||(i=y?Ye.restDelta.granular:Ye.restDelta.default);let w;if(g<1){const k=Hp(x,g);w=T=>{const A=Math.exp(-g*x*T);return o-A*((h+g*x*b)/k*Math.sin(k*T)+b*Math.cos(k*T))}}else if(g===1)w=k=>o-Math.exp(-x*k)*(b+(h+x*b)*k);else{const k=x*Math.sqrt(g*g-1);w=T=>{const A=Math.exp(-g*x*T),S=Math.min(k*T,300);return o-A*((h+g*x*b)*Math.sinh(S)+k*b*Math.cosh(S))/k}}const j={calculatedDuration:m&&u||null,next:k=>{const T=w(k);if(m)a.done=k>=u;else{let A=0;g<1&&(A=k===0?tr(h):GC(w,k,T));const S=Math.abs(A)<=r,F=Math.abs(o-T)<=i;a.done=S&&F}return a.value=a.done?o:T,a},toString:()=>{const k=Math.min(Lm(j),Ku),T=Qb(A=>j.next(k*A).value,k,30);return k+"ms "+T},toTransition:()=>{}};return j}Ju.applyToOptions=e=>{const t=OA(e,100,Ju);return e.ease=Ba()?t.ease:"easeOut",e.duration=tr(t.duration),e.type="keyframes",e};function zy({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=e[0],f={done:!1,value:u},m=S=>a!==void 0&&S<a||l!==void 0&&S>l,h=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let g=n*t;const b=u+g,x=o===void 0?b:o(b);x!==b&&(g=x-u);const y=S=>-g*Math.exp(-S/r),w=S=>x+y(S),j=S=>{const F=y(S),N=w(S);f.done=Math.abs(F)<=c,f.value=f.done?x:N};let k,T;const A=S=>{m(f.value)&&(k=S,T=Ju({keyframes:[f.value,h(f.value)],velocity:GC(w,S,f.value),damping:i,stiffness:s,restDelta:c,restSpeed:d}))};return A(0),{calculatedDuration:null,next:S=>{let F=!1;return!T&&k===void 0&&(F=!0,j(S),A(S)),k!==void 0&&S>=k?T.next(S-k):(!F&&j(S),f)}}}const NP=cl(.42,0,1,1),FP=cl(0,0,.58,1),YC=cl(.42,0,.58,1),IP=e=>Array.isArray(e)&&typeof e[0]!="number",Vy={linear:xn,easeIn:NP,easeInOut:YC,easeOut:FP,circIn:tg,circInOut:jC,circOut:EC,backIn:eg,backInOut:TC,backOut:SC,anticipate:_C},Uy=e=>{if(Nm(e)){Pp(e.length===4);const[t,n,r,i]=e;return cl(t,n,r,i)}else if(typeof e=="string")return Pp(Vy[e]!==void 0),Vy[e];return e};function LP(e,t,n){const r=[],i=n||qC,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||xn:t;a=dl(l,a)}r.push(a)}return r}function $P(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Pp(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=LP(t,r,i),l=a.length,c=d=>{if(o&&d<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(d<e[u+1]);u++);const f=$a(e[u],e[u+1],d);return a[u](f)};return n?d=>c(Tr(e[0],e[s-1],d)):c}function BP(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=$a(0,t,r);e.push(Ve(n,1,i))}}function zP(e){const t=[0];return BP(t,e.length-1),t}function VP(e,t){return e.map(n=>n*t)}function UP(e,t){return e.map(()=>t||YC).splice(0,e.length-1)}function ec({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=IP(r)?r.map(Uy):Uy(r),s={done:!1,value:t[0]},o=VP(n&&n.length===t.length?n:zP(t),e),a=$P(o,t,{ease:Array.isArray(i)?i:UP(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const HP=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Me.update(t,!0),stop:()=>hi(t),now:()=>xt.isProcessing?xt.timestamp:rr.now()}},WP={decay:zy,inertia:zy,tween:ec,keyframes:ec,spring:Ju},qP=e=>e/100;class og extends HC{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:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||ig,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=Fm(n)?n:WP[n]||ec;let l,c;a!==ec&&typeof t[0]!="number"&&(l=dl(qP,qC(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=Lm(d));const{calculatedDuration:u}=d,f=u+i,m=f*(r+1)-i;return{generator:d,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:u,resolvedDuration:f,totalDuration:m}}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:S}=this.options;return{done:!0,value:S[S.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:d,resolvedDuration:u}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:m,repeatType:h,repeatDelay:g,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/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 x=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?x<0:x>d;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,j=s;if(m){const S=Math.min(this.currentTime,d)/u;let F=Math.floor(S),N=S%1;!N&&S>=1&&(N=1),N===1&&F--,F=Math.min(F,m+1),!!(F%2)&&(h==="reverse"?(N=1-N,g&&(N-=g/u)):h==="mirror"&&(j=o)),w=Tr(0,1,N)*u}const k=y?{done:!1,value:l[0]}:j.next(w);a&&(k.value=a(k.value));let{done:T}=k;!y&&c!==null&&(T=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return A&&i!==void 0&&(k.value=Dc(l,this.options,i)),b&&b(k.value),A&&this.finish(),k}get duration(){const{resolved:t}=this;return t?nr(t.calculatedDuration):0}get time(){return nr(this.currentTime)}set time(t){t=tr(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=nr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=HP,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),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(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??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)}get finished(){return this.currentFinishedPromise}}const GP=new Set(["opacity","clipPath","filter","transform"]),YP=Mm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),tc=10,QP=2e4;function KP(e){return Fm(e.type)||e.type==="spring"||!Xb(e.ease)}function XP(e,t){const n=new og({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<QP;)r=n.sample(s),i.push(r.value),s+=tc;return{times:void 0,keyframes:i,duration:s-tc,ease:"linear"}}const QC={anticipate:_C,backInOut:TC,circInOut:jC};function ZP(e){return e in QC}class Hy extends HC{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new UC(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&Ba()&&ZP(s)&&(s=QC[s]),KP(this.options)){const{onComplete:u,onUpdate:f,motionValue:m,element:h,...g}=this.options,b=XP(t,g);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const d=PA(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(yy(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:u}=this.options;a.set(Dc(t,this.options,n)),u&&u(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return nr(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return nr(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=tr(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}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 xn;const{animation:r}=n;yy(r,t)}return xn}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:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:d,onComplete:u,element:f,...m}=this.options,h=new og({...m,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),g=tr(this.time);c.setWithVelocity(h.sample(g-tc).value,h.sample(g).value,tc)}const{onStop:l}=this.options;l&&l(),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:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return YP()&&r&&GP.has(r)&&(r!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const JP={type:"spring",stiffness:500,damping:25,restSpeed:10},eO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),tO={type:"keyframes",duration:.8},nO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rO=(e,{keyframes:t})=>t.length>2?tO:hs.has(e)?e.startsWith("scale")?eO(t[1]):JP:nO;function iO({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const ag=(e,t,n,r={},i,s)=>o=>{const a=Im(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-tr(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};iO(a)||(d={...d,...rO(e,d)}),d.duration&&(d.duration=tr(d.duration)),d.repeatDelay&&(d.repeatDelay=tr(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(u=!0)),d.allowFlatten=!a.type&&!a.ease,u&&!s&&t.get()!==void 0){const f=Dc(d.keyframes,a);if(f!==void 0)return Me.update(()=>{d.onUpdate(f),d.onComplete()}),new jA([])}return!s&&Hy.supports(d)?new Hy(d):new og(d)};function sO({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function KC(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in a){const u=e.getValue(d,e.latestValues[d]??null),f=a[d];if(f===void 0||c&&sO(c,d))continue;const m={delay:n,...Im(s||{},d)};let h=!1;if(window.MotionHandoffAnimation){const b=wC(e);if(b){const x=window.MotionHandoffAnimation(b,d,Me);x!==null&&(m.startTime=x,h=!0)}}Np(e,d),u.start(ag(d,u,f,e.shouldReduceMotion&&xC.has(d)?{type:!1}:m,e,h));const g=u.animation;g&&l.push(g)}return o&&Promise.all(l).then(()=>{Me.update(()=>{o&&NR(e,o)})}),l}function Wp(e,t,n={}){var l;const r=Wa(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(KC(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:u,staggerDirection:f}=i;return oO(e,t,d+c,u,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,d]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>d())}else return Promise.all([s(),o(n.delay)])}function oO(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(aO).forEach((c,d)=>{c.notify("AnimationStart",t),o.push(Wp(c,t,{...s,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function aO(e,t){return e.sortNodePosition(t)}function lO(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Wp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Wp(e,t,n);else{const i=typeof t=="function"?Wa(e,t,n.custom):t;r=Promise.all(KC(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function XC(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}const uO=Vm.length;function ZC(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ZC(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uO;n++){const r=Vm[n],i=e.props[r];(Va(i)||i===!1)&&(t[r]=i)}return t}const cO=[...zm].reverse(),dO=zm.length;function fO(e){return t=>Promise.all(t.map(({animation:n,options:r})=>lO(e,n,r)))}function pO(e){let t=fO(e),n=Wy(),r=!0;const i=l=>(c,d)=>{var f;const u=Wa(e,d,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(u){const{transition:m,transitionEnd:h,...g}=u;c={...c,...g,...h}}return c};function s(l){t=l(e)}function o(l){const{props:c}=e,d=ZC(e.parent)||{},u=[],f=new Set;let m={},h=1/0;for(let b=0;b<dO;b++){const x=cO[b],y=n[x],w=c[x]!==void 0?c[x]:d[x],j=Va(w),k=x===l?y.isActive:null;k===!1&&(h=b);let T=w===d[x]&&w!==c[x]&&j;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),y.protectedKeys={...m},!y.isActive&&k===null||!w&&!y.prevProp||Oc(w)||typeof w=="boolean")continue;const A=hO(y.prevProp,w);let S=A||x===l&&y.isActive&&!T&&j||b>h&&j,F=!1;const N=Array.isArray(w)?w:[w];let O=N.reduce(i(x),{});k===!1&&(O={});const{prevResolvedValues:Q={}}=y,J={...Q,...O},U=I=>{S=!0,f.has(I)&&(F=!0,f.delete(I)),y.needsAnimating[I]=!0;const R=e.getValue(I);R&&(R.liveStyle=!1)};for(const I in J){const R=O[I],P=Q[I];if(m.hasOwnProperty(I))continue;let D=!1;Dp(R)&&Dp(P)?D=!XC(R,P):D=R!==P,D?R!=null?U(I):f.add(I):R!==void 0&&f.has(I)?U(I):y.protectedKeys[I]=!0}y.prevProp=w,y.prevResolvedValues=O,y.isActive&&(m={...m,...O}),r&&e.blockInitialAnimation&&(S=!1),S&&(!(T&&A)||F)&&u.push(...N.map(I=>({animation:I,options:{type:x}})))}if(f.size){const b={};if(typeof c.initial!="boolean"){const x=Wa(e,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(b.transition=x.transition)}f.forEach(x=>{const y=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),b[x]=y??null}),u.push({animation:b})}let g=!!u.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(u):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)==null||u.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(l,c)}),n[l].isActive=c;const d=o(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Wy(),r=!0}}}function hO(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!XC(t,e):!1}function _i(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Wy(){return{animate:_i(!0),whileInView:_i(),whileHover:_i(),whileTap:_i(),whileDrag:_i(),whileFocus:_i(),exit:_i()}}class bi{constructor(t){this.isMounted=!1,this.node=t}update(){}}class mO extends bi{constructor(t){super(t),t.animationState||(t.animationState=pO(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Oc(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let gO=0;class vO extends bi{constructor(){super(...arguments),this.id=gO++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const yO={animation:{Feature:mO},exit:{Feature:vO}};function Ga(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function fl(e){return{point:{x:e.pageX,y:e.pageY}}}const xO=e=>t=>Bm(t)&&e(t,fl(t));function ha(e,t,n,r){return Ga(e,t,xO(n),r)}function JC({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function wO({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function bO(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}}const ek=1e-4,CO=1-ek,kO=1+ek,tk=.01,SO=0-tk,TO=0+tk;function Mt(e){return e.max-e.min}function _O(e,t,n){return Math.abs(e-t)<=n}function qy(e,t,n,r=.5){e.origin=r,e.originPoint=Ve(t.min,t.max,e.origin),e.scale=Mt(n)/Mt(t),e.translate=Ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=CO&&e.scale<=kO||isNaN(e.scale))&&(e.scale=1),(e.translate>=SO&&e.translate<=TO||isNaN(e.translate))&&(e.translate=0)}function ma(e,t,n,r){qy(e.x,t.x,n.x,r?r.originX:void 0),qy(e.y,t.y,n.y,r?r.originY:void 0)}function Gy(e,t,n){e.min=n.min+t.min,e.max=e.min+Mt(t)}function EO(e,t,n){Gy(e.x,t.x,n.x),Gy(e.y,t.y,n.y)}function Yy(e,t,n){e.min=t.min-n.min,e.max=e.min+Mt(t)}function ga(e,t,n){Yy(e.x,t.x,n.x),Yy(e.y,t.y,n.y)}const Qy=()=>({translate:0,scale:1,origin:0,originPoint:0}),zs=()=>({x:Qy(),y:Qy()}),Ky=()=>({min:0,max:0}),Ze=()=>({x:Ky(),y:Ky()});function dn(e){return[e("x"),e("y")]}function qd(e){return e===void 0||e===1}function qp({scale:e,scaleX:t,scaleY:n}){return!qd(e)||!qd(t)||!qd(n)}function Ri(e){return qp(e)||nk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function nk(e){return Xy(e.x)||Xy(e.y)}function Xy(e){return e&&e!=="0%"}function nc(e,t,n){const r=e-n,i=t*r;return n+i}function Zy(e,t,n,r,i){return i!==void 0&&(e=nc(e,i,r)),nc(e,n,r)+t}function Gp(e,t=0,n=1,r,i){e.min=Zy(e.min,t,n,r,i),e.max=Zy(e.max,t,n,r,i)}function rk(e,{x:t,y:n}){Gp(e.x,t.translate,t.scale,t.originPoint),Gp(e.y,n.translate,n.scale,n.originPoint)}const Jy=.999999999999,e0=1.0000000000001;function jO(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Us(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,rk(e,o)),r&&Ri(s.latestValues)&&Us(e,s.latestValues))}t.x<e0&&t.x>Jy&&(t.x=1),t.y<e0&&t.y>Jy&&(t.y=1)}function Vs(e,t){e.min=e.min+t,e.max=e.max+t}function t0(e,t,n,r,i=.5){const s=Ve(e.min,e.max,i);Gp(e,t,n,s,r)}function Us(e,t){t0(e.x,t.x,t.scaleX,t.scale,t.originX),t0(e.y,t.y,t.scaleY,t.scale,t.originY)}function ik(e,t){return JC(bO(e.getBoundingClientRect(),t))}function AO(e,t,n){const r=ik(e,n),{scroll:i}=t;return i&&(Vs(r.x,i.offset.x),Vs(r.y,i.offset.y)),r}const sk=({current:e})=>e?e.ownerDocument.defaultView:null,n0=(e,t)=>Math.abs(e-t);function RO(e,t){const n=n0(e.x,t.x),r=n0(e.y,t.y);return Math.sqrt(n**2+r**2)}class ok{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!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 u=Yd(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,m=RO(u.offset,{x:0,y:0})>=3;if(!f&&!m)return;const{point:h}=u,{timestamp:g}=xt;this.history.push({...h,timestamp:g});const{onStart:b,onMove:x}=this.handlers;f||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,u)},this.handlePointerMove=(u,f)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Gd(f,this.transformPagePoint),Me.update(this.updatePoint,!0)},this.handlePointerUp=(u,f)=>{this.end();const{onEnd:m,onSessionEnd:h,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Yd(u.type==="pointercancel"?this.lastMoveEventInfo:Gd(f,this.transformPagePoint),this.history);this.startEvent&&m&&m(u,b),h&&h(u,b)},!Bm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=fl(t),a=Gd(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=xt;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,Yd(a,this.history)),this.removeListeners=dl(ha(this.contextWindow,"pointermove",this.handlePointerMove),ha(this.contextWindow,"pointerup",this.handlePointerUp),ha(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),hi(this.updatePoint)}}function Gd(e,t){return t?{point:t(e.point)}:e}function r0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Yd({point:e},t){return{point:e,delta:r0(e,ak(t)),offset:r0(e,PO(t)),velocity:OO(t,.1)}}function PO(e){return e[0]}function ak(e){return e[e.length-1]}function OO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=ak(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>tr(t)));)n--;if(!r)return{x:0,y:0};const s=nr(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function MO(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ve(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ve(n,e,r.max):Math.min(e,n)),e}function i0(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 DO(e,{top:t,left:n,bottom:r,right:i}){return{x:i0(e.x,n,i),y:i0(e.y,t,r)}}function s0(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 NO(e,t){return{x:s0(e.x,t.x),y:s0(e.y,t.y)}}function FO(e,t){let n=.5;const r=Mt(e),i=Mt(t);return i>r?n=$a(t.min,t.max-r,e.min):r>i&&(n=$a(e.min,e.max-i,t.min)),Tr(0,1,n)}function IO(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 Yp=.35;function LO(e=Yp){return e===!1?e=0:e===!0&&(e=Yp),{x:o0(e,"left","right"),y:o0(e,"top","bottom")}}function o0(e,t,n){return{min:a0(e,t),max:a0(e,n)}}function a0(e,t){return typeof e=="number"?e:e[t]||0}const $O=new WeakMap;class BO{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ze(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(fl(d).point)},s=(d,u)=>{const{drag:f,dragPropagation:m,onDragStart:h}=this.getProps();if(f&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=FA(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),dn(b=>{let x=this.getAxisMotionValue(b).get()||0;if(ir.test(x)){const{projection:y}=this.visualElement;if(y&&y.layout){const w=y.layout.layoutBox[b];w&&(x=Mt(w)*(parseFloat(x)/100))}}this.originPoint[b]=x}),h&&Me.postRender(()=>h(d,u)),Np(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(d,u)=>{const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:h,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=u;if(m&&this.currentDirection===null){this.currentDirection=zO(b),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",u.point,b),this.updateAxis("y",u.point,b),this.visualElement.render(),g&&g(d,u)},a=(d,u)=>this.stop(d,u),l=()=>dn(d=>{var u;return this.getAnimationState(d)==="paused"&&((u=this.getAxisMotionValue(d).animation)==null?void 0:u.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new ok(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:sk(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Me.postRender(()=>s(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.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Ul(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=MO(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&$s(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=DO(r.layoutBox,t):this.constraints=!1,this.elastic=LO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&dn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=IO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!$s(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=AO(r,i.root,this.visualElement.getTransformPagePoint());let o=NO(i.layout.layoutBox,s);if(n){const a=n(wO(o));this.hasMutatedConstraints=!!a,a&&(o=JC(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=dn(d=>{if(!Ul(d,n,this.currentDirection))return;let u=l&&l[d]||{};o&&(u={min:0,max:0});const f=i?200:1e6,m=i?40:1e7,h={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(d,h)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Np(this.visualElement,t),r.start(ag(t,r,0,n,this.visualElement,!1))}stopAnimation(){dn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){dn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){dn(n=>{const{drag:r}=this.getProps();if(!Ul(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-Ve(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!$s(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};dn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=FO({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),dn(o=>{if(!Ul(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(Ve(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;$O.set(this.visualElement,this);const t=this.visualElement.current,n=ha(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();$s(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Me.read(r);const o=Ga(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(dn(d=>{const u=this.getAxisMotionValue(d);u&&(this.originPoint[d]+=l[d].translate,u.set(u.get()+l[d].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Yp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Ul(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function zO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class VO extends bi{constructor(t){super(t),this.removeGroupControls=xn,this.removeListeners=xn,this.controls=new BO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xn}unmount(){this.removeGroupControls(),this.removeListeners()}}const l0=e=>(t,n)=>{e&&Me.postRender(()=>e(t,n))};class UO extends bi{constructor(){super(...arguments),this.removePointerDownListener=xn}onPointerDown(t){this.session=new ok(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sk(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:l0(t),onStart:l0(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Me.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=ha(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 fu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function u0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Go={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(de.test(e))e=parseFloat(e);else return e;const n=u0(e,t.target.x),r=u0(e,t.target.y);return`${n}% ${r}%`}},HO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=mi.parse(e);if(i.length>5)return r;const s=mi.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const c=Ve(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class WO extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;uR(qO),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),fu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Me.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$m.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 lk(e){const[t,n]=Gb(),r=v.useContext(jm);return p.jsx(WO,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(oC),isPresent:t,safeToRemove:n})}const qO={borderRadius:{...Go,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Go,borderTopRightRadius:Go,borderBottomLeftRadius:Go,borderBottomRightRadius:Go,boxShadow:HO};function GO(e,t,n){const r=jt(e)?e:za(e);return r.start(ag("",r,t,n)),r.animation}function YO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const QO=(e,t)=>e.depth-t.depth;class KO{constructor(){this.children=[],this.isDirty=!1}add(t){Pm(this.children,t),this.isDirty=!0}remove(t){Om(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(QO),this.isDirty=!1,this.children.forEach(t)}}function XO(e,t){const n=rr.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(hi(r),e(s-t))};return Me.read(r,!0),()=>hi(r)}const uk=["TopLeft","TopRight","BottomLeft","BottomRight"],ZO=uk.length,c0=e=>typeof e=="string"?parseFloat(e):e,d0=e=>typeof e=="number"||de.test(e);function JO(e,t,n,r,i,s){i?(e.opacity=Ve(0,n.opacity??1,e3(r)),e.opacityExit=Ve(t.opacity??1,0,t3(r))):s&&(e.opacity=Ve(t.opacity??1,n.opacity??1,r));for(let o=0;o<ZO;o++){const a=`border${uk[o]}Radius`;let l=f0(t,a),c=f0(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||d0(l)===d0(c)?(e[a]=Math.max(Ve(c0(l),c0(c),r),0),(ir.test(c)||ir.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ve(t.rotate||0,n.rotate||0,r))}function f0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const e3=ck(0,.5,EC),t3=ck(.5,.95,xn);function ck(e,t,n){return r=>r<e?0:r>t?1:n($a(e,t,r))}function p0(e,t){e.min=t.min,e.max=t.max}function un(e,t){p0(e.x,t.x),p0(e.y,t.y)}function h0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function m0(e,t,n,r,i){return e-=t,e=nc(e,1/n,r),i!==void 0&&(e=nc(e,1/i,r)),e}function n3(e,t=0,n=1,r=.5,i,s=e,o=e){if(ir.test(t)&&(t=parseFloat(t),t=Ve(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Ve(s.min,s.max,r);e===s&&(a-=t),e.min=m0(e.min,t,n,a,i),e.max=m0(e.max,t,n,a,i)}function g0(e,t,[n,r,i],s,o){n3(e,t[n],t[r],t[i],t.scale,s,o)}const r3=["x","scaleX","originX"],i3=["y","scaleY","originY"];function v0(e,t,n,r){g0(e.x,t,r3,n?n.x:void 0,r?r.x:void 0),g0(e.y,t,i3,n?n.y:void 0,r?r.y:void 0)}function y0(e){return e.translate===0&&e.scale===1}function dk(e){return y0(e.x)&&y0(e.y)}function x0(e,t){return e.min===t.min&&e.max===t.max}function s3(e,t){return x0(e.x,t.x)&&x0(e.y,t.y)}function w0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function fk(e,t){return w0(e.x,t.x)&&w0(e.y,t.y)}function b0(e){return Mt(e.x)/Mt(e.y)}function C0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class o3{constructor(){this.members=[]}add(t){Pm(this.members,t),t.scheduleRender()}remove(t){if(Om(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function a3(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:d,rotateX:u,rotateY:f,skewX:m,skewY:h}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),u&&(r+=`rotateX(${u}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),h&&(r+=`skewY(${h}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Qd=["","X","Y","Z"],l3={visibility:"hidden"},k0=1e3;let u3=0;function Kd(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function pk(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=wC(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Me,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&pk(r)}function hk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=u3++,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,this.nodes.forEach(f3),this.nodes.forEach(v3),this.nodes.forEach(y3),this.nodes.forEach(p3)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new KO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Dm),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=YO(o),this.instance=o;const{layoutId:l,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let u;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=XO(f,250),fu.hasAnimatedSinceResize&&(fu.hasAnimatedSinceResize=!1,this.nodes.forEach(T0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||k3,{onLayoutAnimationStart:b,onLayoutAnimationComplete:x}=d.getProps(),y=!this.targetLayout||!fk(this.targetLayout,h),w=!f&&m;if(this.options.layoutRoot||this.resumeFrom||w||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,w);const j={...Im(g,"layout"),onPlay:b,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j)}else f||T0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,hi(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(x3),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&pk(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const u=this.path[d];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(S0);return}this.isUpdating||this.nodes.forEach(m3),this.isUpdating=!1,this.nodes.forEach(g3),this.nodes.forEach(c3),this.nodes.forEach(d3),this.clearAllSnapshots();const a=rr.now();xt.delta=Tr(0,1e3/60,a-xt.timestamp),xt.timestamp=a,xt.isProcessing=!0,Bd.update.process(xt),Bd.preRender.process(xt),Bd.render.process(xt),xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$m.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(h3),this.sharedNodes.forEach(w3)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Me.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Me.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Mt(this.snapshot.measuredBox.x)&&!Mt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ze(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!dk(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&(a||Ri(this.latestValues)||d)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),S3(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Ze();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(T3))){const{scroll:d}=this.root;d&&(Vs(a.x,d.offset.x),Vs(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=Ze();if(un(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:u,options:f}=d;d!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&un(a,o),Vs(a.x,u.offset.x),Vs(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const l=Ze();un(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Us(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Ri(d.latestValues)&&Us(l,d.latestValues)}return Ri(this.latestValues)&&Us(l,this.latestValues),l}removeTransform(o){const a=Ze();un(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ri(c.latestValues))continue;qp(c.latestValues)&&c.updateSnapshot();const d=Ze(),u=c.measurePageBox();un(d,u),v0(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return Ri(this.latestValues)&&v0(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:u}=this.options;if(!(!this.layout||!(d||u))){if(this.resolvedRelativeTargetAt=xt.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ze(),this.relativeTargetOrigin=Ze(),ga(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),un(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ze(),this.targetWithTransforms=Ze()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),EO(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):un(this.target,this.layout.layoutBox),rk(this.target,this.targetDelta)):un(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ze(),this.relativeTargetOrigin=Ze(),ga(this.relativeTargetOrigin,this.target,m.target),un(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||qp(this.parent.latestValues)||nk(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 h;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===xt.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;un(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,f=this.treeScale.y;jO(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ze());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(h0(this.prevProjectionDelta.x,this.projectionDelta.x),h0(this.prevProjectionDelta.y,this.projectionDelta.y)),ma(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==f||!C0(this.projectionDelta.x,this.prevProjectionDelta.x)||!C0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=zs(),this.projectionDelta=zs(),this.projectionDeltaWithTransform=zs()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},u=zs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ze(),m=l?l.source:void 0,h=this.layout?this.layout.source:void 0,g=m!==h,b=this.getStack(),x=!b||b.members.length<=1,y=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(C3));this.animationProgress=0;let w;this.mixTargetDelta=j=>{const k=j/1e3;_0(u.x,o.x,k),_0(u.y,o.y,k),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ga(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),b3(this.relativeTarget,this.relativeTargetOrigin,f,k),w&&s3(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ze()),un(w,this.relativeTarget)),g&&(this.animationValues=d,JO(d,c,this.latestValues,k,y,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(hi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Me.update(()=>{fu.hasAnimatedSinceResize=!0,this.currentAnimation=GO(0,k0,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(k0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:d}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&mk(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ze();const u=Mt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const f=Mt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}un(a,l),Us(a,d),ma(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new o3),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Kd("z",o,c,this.animationValues);for(let d=0;d<Qd.length;d++)Kd(`rotate${Qd[d]}`,o,c,this.animationValues),Kd(`skew${Qd[d]}`,o,c,this.animationValues);o.render();for(const d in c)o.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return l3;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=du(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=du(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Ri(this.latestValues)&&(m.transform=l?l({},""):"none",this.hasProjected=!1),m}const d=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=a3(this.projectionDeltaWithTransform,this.treeScale,d),l&&(a.transform=l(d,a.transform));const{x:u,y:f}=this.projectionDelta;a.transformOrigin=`${u.origin*100}% ${f.origin*100}% 0`,c.animationValues?a.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in Ua){if(d[m]===void 0)continue;const{correct:h,applyTo:g,isCSSVariable:b}=Ua[m],x=a.transform==="none"?d[m]:h(d[m],c);if(g){const y=g.length;for(let w=0;w<y;w++)a[g[w]]=x}else b?this.options.visualElement.renderState.vars[m]=x:a[m]=x}return this.options.layoutId&&(a.pointerEvents=c===this?du(o==null?void 0:o.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(S0),this.root.sharedNodes.clear()}}}function c3(e){e.updateLayout()}function d3(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?dn(u=>{const f=o?t.measuredBox[u]:t.layoutBox[u],m=Mt(f);f.min=r[u].min,f.max=f.min+m}):mk(s,t.layoutBox,r)&&dn(u=>{const f=o?t.measuredBox[u]:t.layoutBox[u],m=Mt(r[u]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+m)});const a=zs();ma(a,r,t.layoutBox);const l=zs();o?ma(l,e.applyTransform(i,!0),t.measuredBox):ma(l,r,t.layoutBox);const c=!dk(a);let d=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:m}=u;if(f&&m){const h=Ze();ga(h,t.layoutBox,f.layoutBox);const g=Ze();ga(g,r,m.layoutBox),fk(h,g)||(d=!0),u.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function f3(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function p3(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function h3(e){e.clearSnapshot()}function S0(e){e.clearMeasurements()}function m3(e){e.isLayoutDirty=!1}function g3(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function T0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function v3(e){e.resolveTargetDelta()}function y3(e){e.calcProjection()}function x3(e){e.resetSkewAndRotation()}function w3(e){e.removeLeadSnapshot()}function _0(e,t,n){e.translate=Ve(t.translate,0,n),e.scale=Ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function E0(e,t,n,r){e.min=Ve(t.min,n.min,r),e.max=Ve(t.max,n.max,r)}function b3(e,t,n,r){E0(e.x,t.x,n.x,r),E0(e.y,t.y,n.y,r)}function C3(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const k3={duration:.45,ease:[.4,0,.1,1]},j0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),A0=j0("applewebkit/")&&!j0("chrome/")?Math.round:xn;function R0(e){e.min=A0(e.min),e.max=A0(e.max)}function S3(e){R0(e.x),R0(e.y)}function mk(e,t,n){return e==="position"||e==="preserve-aspect"&&!_O(b0(t),b0(n),.2)}function T3(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const _3=hk({attachResizeListener:(e,t)=>Ga(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xd={current:void 0},gk=hk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xd.current){const e=new _3({});e.mount(window),e.setOptions({layoutScroll:!0}),Xd.current=e}return Xd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),E3={pan:{Feature:UO},drag:{Feature:VO,ProjectionNode:gk,MeasureLayout:lk}};function P0(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&Me.postRender(()=>s(t,fl(t)))}class j3 extends bi{mount(){const{current:t}=this.node;t&&(this.unmount=LA(t,(n,r)=>(P0(this.node,r,"Start"),i=>P0(this.node,i,"End"))))}unmount(){}}class A3 extends bi{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=dl(Ga(this.node.current,"focus",()=>this.onFocus()),Ga(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function O0(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&Me.postRender(()=>s(t,fl(t)))}class R3 extends bi{mount(){const{current:t}=this.node;t&&(this.unmount=VA(t,(n,r)=>(O0(this.node,r,"Start"),(i,{success:s})=>O0(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Qp=new WeakMap,Zd=new WeakMap,P3=e=>{const t=Qp.get(e.target);t&&t(e)},O3=e=>{e.forEach(P3)};function M3({root:e,...t}){const n=e||document;Zd.has(n)||Zd.set(n,{});const r=Zd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(O3,{root:e,...t})),r[i]}function D3(e,t,n){const r=M3(t);return Qp.set(e,n),r.observe(e),()=>{Qp.delete(e),r.unobserve(e)}}const N3={some:0,all:1};class F3 extends bi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:N3[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:u}=this.node.getProps(),f=c?d:u;f&&f(l)};return D3(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(I3(t,n))&&this.startObserver()}unmount(){}}function I3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const L3={inView:{Feature:F3},tap:{Feature:R3},focus:{Feature:A3},hover:{Feature:j3}},$3={layout:{ProjectionNode:gk,MeasureLayout:lk}},Kp={current:null},vk={current:!1};function B3(){if(vk.current=!0,!!Am)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Kp.current=e.matches;e.addListener(t),t()}else Kp.current=!1}const z3=[...VC,_t,mi],V3=e=>z3.find(zC(e)),U3=new WeakMap;function H3(e,t,n){for(const r in t){const i=t[r],s=n[r];if(jt(i))e.addValue(r,i);else if(jt(s))e.addValue(r,za(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,za(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const M0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class W3{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ig,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 m=rr.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Me.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:d}=o;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Mc(n),this.isVariantNode=iC(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const h=f[m];l[m]!==void 0&&jt(h)&&h.set(l[m],!1)}}mount(t){this.current=t,U3.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)),vk.current||B3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Kp.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),hi(this.notifyUpdate),hi(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=hs.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Me.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),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 bo){const n=bo[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ze()}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<M0.length;r++){const i=M0[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=H3(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=za(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&($C(r)||AC(r))?r=parseFloat(r):!V3(r)&&mi.test(n)&&(r=FC(t,n)),this.setBaseTarget(t,jt(r)?r.get():r)),jt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Zm(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!jt(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Dm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class yk extends W3{constructor(){super(...arguments),this.KeyframeResolver=UC}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function q3(e){return window.getComputedStyle(e)}class G3 extends yk{constructor(){super(...arguments),this.type="html",this.renderInstance=mC}readValueFromInstance(t,n){if(hs.has(n))return oP(t,n);{const r=q3(t),i=(Hm(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ik(t,n)}build(t,n,r){Gm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Jm(t,n,r)}}class Y3 extends yk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ze,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&hC(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(hs.has(n)){const r=NC(n);return r&&r.default||0}return n=gC.has(n)?n:Um(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return yC(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Me.postRender(this.updateDimensions)}build(t,n,r){Km(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){vC(t,n,r,i)}mount(t){this.isSVGTag=Xm(t.tagName),super.mount(t)}}const Q3=(e,t)=>Qm(e)?new Y3(t):new G3(t,{allowProjection:e!==v.Fragment}),K3=MR({...yO,...L3,...E3,...$3},Q3),He=QA(K3);class X3{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const Z3=()=>new X3;function J3(){return Ac(Z3)}var Ir=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(Ir||{});const xk=v.createContext({}),eM={[ne.TooltipDefault]:"Bizimle sohbet edin!",[ne.TooltipActive]:"Yeni mesajlar var!",[ne.CloseButtonAria]:"Kapat",[ne.MessagePlaceholder]:"Mesajınızı yazın",[ne.FileUploadDisabled]:"Dosya gönderim izniniz olmadığı için yükleyemezsiniz",[ne.NewMessagesNotification]:"Yeni mesajlar var!",[ne.ChatCloseConfirm]:"Sohbeti kapatmak istediğinizden emin misiniz?",[ne.ChatCloseWarning]:"Bu işlem geri alınamaz.",[ne.ChatSettings]:"Sohbet Ayarları",[ne.ChatEndConversation]:"Sohbeti Sonlandır",[ne.CancelAction]:"Vazgeç",[ne.CloseAction]:"Kapat",[ne.QuickActions]:"Hızlı işlemler",[ne.GreetingStartChat]:"Sohbete başla",[ne.RateLimitMessage]:"Çok fazla mesaj gönderdiniz. Lütfen {seconds} saniye bekleyin.",[ne.RatingHeaderEvaluate]:"Görüşmenizi Değerlendirin",[ne.RatingHeaderThanks]:"Teşekkürler!",[ne.RatingDescription]:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli.",[ne.RatingRateConversation]:"Görüşmeyi puanlayın",[ne.RatingComment]:"Yorumunuz (İsteğe bağlı)",[ne.RatingCommentPlaceholder]:"Görüşme hakkında düşüncelerinizi paylaşın...",[ne.RatingSubmit]:"Değerlendirmeyi Gönder",[ne.RatingNewConversation]:"Yeni Görüşme Başlat",[ne.RatingThankYouTitle]:"Değerlendirmeniz için teşekkürler!",[ne.RatingThankYouDescription]:"Geri bildiriminiz bizim için çok değerli.",[ne.RatingCountdown]:"Ekran {seconds} saniye içinde kapanacaktır.",[ne.RatingMinimumError]:"Lütfen en az 1 yıldız seçiniz.",[ne.RatingYourScore]:"Puanınız: {score}",[ne.PoweredBy]:"Powered by"},tM={[C.Background]:"#ffffff",[C.Border]:"#e2e8f0",[C.TooltipText]:"#1e40af",[C.TooltipBackground]:"#dbeafe",[C.TooltipBorder]:"#3b82f6",[C.HeaderBackground]:"#2563eb",[C.HeaderBorder]:"#e2e8f0",[C.HeaderText]:"#ffffff",[C.FooterBackground]:"#f8fafc",[C.FooterBorder]:"#e2e8f0",[C.FooterText]:"#475569",[C.MessageAdminBackground]:"#f1f5f9",[C.MessageAdminText]:"#334155",[C.MessageVisitorBackground]:"#3b82f6",[C.MessageVisitorText]:"#ffffff",[C.MessageAgentBackground]:"#ede9fe",[C.MessageAgentText]:"#5b21b6",[C.GreeterBackground]:"#ffffff",[C.GreeterText]:"#334155",[C.GreeterBorder]:"#e2e8f0",[C.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[C.GreeterTopText]:"#ffffff",[C.GreeterButtonBackground]:"#4f46e5",[C.GreeterButtonText]:"#ffffff",[C.ButtonBackground]:"#4f46e5",[C.ButtonText]:"#ffffff",[C.InputBackground]:"#ffffff",[C.InputText]:"#1e293b",[C.InputBorder]:"#e2e8f0",[C.CloseButtonBackground]:"#f1f5f9",[C.CloseButtonText]:"#475569",[C.CloseButtonHover]:"#e2e8f0",[C.IconColor]:"#64748b",[C.IconBackground]:"transparent",[C.ErrorBackground]:"#fef2f2",[C.ErrorText]:"#dc2626",[C.ErrorBorder]:"#fca5a5",[C.SuccessBackground]:"#f0fdf4",[C.SuccessText]:"#16a34a",[C.SuccessBorder]:"#86efac",[C.WarningBackground]:"#fffbeb",[C.WarningText]:"#d97706",[C.WarningBorder]:"#fcd34d",[C.LinkColor]:"#2563eb",[C.LinkHoverColor]:"#1d4ed8",[C.DividerColor]:"#e2e8f0",[C.ShadowColor]:"rgba(0, 0, 0, 0.1)",[C.StarActiveColor]:"#3b82f6",[C.StarInactiveColor]:"#e2e8f0",[C.ModalOverlayColor]:"rgba(0, 0, 0, 0.4)",[C.ChatCloseConfirmText]:"#dc2626",[C.RatingHeaderBackground]:"#4F46E5",[C.RatingHeaderText]:"#ffffff",[C.RatingSuccessBackground]:"#ffffff",[C.RatingSuccessText]:"#334155",[C.RatingRateConversationText]:"#1e293b"},nM={[Ir.None]:"0px",[Ir.Sm]:"var(--radius-xs)",[Ir.Md]:"var(--radius-sm)",[Ir.Lg]:"var(--radius-md)",[Ir.Xl]:"var(--radius-lg)",[Ir.Full]:"calc(infinity * 1px)"},rM=e=>{const t={...eM};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.texts)return t;for(const n in e.appearance.design.texts){const r=n;e.appearance.design.texts[r]&&(t[r]=e.appearance.design.texts[r])}return t},iM=e=>{const t={...tM};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.colors)return t;for(const n in e.appearance.design.colors){const r=n;e.appearance.design.colors[r]&&(t[r]=e.appearance.design.colors[r])}return t};function sM({children:e,widget:t}){const n=iM(t),r=rM(t),i=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:Ir.Md,s=l=>n[l],o=l=>r[l],a=()=>nM[i];return p.jsx(xk.Provider,{value:{colors:n,texts:r,getColor:s,getText:o,getRadius:a},children:e})}const Se=()=>v.useContext(xk),ms=()=>Se().getText;function pt({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,style:l,textKey:c=C.ButtonText,bgKey:d=C.ButtonBackground,animations:u={},withoutTheming:f,...m}){const h=Se();return p.jsx(He.button,{type:t,className:Ie("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,my[n]&&my[n][r],bA[i][o?"rounded":"default"]),disabled:s,style:{...!f&&{color:h.getColor(c),backgroundColor:h.getColor(d),...o?{}:{borderRadius:h.getRadius()}},...l},...u,...m,children:e})}function ie(){}ie.Home=function(t){return p.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:p.jsx("path",{d:"M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 00.707-1.707l-9-9a.999.999 0 00-1.414 0l-9 9A1 1 0 003 13zm7 7v-5h4v5h-4zm2-15.586l6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z"})})};ie.Chat=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});ie.Menu=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});ie.MessageTyping=({className:e="size-5",...t})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});ie.Check=function(t){return p.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:p.jsx("path",{d:"M12.736 3.97a.733.733 0 011.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 01-1.065.02L3.217 8.384a.757.757 0 010-1.06.733.733 0 011.047 0l3.052 3.093 5.4-6.425a.247.247 0 01.02-.022z"})})};ie.Website=function(t){return p.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[p.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14 7a1 1 0 00-1 1v8a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1h-4zm3 2h-2v6h2V9z",clipRule:"evenodd"}),p.jsx("path",{fill:"currentColor",d:"M6 7a1 1 0 000 2h4a1 1 0 100-2H6zM6 11a1 1 0 100 2h4a1 1 0 100-2H6zM5 16a1 1 0 011-1h4a1 1 0 110 2H6a1 1 0 01-1-1z"}),p.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 3a3 3 0 00-3 3v12a3 3 0 003 3h16a3 3 0 003-3V6a3 3 0 00-3-3H4zm16 2H4a1 1 0 00-1 1v12a1 1 0 001 1h16a1 1 0 001-1V6a1 1 0 00-1-1z",clipRule:"evenodd"})]})};ie.ArrowDown=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});ie.ArrowLeft=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})});ie.XCircle=({className:e="e-5",...t})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});ie.X=({className:e="e-5",...t})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});ie.PaperAirplane=({className:e="e-5",...t})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})});ie.Spin=function(t){return p.jsx("svg",{"data-name":"Layer 1",viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:p.jsx("path",{d:"M6.804 15a1 1 0 00-1.366-.366l-1.732 1a1 1 0 001 1.732l1.732-1A1 1 0 006.804 15zM3.706 8.366l1.732 1a1 1 0 101-1.732l-1.732-1a1 1 0 00-1 1.732zM6 12a1 1 0 00-1-1H3a1 1 0 000 2h2a1 1 0 001-1zm11.196-3a1 1 0 001.366.366l1.732-1a1 1 0 10-1-1.732l-1.732 1A1 1 0 0017.196 9zM15 6.804a1 1 0 001.366-.366l1-1.732a1 1 0 10-1.732-1l-1 1.732A1 1 0 0015 6.804zm5.294 8.83l-1.732-1a1 1 0 10-1 1.732l1.732 1a1 1 0 001-1.732zm-3.928 1.928a1 1 0 10-1.732 1l1 1.732a1 1 0 101.732-1zM21 11h-2a1 1 0 000 2h2a1 1 0 000-2zm-9 7a1 1 0 00-1 1v2a1 1 0 002 0v-2a1 1 0 00-1-1zm-3-.804a1 1 0 00-1.366.366l-1 1.732a1 1 0 001.732 1l1-1.732A1 1 0 009 17.196zM12 2a1 1 0 00-1 1v2a1 1 0 002 0V3a1 1 0 00-1-1z"})})};ie.ExternalLink=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})});ie.Phone=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z"})});ie.Mail=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})});ie.Star=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"})});ie.Plus=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})});ie.History=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});ie.Eye=e=>p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:[p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]});ie.Lock=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 10.5V6.75a4.5 4.5 0 119 0v3.75M3.75 21.75h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H3.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"})});ie.User=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"})});ie.Bot=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z"})});function Xp(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var ft=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e.AIAgentMode="lc:agent:mode",e.AIAgent="lc:agent:data",e.AIAgentSessionId="lc:agent:session",e))(ft||{});const Dn=(e,t,n)=>{let r=e;["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(r=`${n}:${e}`),localStorage.setItem(r,t)},pu=(e,t)=>{let n=e;return["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(n=`${t}:${e}`),localStorage.getItem(n)},Zs=e=>{localStorage.removeItem(`${e}:lc:customer:token`),localStorage.removeItem(`${e}:lc:customer:refresh_token`),lg(e)},Jd=(e,t,n,r)=>{const i=`${e}:`;t&&n?(localStorage.setItem(`${i}lc:agent:mode`,"true"),localStorage.setItem(`${i}lc:agent:data`,JSON.stringify(t)),r&&localStorage.setItem(`${i}lc:agent:session`,r)):lg(e)},ef=e=>{const t=`${e}:`,n=localStorage.getItem(`${t}lc:agent:mode`)==="true",r=localStorage.getItem(`${t}lc:agent:data`),i=localStorage.getItem(`${t}lc:agent:session`);let s=null;if(r)try{s=JSON.parse(r)}catch{s=null}return{isAgentMode:n,agent:s,sessionId:i}},lg=e=>{const t=`${e}:`;localStorage.removeItem(`${t}lc:agent:mode`),localStorage.removeItem(`${t}lc:agent:data`),localStorage.removeItem(`${t}lc:agent:session`)},gi=e=>{const t=`${e}:lc:device:id`;let n=localStorage.getItem(t);return n||(n=Xp(),localStorage.setItem(t,n)),n},oM={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},D0=e=>{let t;const n=new Set,r=(d,u)=>{const f=typeof d=="function"?d(t):d;if(!Object.is(f,t)){const m=t;t=u??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(h=>h(t,m))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(oM?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,i,l);return l},aM=e=>e?D0(e):D0;var wk={exports:{}},bk={},Ck={exports:{}},kk={};/**
|
|
79
|
+
`),()=>{document.head.removeChild(m)}},[t]),p.jsx(CA,{isPresent:t,childRef:i,sizeRef:s,children:v.cloneElement(e,{ref:i})})}const SA=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Ac(TA),c=v.useId();let d=!0,u=v.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:f=>{l.set(f,!0);for(const m of l.values())if(!m)return;r&&r()},register:f=>(l.set(f,!1),()=>l.delete(f))}),[n,l,r]);return s&&d&&(u={...u}),v.useMemo(()=>{l.forEach((f,m)=>l.set(m,!1))},[n]),v.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=p.jsx(kA,{isPresent:n,anchorX:a,children:e})),p.jsx(Rc.Provider,{value:u,children:e})};function TA(){return new Map}function Gb(e=!0){const t=v.useContext(Rc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=v.useId();v.useEffect(()=>{if(e)return i(s)},[e]);const o=v.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const zl=e=>e.key||"";function gy(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const as=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,c]=Gb(o),d=v.useMemo(()=>gy(e),[e]),u=o&&!l?[]:d.map(zl),f=v.useRef(!0),m=v.useRef(d),h=Ac(()=>new Map),[g,b]=v.useState(d),[x,y]=v.useState(d);qb(()=>{f.current=!1,m.current=d;for(let k=0;k<x.length;k++){const T=zl(x[k]);u.includes(T)?h.delete(T):h.get(T)!==!0&&h.set(T,!1)}},[x,u.length,u.join("-")]);const w=[];if(d!==g){let k=[...d];for(let T=0;T<x.length;T++){const A=x[T],S=zl(A);u.includes(S)||(k.splice(T,0,A),w.push(A))}return s==="wait"&&w.length&&(k=w),y(gy(k)),b(d),null}const{forceRender:j}=v.useContext(jm);return p.jsx(p.Fragment,{children:x.map(k=>{const T=zl(k),A=o&&!l?!1:d===x||u.includes(T),S=()=>{if(h.has(T))h.set(T,!0);else return;let F=!0;h.forEach(N=>{N||(F=!1)}),F&&(j==null||j(),y(m.current),o&&(c==null||c()),r&&r())};return p.jsx(SA,{isPresent:A,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:A?void 0:S,anchorX:a,children:k},T)})})};function Pm(e,t){e.indexOf(t)===-1&&e.push(t)}function Om(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let Pp=()=>{};const Op={skipAnimations:!1,useManualTiming:!1};function Mm(e){let t;return()=>(t===void 0&&(t=e()),t)}const xn=e=>e,Ba=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Dm{constructor(){this.subscriptions=[]}add(t){return Pm(this.subscriptions,t),()=>Om(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const tr=e=>e*1e3,nr=e=>e/1e3;function Yb(e,t){return t?e*(1e3/t):0}const _A=Mm(()=>window.ScrollTimeline!==void 0);class EA{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}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=>{if(_A()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].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]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class jA extends EA{then(t,n){return this.finished.finally(t).then(()=>{})}}const vy={value:null,addProjectionMetrics:null},Nm=e=>Array.isArray(e)&&typeof e[0]=="number",AA={};function RA(e,t){const n=Mm(e);return()=>AA[t]??n()}const za=RA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Qb=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(s/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},ta=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Mp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ta([0,.65,.55,1]),circOut:ta([.55,0,1,.45]),backIn:ta([.31,.01,.66,-.59]),backOut:ta([.33,1.53,.69,.99])};function Kb(e,t){if(e)return typeof e=="function"&&za()?Qb(e,t):Nm(e)?ta(e):Array.isArray(e)?e.map(n=>Kb(n,t)||Mp.easeOut):Mp[e]}function PA(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},c=void 0){const d={[t]:n};l&&(d.offset=l);const u=Kb(a,i);return Array.isArray(u)&&(d.easing=u),e.animate(d,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:c})}function Fm(e){return typeof e=="function"&&"applyToOptions"in e}function Im(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Ku=2e4;function Lm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ku;)t+=n,r=e.next(t);return t>=Ku?1/0:t}function OA(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Lm(r),Ku);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:nr(i)}}function Xb(e){return!!(typeof e=="function"&&za()||!e||typeof e=="string"&&(e in Mp||za())||Nm(e)||Array.isArray(e)&&e.every(Xb))}function yy(e,t){e.timeline=t,e.onfinish=null}const Vl=["read","resolveKeyframes","update","preRender","render","postRender"];function MA(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(u){o.has(u)&&(d.schedule(u),e()),l++,u(a)}const d={schedule:(u,f=!1,m=!1)=>{const g=m&&i?n:r;return f&&o.add(u),g.has(u)||g.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),t&&vy.value&&vy.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(u))}};return d}const DA=40;function Zb(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Vl.reduce((x,y)=>(x[y]=MA(s,t?y:void 0),x),{}),{read:a,resolveKeyframes:l,update:c,preRender:d,render:u,postRender:f}=o,m=()=>{const x=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(x-i.timestamp,DA),1),i.timestamp=x,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),d.process(i),u.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},h=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:Vl.reduce((x,y)=>{const w=o[y];return x[y]=(j,k=!1,T=!1)=>(n||h(),w.schedule(j,k,T)),x},{}),cancel:x=>{for(let y=0;y<Vl.length;y++)o[Vl[y]].cancel(x)},state:i,steps:o}}const{schedule:$m,cancel:zB}=Zb(queueMicrotask,!1),{schedule:Me,cancel:hi,state:xt,steps:Bd}=Zb(typeof requestAnimationFrame<"u"?requestAnimationFrame:xn,!0);let du;function NA(){du=void 0}const rr={now:()=>(du===void 0&&rr.set(xt.isProcessing||Op.useManualTiming?xt.timestamp:performance.now()),du),set:e=>{du=e,queueMicrotask(NA)}},_n={x:!1,y:!1};function Jb(){return _n.x||_n.y}function FA(e){return e==="x"||e==="y"?_n[e]?null:(_n[e]=!0,()=>{_n[e]=!1}):_n.x||_n.y?null:(_n.x=_n.y=!0,()=>{_n.x=_n.y=!1})}function IA(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function eC(e,t){const n=IA(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function xy(e){return!(e.pointerType==="touch"||Jb())}function LA(e,t,n={}){const[r,i,s]=eC(e,n),o=a=>{if(!xy(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const d=u=>{xy(u)&&(c(u),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const tC=(e,t)=>t?e===t?!0:tC(e,t.parentElement):!1,Bm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,$A=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function BA(e){return $A.has(e.tagName)||e.tabIndex!==-1}const na=new WeakSet;function wy(e){return t=>{t.key==="Enter"&&e(t)}}function zd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const zA=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=wy(()=>{if(na.has(n))return;zd(n,"down");const i=wy(()=>{zd(n,"up")}),s=()=>zd(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function by(e){return Bm(e)&&!Jb()}function VA(e,t,n={}){const[r,i,s]=eC(e,n),o=a=>{const l=a.currentTarget;if(!by(a)||na.has(l))return;na.add(l);const c=t(l,a),d=(m,h)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",f),!(!by(m)||!na.has(l))&&(na.delete(l),typeof c=="function"&&c(m,{success:h}))},u=m=>{d(m,l===window||l===document||n.useGlobalTarget||tC(l,m.target))},f=m=>{d(m,!1)};window.addEventListener("pointerup",u,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",c=>zA(c,i)),!BA(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const Cy=30,UA=e=>!isNaN(parseFloat(e));class HA{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=rr.now();this.updatedAt!==s&&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=rr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=UA(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 Dm);const r=this.events[t].add(n);return t==="change"?()=>{r(),Me.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=rr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Cy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Cy);return Yb(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 Va(e,t){return new HA(e,t)}const nC=v.createContext({strict:!1}),ky={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"]},Co={};for(const e in ky)Co[e]={isEnabled:t=>ky[e].some(n=>!!t[n])};function WA(e){for(const t in e)Co[t]={...Co[t],...e[t]}}const qA=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 Xu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qA.has(e)}let rC=e=>!Xu(e);function GA(e){e&&(rC=t=>t.startsWith("on")?!Xu(t):e(t))}try{GA(require("@emotion/is-prop-valid").default)}catch{}function YA(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(rC(i)||n===!0&&Xu(i)||!t&&!Xu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function QA(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))})}const Pc=v.createContext({});function Oc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ua(e){return typeof e=="string"||Array.isArray(e)}const zm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vm=["initial",...zm];function Mc(e){return Oc(e.animate)||Vm.some(t=>Ua(e[t]))}function iC(e){return!!(Mc(e)||e.variants)}function KA(e,t){if(Mc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ua(n)?n:void 0,animate:Ua(r)?r:void 0}}return e.inherit!==!1?t:{}}function XA(e){const{initial:t,animate:n}=KA(e,v.useContext(Pc));return v.useMemo(()=>({initial:t,animate:n}),[Sy(t),Sy(n)])}function Sy(e){return Array.isArray(e)?e.join(" "):e}const ZA=Symbol.for("motionComponentSymbol");function Bs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function JA(e,t,n){return v.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Bs(n)&&(n.current=r))},[t])}const Um=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),eR="framerAppearId",sC="data-"+Um(eR),oC=v.createContext({});function tR(e,t,n,r,i){var g,b;const{visualElement:s}=v.useContext(Pc),o=v.useContext(nC),a=v.useContext(Rc),l=v.useContext(Rm).reducedMotion,c=v.useRef(null);r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const d=c.current,u=v.useContext(oC);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&nR(c.current,n,i,u);const f=v.useRef(!1);v.useInsertionEffect(()=>{d&&f.current&&d.update(n,a)});const m=n[sC],h=v.useRef(!!m&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,m))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,m)));return qb(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),$m.render(d.render),h.current&&d.animationState&&d.animationState.animateChanges())}),v.useEffect(()=>{d&&(!h.current&&d.animationState&&d.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,m)}),h.current=!1))}),d}function nR(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:aC(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Bs(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c})}function aC(e){if(e)return e.options.allowProjection!==!1?e.projection:aC(e.parent)}function rR({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&WA(e);function s(a,l){let c;const d={...v.useContext(Rm),...a,layoutId:iR(a)},{isStatic:u}=d,f=XA(a),m=r(a,u);if(!u&&Am){sR();const h=oR(d);c=h.MeasureLayout,f.visualElement=tR(i,m,d,t,h.ProjectionNode)}return p.jsxs(Pc.Provider,{value:f,children:[c&&f.visualElement?p.jsx(c,{visualElement:f.visualElement,...d}):null,n(i,a,JA(m,f.visualElement,l),m,u,f.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=v.forwardRef(s);return o[ZA]=i,o}function iR({layoutId:e}){const t=v.useContext(jm).id;return t&&e!==void 0?t+"-"+e:e}function sR(e,t){v.useContext(nC).strict}function oR(e){const{drag:t,layout:n}=Co;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 lC=e=>t=>typeof t=="string"&&t.startsWith(e),Hm=lC("--"),aR=lC("var(--"),Wm=e=>aR(e)?lR.test(e.split("/*")[0].trim()):!1,lR=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ha={};function uR(e){for(const t in e)Ha[t]=e[t],Hm(t)&&(Ha[t].isCSSVariable=!0)}const Mo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hs=new Set(Mo);function uC(e,{layout:t,layoutId:n}){return hs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ha[e]||e==="opacity")}const jt=e=>!!(e&&e.getVelocity),cC=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Tr=(e,t,n)=>n>t?t:n<e?e:n,Do={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Wa={...Do,transform:e=>Tr(0,1,e)},Ul={...Do,default:1},cl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Dr=cl("deg"),ir=cl("%"),de=cl("px"),cR=cl("vh"),dR=cl("vw"),Ty={...ir,parse:e=>ir.parse(e)/100,transform:e=>ir.transform(e*100)},fR={borderWidth:de,borderTopWidth:de,borderRightWidth:de,borderBottomWidth:de,borderLeftWidth:de,borderRadius:de,radius:de,borderTopLeftRadius:de,borderTopRightRadius:de,borderBottomRightRadius:de,borderBottomLeftRadius:de,width:de,maxWidth:de,height:de,maxHeight:de,top:de,right:de,bottom:de,left:de,padding:de,paddingTop:de,paddingRight:de,paddingBottom:de,paddingLeft:de,margin:de,marginTop:de,marginRight:de,marginBottom:de,marginLeft:de,backgroundPositionX:de,backgroundPositionY:de},pR={rotate:Dr,rotateX:Dr,rotateY:Dr,rotateZ:Dr,scale:Ul,scaleX:Ul,scaleY:Ul,scaleZ:Ul,skew:Dr,skewX:Dr,skewY:Dr,distance:de,translateX:de,translateY:de,translateZ:de,x:de,y:de,z:de,perspective:de,transformPerspective:de,opacity:Wa,originX:Ty,originY:Ty,originZ:de},_y={...Do,transform:Math.round},qm={...fR,...pR,zIndex:_y,size:de,fillOpacity:Wa,strokeOpacity:Wa,numOctaves:_y},hR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},mR=Mo.length;function gR(e,t,n){let r="",i=!0;for(let s=0;s<mR;s++){const o=Mo[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=cC(a,qm[o]);if(!l){i=!1;const d=hR[o]||o;r+=`${d}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Gm(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(hs.has(l)){o=!0;continue}else if(Hm(l)){i[l]=c;continue}else{const d=cC(c,qm[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=gR(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:d=0}=s;r.transformOrigin=`${l} ${c} ${d}`}}const Ym=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dC(e,t,n){for(const r in t)!jt(t[r])&&!uC(r,n)&&(e[r]=t[r])}function vR({transformTemplate:e},t){return v.useMemo(()=>{const n=Ym();return Gm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function yR(e,t){const n=e.style||{},r={};return dC(r,n,e),Object.assign(r,vR(e,t)),r}function xR(e,t){const n={},r=yR(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 wR=["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 Qm(e){return typeof e!="string"||e.includes("-")?!1:!!(wR.indexOf(e)>-1||/[A-Z]/u.test(e))}const bR={offset:"stroke-dashoffset",array:"stroke-dasharray"},CR={offset:"strokeDashoffset",array:"strokeDasharray"};function kR(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?bR:CR;e[s.offset]=de.transform(-r);const o=de.transform(t),a=de.transform(n);e[s.array]=`${o} ${a}`}function Ey(e,t,n){return typeof e=="string"?e:de.transform(t+n*e)}function SR(e,t,n){const r=Ey(t,e.x,e.width),i=Ey(n,e.y,e.height);return`${r} ${i}`}function Km(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},d,u){if(Gm(e,c,u),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m,dimensions:h}=e;f.transform&&(h&&(m.transform=f.transform),delete f.transform),h&&(i!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=SR(h,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&kR(f,o,a,l,!1)}const fC=()=>({...Ym(),attrs:{}}),Xm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function TR(e,t,n,r){const i=v.useMemo(()=>{const s=fC();return Km(s,t,Xm(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};dC(s,e.style,e),i.style={...s,...i.style}}return i}function _R(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Qm(n)?TR:xR)(r,s,o,n),c=YA(r,typeof n=="string",e),d=n!==v.Fragment?{...c,...l,ref:i}:{},{children:u}=r,f=v.useMemo(()=>jt(u)?u.get():u,[u]);return v.createElement(n,{...d,children:f})}}function jy(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Zm(e,t,n,r){if(typeof t=="function"){const[i,s]=jy(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=jy(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const Dp=e=>Array.isArray(e),ER=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),jR=e=>Dp(e)?e[e.length-1]||0:e;function fu(e){const t=jt(e)?e.get():e;return ER(t)?t.toValue():t}function AR({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:RR(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const pC=e=>(t,n)=>{const r=v.useContext(Pc),i=v.useContext(Rc),s=()=>AR(e,t,r,i);return n?s():Ac(s)};function RR(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=fu(s[f]);let{initial:o,animate:a}=e;const l=Mc(e),c=iC(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const u=d?a:o;if(u&&typeof u!="boolean"&&!Oc(u)){const f=Array.isArray(u)?u:[u];for(let m=0;m<f.length;m++){const h=Zm(e,f[m]);if(h){const{transitionEnd:g,transition:b,...x}=h;for(const y in x){let w=x[y];if(Array.isArray(w)){const j=d?w.length-1:0;w=w[j]}w!==null&&(i[y]=w)}for(const y in g)i[y]=g[y]}}}return i}function Jm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(jt(r[o])||t.style&&jt(t.style[o])||uC(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const PR={useVisualState:pC({scrapeMotionValuesFromProps:Jm,createRenderState:Ym})};function hC(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function mC(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const gC=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 vC(e,t,n,r){mC(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(gC.has(i)?i:Um(i),t.attrs[i])}function yC(e,t,n){const r=Jm(e,t,n);for(const i in e)if(jt(e[i])||jt(t[i])){const s=Mo.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const Ay=["x","y","width","height","cx","cy","r"],OR={useVisualState:pC({scrapeMotionValuesFromProps:yC,createRenderState:fC,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if(hs.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<Ay.length;a++){const l=Ay[a];e[l]!==t[l]&&(o=!0)}o&&Me.read(()=>{hC(n,r),Me.render(()=>{Km(r,i,Xm(n.tagName),e.transformTemplate),vC(n,r)})})}})};function MR(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Qm(r)?OR:PR,preloadedFeatures:e,useRender:_R(i),createVisualElement:t,Component:r};return rR(o)}}function qa(e,t,n){const r=e.getProps();return Zm(r,t,n!==void 0?n:r.custom,e)}const xC=new Set(["width","height","top","left","right","bottom",...Mo]);function DR(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Va(n))}function NR(e,t){const n=qa(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=jR(s[o]);DR(e,o,a)}}function FR(e){return!!(jt(e)&&e.add)}function Np(e,t){const n=e.getValue("willChange");if(FR(n))return n.add(t);if(!n&&Op.WillChange){const r=new Op.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function wC(e){return e.props[sC]}const bC=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,IR=1e-7,LR=12;function $R(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=bC(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>IR&&++a<LR);return o}function dl(e,t,n,r){if(e===t&&n===r)return xn;const i=s=>$R(s,0,1,e,n);return s=>s===0||s===1?s:bC(i(s),t,r)}const CC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kC=e=>t=>1-e(1-t),SC=dl(.33,1.53,.69,.99),eg=kC(SC),TC=CC(eg),_C=e=>(e*=2)<1?.5*eg(e):.5*(2-Math.pow(2,-10*(e-1))),tg=e=>1-Math.sin(Math.acos(e)),EC=kC(tg),jC=CC(tg),AC=e=>/^0[^.\s]+$/u.test(e);function BR(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||AC(e):!0}const ha=e=>Math.round(e*1e5)/1e5,ng=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zR(e){return e==null}const VR=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rg=(e,t)=>n=>!!(typeof n=="string"&&VR.test(n)&&n.startsWith(e)||t&&!zR(n)&&Object.prototype.hasOwnProperty.call(n,t)),RC=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(ng);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},UR=e=>Tr(0,255,e),Vd={...Do,transform:e=>Math.round(UR(e))},Ii={test:rg("rgb","red"),parse:RC("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Vd.transform(e)+", "+Vd.transform(t)+", "+Vd.transform(n)+", "+ha(Wa.transform(r))+")"};function HR(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 Fp={test:rg("#"),parse:HR,transform:Ii.transform},zs={test:rg("hsl","hue"),parse:RC("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ir.transform(ha(t))+", "+ir.transform(ha(n))+", "+ha(Wa.transform(r))+")"},_t={test:e=>Ii.test(e)||Fp.test(e)||zs.test(e),parse:e=>Ii.test(e)?Ii.parse(e):zs.test(e)?zs.parse(e):Fp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ii.transform(e):zs.transform(e)},WR=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qR(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ng))==null?void 0:t.length)||0)+(((n=e.match(WR))==null?void 0:n.length)||0)>0}const PC="number",OC="color",GR="var",YR="var(",Ry="${}",QR=/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 Ga(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(QR,l=>(_t.test(l)?(r.color.push(s),i.push(OC),n.push(_t.parse(l))):l.startsWith(YR)?(r.var.push(s),i.push(GR),n.push(l)):(r.number.push(s),i.push(PC),n.push(parseFloat(l))),++s,Ry)).split(Ry);return{values:n,split:a,indexes:r,types:i}}function MC(e){return Ga(e).values}function DC(e){const{split:t,types:n}=Ga(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===PC?s+=ha(i[o]):a===OC?s+=_t.transform(i[o]):s+=i[o]}return s}}const KR=e=>typeof e=="number"?0:e;function XR(e){const t=MC(e);return DC(e)(t.map(KR))}const mi={test:qR,parse:MC,createTransformer:DC,getAnimatableNone:XR},ZR=new Set(["brightness","contrast","saturate","opacity"]);function JR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ng)||[];if(!r)return e;const i=n.replace(r,"");let s=ZR.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const eP=/\b([a-z-]*)\(.*?\)/gu,Ip={...mi,getAnimatableNone:e=>{const t=e.match(eP);return t?t.map(JR).join(" "):e}},tP={...qm,color:_t,backgroundColor:_t,outlineColor:_t,fill:_t,stroke:_t,borderColor:_t,borderTopColor:_t,borderRightColor:_t,borderBottomColor:_t,borderLeftColor:_t,filter:Ip,WebkitFilter:Ip},NC=e=>tP[e];function FC(e,t){let n=NC(e);return n!==Ip&&(n=mi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const nP=new Set(["auto","none","0"]);function rP(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!nP.has(s)&&Ga(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=FC(n,i)}const Li=e=>e*180/Math.PI,Lp=e=>{const t=Li(Math.atan2(e[1],e[0]));return $p(t)},iP={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Lp,rotateZ:Lp,skewX:e=>Li(Math.atan(e[1])),skewY:e=>Li(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$p=e=>(e=e%360,e<0&&(e+=360),e),Py=Lp,Oy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),My=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),sP={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Oy,scaleY:My,scale:e=>(Oy(e)+My(e))/2,rotateX:e=>$p(Li(Math.atan2(e[6],e[5]))),rotateY:e=>$p(Li(Math.atan2(-e[2],e[0]))),rotateZ:Py,rotate:Py,skewX:e=>Li(Math.atan(e[4])),skewY:e=>Li(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Dy(e){return e.includes("scale")?1:0}function Bp(e,t){if(!e||e==="none")return Dy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=sP,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=iP,i=a}if(!i)return Dy(t);const s=r[t],o=i[1].split(",").map(aP);return typeof s=="function"?s(o):o[s]}const oP=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Bp(n,t)};function aP(e){return parseFloat(e.trim())}const Ny=e=>e===Do||e===de,lP=new Set(["x","y","z"]),uP=Mo.filter(e=>!lP.has(e));function cP(e){const t=[];return uP.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ko={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Bp(t,"x"),y:(e,{transform:t})=>Bp(t,"y")};ko.translateX=ko.x;ko.translateY=ko.y;const Ki=new Set;let zp=!1,Vp=!1;function IC(){if(Vp){const e=Array.from(Ki).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=cP(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Vp=!1,zp=!1,Ki.forEach(e=>e.complete()),Ki.clear()}function LC(){Ki.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Vp=!0)})}function dP(){LC(),IC()}class ig{constructor(t,n,r,i,s,o=!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=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ki.add(this),zp||(zp=!0,Me.read(LC),Me.resolveKeyframes(IC))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ki.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ki.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const $C=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),fP=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pP(e){const t=fP.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function BC(e,t,n=1){const[r,i]=pP(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return $C(o)?parseFloat(o):o}return Wm(i)?BC(i,t,n+1):i}const zC=e=>t=>t.test(e),hP={test:e=>e==="auto",parse:e=>e},VC=[Do,de,ir,Dr,dR,cR,hP],Fy=e=>VC.find(zC(e));class UC extends ig{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Wm(c))){const d=BC(c,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!xC.has(r)||t.length!==2)return;const[i,s]=t,o=Fy(i),a=Fy(s);if(o!==a)if(Ny(o)&&Ny(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)BR(t[i])&&r.push(i);r.length&&rP(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=ko[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 a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=ko[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Iy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(mi.test(e)||e==="0")&&!e.startsWith("url("));function mP(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 gP(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=Iy(i,t),a=Iy(s,t);return!o||!a?!1:mP(e)||(n==="spring"||Fm(n))&&r}const vP=e=>e!==null;function Dc(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(vP),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const yP=40;class HC{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=rr.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>yP?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&dP(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=rr.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!gP(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Dc(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Ve=(e,t,n)=>e+(t-e)*n;function Ud(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 xP({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Ud(l,a,e+1/3),s=Ud(l,a,e),o=Ud(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Zu(e,t){return n=>n>0?t:e}const Hd=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},wP=[Fp,Ii,zs],bP=e=>wP.find(t=>t.test(e));function Ly(e){const t=bP(e);if(!t)return!1;let n=t.parse(e);return t===zs&&(n=xP(n)),n}const $y=(e,t)=>{const n=Ly(e),r=Ly(t);if(!n||!r)return Zu(e,t);const i={...n};return s=>(i.red=Hd(n.red,r.red,s),i.green=Hd(n.green,r.green,s),i.blue=Hd(n.blue,r.blue,s),i.alpha=Ve(n.alpha,r.alpha,s),Ii.transform(i))},CP=(e,t)=>n=>t(e(n)),fl=(...e)=>e.reduce(CP),Up=new Set(["none","hidden"]);function kP(e,t){return Up.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function SP(e,t){return n=>Ve(e,t,n)}function sg(e){return typeof e=="number"?SP:typeof e=="string"?Wm(e)?Zu:_t.test(e)?$y:EP:Array.isArray(e)?WC:typeof e=="object"?_t.test(e)?$y:TP:Zu}function WC(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>sg(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function TP(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=sg(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function _P(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const EP=(e,t)=>{const n=mi.createTransformer(t),r=Ga(e),i=Ga(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?Up.has(e)&&!i.values.length||Up.has(t)&&!r.values.length?kP(e,t):fl(WC(_P(r,i),i.values),n):Zu(e,t)};function qC(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ve(e,t,n):sg(e)(e,t)}const jP=5;function GC(e,t,n){const r=Math.max(t-jP,0);return Yb(n-e(r),t-r)}const Ye={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Wd=.001;function AP({duration:e=Ye.duration,bounce:t=Ye.bounce,velocity:n=Ye.velocity,mass:r=Ye.mass}){let i,s,o=1-t;o=Tr(Ye.minDamping,Ye.maxDamping,o),e=Tr(Ye.minDuration,Ye.maxDuration,nr(e)),o<1?(i=c=>{const d=c*o,u=d*e,f=d-n,m=Hp(c,o),h=Math.exp(-u);return Wd-f/m*h},s=c=>{const u=c*o*e,f=u*n+n,m=Math.pow(o,2)*Math.pow(c,2)*e,h=Math.exp(-u),g=Hp(Math.pow(c,2),o);return(-i(c)+Wd>0?-1:1)*((f-m)*h)/g}):(i=c=>{const d=Math.exp(-c*e),u=(c-n)*e+1;return-Wd+d*u},s=c=>{const d=Math.exp(-c*e),u=(n-c)*(e*e);return d*u});const a=5/e,l=PP(i,s,a);if(e=tr(e),isNaN(l))return{stiffness:Ye.stiffness,damping:Ye.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const RP=12;function PP(e,t,n){let r=n;for(let i=1;i<RP;i++)r=r-e(r)/t(r);return r}function Hp(e,t){return e*Math.sqrt(1-t*t)}const OP=["duration","bounce"],MP=["stiffness","damping","mass"];function By(e,t){return t.some(n=>e[n]!==void 0)}function DP(e){let t={velocity:Ye.velocity,stiffness:Ye.stiffness,damping:Ye.damping,mass:Ye.mass,isResolvedFromDuration:!1,...e};if(!By(e,MP)&&By(e,OP))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Tr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ye.mass,stiffness:i,damping:s}}else{const n=AP(e);t={...t,...n,mass:Ye.mass},t.isResolvedFromDuration=!0}return t}function Ju(e=Ye.visualDuration,t=Ye.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:d,duration:u,velocity:f,isResolvedFromDuration:m}=DP({...n,velocity:-nr(n.velocity||0)}),h=f||0,g=c/(2*Math.sqrt(l*d)),b=o-s,x=nr(Math.sqrt(l/d)),y=Math.abs(b)<5;r||(r=y?Ye.restSpeed.granular:Ye.restSpeed.default),i||(i=y?Ye.restDelta.granular:Ye.restDelta.default);let w;if(g<1){const k=Hp(x,g);w=T=>{const A=Math.exp(-g*x*T);return o-A*((h+g*x*b)/k*Math.sin(k*T)+b*Math.cos(k*T))}}else if(g===1)w=k=>o-Math.exp(-x*k)*(b+(h+x*b)*k);else{const k=x*Math.sqrt(g*g-1);w=T=>{const A=Math.exp(-g*x*T),S=Math.min(k*T,300);return o-A*((h+g*x*b)*Math.sinh(S)+k*b*Math.cosh(S))/k}}const j={calculatedDuration:m&&u||null,next:k=>{const T=w(k);if(m)a.done=k>=u;else{let A=0;g<1&&(A=k===0?tr(h):GC(w,k,T));const S=Math.abs(A)<=r,F=Math.abs(o-T)<=i;a.done=S&&F}return a.value=a.done?o:T,a},toString:()=>{const k=Math.min(Lm(j),Ku),T=Qb(A=>j.next(k*A).value,k,30);return k+"ms "+T},toTransition:()=>{}};return j}Ju.applyToOptions=e=>{const t=OA(e,100,Ju);return e.ease=za()?t.ease:"easeOut",e.duration=tr(t.duration),e.type="keyframes",e};function zy({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=e[0],f={done:!1,value:u},m=S=>a!==void 0&&S<a||l!==void 0&&S>l,h=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let g=n*t;const b=u+g,x=o===void 0?b:o(b);x!==b&&(g=x-u);const y=S=>-g*Math.exp(-S/r),w=S=>x+y(S),j=S=>{const F=y(S),N=w(S);f.done=Math.abs(F)<=c,f.value=f.done?x:N};let k,T;const A=S=>{m(f.value)&&(k=S,T=Ju({keyframes:[f.value,h(f.value)],velocity:GC(w,S,f.value),damping:i,stiffness:s,restDelta:c,restSpeed:d}))};return A(0),{calculatedDuration:null,next:S=>{let F=!1;return!T&&k===void 0&&(F=!0,j(S),A(S)),k!==void 0&&S>=k?T.next(S-k):(!F&&j(S),f)}}}const NP=dl(.42,0,1,1),FP=dl(0,0,.58,1),YC=dl(.42,0,.58,1),IP=e=>Array.isArray(e)&&typeof e[0]!="number",Vy={linear:xn,easeIn:NP,easeInOut:YC,easeOut:FP,circIn:tg,circInOut:jC,circOut:EC,backIn:eg,backInOut:TC,backOut:SC,anticipate:_C},Uy=e=>{if(Nm(e)){Pp(e.length===4);const[t,n,r,i]=e;return dl(t,n,r,i)}else if(typeof e=="string")return Pp(Vy[e]!==void 0),Vy[e];return e};function LP(e,t,n){const r=[],i=n||qC,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||xn:t;a=fl(l,a)}r.push(a)}return r}function $P(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Pp(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=LP(t,r,i),l=a.length,c=d=>{if(o&&d<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(d<e[u+1]);u++);const f=Ba(e[u],e[u+1],d);return a[u](f)};return n?d=>c(Tr(e[0],e[s-1],d)):c}function BP(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ba(0,t,r);e.push(Ve(n,1,i))}}function zP(e){const t=[0];return BP(t,e.length-1),t}function VP(e,t){return e.map(n=>n*t)}function UP(e,t){return e.map(()=>t||YC).splice(0,e.length-1)}function ec({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=IP(r)?r.map(Uy):Uy(r),s={done:!1,value:t[0]},o=VP(n&&n.length===t.length?n:zP(t),e),a=$P(o,t,{ease:Array.isArray(i)?i:UP(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const HP=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Me.update(t,!0),stop:()=>hi(t),now:()=>xt.isProcessing?xt.timestamp:rr.now()}},WP={decay:zy,inertia:zy,tween:ec,keyframes:ec,spring:Ju},qP=e=>e/100;class og extends HC{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:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||ig,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=Fm(n)?n:WP[n]||ec;let l,c;a!==ec&&typeof t[0]!="number"&&(l=fl(qP,qC(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=Lm(d));const{calculatedDuration:u}=d,f=u+i,m=f*(r+1)-i;return{generator:d,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:u,resolvedDuration:f,totalDuration:m}}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:S}=this.options;return{done:!0,value:S[S.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:d,resolvedDuration:u}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:m,repeatType:h,repeatDelay:g,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/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 x=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?x<0:x>d;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,j=s;if(m){const S=Math.min(this.currentTime,d)/u;let F=Math.floor(S),N=S%1;!N&&S>=1&&(N=1),N===1&&F--,F=Math.min(F,m+1),!!(F%2)&&(h==="reverse"?(N=1-N,g&&(N-=g/u)):h==="mirror"&&(j=o)),w=Tr(0,1,N)*u}const k=y?{done:!1,value:l[0]}:j.next(w);a&&(k.value=a(k.value));let{done:T}=k;!y&&c!==null&&(T=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return A&&i!==void 0&&(k.value=Dc(l,this.options,i)),b&&b(k.value),A&&this.finish(),k}get duration(){const{resolved:t}=this;return t?nr(t.calculatedDuration):0}get time(){return nr(this.currentTime)}set time(t){t=tr(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=nr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=HP,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),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(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??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)}get finished(){return this.currentFinishedPromise}}const GP=new Set(["opacity","clipPath","filter","transform"]),YP=Mm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),tc=10,QP=2e4;function KP(e){return Fm(e.type)||e.type==="spring"||!Xb(e.ease)}function XP(e,t){const n=new og({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<QP;)r=n.sample(s),i.push(r.value),s+=tc;return{times:void 0,keyframes:i,duration:s-tc,ease:"linear"}}const QC={anticipate:_C,backInOut:TC,circInOut:jC};function ZP(e){return e in QC}class Hy extends HC{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new UC(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&za()&&ZP(s)&&(s=QC[s]),KP(this.options)){const{onComplete:u,onUpdate:f,motionValue:m,element:h,...g}=this.options,b=XP(t,g);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const d=PA(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(yy(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:u}=this.options;a.set(Dc(t,this.options,n)),u&&u(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return nr(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return nr(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=tr(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}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 xn;const{animation:r}=n;yy(r,t)}return xn}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:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:d,onComplete:u,element:f,...m}=this.options,h=new og({...m,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),g=tr(this.time);c.setWithVelocity(h.sample(g-tc).value,h.sample(g).value,tc)}const{onStop:l}=this.options;l&&l(),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:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return YP()&&r&&GP.has(r)&&(r!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const JP={type:"spring",stiffness:500,damping:25,restSpeed:10},eO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),tO={type:"keyframes",duration:.8},nO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rO=(e,{keyframes:t})=>t.length>2?tO:hs.has(e)?e.startsWith("scale")?eO(t[1]):JP:nO;function iO({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const ag=(e,t,n,r={},i,s)=>o=>{const a=Im(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-tr(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};iO(a)||(d={...d,...rO(e,d)}),d.duration&&(d.duration=tr(d.duration)),d.repeatDelay&&(d.repeatDelay=tr(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(u=!0)),d.allowFlatten=!a.type&&!a.ease,u&&!s&&t.get()!==void 0){const f=Dc(d.keyframes,a);if(f!==void 0)return Me.update(()=>{d.onUpdate(f),d.onComplete()}),new jA([])}return!s&&Hy.supports(d)?new Hy(d):new og(d)};function sO({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function KC(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in a){const u=e.getValue(d,e.latestValues[d]??null),f=a[d];if(f===void 0||c&&sO(c,d))continue;const m={delay:n,...Im(s||{},d)};let h=!1;if(window.MotionHandoffAnimation){const b=wC(e);if(b){const x=window.MotionHandoffAnimation(b,d,Me);x!==null&&(m.startTime=x,h=!0)}}Np(e,d),u.start(ag(d,u,f,e.shouldReduceMotion&&xC.has(d)?{type:!1}:m,e,h));const g=u.animation;g&&l.push(g)}return o&&Promise.all(l).then(()=>{Me.update(()=>{o&&NR(e,o)})}),l}function Wp(e,t,n={}){var l;const r=qa(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(KC(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:u,staggerDirection:f}=i;return oO(e,t,d+c,u,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,d]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>d())}else return Promise.all([s(),o(n.delay)])}function oO(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(aO).forEach((c,d)=>{c.notify("AnimationStart",t),o.push(Wp(c,t,{...s,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function aO(e,t){return e.sortNodePosition(t)}function lO(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Wp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Wp(e,t,n);else{const i=typeof t=="function"?qa(e,t,n.custom):t;r=Promise.all(KC(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function XC(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}const uO=Vm.length;function ZC(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ZC(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uO;n++){const r=Vm[n],i=e.props[r];(Ua(i)||i===!1)&&(t[r]=i)}return t}const cO=[...zm].reverse(),dO=zm.length;function fO(e){return t=>Promise.all(t.map(({animation:n,options:r})=>lO(e,n,r)))}function pO(e){let t=fO(e),n=Wy(),r=!0;const i=l=>(c,d)=>{var f;const u=qa(e,d,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(u){const{transition:m,transitionEnd:h,...g}=u;c={...c,...g,...h}}return c};function s(l){t=l(e)}function o(l){const{props:c}=e,d=ZC(e.parent)||{},u=[],f=new Set;let m={},h=1/0;for(let b=0;b<dO;b++){const x=cO[b],y=n[x],w=c[x]!==void 0?c[x]:d[x],j=Ua(w),k=x===l?y.isActive:null;k===!1&&(h=b);let T=w===d[x]&&w!==c[x]&&j;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),y.protectedKeys={...m},!y.isActive&&k===null||!w&&!y.prevProp||Oc(w)||typeof w=="boolean")continue;const A=hO(y.prevProp,w);let S=A||x===l&&y.isActive&&!T&&j||b>h&&j,F=!1;const N=Array.isArray(w)?w:[w];let O=N.reduce(i(x),{});k===!1&&(O={});const{prevResolvedValues:Q={}}=y,J={...Q,...O},U=I=>{S=!0,f.has(I)&&(F=!0,f.delete(I)),y.needsAnimating[I]=!0;const R=e.getValue(I);R&&(R.liveStyle=!1)};for(const I in J){const R=O[I],P=Q[I];if(m.hasOwnProperty(I))continue;let D=!1;Dp(R)&&Dp(P)?D=!XC(R,P):D=R!==P,D?R!=null?U(I):f.add(I):R!==void 0&&f.has(I)?U(I):y.protectedKeys[I]=!0}y.prevProp=w,y.prevResolvedValues=O,y.isActive&&(m={...m,...O}),r&&e.blockInitialAnimation&&(S=!1),S&&(!(T&&A)||F)&&u.push(...N.map(I=>({animation:I,options:{type:x}})))}if(f.size){const b={};if(typeof c.initial!="boolean"){const x=qa(e,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(b.transition=x.transition)}f.forEach(x=>{const y=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),b[x]=y??null}),u.push({animation:b})}let g=!!u.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(u):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)==null||u.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(l,c)}),n[l].isActive=c;const d=o(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Wy(),r=!0}}}function hO(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!XC(t,e):!1}function _i(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Wy(){return{animate:_i(!0),whileInView:_i(),whileHover:_i(),whileTap:_i(),whileDrag:_i(),whileFocus:_i(),exit:_i()}}class bi{constructor(t){this.isMounted=!1,this.node=t}update(){}}class mO extends bi{constructor(t){super(t),t.animationState||(t.animationState=pO(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Oc(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let gO=0;class vO extends bi{constructor(){super(...arguments),this.id=gO++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const yO={animation:{Feature:mO},exit:{Feature:vO}};function Ya(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function pl(e){return{point:{x:e.pageX,y:e.pageY}}}const xO=e=>t=>Bm(t)&&e(t,pl(t));function ma(e,t,n,r){return Ya(e,t,xO(n),r)}function JC({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function wO({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function bO(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}}const ek=1e-4,CO=1-ek,kO=1+ek,tk=.01,SO=0-tk,TO=0+tk;function Mt(e){return e.max-e.min}function _O(e,t,n){return Math.abs(e-t)<=n}function qy(e,t,n,r=.5){e.origin=r,e.originPoint=Ve(t.min,t.max,e.origin),e.scale=Mt(n)/Mt(t),e.translate=Ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=CO&&e.scale<=kO||isNaN(e.scale))&&(e.scale=1),(e.translate>=SO&&e.translate<=TO||isNaN(e.translate))&&(e.translate=0)}function ga(e,t,n,r){qy(e.x,t.x,n.x,r?r.originX:void 0),qy(e.y,t.y,n.y,r?r.originY:void 0)}function Gy(e,t,n){e.min=n.min+t.min,e.max=e.min+Mt(t)}function EO(e,t,n){Gy(e.x,t.x,n.x),Gy(e.y,t.y,n.y)}function Yy(e,t,n){e.min=t.min-n.min,e.max=e.min+Mt(t)}function va(e,t,n){Yy(e.x,t.x,n.x),Yy(e.y,t.y,n.y)}const Qy=()=>({translate:0,scale:1,origin:0,originPoint:0}),Vs=()=>({x:Qy(),y:Qy()}),Ky=()=>({min:0,max:0}),Ze=()=>({x:Ky(),y:Ky()});function dn(e){return[e("x"),e("y")]}function qd(e){return e===void 0||e===1}function qp({scale:e,scaleX:t,scaleY:n}){return!qd(e)||!qd(t)||!qd(n)}function Ri(e){return qp(e)||nk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function nk(e){return Xy(e.x)||Xy(e.y)}function Xy(e){return e&&e!=="0%"}function nc(e,t,n){const r=e-n,i=t*r;return n+i}function Zy(e,t,n,r,i){return i!==void 0&&(e=nc(e,i,r)),nc(e,n,r)+t}function Gp(e,t=0,n=1,r,i){e.min=Zy(e.min,t,n,r,i),e.max=Zy(e.max,t,n,r,i)}function rk(e,{x:t,y:n}){Gp(e.x,t.translate,t.scale,t.originPoint),Gp(e.y,n.translate,n.scale,n.originPoint)}const Jy=.999999999999,e0=1.0000000000001;function jO(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Hs(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,rk(e,o)),r&&Ri(s.latestValues)&&Hs(e,s.latestValues))}t.x<e0&&t.x>Jy&&(t.x=1),t.y<e0&&t.y>Jy&&(t.y=1)}function Us(e,t){e.min=e.min+t,e.max=e.max+t}function t0(e,t,n,r,i=.5){const s=Ve(e.min,e.max,i);Gp(e,t,n,s,r)}function Hs(e,t){t0(e.x,t.x,t.scaleX,t.scale,t.originX),t0(e.y,t.y,t.scaleY,t.scale,t.originY)}function ik(e,t){return JC(bO(e.getBoundingClientRect(),t))}function AO(e,t,n){const r=ik(e,n),{scroll:i}=t;return i&&(Us(r.x,i.offset.x),Us(r.y,i.offset.y)),r}const sk=({current:e})=>e?e.ownerDocument.defaultView:null,n0=(e,t)=>Math.abs(e-t);function RO(e,t){const n=n0(e.x,t.x),r=n0(e.y,t.y);return Math.sqrt(n**2+r**2)}class ok{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!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 u=Yd(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,m=RO(u.offset,{x:0,y:0})>=3;if(!f&&!m)return;const{point:h}=u,{timestamp:g}=xt;this.history.push({...h,timestamp:g});const{onStart:b,onMove:x}=this.handlers;f||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,u)},this.handlePointerMove=(u,f)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Gd(f,this.transformPagePoint),Me.update(this.updatePoint,!0)},this.handlePointerUp=(u,f)=>{this.end();const{onEnd:m,onSessionEnd:h,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Yd(u.type==="pointercancel"?this.lastMoveEventInfo:Gd(f,this.transformPagePoint),this.history);this.startEvent&&m&&m(u,b),h&&h(u,b)},!Bm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=pl(t),a=Gd(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=xt;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,Yd(a,this.history)),this.removeListeners=fl(ma(this.contextWindow,"pointermove",this.handlePointerMove),ma(this.contextWindow,"pointerup",this.handlePointerUp),ma(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),hi(this.updatePoint)}}function Gd(e,t){return t?{point:t(e.point)}:e}function r0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Yd({point:e},t){return{point:e,delta:r0(e,ak(t)),offset:r0(e,PO(t)),velocity:OO(t,.1)}}function PO(e){return e[0]}function ak(e){return e[e.length-1]}function OO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=ak(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>tr(t)));)n--;if(!r)return{x:0,y:0};const s=nr(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function MO(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ve(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ve(n,e,r.max):Math.min(e,n)),e}function i0(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 DO(e,{top:t,left:n,bottom:r,right:i}){return{x:i0(e.x,n,i),y:i0(e.y,t,r)}}function s0(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 NO(e,t){return{x:s0(e.x,t.x),y:s0(e.y,t.y)}}function FO(e,t){let n=.5;const r=Mt(e),i=Mt(t);return i>r?n=Ba(t.min,t.max-r,e.min):r>i&&(n=Ba(e.min,e.max-i,t.min)),Tr(0,1,n)}function IO(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 Yp=.35;function LO(e=Yp){return e===!1?e=0:e===!0&&(e=Yp),{x:o0(e,"left","right"),y:o0(e,"top","bottom")}}function o0(e,t,n){return{min:a0(e,t),max:a0(e,n)}}function a0(e,t){return typeof e=="number"?e:e[t]||0}const $O=new WeakMap;class BO{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ze(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(pl(d).point)},s=(d,u)=>{const{drag:f,dragPropagation:m,onDragStart:h}=this.getProps();if(f&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=FA(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),dn(b=>{let x=this.getAxisMotionValue(b).get()||0;if(ir.test(x)){const{projection:y}=this.visualElement;if(y&&y.layout){const w=y.layout.layoutBox[b];w&&(x=Mt(w)*(parseFloat(x)/100))}}this.originPoint[b]=x}),h&&Me.postRender(()=>h(d,u)),Np(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(d,u)=>{const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:h,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=u;if(m&&this.currentDirection===null){this.currentDirection=zO(b),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",u.point,b),this.updateAxis("y",u.point,b),this.visualElement.render(),g&&g(d,u)},a=(d,u)=>this.stop(d,u),l=()=>dn(d=>{var u;return this.getAnimationState(d)==="paused"&&((u=this.getAxisMotionValue(d).animation)==null?void 0:u.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new ok(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:sk(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Me.postRender(()=>s(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.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Hl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=MO(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&Bs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=DO(r.layoutBox,t):this.constraints=!1,this.elastic=LO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&dn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=IO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Bs(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=AO(r,i.root,this.visualElement.getTransformPagePoint());let o=NO(i.layout.layoutBox,s);if(n){const a=n(wO(o));this.hasMutatedConstraints=!!a,a&&(o=JC(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=dn(d=>{if(!Hl(d,n,this.currentDirection))return;let u=l&&l[d]||{};o&&(u={min:0,max:0});const f=i?200:1e6,m=i?40:1e7,h={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(d,h)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Np(this.visualElement,t),r.start(ag(t,r,0,n,this.visualElement,!1))}stopAnimation(){dn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){dn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){dn(n=>{const{drag:r}=this.getProps();if(!Hl(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-Ve(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Bs(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};dn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=FO({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),dn(o=>{if(!Hl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(Ve(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;$O.set(this.visualElement,this);const t=this.visualElement.current,n=ma(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Bs(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Me.read(r);const o=Ya(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(dn(d=>{const u=this.getAxisMotionValue(d);u&&(this.originPoint[d]+=l[d].translate,u.set(u.get()+l[d].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Yp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Hl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function zO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class VO extends bi{constructor(t){super(t),this.removeGroupControls=xn,this.removeListeners=xn,this.controls=new BO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xn}unmount(){this.removeGroupControls(),this.removeListeners()}}const l0=e=>(t,n)=>{e&&Me.postRender(()=>e(t,n))};class UO extends bi{constructor(){super(...arguments),this.removePointerDownListener=xn}onPointerDown(t){this.session=new ok(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sk(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:l0(t),onStart:l0(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Me.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=ma(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 pu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function u0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Go={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(de.test(e))e=parseFloat(e);else return e;const n=u0(e,t.target.x),r=u0(e,t.target.y);return`${n}% ${r}%`}},HO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=mi.parse(e);if(i.length>5)return r;const s=mi.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const c=Ve(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class WO extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;uR(qO),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),pu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Me.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$m.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 lk(e){const[t,n]=Gb(),r=v.useContext(jm);return p.jsx(WO,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(oC),isPresent:t,safeToRemove:n})}const qO={borderRadius:{...Go,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Go,borderTopRightRadius:Go,borderBottomLeftRadius:Go,borderBottomRightRadius:Go,boxShadow:HO};function GO(e,t,n){const r=jt(e)?e:Va(e);return r.start(ag("",r,t,n)),r.animation}function YO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const QO=(e,t)=>e.depth-t.depth;class KO{constructor(){this.children=[],this.isDirty=!1}add(t){Pm(this.children,t),this.isDirty=!0}remove(t){Om(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(QO),this.isDirty=!1,this.children.forEach(t)}}function XO(e,t){const n=rr.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(hi(r),e(s-t))};return Me.read(r,!0),()=>hi(r)}const uk=["TopLeft","TopRight","BottomLeft","BottomRight"],ZO=uk.length,c0=e=>typeof e=="string"?parseFloat(e):e,d0=e=>typeof e=="number"||de.test(e);function JO(e,t,n,r,i,s){i?(e.opacity=Ve(0,n.opacity??1,e3(r)),e.opacityExit=Ve(t.opacity??1,0,t3(r))):s&&(e.opacity=Ve(t.opacity??1,n.opacity??1,r));for(let o=0;o<ZO;o++){const a=`border${uk[o]}Radius`;let l=f0(t,a),c=f0(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||d0(l)===d0(c)?(e[a]=Math.max(Ve(c0(l),c0(c),r),0),(ir.test(c)||ir.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ve(t.rotate||0,n.rotate||0,r))}function f0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const e3=ck(0,.5,EC),t3=ck(.5,.95,xn);function ck(e,t,n){return r=>r<e?0:r>t?1:n(Ba(e,t,r))}function p0(e,t){e.min=t.min,e.max=t.max}function un(e,t){p0(e.x,t.x),p0(e.y,t.y)}function h0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function m0(e,t,n,r,i){return e-=t,e=nc(e,1/n,r),i!==void 0&&(e=nc(e,1/i,r)),e}function n3(e,t=0,n=1,r=.5,i,s=e,o=e){if(ir.test(t)&&(t=parseFloat(t),t=Ve(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Ve(s.min,s.max,r);e===s&&(a-=t),e.min=m0(e.min,t,n,a,i),e.max=m0(e.max,t,n,a,i)}function g0(e,t,[n,r,i],s,o){n3(e,t[n],t[r],t[i],t.scale,s,o)}const r3=["x","scaleX","originX"],i3=["y","scaleY","originY"];function v0(e,t,n,r){g0(e.x,t,r3,n?n.x:void 0,r?r.x:void 0),g0(e.y,t,i3,n?n.y:void 0,r?r.y:void 0)}function y0(e){return e.translate===0&&e.scale===1}function dk(e){return y0(e.x)&&y0(e.y)}function x0(e,t){return e.min===t.min&&e.max===t.max}function s3(e,t){return x0(e.x,t.x)&&x0(e.y,t.y)}function w0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function fk(e,t){return w0(e.x,t.x)&&w0(e.y,t.y)}function b0(e){return Mt(e.x)/Mt(e.y)}function C0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class o3{constructor(){this.members=[]}add(t){Pm(this.members,t),t.scheduleRender()}remove(t){if(Om(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function a3(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:d,rotateX:u,rotateY:f,skewX:m,skewY:h}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),u&&(r+=`rotateX(${u}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),h&&(r+=`skewY(${h}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Qd=["","X","Y","Z"],l3={visibility:"hidden"},k0=1e3;let u3=0;function Kd(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function pk(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=wC(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Me,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&pk(r)}function hk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=u3++,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,this.nodes.forEach(f3),this.nodes.forEach(v3),this.nodes.forEach(y3),this.nodes.forEach(p3)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new KO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Dm),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=YO(o),this.instance=o;const{layoutId:l,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let u;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=XO(f,250),pu.hasAnimatedSinceResize&&(pu.hasAnimatedSinceResize=!1,this.nodes.forEach(T0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||k3,{onLayoutAnimationStart:b,onLayoutAnimationComplete:x}=d.getProps(),y=!this.targetLayout||!fk(this.targetLayout,h),w=!f&&m;if(this.options.layoutRoot||this.resumeFrom||w||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,w);const j={...Im(g,"layout"),onPlay:b,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j)}else f||T0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,hi(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(x3),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&pk(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const u=this.path[d];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(S0);return}this.isUpdating||this.nodes.forEach(m3),this.isUpdating=!1,this.nodes.forEach(g3),this.nodes.forEach(c3),this.nodes.forEach(d3),this.clearAllSnapshots();const a=rr.now();xt.delta=Tr(0,1e3/60,a-xt.timestamp),xt.timestamp=a,xt.isProcessing=!0,Bd.update.process(xt),Bd.preRender.process(xt),Bd.render.process(xt),xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$m.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(h3),this.sharedNodes.forEach(w3)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Me.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Me.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Mt(this.snapshot.measuredBox.x)&&!Mt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ze(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!dk(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&(a||Ri(this.latestValues)||d)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),S3(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Ze();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(T3))){const{scroll:d}=this.root;d&&(Us(a.x,d.offset.x),Us(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=Ze();if(un(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:u,options:f}=d;d!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&un(a,o),Us(a.x,u.offset.x),Us(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const l=Ze();un(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Hs(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Ri(d.latestValues)&&Hs(l,d.latestValues)}return Ri(this.latestValues)&&Hs(l,this.latestValues),l}removeTransform(o){const a=Ze();un(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ri(c.latestValues))continue;qp(c.latestValues)&&c.updateSnapshot();const d=Ze(),u=c.measurePageBox();un(d,u),v0(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return Ri(this.latestValues)&&v0(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:u}=this.options;if(!(!this.layout||!(d||u))){if(this.resolvedRelativeTargetAt=xt.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ze(),this.relativeTargetOrigin=Ze(),va(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),un(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ze(),this.targetWithTransforms=Ze()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),EO(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):un(this.target,this.layout.layoutBox),rk(this.target,this.targetDelta)):un(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ze(),this.relativeTargetOrigin=Ze(),va(this.relativeTargetOrigin,this.target,m.target),un(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||qp(this.parent.latestValues)||nk(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 h;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===xt.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;un(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,f=this.treeScale.y;jO(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ze());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(h0(this.prevProjectionDelta.x,this.projectionDelta.x),h0(this.prevProjectionDelta.y,this.projectionDelta.y)),ga(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==f||!C0(this.projectionDelta.x,this.prevProjectionDelta.x)||!C0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Vs(),this.projectionDelta=Vs(),this.projectionDeltaWithTransform=Vs()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},u=Vs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ze(),m=l?l.source:void 0,h=this.layout?this.layout.source:void 0,g=m!==h,b=this.getStack(),x=!b||b.members.length<=1,y=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(C3));this.animationProgress=0;let w;this.mixTargetDelta=j=>{const k=j/1e3;_0(u.x,o.x,k),_0(u.y,o.y,k),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(va(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),b3(this.relativeTarget,this.relativeTargetOrigin,f,k),w&&s3(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ze()),un(w,this.relativeTarget)),g&&(this.animationValues=d,JO(d,c,this.latestValues,k,y,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(hi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Me.update(()=>{pu.hasAnimatedSinceResize=!0,this.currentAnimation=GO(0,k0,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(k0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:d}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&mk(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ze();const u=Mt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const f=Mt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}un(a,l),Hs(a,d),ga(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new o3),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Kd("z",o,c,this.animationValues);for(let d=0;d<Qd.length;d++)Kd(`rotate${Qd[d]}`,o,c,this.animationValues),Kd(`skew${Qd[d]}`,o,c,this.animationValues);o.render();for(const d in c)o.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return l3;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=fu(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=fu(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Ri(this.latestValues)&&(m.transform=l?l({},""):"none",this.hasProjected=!1),m}const d=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=a3(this.projectionDeltaWithTransform,this.treeScale,d),l&&(a.transform=l(d,a.transform));const{x:u,y:f}=this.projectionDelta;a.transformOrigin=`${u.origin*100}% ${f.origin*100}% 0`,c.animationValues?a.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in Ha){if(d[m]===void 0)continue;const{correct:h,applyTo:g,isCSSVariable:b}=Ha[m],x=a.transform==="none"?d[m]:h(d[m],c);if(g){const y=g.length;for(let w=0;w<y;w++)a[g[w]]=x}else b?this.options.visualElement.renderState.vars[m]=x:a[m]=x}return this.options.layoutId&&(a.pointerEvents=c===this?fu(o==null?void 0:o.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(S0),this.root.sharedNodes.clear()}}}function c3(e){e.updateLayout()}function d3(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?dn(u=>{const f=o?t.measuredBox[u]:t.layoutBox[u],m=Mt(f);f.min=r[u].min,f.max=f.min+m}):mk(s,t.layoutBox,r)&&dn(u=>{const f=o?t.measuredBox[u]:t.layoutBox[u],m=Mt(r[u]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+m)});const a=Vs();ga(a,r,t.layoutBox);const l=Vs();o?ga(l,e.applyTransform(i,!0),t.measuredBox):ga(l,r,t.layoutBox);const c=!dk(a);let d=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:m}=u;if(f&&m){const h=Ze();va(h,t.layoutBox,f.layoutBox);const g=Ze();va(g,r,m.layoutBox),fk(h,g)||(d=!0),u.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function f3(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function p3(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function h3(e){e.clearSnapshot()}function S0(e){e.clearMeasurements()}function m3(e){e.isLayoutDirty=!1}function g3(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function T0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function v3(e){e.resolveTargetDelta()}function y3(e){e.calcProjection()}function x3(e){e.resetSkewAndRotation()}function w3(e){e.removeLeadSnapshot()}function _0(e,t,n){e.translate=Ve(t.translate,0,n),e.scale=Ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function E0(e,t,n,r){e.min=Ve(t.min,n.min,r),e.max=Ve(t.max,n.max,r)}function b3(e,t,n,r){E0(e.x,t.x,n.x,r),E0(e.y,t.y,n.y,r)}function C3(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const k3={duration:.45,ease:[.4,0,.1,1]},j0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),A0=j0("applewebkit/")&&!j0("chrome/")?Math.round:xn;function R0(e){e.min=A0(e.min),e.max=A0(e.max)}function S3(e){R0(e.x),R0(e.y)}function mk(e,t,n){return e==="position"||e==="preserve-aspect"&&!_O(b0(t),b0(n),.2)}function T3(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const _3=hk({attachResizeListener:(e,t)=>Ya(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xd={current:void 0},gk=hk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xd.current){const e=new _3({});e.mount(window),e.setOptions({layoutScroll:!0}),Xd.current=e}return Xd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),E3={pan:{Feature:UO},drag:{Feature:VO,ProjectionNode:gk,MeasureLayout:lk}};function P0(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&Me.postRender(()=>s(t,pl(t)))}class j3 extends bi{mount(){const{current:t}=this.node;t&&(this.unmount=LA(t,(n,r)=>(P0(this.node,r,"Start"),i=>P0(this.node,i,"End"))))}unmount(){}}class A3 extends bi{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=fl(Ya(this.node.current,"focus",()=>this.onFocus()),Ya(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function O0(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&Me.postRender(()=>s(t,pl(t)))}class R3 extends bi{mount(){const{current:t}=this.node;t&&(this.unmount=VA(t,(n,r)=>(O0(this.node,r,"Start"),(i,{success:s})=>O0(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Qp=new WeakMap,Zd=new WeakMap,P3=e=>{const t=Qp.get(e.target);t&&t(e)},O3=e=>{e.forEach(P3)};function M3({root:e,...t}){const n=e||document;Zd.has(n)||Zd.set(n,{});const r=Zd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(O3,{root:e,...t})),r[i]}function D3(e,t,n){const r=M3(t);return Qp.set(e,n),r.observe(e),()=>{Qp.delete(e),r.unobserve(e)}}const N3={some:0,all:1};class F3 extends bi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:N3[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:u}=this.node.getProps(),f=c?d:u;f&&f(l)};return D3(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(I3(t,n))&&this.startObserver()}unmount(){}}function I3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const L3={inView:{Feature:F3},tap:{Feature:R3},focus:{Feature:A3},hover:{Feature:j3}},$3={layout:{ProjectionNode:gk,MeasureLayout:lk}},Kp={current:null},vk={current:!1};function B3(){if(vk.current=!0,!!Am)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Kp.current=e.matches;e.addListener(t),t()}else Kp.current=!1}const z3=[...VC,_t,mi],V3=e=>z3.find(zC(e)),U3=new WeakMap;function H3(e,t,n){for(const r in t){const i=t[r],s=n[r];if(jt(i))e.addValue(r,i);else if(jt(s))e.addValue(r,Va(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Va(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const M0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class W3{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ig,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 m=rr.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Me.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:d}=o;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Mc(n),this.isVariantNode=iC(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const h=f[m];l[m]!==void 0&&jt(h)&&h.set(l[m],!1)}}mount(t){this.current=t,U3.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)),vk.current||B3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Kp.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),hi(this.notifyUpdate),hi(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=hs.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Me.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),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 Co){const n=Co[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ze()}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<M0.length;r++){const i=M0[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=H3(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=Va(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&($C(r)||AC(r))?r=parseFloat(r):!V3(r)&&mi.test(n)&&(r=FC(t,n)),this.setBaseTarget(t,jt(r)?r.get():r)),jt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Zm(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!jt(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Dm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class yk extends W3{constructor(){super(...arguments),this.KeyframeResolver=UC}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function q3(e){return window.getComputedStyle(e)}class G3 extends yk{constructor(){super(...arguments),this.type="html",this.renderInstance=mC}readValueFromInstance(t,n){if(hs.has(n))return oP(t,n);{const r=q3(t),i=(Hm(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ik(t,n)}build(t,n,r){Gm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Jm(t,n,r)}}class Y3 extends yk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ze,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&hC(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(hs.has(n)){const r=NC(n);return r&&r.default||0}return n=gC.has(n)?n:Um(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return yC(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Me.postRender(this.updateDimensions)}build(t,n,r){Km(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){vC(t,n,r,i)}mount(t){this.isSVGTag=Xm(t.tagName),super.mount(t)}}const Q3=(e,t)=>Qm(e)?new Y3(t):new G3(t,{allowProjection:e!==v.Fragment}),K3=MR({...yO,...L3,...E3,...$3},Q3),He=QA(K3);class X3{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const Z3=()=>new X3;function J3(){return Ac(Z3)}var Ir=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(Ir||{});const xk=v.createContext({}),eM={[ne.TooltipDefault]:"Bizimle sohbet edin!",[ne.TooltipActive]:"Yeni mesajlar var!",[ne.CloseButtonAria]:"Kapat",[ne.MessagePlaceholder]:"Mesajınızı yazın",[ne.FileUploadDisabled]:"Dosya gönderim izniniz olmadığı için yükleyemezsiniz",[ne.NewMessagesNotification]:"Yeni mesajlar var!",[ne.ChatCloseConfirm]:"Sohbeti kapatmak istediğinizden emin misiniz?",[ne.ChatCloseWarning]:"Bu işlem geri alınamaz.",[ne.ChatSettings]:"Sohbet Ayarları",[ne.ChatEndConversation]:"Sohbeti Sonlandır",[ne.CancelAction]:"Vazgeç",[ne.CloseAction]:"Kapat",[ne.QuickActions]:"Hızlı işlemler",[ne.GreetingStartChat]:"Sohbete başla",[ne.RateLimitMessage]:"Çok fazla mesaj gönderdiniz. Lütfen {seconds} saniye bekleyin.",[ne.RatingHeaderEvaluate]:"Görüşmenizi Değerlendirin",[ne.RatingHeaderThanks]:"Teşekkürler!",[ne.RatingDescription]:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli.",[ne.RatingRateConversation]:"Görüşmeyi puanlayın",[ne.RatingComment]:"Yorumunuz (İsteğe bağlı)",[ne.RatingCommentPlaceholder]:"Görüşme hakkında düşüncelerinizi paylaşın...",[ne.RatingSubmit]:"Değerlendirmeyi Gönder",[ne.RatingNewConversation]:"Yeni Görüşme Başlat",[ne.RatingThankYouTitle]:"Değerlendirmeniz için teşekkürler!",[ne.RatingThankYouDescription]:"Geri bildiriminiz bizim için çok değerli.",[ne.RatingCountdown]:"Ekran {seconds} saniye içinde kapanacaktır.",[ne.RatingMinimumError]:"Lütfen en az 1 yıldız seçiniz.",[ne.RatingYourScore]:"Puanınız: {score}",[ne.PoweredBy]:"Powered by"},tM={[C.Background]:"#ffffff",[C.Border]:"#e2e8f0",[C.TooltipText]:"#1e40af",[C.TooltipBackground]:"#dbeafe",[C.TooltipBorder]:"#3b82f6",[C.HeaderBackground]:"#2563eb",[C.HeaderBorder]:"#e2e8f0",[C.HeaderText]:"#ffffff",[C.FooterBackground]:"#f8fafc",[C.FooterBorder]:"#e2e8f0",[C.FooterText]:"#475569",[C.MessageAdminBackground]:"#f1f5f9",[C.MessageAdminText]:"#334155",[C.MessageVisitorBackground]:"#3b82f6",[C.MessageVisitorText]:"#ffffff",[C.MessageAgentBackground]:"#ede9fe",[C.MessageAgentText]:"#5b21b6",[C.GreeterBackground]:"#ffffff",[C.GreeterText]:"#334155",[C.GreeterBorder]:"#e2e8f0",[C.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[C.GreeterTopText]:"#ffffff",[C.GreeterButtonBackground]:"#4f46e5",[C.GreeterButtonText]:"#ffffff",[C.ButtonBackground]:"#4f46e5",[C.ButtonText]:"#ffffff",[C.InputBackground]:"#ffffff",[C.InputText]:"#1e293b",[C.InputBorder]:"#e2e8f0",[C.CloseButtonBackground]:"#f1f5f9",[C.CloseButtonText]:"#475569",[C.CloseButtonHover]:"#e2e8f0",[C.IconColor]:"#64748b",[C.IconBackground]:"transparent",[C.ErrorBackground]:"#fef2f2",[C.ErrorText]:"#dc2626",[C.ErrorBorder]:"#fca5a5",[C.SuccessBackground]:"#f0fdf4",[C.SuccessText]:"#16a34a",[C.SuccessBorder]:"#86efac",[C.WarningBackground]:"#fffbeb",[C.WarningText]:"#d97706",[C.WarningBorder]:"#fcd34d",[C.LinkColor]:"#2563eb",[C.LinkHoverColor]:"#1d4ed8",[C.DividerColor]:"#e2e8f0",[C.ShadowColor]:"rgba(0, 0, 0, 0.1)",[C.StarActiveColor]:"#3b82f6",[C.StarInactiveColor]:"#e2e8f0",[C.ModalOverlayColor]:"rgba(0, 0, 0, 0.4)",[C.ChatCloseConfirmText]:"#dc2626",[C.RatingHeaderBackground]:"#4F46E5",[C.RatingHeaderText]:"#ffffff",[C.RatingSuccessBackground]:"#ffffff",[C.RatingSuccessText]:"#334155",[C.RatingRateConversationText]:"#1e293b"},nM={[Ir.None]:"0px",[Ir.Sm]:"var(--radius-xs)",[Ir.Md]:"var(--radius-sm)",[Ir.Lg]:"var(--radius-md)",[Ir.Xl]:"var(--radius-lg)",[Ir.Full]:"calc(infinity * 1px)"},rM=e=>{const t={...eM};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.texts)return t;for(const n in e.appearance.design.texts){const r=n;e.appearance.design.texts[r]&&(t[r]=e.appearance.design.texts[r])}return t},iM=e=>{const t={...tM};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.colors)return t;for(const n in e.appearance.design.colors){const r=n;e.appearance.design.colors[r]&&(t[r]=e.appearance.design.colors[r])}return t};function sM({children:e,widget:t}){const n=iM(t),r=rM(t),i=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:Ir.Md,s=l=>n[l],o=l=>r[l],a=()=>nM[i];return p.jsx(xk.Provider,{value:{colors:n,texts:r,getColor:s,getText:o,getRadius:a},children:e})}const Se=()=>v.useContext(xk),ms=()=>Se().getText;function pt({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,style:l,textKey:c=C.ButtonText,bgKey:d=C.ButtonBackground,animations:u={},withoutTheming:f,...m}){const h=Se();return p.jsx(He.button,{type:t,className:Ie("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,my[n]&&my[n][r],bA[i][o?"rounded":"default"]),disabled:s,style:{...!f&&{color:h.getColor(c),backgroundColor:h.getColor(d),...o?{}:{borderRadius:h.getRadius()}},...l},...u,...m,children:e})}function ie(){}ie.Home=function(t){return p.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:p.jsx("path",{d:"M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 00.707-1.707l-9-9a.999.999 0 00-1.414 0l-9 9A1 1 0 003 13zm7 7v-5h4v5h-4zm2-15.586l6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z"})})};ie.Chat=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});ie.Menu=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});ie.MessageTyping=({className:e="size-5",...t})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});ie.Check=function(t){return p.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:p.jsx("path",{d:"M12.736 3.97a.733.733 0 011.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 01-1.065.02L3.217 8.384a.757.757 0 010-1.06.733.733 0 011.047 0l3.052 3.093 5.4-6.425a.247.247 0 01.02-.022z"})})};ie.Website=function(t){return p.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[p.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14 7a1 1 0 00-1 1v8a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1h-4zm3 2h-2v6h2V9z",clipRule:"evenodd"}),p.jsx("path",{fill:"currentColor",d:"M6 7a1 1 0 000 2h4a1 1 0 100-2H6zM6 11a1 1 0 100 2h4a1 1 0 100-2H6zM5 16a1 1 0 011-1h4a1 1 0 110 2H6a1 1 0 01-1-1z"}),p.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 3a3 3 0 00-3 3v12a3 3 0 003 3h16a3 3 0 003-3V6a3 3 0 00-3-3H4zm16 2H4a1 1 0 00-1 1v12a1 1 0 001 1h16a1 1 0 001-1V6a1 1 0 00-1-1z",clipRule:"evenodd"})]})};ie.ArrowDown=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});ie.ArrowLeft=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})});ie.XCircle=({className:e="e-5",...t})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});ie.X=({className:e="e-5",...t})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});ie.PaperAirplane=({className:e="e-5",...t})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})});ie.Spin=function(t){return p.jsx("svg",{"data-name":"Layer 1",viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:p.jsx("path",{d:"M6.804 15a1 1 0 00-1.366-.366l-1.732 1a1 1 0 001 1.732l1.732-1A1 1 0 006.804 15zM3.706 8.366l1.732 1a1 1 0 101-1.732l-1.732-1a1 1 0 00-1 1.732zM6 12a1 1 0 00-1-1H3a1 1 0 000 2h2a1 1 0 001-1zm11.196-3a1 1 0 001.366.366l1.732-1a1 1 0 10-1-1.732l-1.732 1A1 1 0 0017.196 9zM15 6.804a1 1 0 001.366-.366l1-1.732a1 1 0 10-1.732-1l-1 1.732A1 1 0 0015 6.804zm5.294 8.83l-1.732-1a1 1 0 10-1 1.732l1.732 1a1 1 0 001-1.732zm-3.928 1.928a1 1 0 10-1.732 1l1 1.732a1 1 0 101.732-1zM21 11h-2a1 1 0 000 2h2a1 1 0 000-2zm-9 7a1 1 0 00-1 1v2a1 1 0 002 0v-2a1 1 0 00-1-1zm-3-.804a1 1 0 00-1.366.366l-1 1.732a1 1 0 001.732 1l1-1.732A1 1 0 009 17.196zM12 2a1 1 0 00-1 1v2a1 1 0 002 0V3a1 1 0 00-1-1z"})})};ie.ExternalLink=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})});ie.Phone=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z"})});ie.Mail=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})});ie.Star=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"})});ie.Plus=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})});ie.History=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});ie.Eye=e=>p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:[p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]});ie.Lock=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 10.5V6.75a4.5 4.5 0 119 0v3.75M3.75 21.75h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H3.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"})});ie.User=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"})});ie.Bot=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z"})});function Xp(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var at=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e.AIAgentMode="lc:agent:mode",e.AIAgent="lc:agent:data",e.AIAgentSessionId="lc:agent:session",e))(at||{});const Dn=(e,t,n)=>{let r=e;["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(r=`${n}:${e}`),localStorage.setItem(r,t)},ra=(e,t)=>{let n=e;return["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(n=`${t}:${e}`),localStorage.getItem(n)},Js=e=>{localStorage.removeItem(`${e}:lc:customer:token`),localStorage.removeItem(`${e}:lc:customer:refresh_token`),lg(e)},Jd=(e,t,n,r)=>{const i=`${e}:`;t&&n?(localStorage.setItem(`${i}lc:agent:mode`,"true"),localStorage.setItem(`${i}lc:agent:data`,JSON.stringify(t)),r&&localStorage.setItem(`${i}lc:agent:session`,r)):lg(e)},ef=e=>{const t=`${e}:`,n=localStorage.getItem(`${t}lc:agent:mode`)==="true",r=localStorage.getItem(`${t}lc:agent:data`),i=localStorage.getItem(`${t}lc:agent:session`);let s=null;if(r)try{s=JSON.parse(r)}catch{s=null}return{isAgentMode:n,agent:s,sessionId:i}},lg=e=>{const t=`${e}:`;localStorage.removeItem(`${t}lc:agent:mode`),localStorage.removeItem(`${t}lc:agent:data`),localStorage.removeItem(`${t}lc:agent:session`)},gi=e=>{const t=`${e}:lc:device:id`;let n=localStorage.getItem(t);return n||(n=Xp(),localStorage.setItem(t,n)),n},oM={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},D0=e=>{let t;const n=new Set,r=(d,u)=>{const f=typeof d=="function"?d(t):d;if(!Object.is(f,t)){const m=t;t=u??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(h=>h(t,m))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(oM?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,i,l);return l},aM=e=>e?D0(e):D0;var wk={exports:{}},bk={},Ck={exports:{}},kk={};/**
|
|
80
80
|
* @license React
|
|
81
81
|
* use-sync-external-store-shim.production.min.js
|
|
82
82
|
*
|
|
@@ -84,7 +84,7 @@ Error generating stack: `+s.message+`
|
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the MIT license found in the
|
|
86
86
|
* LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/var
|
|
87
|
+
*/var So=v;function lM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var uM=typeof Object.is=="function"?Object.is:lM,cM=So.useState,dM=So.useEffect,fM=So.useLayoutEffect,pM=So.useDebugValue;function hM(e,t){var n=t(),r=cM({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return fM(function(){i.value=n,i.getSnapshot=t,tf(i)&&s({inst:i})},[e,n,t]),dM(function(){return tf(i)&&s({inst:i}),e(function(){tf(i)&&s({inst:i})})},[e]),pM(n),n}function tf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!uM(e,n)}catch{return!0}}function mM(e,t){return t()}var gM=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?mM:hM;kk.useSyncExternalStore=So.useSyncExternalStore!==void 0?So.useSyncExternalStore:gM;Ck.exports=kk;var vM=Ck.exports;/**
|
|
88
88
|
* @license React
|
|
89
89
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
90
90
|
*
|
|
@@ -92,21 +92,21 @@ Error generating stack: `+s.message+`
|
|
|
92
92
|
*
|
|
93
93
|
* This source code is licensed under the MIT license found in the
|
|
94
94
|
* LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/var Nc=v,yM=vM;function xM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wM=typeof Object.is=="function"?Object.is:xM,bM=yM.useSyncExternalStore,CM=Nc.useRef,kM=Nc.useEffect,SM=Nc.useMemo,TM=Nc.useDebugValue;bk.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=CM(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=SM(function(){function l(m){if(!c){if(c=!0,d=m,m=r(m),i!==void 0&&o.hasValue){var h=o.value;if(i(h,m))return u=h}return u=m}if(h=u,wM(d,m))return h;var g=r(m);return i!==void 0&&i(h,g)?h:(d=m,u=g)}var c=!1,d,u,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var a=bM(e,s[0],s[1]);return kM(function(){o.hasValue=!0,o.value=a},[a]),TM(a),a};wk.exports=bk;var _M=wk.exports;const EM=_r(_M),Sk={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:jM}=W,{useSyncExternalStoreWithSelector:AM}=EM;let N0=!1;const RM=e=>e;function PM(e,t=RM,n){(Sk?"production":void 0)!=="production"&&n&&!N0&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),N0=!0);const r=AM(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return jM(r),r}const F0=e=>{(Sk?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?aM(e):e,n=(r,i)=>PM(t,r,i);return Object.assign(n,t),n},OM=e=>e?F0(e):F0,he=OM(e=>({widget:null,open:localStorage.getItem("lc:widget:isHaveChat")==="true",isInputFocused:!1,isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,isTooltipVisible:!0,onTooltipClose:void 0,anyAdmin:!0,setIsTooltipVisible:t=>e({isTooltipVisible:t}),setOnTooltipClose:t=>e({onTooltipClose:t}),setOpen:t=>{e({open:t})},setAnyAdmin:t=>e({anyAdmin:t}),setWidget:t=>e({widget:t}),setDefaultValues:t=>e({defaultValues:t}),setIsHaveChat:t=>{e({isHaveChat:t}),localStorage.setItem("lc:widget:isHaveChat",t.toString())},setSoundPath:t=>{e({soundPath:t})},onOpen:void 0,onClose:void 0,setOnOpen:t=>e({onOpen:t}),setOnClose:t=>e({onClose:t}),setIsInputFocused:t=>e({isInputFocused:t}),historyChat:null,setHistoryChat:t=>e({historyChat:t}),historyMessages:null,setHistoryMessages:t=>e({historyMessages:t}),showHistoryOnRegistration:!1,setShowHistoryOnRegistration:t=>e({showHistoryOnRegistration:t}),aiAgent:null,setAIAgent:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;return r&&Jd(r,t,n.isAIAgentMode,n.aiAgentSessionId),{aiAgent:t}}),isAIAgentMode:!1,setIsAIAgentMode:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;return r&&Jd(r,n.aiAgent,t,n.aiAgentSessionId),{isAIAgentMode:t}}),aiAgentSessionId:null,setAIAgentSessionId:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;return r&&Jd(r,n.aiAgent,n.isAIAgentMode,t),{aiAgentSessionId:t}}),humanNeedRequested:!1,setHumanNeedRequested:t=>e({humanNeedRequested:t}),aiAgentMessages:[],setAIAgentMessages:t=>e(n=>({aiAgentMessages:typeof t=="function"?t(n.aiAgentMessages):t})),addAIAgentMessage:t=>e(n=>({aiAgentMessages:[...n.aiAgentMessages,t]})),clearAIAgentState:()=>e(t=>{var r;const n=(r=t.widget)==null?void 0:r.link_id;return n&&lg(n),{aiAgent:null,isAIAgentMode:!1,aiAgentSessionId:null,humanNeedRequested:!1,aiAgentMessages:[],connectingToOperator:!1,showOperatorForm:!1}}),connectingToOperator:!1,setConnectingToOperator:t=>e({connectingToOperator:t}),showOperatorForm:!1,setShowOperatorForm:t=>e({showOperatorForm:t})})),MM=e=>({accessToken:localStorage.getItem(`${e}:${ft.CustomerToken}`)||"",refreshToken:localStorage.getItem(`${e}:${ft.CustomerRefreshToken}`)||""}),pl=()=>{const{widget:e}=he();return e?MM(e.link_id):null},Xi=e=>{if(!e)return{};const{accessToken:t,refreshToken:n}=e,r={};return t&&(r["X-Customer-Token"]=t),n&&(r["X-Customer-Refresh-Token"]=n),{...r}};function Zp(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const ug=()=>Sm({mutationFn:e=>jr(`clients/${e.client_id}/chats`,{method:"POST",body:JSON.stringify({inputs:e.inputs,client_id:void 0,widget_id:e.widget_id,history:e.history,device_id:e.device_id,is_agent_mode:e.is_agent_mode,widget_version:"2026.01.05-1"})})}),DM=(e,t)=>jr(`clients/${e}/chats`,{headers:t}),hu=(e,t)=>jr(`clients/${e}/chats`,{method:"DELETE",headers:t}),NM=(e,t,n)=>jr("review",{method:"POST",body:JSON.stringify({rating:e,comment:t||void 0}),headers:{...n,"X-Device-Id":pu(ft.DeviceId,"")||""}}),FM=()=>{const e=pl();return Sm({mutationFn:t=>NM(t.rating,t.comment,Xi(e))})},IM=e=>{const t=pl();return Sm({mutationFn:n=>jr(`clients/${e}/chats/files`,{method:"POST",headers:Xi(t),body:oE({files:n},{arrayWithBracketAndIndex:!1,arrayWithBrackets:!1})})})};function LM(e){return e&&typeof e=="object"&&"file_urls"in e}const $M=e=>{const t=`${vb}/visitors/identify`,n=JSON.stringify(e);try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0,credentials:"include"}).catch(()=>{if(navigator.sendBeacon){const r=new Blob([n],{type:"application/json"});navigator.sendBeacon(t,r)}})}catch{if(navigator.sendBeacon){const r=new Blob([n],{type:"application/json"});navigator.sendBeacon(t,r)}}},BM=(e,t)=>Ob({queryKey:["visitors","history",e,t],queryFn:()=>jr(`visitors/history?widget_id=${e}&device_id=${t}`),enabled:!!e&&!!t}),zM=(e,t,n)=>jr(`visitors/chats/${e}/messages?widget_id=${t}&device_id=${n}`);async function VM(e){const[t,n]=await jr(`widgets/${e}/agent`);return n===204?[null,n]:[t,n]}function gs(e){this._maxSize=e,this.clear()}gs.prototype.clear=function(){this._size=0,this._values=Object.create(null)};gs.prototype.get=function(e){return this._values[e]};gs.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var UM=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Tk=/^\d+$/,HM=/^\d/,WM=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,qM=/^\s*(['"]?)(.*?)(\1)\s*$/,cg=512,I0=new gs(cg),L0=new gs(cg),$0=new gs(cg),Zi={Cache:gs,split:Jp,normalizePath:nf,setter:function(e){var t=nf(e);return L0.get(e)||L0.set(e,function(r,i){for(var s=0,o=t.length,a=r;s<o-1;){var l=t[s];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[t[s++]]}a[t[s]]=i})},getter:function(e,t){var n=nf(e);return $0.get(e)||$0.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(dg(n)||Tk.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){GM(Array.isArray(e)?e:Jp(e),t,n)}};function nf(e){return I0.get(e)||I0.set(e,Jp(e).map(function(t){return t.replace(qM,"$2")}))}function Jp(e){return e.match(UM)||[""]}function GM(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(KM(i)&&(i='"'+i+'"'),a=dg(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function dg(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function YM(e){return e.match(HM)&&!e.match(Tk)}function QM(e){return WM.test(e)}function KM(e){return!dg(e)&&(YM(e)||QM(e))}const XM=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Fc=e=>e.match(XM)||[],Ic=e=>e[0].toUpperCase()+e.slice(1),fg=(e,t)=>Fc(e).join(t).toLowerCase(),_k=e=>Fc(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),ZM=e=>Ic(_k(e)),JM=e=>fg(e,"_"),e5=e=>fg(e,"-"),t5=e=>Ic(fg(e," ")),n5=e=>Fc(e).map(Ic).join(" ");var rf={words:Fc,upperFirst:Ic,camelCase:_k,pascalCase:ZM,snakeCase:JM,kebabCase:e5,sentenceCase:t5,titleCase:n5},pg={exports:{}};pg.exports=function(e){return Ek(r5(e),e)};pg.exports.array=Ek;function Ek(e,t){var n=e.length,r=new Array(n),i={},s=n,o=i5(t),a=s5(e);for(t.forEach(function(c){if(!a.has(c[0])||!a.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(c,d,u){if(u.has(c)){var f;try{f=", node was:"+JSON.stringify(c)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!i[d]){i[d]=!0;var m=o.get(c)||new Set;if(m=Array.from(m),d=m.length){u.add(c);do{var h=m[--d];l(h,a.get(h),u)}while(d);u.delete(c)}r[--n]=c}}}function r5(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function i5(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function s5(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var o5=pg.exports;const a5=_r(o5),l5=Object.prototype.toString,u5=Error.prototype.toString,c5=RegExp.prototype.toString,d5=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",f5=/^Symbol\((.*)\)(.*)$/;function p5(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function B0(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return p5(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return d5.call(e).replace(f5,"Symbol($1)");const r=l5.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+u5.call(e)+"]":r==="RegExp"?c5.call(e):null}function li(e,t){let n=B0(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=B0(this[r],t);return s!==null?s:i},2)}function jk(e){return e==null?[]:[].concat(e)}let Ak,Rk,Pk,h5=/\$\{\s*(\w+)\s*\}/g;Ak=Symbol.toStringTag;class z0{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Ak]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],jk(t).forEach(s=>{if(Vt.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Rk=Symbol.hasInstance;Pk=Symbol.toStringTag;class Vt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(h5,(i,s)=>li(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,s){const o=new z0(t,n,r,i);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Pk]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Vt)}static[Rk](t){return z0[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let qn={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${li(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${li(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${li(n,!0)}\``+i}},It={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},m5={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},eh={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},g5={isValue:"${path} field must be ${value}"},mu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},v5={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},y5={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${li(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${li(n,!0)}\``}return Vt.formatError(qn.notType,e)}};Object.assign(Object.create(null),{mixed:qn,string:It,number:m5,date:eh,object:mu,array:v5,boolean:g5,tuple:y5});const hg=e=>e&&e.__isYupSchema__;class rc{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:s}=n,o=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new rc(t,(a,l)=>{var c;let d=o(...a)?i:s;return(c=d==null?void 0:d(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!hg(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Hl={context:"$",value:"."};class vs{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Hl.context,this.isValue=this.key[0]===Hl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Hl.context:this.isValue?Hl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Zi.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}vs.prototype.__isYupRef=!0;const $i=e=>e==null;function _s(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:c,test:d,params:u,message:f,skipAbsent:m}=e;let{parent:h,context:g,abortEarly:b=o.spec.abortEarly,disableStackTrace:x=o.spec.disableStackTrace}=i;function y(O){return vs.isRef(O)?O.getValue(n,h,g):O}function w(O={}){const Q=Object.assign({value:n,originalValue:s,label:o.spec.label,path:O.path||r,spec:o.spec,disableStackTrace:O.disableStackTrace||x},u,O.params);for(const U of Object.keys(Q))Q[U]=y(Q[U]);const J=new Vt(Vt.formatError(O.message||f,Q),n,Q.path,O.type||c,Q.disableStackTrace);return J.params=Q,J}const j=b?a:l;let k={path:r,parent:h,type:c,from:i.from,createError:w,resolve:y,options:i,originalValue:s,schema:o};const T=O=>{Vt.isError(O)?j(O):O?l(null):j(w())},A=O=>{Vt.isError(O)?j(O):a(O)};if(m&&$i(n))return T(!0);let F;try{var N;if(F=d.call(k,n,k),typeof((N=F)==null?void 0:N.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${k.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(F).then(T,A)}}catch(O){A(O);return}T(F)}return t.OPTIONS=e,t}function x5(e,t,n,r=n){let i,s,o;return t?(Zi.forEach(t,(a,l,c)=>{let d=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let u=e.type==="tuple",f=c?parseInt(d,10):0;if(e.innerType||u){if(u&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[f],e=u?e.spec.types[f]:e.innerType}if(!c){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[d],e=e.fields[d]}s=d,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class ic extends Set{describe(){const t=[];for(const n of this.values())t.push(vs.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new ic(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Hs(e,t=new Map){if(hg(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Hs(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,Hs(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Hs(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Hs(i,t)}else throw Error(`Unable to clone ${e}`);return n}class or{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new ic,this._blacklist=new ic,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(qn.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Hs(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,s)=>s.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,s;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(i&&$i(s))return s;let o=li(t),a=li(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
|
|
95
|
+
*/var Nc=v,yM=vM;function xM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wM=typeof Object.is=="function"?Object.is:xM,bM=yM.useSyncExternalStore,CM=Nc.useRef,kM=Nc.useEffect,SM=Nc.useMemo,TM=Nc.useDebugValue;bk.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=CM(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=SM(function(){function l(m){if(!c){if(c=!0,d=m,m=r(m),i!==void 0&&o.hasValue){var h=o.value;if(i(h,m))return u=h}return u=m}if(h=u,wM(d,m))return h;var g=r(m);return i!==void 0&&i(h,g)?h:(d=m,u=g)}var c=!1,d,u,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var a=bM(e,s[0],s[1]);return kM(function(){o.hasValue=!0,o.value=a},[a]),TM(a),a};wk.exports=bk;var _M=wk.exports;const EM=_r(_M),Sk={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:jM}=W,{useSyncExternalStoreWithSelector:AM}=EM;let N0=!1;const RM=e=>e;function PM(e,t=RM,n){(Sk?"production":void 0)!=="production"&&n&&!N0&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),N0=!0);const r=AM(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return jM(r),r}const F0=e=>{(Sk?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?aM(e):e,n=(r,i)=>PM(t,r,i);return Object.assign(n,t),n},OM=e=>e?F0(e):F0,he=OM(e=>({widget:null,open:localStorage.getItem("lc:widget:isHaveChat")==="true",isInputFocused:!1,isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,isTooltipVisible:!0,onTooltipClose:void 0,anyAdmin:!0,setIsTooltipVisible:t=>e({isTooltipVisible:t}),setOnTooltipClose:t=>e({onTooltipClose:t}),setOpen:t=>{e({open:t})},setAnyAdmin:t=>e({anyAdmin:t}),setWidget:t=>e({widget:t}),setDefaultValues:t=>e({defaultValues:t}),setIsHaveChat:t=>{e({isHaveChat:t}),localStorage.setItem("lc:widget:isHaveChat",t.toString())},setSoundPath:t=>{e({soundPath:t})},onOpen:void 0,onClose:void 0,setOnOpen:t=>e({onOpen:t}),setOnClose:t=>e({onClose:t}),setIsInputFocused:t=>e({isInputFocused:t}),historyChat:null,setHistoryChat:t=>e({historyChat:t}),historyMessages:null,setHistoryMessages:t=>e({historyMessages:t}),showHistoryOnRegistration:!1,setShowHistoryOnRegistration:t=>e({showHistoryOnRegistration:t}),aiAgent:null,setAIAgent:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;return r&&Jd(r,t,n.isAIAgentMode,n.aiAgentSessionId),{aiAgent:t}}),isAIAgentMode:!1,setIsAIAgentMode:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;return r&&Jd(r,n.aiAgent,t,n.aiAgentSessionId),{isAIAgentMode:t}}),aiAgentSessionId:null,setAIAgentSessionId:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;return r&&Jd(r,n.aiAgent,n.isAIAgentMode,t),{aiAgentSessionId:t}}),humanNeedRequested:!1,setHumanNeedRequested:t=>e({humanNeedRequested:t}),aiAgentMessages:[],setAIAgentMessages:t=>e(n=>({aiAgentMessages:typeof t=="function"?t(n.aiAgentMessages):t})),addAIAgentMessage:t=>e(n=>({aiAgentMessages:[...n.aiAgentMessages,t]})),clearAIAgentState:()=>e(t=>{var r;const n=(r=t.widget)==null?void 0:r.link_id;return n&&lg(n),{aiAgent:null,isAIAgentMode:!1,aiAgentSessionId:null,humanNeedRequested:!1,aiAgentMessages:[],connectingToOperator:!1,showOperatorForm:!1}}),connectingToOperator:!1,setConnectingToOperator:t=>e({connectingToOperator:t}),showOperatorForm:!1,setShowOperatorForm:t=>e({showOperatorForm:t})})),MM=e=>({accessToken:localStorage.getItem(`${e}:${at.CustomerToken}`)||"",refreshToken:localStorage.getItem(`${e}:${at.CustomerRefreshToken}`)||""}),hl=()=>{const{widget:e}=he();return e?MM(e.link_id):null},Xi=e=>{if(!e)return{};const{accessToken:t,refreshToken:n}=e,r={};return t&&(r["X-Customer-Token"]=t),n&&(r["X-Customer-Refresh-Token"]=n),{...r}};function Zp(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const ug=()=>Sm({mutationFn:e=>jr(`clients/${e.client_id}/chats`,{method:"POST",body:JSON.stringify({inputs:e.inputs,client_id:void 0,widget_id:e.widget_id,history:e.history,device_id:e.device_id,is_agent_mode:e.is_agent_mode,widget_version:"2026.01.05-1"})})}),DM=(e,t)=>jr(`clients/${e}/chats`,{headers:t}),hu=(e,t)=>jr(`clients/${e}/chats`,{method:"DELETE",headers:t}),NM=(e,t,n)=>jr("review",{method:"POST",body:JSON.stringify({rating:e,comment:t||void 0}),headers:{...n,"X-Device-Id":ra(at.DeviceId,"")||""}}),FM=()=>{const e=hl();return Sm({mutationFn:t=>NM(t.rating,t.comment,Xi(e))})},IM=e=>{const t=hl();return Sm({mutationFn:n=>jr(`clients/${e}/chats/files`,{method:"POST",headers:Xi(t),body:o2({files:n},{arrayWithBracketAndIndex:!1,arrayWithBrackets:!1})})})};function LM(e){return e&&typeof e=="object"&&"file_urls"in e}const $M=e=>{const t=`${vb}/visitors/identify`,n=JSON.stringify(e);try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0,credentials:"include"}).catch(()=>{if(navigator.sendBeacon){const r=new Blob([n],{type:"application/json"});navigator.sendBeacon(t,r)}})}catch{if(navigator.sendBeacon){const r=new Blob([n],{type:"application/json"});navigator.sendBeacon(t,r)}}},BM=(e,t)=>Ob({queryKey:["visitors","history",e,t],queryFn:()=>jr(`visitors/history?widget_id=${e}&device_id=${t}`),enabled:!!e&&!!t}),zM=(e,t,n)=>jr(`visitors/chats/${e}/messages?widget_id=${t}&device_id=${n}`);async function VM(e){const[t,n]=await jr(`widgets/${e}/agent`);return n===204?[null,n]:[t,n]}function gs(e){this._maxSize=e,this.clear()}gs.prototype.clear=function(){this._size=0,this._values=Object.create(null)};gs.prototype.get=function(e){return this._values[e]};gs.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var UM=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Tk=/^\d+$/,HM=/^\d/,WM=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,qM=/^\s*(['"]?)(.*?)(\1)\s*$/,cg=512,I0=new gs(cg),L0=new gs(cg),$0=new gs(cg),Zi={Cache:gs,split:Jp,normalizePath:nf,setter:function(e){var t=nf(e);return L0.get(e)||L0.set(e,function(r,i){for(var s=0,o=t.length,a=r;s<o-1;){var l=t[s];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[t[s++]]}a[t[s]]=i})},getter:function(e,t){var n=nf(e);return $0.get(e)||$0.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(dg(n)||Tk.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){GM(Array.isArray(e)?e:Jp(e),t,n)}};function nf(e){return I0.get(e)||I0.set(e,Jp(e).map(function(t){return t.replace(qM,"$2")}))}function Jp(e){return e.match(UM)||[""]}function GM(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(KM(i)&&(i='"'+i+'"'),a=dg(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function dg(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function YM(e){return e.match(HM)&&!e.match(Tk)}function QM(e){return WM.test(e)}function KM(e){return!dg(e)&&(YM(e)||QM(e))}const XM=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Fc=e=>e.match(XM)||[],Ic=e=>e[0].toUpperCase()+e.slice(1),fg=(e,t)=>Fc(e).join(t).toLowerCase(),_k=e=>Fc(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),ZM=e=>Ic(_k(e)),JM=e=>fg(e,"_"),e5=e=>fg(e,"-"),t5=e=>Ic(fg(e," ")),n5=e=>Fc(e).map(Ic).join(" ");var rf={words:Fc,upperFirst:Ic,camelCase:_k,pascalCase:ZM,snakeCase:JM,kebabCase:e5,sentenceCase:t5,titleCase:n5},pg={exports:{}};pg.exports=function(e){return Ek(r5(e),e)};pg.exports.array=Ek;function Ek(e,t){var n=e.length,r=new Array(n),i={},s=n,o=i5(t),a=s5(e);for(t.forEach(function(c){if(!a.has(c[0])||!a.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(c,d,u){if(u.has(c)){var f;try{f=", node was:"+JSON.stringify(c)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!i[d]){i[d]=!0;var m=o.get(c)||new Set;if(m=Array.from(m),d=m.length){u.add(c);do{var h=m[--d];l(h,a.get(h),u)}while(d);u.delete(c)}r[--n]=c}}}function r5(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function i5(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function s5(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var o5=pg.exports;const a5=_r(o5),l5=Object.prototype.toString,u5=Error.prototype.toString,c5=RegExp.prototype.toString,d5=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",f5=/^Symbol\((.*)\)(.*)$/;function p5(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function B0(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return p5(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return d5.call(e).replace(f5,"Symbol($1)");const r=l5.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+u5.call(e)+"]":r==="RegExp"?c5.call(e):null}function li(e,t){let n=B0(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=B0(this[r],t);return s!==null?s:i},2)}function jk(e){return e==null?[]:[].concat(e)}let Ak,Rk,Pk,h5=/\$\{\s*(\w+)\s*\}/g;Ak=Symbol.toStringTag;class z0{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Ak]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],jk(t).forEach(s=>{if(Vt.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Rk=Symbol.hasInstance;Pk=Symbol.toStringTag;class Vt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(h5,(i,s)=>li(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,s){const o=new z0(t,n,r,i);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Pk]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Vt)}static[Rk](t){return z0[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let qn={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${li(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${li(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${li(n,!0)}\``+i}},It={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},m5={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},eh={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},g5={isValue:"${path} field must be ${value}"},mu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},v5={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},y5={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${li(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${li(n,!0)}\``}return Vt.formatError(qn.notType,e)}};Object.assign(Object.create(null),{mixed:qn,string:It,number:m5,date:eh,object:mu,array:v5,boolean:g5,tuple:y5});const hg=e=>e&&e.__isYupSchema__;class rc{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:s}=n,o=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new rc(t,(a,l)=>{var c;let d=o(...a)?i:s;return(c=d==null?void 0:d(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!hg(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Wl={context:"$",value:"."};class vs{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Wl.context,this.isValue=this.key[0]===Wl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Wl.context:this.isValue?Wl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Zi.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}vs.prototype.__isYupRef=!0;const $i=e=>e==null;function Es(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:c,test:d,params:u,message:f,skipAbsent:m}=e;let{parent:h,context:g,abortEarly:b=o.spec.abortEarly,disableStackTrace:x=o.spec.disableStackTrace}=i;function y(O){return vs.isRef(O)?O.getValue(n,h,g):O}function w(O={}){const Q=Object.assign({value:n,originalValue:s,label:o.spec.label,path:O.path||r,spec:o.spec,disableStackTrace:O.disableStackTrace||x},u,O.params);for(const U of Object.keys(Q))Q[U]=y(Q[U]);const J=new Vt(Vt.formatError(O.message||f,Q),n,Q.path,O.type||c,Q.disableStackTrace);return J.params=Q,J}const j=b?a:l;let k={path:r,parent:h,type:c,from:i.from,createError:w,resolve:y,options:i,originalValue:s,schema:o};const T=O=>{Vt.isError(O)?j(O):O?l(null):j(w())},A=O=>{Vt.isError(O)?j(O):a(O)};if(m&&$i(n))return T(!0);let F;try{var N;if(F=d.call(k,n,k),typeof((N=F)==null?void 0:N.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${k.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(F).then(T,A)}}catch(O){A(O);return}T(F)}return t.OPTIONS=e,t}function x5(e,t,n,r=n){let i,s,o;return t?(Zi.forEach(t,(a,l,c)=>{let d=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let u=e.type==="tuple",f=c?parseInt(d,10):0;if(e.innerType||u){if(u&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[f],e=u?e.spec.types[f]:e.innerType}if(!c){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[d],e=e.fields[d]}s=d,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class ic extends Set{describe(){const t=[];for(const n of this.values())t.push(vs.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new ic(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Ws(e,t=new Map){if(hg(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Ws(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,Ws(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Ws(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Ws(i,t)}else throw Error(`Unable to clone ${e}`);return n}class or{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new ic,this._blacklist=new ic,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(qn.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Ws(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,s)=>s.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,s;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(i&&$i(s))return s;let o=li(t),a=li(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
|
|
96
96
|
|
|
97
97
|
attempted value: ${o}
|
|
98
|
-
`+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let d of Object.values(this.internalTests))d&&c.push(d);this.runTests({path:s,value:l,originalValue:o,options:n,tests:c},r,d=>{if(d.length)return i(d,l);this.runTests({path:s,value:l,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:s,value:o,originalValue:a,path:l,options:c}=t,d=g=>{i||(i=!0,n(g,o))},u=g=>{i||(i=!0,r(g,o))},f=s.length,m=[];if(!f)return u([]);let h={value:o,originalValue:a,path:l,options:c,schema:this};for(let g=0;g<s.length;g++){const b=s[g];b(h,d,function(y){y&&(Array.isArray(y)?m.push(...y):m.push(y)),--f<=0&&u(m)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let c=r[a];const d=Object.assign({},o,{strict:!0,parent:r,value:c,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(u,f,m)=>this.resolve(d)._validate(c,d,f,m)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(l,c)=>{Vt.isError(l)&&(l.value=c),a(l)},(l,c)=>{l.length?a(new Vt(l,c,void 0,void 0,s)):o(c)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw Vt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Vt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Vt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Vt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Hs(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=_s({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=_s({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=qn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=qn.notNull){return this.nullability(!1,t)}required(t=qn.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=qn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=_s(n),s=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(s||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=jk(t).map(s=>new vs(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new rc(i,n):rc.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=_s({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=qn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=_s({message:n,name:"oneOf",skipAbsent:!0,test(i){let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:o}})}}),r}notOneOf(t,n=qn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=_s({message:n,name:"notOneOf",test(i){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:s,nullable:o}=n.spec;return{meta:i,label:r,optional:s,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,d)=>d.findIndex(u=>u.name===l.name)===c)}}}or.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])or.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=x5(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])or.prototype[e]=or.prototype.oneOf;for(const e of["not","nope"])or.prototype[e]=or.prototype.notOneOf;const w5=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function b5(e){const t=th(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function th(e){var t,n;const r=w5.exec(e);return r?{year:cr(r[1]),month:cr(r[2],1)-1,day:cr(r[3],1),hour:cr(r[4]),minute:cr(r[5]),second:cr(r[6]),millisecond:r[7]?cr(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:cr(r[10]),minuteOffset:cr(r[11])}:null}function cr(e,t=0){return Number(e)||t}let C5=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,k5=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,S5=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,T5="^\\d{4}-\\d{2}-\\d{2}",_5="\\d{2}:\\d{2}:\\d{2}",E5="(([+-]\\d{2}(:?\\d{2})?)|Z)",j5=new RegExp(`${T5}T${_5}(\\.\\d+)?${E5}$`),A5=e=>$i(e)||e===e.trim(),R5={}.toString();function So(){return new Ok}class Ok extends or{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===R5?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||qn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=It.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=It.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=It.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:s}=n:i=n),this.test({name:s||"matches",message:i||It.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=It.email){return this.matches(C5,{name:"email",message:t,excludeEmptyString:!0})}url(t=It.url){return this.matches(k5,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=It.uuid){return this.matches(S5,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(j5,{name:"datetime",message:n||It.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||It.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=th(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||It.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=th(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=It.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:A5})}lowercase(t=It.lowercase){return this.transform(n=>$i(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>$i(n)||n===n.toLowerCase()})}uppercase(t=It.uppercase){return this.transform(n=>$i(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>$i(n)||n===n.toUpperCase()})}}So.prototype=Ok.prototype;let P5=new Date(""),O5=e=>Object.prototype.toString.call(e)==="[object Date]";class Lc extends or{constructor(){super({type:"date",check(t){return O5(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=b5(t),isNaN(t)?Lc.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(vs.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=eh.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=eh.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}Lc.INVALID_DATE=P5;Lc.prototype;function M5(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=Zi.split(o)[0];r.add(l),i.has(`${a}-${l}`)||n.push([a,l])}for(const o of Object.keys(e)){let a=e[o];r.add(o),vs.isRef(a)&&a.isSibling?s(a.path,o):hg(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return a5.array(Array.from(r),n).reverse()}function V0(e,t){let n=1/0;return e.some((r,i)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=i,!0}),n}function Mk(e){return(t,n)=>V0(e,t)-V0(e,n)}const D5=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function gu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=gu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=gu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(gu)}):"optional"in e?e.optional():e}const N5=(e,t)=>{const n=[...Zi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Zi.getter(Zi.join(n),!0)(e);return!!(i&&r in i)};let U0=e=>Object.prototype.toString.call(e)==="[object Object]";function H0(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const F5=Mk([]);function $c(e){return new Dk(e)}class Dk extends or{constructor(t){super({type:"object",check(n){return U0(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=F5,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let s=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(u=>!this._nodes.includes(u))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),d=!1;for(const u of a){let f=s[u],m=u in i;if(f){let h,g=i[u];c.path=(n.path?`${n.path}.`:"")+u,f=f.resolve({value:g,context:n.context,parent:l});let b=f instanceof or?f.spec:void 0,x=b==null?void 0:b.strict;if(b!=null&&b.strip){d=d||u in i;continue}h=!n.__validating||!x?f.cast(i[u],c):i[u],h!==void 0&&(l[u]=h)}else m&&!o&&(l[u]=i[u]);(m!==u in l||l[u]!==i[u])&&(d=!0)}return d?l:i}_validate(t,n={},r,i){let{from:s=[],originalValue:o=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(l,c)=>{if(!a||!U0(c)){i(l,c);return}o=o||c;let d=[];for(let u of this._nodes){let f=this.fields[u];!f||vs.isRef(f)||d.push(f.asNestedTest({options:n,key:u,parent:c,parentPath:n.path,originalParent:o}))}this.runTests({tests:d,value:c,originalValue:o,options:n},r,u=>{i(u.sort(this._sortErrors).concat(l),c)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,s]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?s:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const s=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=M5(t,n),r._sortErrors=Mk(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return gu(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=Zi.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return N5(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(D5)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||mu.exact,test(n){if(n==null)return!0;const r=H0(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=mu.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const s=H0(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=mu.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(rf.camelCase)}snakeCase(){return this.transformKeys(rf.snakeCase)}constantCase(){return this.transformKeys(t=>rf.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,o]of Object.entries(n.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),r.fields[s]=o.describe(a)}return r}}$c.prototype=Dk.prototype;var I5=function(t){return L5(t)&&!$5(t)};function L5(e){return!!e&&typeof e=="object"}function $5(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||V5(e)}var B5=typeof Symbol=="function"&&Symbol.for,z5=B5?Symbol.for("react.element"):60103;function V5(e){return e.$$typeof===z5}function U5(e){return Array.isArray(e)?[]:{}}function sc(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ya(U5(e),e,t):e}function H5(e,t,n){return e.concat(t).map(function(r){return sc(r,n)})}function W5(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=sc(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=sc(t[i],n):r[i]=Ya(e[i],t[i],n)}),r}function Ya(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||H5,n.isMergeableObject=n.isMergeableObject||I5;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):W5(e,t,n):sc(t,n)}Ya.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Ya(r,i,n)},{})};var nh=Ya,Nk=typeof global=="object"&&global&&global.Object===Object&&global,q5=typeof self=="object"&&self&&self.Object===Object&&self,lr=Nk||q5||Function("return this")(),vi=lr.Symbol,Fk=Object.prototype,G5=Fk.hasOwnProperty,Y5=Fk.toString,Yo=vi?vi.toStringTag:void 0;function Q5(e){var t=G5.call(e,Yo),n=e[Yo];try{e[Yo]=void 0;var r=!0}catch{}var i=Y5.call(e);return r&&(t?e[Yo]=n:delete e[Yo]),i}var K5=Object.prototype,X5=K5.toString;function Z5(e){return X5.call(e)}var J5="[object Null]",eD="[object Undefined]",W0=vi?vi.toStringTag:void 0;function ys(e){return e==null?e===void 0?eD:J5:W0&&W0 in Object(e)?Q5(e):Z5(e)}function Ik(e,t){return function(n){return e(t(n))}}var mg=Ik(Object.getPrototypeOf,Object);function xs(e){return e!=null&&typeof e=="object"}var tD="[object Object]",nD=Function.prototype,rD=Object.prototype,Lk=nD.toString,iD=rD.hasOwnProperty,sD=Lk.call(Object);function q0(e){if(!xs(e)||ys(e)!=tD)return!1;var t=mg(e);if(t===null)return!0;var n=iD.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Lk.call(n)==sD}function oD(){this.__data__=[],this.size=0}function $k(e,t){return e===t||e!==e&&t!==t}function Bc(e,t){for(var n=e.length;n--;)if($k(e[n][0],t))return n;return-1}var aD=Array.prototype,lD=aD.splice;function uD(e){var t=this.__data__,n=Bc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():lD.call(t,n,1),--this.size,!0}function cD(e){var t=this.__data__,n=Bc(t,e);return n<0?void 0:t[n][1]}function dD(e){return Bc(this.__data__,e)>-1}function fD(e,t){var n=this.__data__,r=Bc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Ar(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ar.prototype.clear=oD;Ar.prototype.delete=uD;Ar.prototype.get=cD;Ar.prototype.has=dD;Ar.prototype.set=fD;function pD(){this.__data__=new Ar,this.size=0}function hD(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function mD(e){return this.__data__.get(e)}function gD(e){return this.__data__.has(e)}function hl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var vD="[object AsyncFunction]",yD="[object Function]",xD="[object GeneratorFunction]",wD="[object Proxy]";function Bk(e){if(!hl(e))return!1;var t=ys(e);return t==yD||t==xD||t==vD||t==wD}var sf=lr["__core-js_shared__"],G0=function(){var e=/[^.]+$/.exec(sf&&sf.keys&&sf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function bD(e){return!!G0&&G0 in e}var CD=Function.prototype,kD=CD.toString;function ws(e){if(e!=null){try{return kD.call(e)}catch{}try{return e+""}catch{}}return""}var SD=/[\\^$.*+?()[\]{}|]/g,TD=/^\[object .+?Constructor\]$/,_D=Function.prototype,ED=Object.prototype,jD=_D.toString,AD=ED.hasOwnProperty,RD=RegExp("^"+jD.call(AD).replace(SD,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function PD(e){if(!hl(e)||bD(e))return!1;var t=Bk(e)?RD:TD;return t.test(ws(e))}function OD(e,t){return e==null?void 0:e[t]}function bs(e,t){var n=OD(e,t);return PD(n)?n:void 0}var Qa=bs(lr,"Map"),Ka=bs(Object,"create");function MD(){this.__data__=Ka?Ka(null):{},this.size=0}function DD(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ND="__lodash_hash_undefined__",FD=Object.prototype,ID=FD.hasOwnProperty;function LD(e){var t=this.__data__;if(Ka){var n=t[e];return n===ND?void 0:n}return ID.call(t,e)?t[e]:void 0}var $D=Object.prototype,BD=$D.hasOwnProperty;function zD(e){var t=this.__data__;return Ka?t[e]!==void 0:BD.call(t,e)}var VD="__lodash_hash_undefined__";function UD(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ka&&t===void 0?VD:t,this}function ls(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ls.prototype.clear=MD;ls.prototype.delete=DD;ls.prototype.get=LD;ls.prototype.has=zD;ls.prototype.set=UD;function HD(){this.size=0,this.__data__={hash:new ls,map:new(Qa||Ar),string:new ls}}function WD(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function zc(e,t){var n=e.__data__;return WD(t)?n[typeof t=="string"?"string":"hash"]:n.map}function qD(e){var t=zc(this,e).delete(e);return this.size-=t?1:0,t}function GD(e){return zc(this,e).get(e)}function YD(e){return zc(this,e).has(e)}function QD(e,t){var n=zc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Ci(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ci.prototype.clear=HD;Ci.prototype.delete=qD;Ci.prototype.get=GD;Ci.prototype.has=YD;Ci.prototype.set=QD;var KD=200;function XD(e,t){var n=this.__data__;if(n instanceof Ar){var r=n.__data__;if(!Qa||r.length<KD-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ci(r)}return n.set(e,t),this.size=n.size,this}function Do(e){var t=this.__data__=new Ar(e);this.size=t.size}Do.prototype.clear=pD;Do.prototype.delete=hD;Do.prototype.get=mD;Do.prototype.has=gD;Do.prototype.set=XD;function ZD(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Y0=function(){try{var e=bs(Object,"defineProperty");return e({},"",{}),e}catch{}}();function zk(e,t,n){t=="__proto__"&&Y0?Y0(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var JD=Object.prototype,eN=JD.hasOwnProperty;function Vk(e,t,n){var r=e[t];(!(eN.call(e,t)&&$k(r,n))||n===void 0&&!(t in e))&&zk(e,t,n)}function Vc(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?zk(n,a,l):Vk(n,a,l)}return n}function tN(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var nN="[object Arguments]";function Q0(e){return xs(e)&&ys(e)==nN}var Uk=Object.prototype,rN=Uk.hasOwnProperty,iN=Uk.propertyIsEnumerable,sN=Q0(function(){return arguments}())?Q0:function(e){return xs(e)&&rN.call(e,"callee")&&!iN.call(e,"callee")},ml=Array.isArray;function oN(){return!1}var Hk=typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,K0=Hk&&typeof en=="object"&&en&&!en.nodeType&&en,aN=K0&&K0.exports===Hk,X0=aN?lr.Buffer:void 0,lN=X0?X0.isBuffer:void 0,Wk=lN||oN,uN=9007199254740991,cN=/^(?:0|[1-9]\d*)$/;function dN(e,t){var n=typeof e;return t=t??uN,!!t&&(n=="number"||n!="symbol"&&cN.test(e))&&e>-1&&e%1==0&&e<t}var fN=9007199254740991;function qk(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=fN}var pN="[object Arguments]",hN="[object Array]",mN="[object Boolean]",gN="[object Date]",vN="[object Error]",yN="[object Function]",xN="[object Map]",wN="[object Number]",bN="[object Object]",CN="[object RegExp]",kN="[object Set]",SN="[object String]",TN="[object WeakMap]",_N="[object ArrayBuffer]",EN="[object DataView]",jN="[object Float32Array]",AN="[object Float64Array]",RN="[object Int8Array]",PN="[object Int16Array]",ON="[object Int32Array]",MN="[object Uint8Array]",DN="[object Uint8ClampedArray]",NN="[object Uint16Array]",FN="[object Uint32Array]",Ne={};Ne[jN]=Ne[AN]=Ne[RN]=Ne[PN]=Ne[ON]=Ne[MN]=Ne[DN]=Ne[NN]=Ne[FN]=!0;Ne[pN]=Ne[hN]=Ne[_N]=Ne[mN]=Ne[EN]=Ne[gN]=Ne[vN]=Ne[yN]=Ne[xN]=Ne[wN]=Ne[bN]=Ne[CN]=Ne[kN]=Ne[SN]=Ne[TN]=!1;function IN(e){return xs(e)&&qk(e.length)&&!!Ne[ys(e)]}function gg(e){return function(t){return e(t)}}var Gk=typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,va=Gk&&typeof en=="object"&&en&&!en.nodeType&&en,LN=va&&va.exports===Gk,of=LN&&Nk.process,To=function(){try{var e=va&&va.require&&va.require("util").types;return e||of&&of.binding&&of.binding("util")}catch{}}(),Z0=To&&To.isTypedArray,$N=Z0?gg(Z0):IN,BN=Object.prototype,zN=BN.hasOwnProperty;function Yk(e,t){var n=ml(e),r=!n&&sN(e),i=!n&&!r&&Wk(e),s=!n&&!r&&!i&&$N(e),o=n||r||i||s,a=o?tN(e.length,String):[],l=a.length;for(var c in e)(t||zN.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||dN(c,l)))&&a.push(c);return a}var VN=Object.prototype;function vg(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||VN;return e===n}var UN=Ik(Object.keys,Object),HN=Object.prototype,WN=HN.hasOwnProperty;function qN(e){if(!vg(e))return UN(e);var t=[];for(var n in Object(e))WN.call(e,n)&&n!="constructor"&&t.push(n);return t}function Qk(e){return e!=null&&qk(e.length)&&!Bk(e)}function yg(e){return Qk(e)?Yk(e):qN(e)}function GN(e,t){return e&&Vc(t,yg(t),e)}function YN(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var QN=Object.prototype,KN=QN.hasOwnProperty;function XN(e){if(!hl(e))return YN(e);var t=vg(e),n=[];for(var r in e)r=="constructor"&&(t||!KN.call(e,r))||n.push(r);return n}function xg(e){return Qk(e)?Yk(e,!0):XN(e)}function ZN(e,t){return e&&Vc(t,xg(t),e)}var Kk=typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,J0=Kk&&typeof en=="object"&&en&&!en.nodeType&&en,JN=J0&&J0.exports===Kk,ex=JN?lr.Buffer:void 0,tx=ex?ex.allocUnsafe:void 0;function eF(e,t){if(t)return e.slice();var n=e.length,r=tx?tx(n):new e.constructor(n);return e.copy(r),r}function Xk(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function tF(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function Zk(){return[]}var nF=Object.prototype,rF=nF.propertyIsEnumerable,nx=Object.getOwnPropertySymbols,wg=nx?function(e){return e==null?[]:(e=Object(e),tF(nx(e),function(t){return rF.call(e,t)}))}:Zk;function iF(e,t){return Vc(e,wg(e),t)}function Jk(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var sF=Object.getOwnPropertySymbols,eS=sF?function(e){for(var t=[];e;)Jk(t,wg(e)),e=mg(e);return t}:Zk;function oF(e,t){return Vc(e,eS(e),t)}function tS(e,t,n){var r=t(e);return ml(e)?r:Jk(r,n(e))}function aF(e){return tS(e,yg,wg)}function lF(e){return tS(e,xg,eS)}var rh=bs(lr,"DataView"),ih=bs(lr,"Promise"),sh=bs(lr,"Set"),oh=bs(lr,"WeakMap"),rx="[object Map]",uF="[object Object]",ix="[object Promise]",sx="[object Set]",ox="[object WeakMap]",ax="[object DataView]",cF=ws(rh),dF=ws(Qa),fF=ws(ih),pF=ws(sh),hF=ws(oh),hr=ys;(rh&&hr(new rh(new ArrayBuffer(1)))!=ax||Qa&&hr(new Qa)!=rx||ih&&hr(ih.resolve())!=ix||sh&&hr(new sh)!=sx||oh&&hr(new oh)!=ox)&&(hr=function(e){var t=ys(e),n=t==uF?e.constructor:void 0,r=n?ws(n):"";if(r)switch(r){case cF:return ax;case dF:return rx;case fF:return ix;case pF:return sx;case hF:return ox}return t});var mF=Object.prototype,gF=mF.hasOwnProperty;function vF(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&gF.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var lx=lr.Uint8Array;function bg(e){var t=new e.constructor(e.byteLength);return new lx(t).set(new lx(e)),t}function yF(e,t){var n=t?bg(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var xF=/\w*$/;function wF(e){var t=new e.constructor(e.source,xF.exec(e));return t.lastIndex=e.lastIndex,t}var ux=vi?vi.prototype:void 0,cx=ux?ux.valueOf:void 0;function bF(e){return cx?Object(cx.call(e)):{}}function CF(e,t){var n=t?bg(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var kF="[object Boolean]",SF="[object Date]",TF="[object Map]",_F="[object Number]",EF="[object RegExp]",jF="[object Set]",AF="[object String]",RF="[object Symbol]",PF="[object ArrayBuffer]",OF="[object DataView]",MF="[object Float32Array]",DF="[object Float64Array]",NF="[object Int8Array]",FF="[object Int16Array]",IF="[object Int32Array]",LF="[object Uint8Array]",$F="[object Uint8ClampedArray]",BF="[object Uint16Array]",zF="[object Uint32Array]";function VF(e,t,n){var r=e.constructor;switch(t){case PF:return bg(e);case kF:case SF:return new r(+e);case OF:return yF(e,n);case MF:case DF:case NF:case FF:case IF:case LF:case $F:case BF:case zF:return CF(e,n);case TF:return new r;case _F:case AF:return new r(e);case EF:return wF(e);case jF:return new r;case RF:return bF(e)}}var dx=Object.create,UF=function(){function e(){}return function(t){if(!hl(t))return{};if(dx)return dx(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function HF(e){return typeof e.constructor=="function"&&!vg(e)?UF(mg(e)):{}}var WF="[object Map]";function qF(e){return xs(e)&&hr(e)==WF}var fx=To&&To.isMap,GF=fx?gg(fx):qF,YF="[object Set]";function QF(e){return xs(e)&&hr(e)==YF}var px=To&&To.isSet,KF=px?gg(px):QF,XF=1,ZF=2,JF=4,nS="[object Arguments]",e4="[object Array]",t4="[object Boolean]",n4="[object Date]",r4="[object Error]",rS="[object Function]",i4="[object GeneratorFunction]",s4="[object Map]",o4="[object Number]",iS="[object Object]",a4="[object RegExp]",l4="[object Set]",u4="[object String]",c4="[object Symbol]",d4="[object WeakMap]",f4="[object ArrayBuffer]",p4="[object DataView]",h4="[object Float32Array]",m4="[object Float64Array]",g4="[object Int8Array]",v4="[object Int16Array]",y4="[object Int32Array]",x4="[object Uint8Array]",w4="[object Uint8ClampedArray]",b4="[object Uint16Array]",C4="[object Uint32Array]",Pe={};Pe[nS]=Pe[e4]=Pe[f4]=Pe[p4]=Pe[t4]=Pe[n4]=Pe[h4]=Pe[m4]=Pe[g4]=Pe[v4]=Pe[y4]=Pe[s4]=Pe[o4]=Pe[iS]=Pe[a4]=Pe[l4]=Pe[u4]=Pe[c4]=Pe[x4]=Pe[w4]=Pe[b4]=Pe[C4]=!0;Pe[r4]=Pe[rS]=Pe[d4]=!1;function ya(e,t,n,r,i,s){var o,a=t&XF,l=t&ZF,c=t&JF;if(o!==void 0)return o;if(!hl(e))return e;var d=ml(e);if(d){if(o=vF(e),!a)return Xk(e,o)}else{var u=hr(e),f=u==rS||u==i4;if(Wk(e))return eF(e,a);if(u==iS||u==nS||f&&!i){if(o=l||f?{}:HF(e),!a)return l?oF(e,ZN(o,e)):iF(e,GN(o,e))}else{if(!Pe[u])return i?e:{};o=VF(e,u,a)}}s||(s=new Do);var m=s.get(e);if(m)return m;s.set(e,o),KF(e)?e.forEach(function(b){o.add(ya(b,t,n,b,e,s))}):GF(e)&&e.forEach(function(b,x){o.set(x,ya(b,t,n,x,e,s))});var h=c?l?lF:aF:l?xg:yg,g=d?void 0:h(e);return ZD(g||e,function(b,x){g&&(x=b,b=e[x]),Vk(o,x,ya(b,t,n,x,e,s))}),o}var k4=1,S4=4;function Wl(e){return ya(e,k4|S4)}var hx=Array.isArray,mx=Object.keys,T4=Object.prototype.hasOwnProperty,_4=typeof Element<"u";function ah(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=hx(e),r=hx(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!ah(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var a=e instanceof Date,l=t instanceof Date;if(a!=l)return!1;if(a&&l)return e.getTime()==t.getTime();var c=e instanceof RegExp,d=t instanceof RegExp;if(c!=d)return!1;if(c&&d)return e.toString()==t.toString();var u=mx(e);if(s=u.length,s!==mx(t).length)return!1;for(i=s;i--!==0;)if(!T4.call(t,u[i]))return!1;if(_4&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=u[i],!(o==="_owner"&&e.$$typeof)&&!ah(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var E4=function(t,n){try{return ah(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}};const Pi=_r(E4);var j4=4;function gx(e){return ya(e,j4)}function sS(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var A4="[object Symbol]";function Cg(e){return typeof e=="symbol"||xs(e)&&ys(e)==A4}var R4="Expected a function";function kg(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(R4);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(kg.Cache||Ci),n}kg.Cache=Ci;var P4=500;function O4(e){var t=kg(e,function(r){return n.size===P4&&n.clear(),r}),n=t.cache;return t}var M4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,D4=/\\(\\)?/g,N4=O4(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(M4,function(n,r,i,s){t.push(i?s.replace(D4,"$1"):r||n)}),t}),F4=1/0;function I4(e){if(typeof e=="string"||Cg(e))return e;var t=e+"";return t=="0"&&1/e==-F4?"-0":t}var L4=1/0,vx=vi?vi.prototype:void 0,yx=vx?vx.toString:void 0;function oS(e){if(typeof e=="string")return e;if(ml(e))return sS(e,oS)+"";if(Cg(e))return yx?yx.call(e):"";var t=e+"";return t=="0"&&1/e==-L4?"-0":t}function $4(e){return e==null?"":oS(e)}function aS(e){return ml(e)?sS(e,I4):Cg(e)?[e]:Xk(N4($4(e)))}var lS={exports:{}},je={};/** @license React v16.13.1
|
|
98
|
+
`+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let d of Object.values(this.internalTests))d&&c.push(d);this.runTests({path:s,value:l,originalValue:o,options:n,tests:c},r,d=>{if(d.length)return i(d,l);this.runTests({path:s,value:l,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:s,value:o,originalValue:a,path:l,options:c}=t,d=g=>{i||(i=!0,n(g,o))},u=g=>{i||(i=!0,r(g,o))},f=s.length,m=[];if(!f)return u([]);let h={value:o,originalValue:a,path:l,options:c,schema:this};for(let g=0;g<s.length;g++){const b=s[g];b(h,d,function(y){y&&(Array.isArray(y)?m.push(...y):m.push(y)),--f<=0&&u(m)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let c=r[a];const d=Object.assign({},o,{strict:!0,parent:r,value:c,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(u,f,m)=>this.resolve(d)._validate(c,d,f,m)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(l,c)=>{Vt.isError(l)&&(l.value=c),a(l)},(l,c)=>{l.length?a(new Vt(l,c,void 0,void 0,s)):o(c)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw Vt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Vt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Vt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Vt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Ws(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Es({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Es({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=qn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=qn.notNull){return this.nullability(!1,t)}required(t=qn.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=qn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=Es(n),s=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(s||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=jk(t).map(s=>new vs(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new rc(i,n):rc.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Es({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=qn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=Es({message:n,name:"oneOf",skipAbsent:!0,test(i){let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:o}})}}),r}notOneOf(t,n=qn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=Es({message:n,name:"notOneOf",test(i){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:s,nullable:o}=n.spec;return{meta:i,label:r,optional:s,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,d)=>d.findIndex(u=>u.name===l.name)===c)}}}or.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])or.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=x5(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])or.prototype[e]=or.prototype.oneOf;for(const e of["not","nope"])or.prototype[e]=or.prototype.notOneOf;const w5=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function b5(e){const t=th(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function th(e){var t,n;const r=w5.exec(e);return r?{year:cr(r[1]),month:cr(r[2],1)-1,day:cr(r[3],1),hour:cr(r[4]),minute:cr(r[5]),second:cr(r[6]),millisecond:r[7]?cr(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:cr(r[10]),minuteOffset:cr(r[11])}:null}function cr(e,t=0){return Number(e)||t}let C5=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,k5=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,S5=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,T5="^\\d{4}-\\d{2}-\\d{2}",_5="\\d{2}:\\d{2}:\\d{2}",E5="(([+-]\\d{2}(:?\\d{2})?)|Z)",j5=new RegExp(`${T5}T${_5}(\\.\\d+)?${E5}$`),A5=e=>$i(e)||e===e.trim(),R5={}.toString();function To(){return new Ok}class Ok extends or{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===R5?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||qn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=It.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=It.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=It.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:s}=n:i=n),this.test({name:s||"matches",message:i||It.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=It.email){return this.matches(C5,{name:"email",message:t,excludeEmptyString:!0})}url(t=It.url){return this.matches(k5,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=It.uuid){return this.matches(S5,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(j5,{name:"datetime",message:n||It.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||It.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=th(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||It.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=th(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=It.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:A5})}lowercase(t=It.lowercase){return this.transform(n=>$i(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>$i(n)||n===n.toLowerCase()})}uppercase(t=It.uppercase){return this.transform(n=>$i(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>$i(n)||n===n.toUpperCase()})}}To.prototype=Ok.prototype;let P5=new Date(""),O5=e=>Object.prototype.toString.call(e)==="[object Date]";class Lc extends or{constructor(){super({type:"date",check(t){return O5(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=b5(t),isNaN(t)?Lc.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(vs.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=eh.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=eh.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}Lc.INVALID_DATE=P5;Lc.prototype;function M5(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=Zi.split(o)[0];r.add(l),i.has(`${a}-${l}`)||n.push([a,l])}for(const o of Object.keys(e)){let a=e[o];r.add(o),vs.isRef(a)&&a.isSibling?s(a.path,o):hg(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return a5.array(Array.from(r),n).reverse()}function V0(e,t){let n=1/0;return e.some((r,i)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=i,!0}),n}function Mk(e){return(t,n)=>V0(e,t)-V0(e,n)}const D5=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function gu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=gu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=gu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(gu)}):"optional"in e?e.optional():e}const N5=(e,t)=>{const n=[...Zi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Zi.getter(Zi.join(n),!0)(e);return!!(i&&r in i)};let U0=e=>Object.prototype.toString.call(e)==="[object Object]";function H0(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const F5=Mk([]);function $c(e){return new Dk(e)}class Dk extends or{constructor(t){super({type:"object",check(n){return U0(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=F5,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let s=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(u=>!this._nodes.includes(u))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),d=!1;for(const u of a){let f=s[u],m=u in i;if(f){let h,g=i[u];c.path=(n.path?`${n.path}.`:"")+u,f=f.resolve({value:g,context:n.context,parent:l});let b=f instanceof or?f.spec:void 0,x=b==null?void 0:b.strict;if(b!=null&&b.strip){d=d||u in i;continue}h=!n.__validating||!x?f.cast(i[u],c):i[u],h!==void 0&&(l[u]=h)}else m&&!o&&(l[u]=i[u]);(m!==u in l||l[u]!==i[u])&&(d=!0)}return d?l:i}_validate(t,n={},r,i){let{from:s=[],originalValue:o=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(l,c)=>{if(!a||!U0(c)){i(l,c);return}o=o||c;let d=[];for(let u of this._nodes){let f=this.fields[u];!f||vs.isRef(f)||d.push(f.asNestedTest({options:n,key:u,parent:c,parentPath:n.path,originalParent:o}))}this.runTests({tests:d,value:c,originalValue:o,options:n},r,u=>{i(u.sort(this._sortErrors).concat(l),c)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,s]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?s:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const s=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=M5(t,n),r._sortErrors=Mk(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return gu(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=Zi.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return N5(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(D5)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||mu.exact,test(n){if(n==null)return!0;const r=H0(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=mu.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const s=H0(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=mu.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(rf.camelCase)}snakeCase(){return this.transformKeys(rf.snakeCase)}constantCase(){return this.transformKeys(t=>rf.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,o]of Object.entries(n.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),r.fields[s]=o.describe(a)}return r}}$c.prototype=Dk.prototype;var I5=function(t){return L5(t)&&!$5(t)};function L5(e){return!!e&&typeof e=="object"}function $5(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||V5(e)}var B5=typeof Symbol=="function"&&Symbol.for,z5=B5?Symbol.for("react.element"):60103;function V5(e){return e.$$typeof===z5}function U5(e){return Array.isArray(e)?[]:{}}function sc(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Qa(U5(e),e,t):e}function H5(e,t,n){return e.concat(t).map(function(r){return sc(r,n)})}function W5(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=sc(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=sc(t[i],n):r[i]=Qa(e[i],t[i],n)}),r}function Qa(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||H5,n.isMergeableObject=n.isMergeableObject||I5;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):W5(e,t,n):sc(t,n)}Qa.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Qa(r,i,n)},{})};var nh=Qa,Nk=typeof global=="object"&&global&&global.Object===Object&&global,q5=typeof self=="object"&&self&&self.Object===Object&&self,lr=Nk||q5||Function("return this")(),vi=lr.Symbol,Fk=Object.prototype,G5=Fk.hasOwnProperty,Y5=Fk.toString,Yo=vi?vi.toStringTag:void 0;function Q5(e){var t=G5.call(e,Yo),n=e[Yo];try{e[Yo]=void 0;var r=!0}catch{}var i=Y5.call(e);return r&&(t?e[Yo]=n:delete e[Yo]),i}var K5=Object.prototype,X5=K5.toString;function Z5(e){return X5.call(e)}var J5="[object Null]",eD="[object Undefined]",W0=vi?vi.toStringTag:void 0;function ys(e){return e==null?e===void 0?eD:J5:W0&&W0 in Object(e)?Q5(e):Z5(e)}function Ik(e,t){return function(n){return e(t(n))}}var mg=Ik(Object.getPrototypeOf,Object);function xs(e){return e!=null&&typeof e=="object"}var tD="[object Object]",nD=Function.prototype,rD=Object.prototype,Lk=nD.toString,iD=rD.hasOwnProperty,sD=Lk.call(Object);function q0(e){if(!xs(e)||ys(e)!=tD)return!1;var t=mg(e);if(t===null)return!0;var n=iD.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Lk.call(n)==sD}function oD(){this.__data__=[],this.size=0}function $k(e,t){return e===t||e!==e&&t!==t}function Bc(e,t){for(var n=e.length;n--;)if($k(e[n][0],t))return n;return-1}var aD=Array.prototype,lD=aD.splice;function uD(e){var t=this.__data__,n=Bc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():lD.call(t,n,1),--this.size,!0}function cD(e){var t=this.__data__,n=Bc(t,e);return n<0?void 0:t[n][1]}function dD(e){return Bc(this.__data__,e)>-1}function fD(e,t){var n=this.__data__,r=Bc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Ar(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ar.prototype.clear=oD;Ar.prototype.delete=uD;Ar.prototype.get=cD;Ar.prototype.has=dD;Ar.prototype.set=fD;function pD(){this.__data__=new Ar,this.size=0}function hD(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function mD(e){return this.__data__.get(e)}function gD(e){return this.__data__.has(e)}function ml(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var vD="[object AsyncFunction]",yD="[object Function]",xD="[object GeneratorFunction]",wD="[object Proxy]";function Bk(e){if(!ml(e))return!1;var t=ys(e);return t==yD||t==xD||t==vD||t==wD}var sf=lr["__core-js_shared__"],G0=function(){var e=/[^.]+$/.exec(sf&&sf.keys&&sf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function bD(e){return!!G0&&G0 in e}var CD=Function.prototype,kD=CD.toString;function ws(e){if(e!=null){try{return kD.call(e)}catch{}try{return e+""}catch{}}return""}var SD=/[\\^$.*+?()[\]{}|]/g,TD=/^\[object .+?Constructor\]$/,_D=Function.prototype,ED=Object.prototype,jD=_D.toString,AD=ED.hasOwnProperty,RD=RegExp("^"+jD.call(AD).replace(SD,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function PD(e){if(!ml(e)||bD(e))return!1;var t=Bk(e)?RD:TD;return t.test(ws(e))}function OD(e,t){return e==null?void 0:e[t]}function bs(e,t){var n=OD(e,t);return PD(n)?n:void 0}var Ka=bs(lr,"Map"),Xa=bs(Object,"create");function MD(){this.__data__=Xa?Xa(null):{},this.size=0}function DD(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ND="__lodash_hash_undefined__",FD=Object.prototype,ID=FD.hasOwnProperty;function LD(e){var t=this.__data__;if(Xa){var n=t[e];return n===ND?void 0:n}return ID.call(t,e)?t[e]:void 0}var $D=Object.prototype,BD=$D.hasOwnProperty;function zD(e){var t=this.__data__;return Xa?t[e]!==void 0:BD.call(t,e)}var VD="__lodash_hash_undefined__";function UD(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Xa&&t===void 0?VD:t,this}function ls(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ls.prototype.clear=MD;ls.prototype.delete=DD;ls.prototype.get=LD;ls.prototype.has=zD;ls.prototype.set=UD;function HD(){this.size=0,this.__data__={hash:new ls,map:new(Ka||Ar),string:new ls}}function WD(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function zc(e,t){var n=e.__data__;return WD(t)?n[typeof t=="string"?"string":"hash"]:n.map}function qD(e){var t=zc(this,e).delete(e);return this.size-=t?1:0,t}function GD(e){return zc(this,e).get(e)}function YD(e){return zc(this,e).has(e)}function QD(e,t){var n=zc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Ci(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ci.prototype.clear=HD;Ci.prototype.delete=qD;Ci.prototype.get=GD;Ci.prototype.has=YD;Ci.prototype.set=QD;var KD=200;function XD(e,t){var n=this.__data__;if(n instanceof Ar){var r=n.__data__;if(!Ka||r.length<KD-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ci(r)}return n.set(e,t),this.size=n.size,this}function No(e){var t=this.__data__=new Ar(e);this.size=t.size}No.prototype.clear=pD;No.prototype.delete=hD;No.prototype.get=mD;No.prototype.has=gD;No.prototype.set=XD;function ZD(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Y0=function(){try{var e=bs(Object,"defineProperty");return e({},"",{}),e}catch{}}();function zk(e,t,n){t=="__proto__"&&Y0?Y0(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var JD=Object.prototype,eN=JD.hasOwnProperty;function Vk(e,t,n){var r=e[t];(!(eN.call(e,t)&&$k(r,n))||n===void 0&&!(t in e))&&zk(e,t,n)}function Vc(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?zk(n,a,l):Vk(n,a,l)}return n}function tN(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var nN="[object Arguments]";function Q0(e){return xs(e)&&ys(e)==nN}var Uk=Object.prototype,rN=Uk.hasOwnProperty,iN=Uk.propertyIsEnumerable,sN=Q0(function(){return arguments}())?Q0:function(e){return xs(e)&&rN.call(e,"callee")&&!iN.call(e,"callee")},gl=Array.isArray;function oN(){return!1}var Hk=typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,K0=Hk&&typeof en=="object"&&en&&!en.nodeType&&en,aN=K0&&K0.exports===Hk,X0=aN?lr.Buffer:void 0,lN=X0?X0.isBuffer:void 0,Wk=lN||oN,uN=9007199254740991,cN=/^(?:0|[1-9]\d*)$/;function dN(e,t){var n=typeof e;return t=t??uN,!!t&&(n=="number"||n!="symbol"&&cN.test(e))&&e>-1&&e%1==0&&e<t}var fN=9007199254740991;function qk(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=fN}var pN="[object Arguments]",hN="[object Array]",mN="[object Boolean]",gN="[object Date]",vN="[object Error]",yN="[object Function]",xN="[object Map]",wN="[object Number]",bN="[object Object]",CN="[object RegExp]",kN="[object Set]",SN="[object String]",TN="[object WeakMap]",_N="[object ArrayBuffer]",EN="[object DataView]",jN="[object Float32Array]",AN="[object Float64Array]",RN="[object Int8Array]",PN="[object Int16Array]",ON="[object Int32Array]",MN="[object Uint8Array]",DN="[object Uint8ClampedArray]",NN="[object Uint16Array]",FN="[object Uint32Array]",Ne={};Ne[jN]=Ne[AN]=Ne[RN]=Ne[PN]=Ne[ON]=Ne[MN]=Ne[DN]=Ne[NN]=Ne[FN]=!0;Ne[pN]=Ne[hN]=Ne[_N]=Ne[mN]=Ne[EN]=Ne[gN]=Ne[vN]=Ne[yN]=Ne[xN]=Ne[wN]=Ne[bN]=Ne[CN]=Ne[kN]=Ne[SN]=Ne[TN]=!1;function IN(e){return xs(e)&&qk(e.length)&&!!Ne[ys(e)]}function gg(e){return function(t){return e(t)}}var Gk=typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,ya=Gk&&typeof en=="object"&&en&&!en.nodeType&&en,LN=ya&&ya.exports===Gk,of=LN&&Nk.process,_o=function(){try{var e=ya&&ya.require&&ya.require("util").types;return e||of&&of.binding&&of.binding("util")}catch{}}(),Z0=_o&&_o.isTypedArray,$N=Z0?gg(Z0):IN,BN=Object.prototype,zN=BN.hasOwnProperty;function Yk(e,t){var n=gl(e),r=!n&&sN(e),i=!n&&!r&&Wk(e),s=!n&&!r&&!i&&$N(e),o=n||r||i||s,a=o?tN(e.length,String):[],l=a.length;for(var c in e)(t||zN.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||dN(c,l)))&&a.push(c);return a}var VN=Object.prototype;function vg(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||VN;return e===n}var UN=Ik(Object.keys,Object),HN=Object.prototype,WN=HN.hasOwnProperty;function qN(e){if(!vg(e))return UN(e);var t=[];for(var n in Object(e))WN.call(e,n)&&n!="constructor"&&t.push(n);return t}function Qk(e){return e!=null&&qk(e.length)&&!Bk(e)}function yg(e){return Qk(e)?Yk(e):qN(e)}function GN(e,t){return e&&Vc(t,yg(t),e)}function YN(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var QN=Object.prototype,KN=QN.hasOwnProperty;function XN(e){if(!ml(e))return YN(e);var t=vg(e),n=[];for(var r in e)r=="constructor"&&(t||!KN.call(e,r))||n.push(r);return n}function xg(e){return Qk(e)?Yk(e,!0):XN(e)}function ZN(e,t){return e&&Vc(t,xg(t),e)}var Kk=typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,J0=Kk&&typeof en=="object"&&en&&!en.nodeType&&en,JN=J0&&J0.exports===Kk,ex=JN?lr.Buffer:void 0,tx=ex?ex.allocUnsafe:void 0;function eF(e,t){if(t)return e.slice();var n=e.length,r=tx?tx(n):new e.constructor(n);return e.copy(r),r}function Xk(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function tF(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function Zk(){return[]}var nF=Object.prototype,rF=nF.propertyIsEnumerable,nx=Object.getOwnPropertySymbols,wg=nx?function(e){return e==null?[]:(e=Object(e),tF(nx(e),function(t){return rF.call(e,t)}))}:Zk;function iF(e,t){return Vc(e,wg(e),t)}function Jk(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var sF=Object.getOwnPropertySymbols,eS=sF?function(e){for(var t=[];e;)Jk(t,wg(e)),e=mg(e);return t}:Zk;function oF(e,t){return Vc(e,eS(e),t)}function tS(e,t,n){var r=t(e);return gl(e)?r:Jk(r,n(e))}function aF(e){return tS(e,yg,wg)}function lF(e){return tS(e,xg,eS)}var rh=bs(lr,"DataView"),ih=bs(lr,"Promise"),sh=bs(lr,"Set"),oh=bs(lr,"WeakMap"),rx="[object Map]",uF="[object Object]",ix="[object Promise]",sx="[object Set]",ox="[object WeakMap]",ax="[object DataView]",cF=ws(rh),dF=ws(Ka),fF=ws(ih),pF=ws(sh),hF=ws(oh),hr=ys;(rh&&hr(new rh(new ArrayBuffer(1)))!=ax||Ka&&hr(new Ka)!=rx||ih&&hr(ih.resolve())!=ix||sh&&hr(new sh)!=sx||oh&&hr(new oh)!=ox)&&(hr=function(e){var t=ys(e),n=t==uF?e.constructor:void 0,r=n?ws(n):"";if(r)switch(r){case cF:return ax;case dF:return rx;case fF:return ix;case pF:return sx;case hF:return ox}return t});var mF=Object.prototype,gF=mF.hasOwnProperty;function vF(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&gF.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var lx=lr.Uint8Array;function bg(e){var t=new e.constructor(e.byteLength);return new lx(t).set(new lx(e)),t}function yF(e,t){var n=t?bg(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var xF=/\w*$/;function wF(e){var t=new e.constructor(e.source,xF.exec(e));return t.lastIndex=e.lastIndex,t}var ux=vi?vi.prototype:void 0,cx=ux?ux.valueOf:void 0;function bF(e){return cx?Object(cx.call(e)):{}}function CF(e,t){var n=t?bg(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var kF="[object Boolean]",SF="[object Date]",TF="[object Map]",_F="[object Number]",EF="[object RegExp]",jF="[object Set]",AF="[object String]",RF="[object Symbol]",PF="[object ArrayBuffer]",OF="[object DataView]",MF="[object Float32Array]",DF="[object Float64Array]",NF="[object Int8Array]",FF="[object Int16Array]",IF="[object Int32Array]",LF="[object Uint8Array]",$F="[object Uint8ClampedArray]",BF="[object Uint16Array]",zF="[object Uint32Array]";function VF(e,t,n){var r=e.constructor;switch(t){case PF:return bg(e);case kF:case SF:return new r(+e);case OF:return yF(e,n);case MF:case DF:case NF:case FF:case IF:case LF:case $F:case BF:case zF:return CF(e,n);case TF:return new r;case _F:case AF:return new r(e);case EF:return wF(e);case jF:return new r;case RF:return bF(e)}}var dx=Object.create,UF=function(){function e(){}return function(t){if(!ml(t))return{};if(dx)return dx(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function HF(e){return typeof e.constructor=="function"&&!vg(e)?UF(mg(e)):{}}var WF="[object Map]";function qF(e){return xs(e)&&hr(e)==WF}var fx=_o&&_o.isMap,GF=fx?gg(fx):qF,YF="[object Set]";function QF(e){return xs(e)&&hr(e)==YF}var px=_o&&_o.isSet,KF=px?gg(px):QF,XF=1,ZF=2,JF=4,nS="[object Arguments]",e4="[object Array]",t4="[object Boolean]",n4="[object Date]",r4="[object Error]",rS="[object Function]",i4="[object GeneratorFunction]",s4="[object Map]",o4="[object Number]",iS="[object Object]",a4="[object RegExp]",l4="[object Set]",u4="[object String]",c4="[object Symbol]",d4="[object WeakMap]",f4="[object ArrayBuffer]",p4="[object DataView]",h4="[object Float32Array]",m4="[object Float64Array]",g4="[object Int8Array]",v4="[object Int16Array]",y4="[object Int32Array]",x4="[object Uint8Array]",w4="[object Uint8ClampedArray]",b4="[object Uint16Array]",C4="[object Uint32Array]",Pe={};Pe[nS]=Pe[e4]=Pe[f4]=Pe[p4]=Pe[t4]=Pe[n4]=Pe[h4]=Pe[m4]=Pe[g4]=Pe[v4]=Pe[y4]=Pe[s4]=Pe[o4]=Pe[iS]=Pe[a4]=Pe[l4]=Pe[u4]=Pe[c4]=Pe[x4]=Pe[w4]=Pe[b4]=Pe[C4]=!0;Pe[r4]=Pe[rS]=Pe[d4]=!1;function xa(e,t,n,r,i,s){var o,a=t&XF,l=t&ZF,c=t&JF;if(o!==void 0)return o;if(!ml(e))return e;var d=gl(e);if(d){if(o=vF(e),!a)return Xk(e,o)}else{var u=hr(e),f=u==rS||u==i4;if(Wk(e))return eF(e,a);if(u==iS||u==nS||f&&!i){if(o=l||f?{}:HF(e),!a)return l?oF(e,ZN(o,e)):iF(e,GN(o,e))}else{if(!Pe[u])return i?e:{};o=VF(e,u,a)}}s||(s=new No);var m=s.get(e);if(m)return m;s.set(e,o),KF(e)?e.forEach(function(b){o.add(xa(b,t,n,b,e,s))}):GF(e)&&e.forEach(function(b,x){o.set(x,xa(b,t,n,x,e,s))});var h=c?l?lF:aF:l?xg:yg,g=d?void 0:h(e);return ZD(g||e,function(b,x){g&&(x=b,b=e[x]),Vk(o,x,xa(b,t,n,x,e,s))}),o}var k4=1,S4=4;function ql(e){return xa(e,k4|S4)}var hx=Array.isArray,mx=Object.keys,T4=Object.prototype.hasOwnProperty,_4=typeof Element<"u";function ah(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=hx(e),r=hx(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!ah(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var a=e instanceof Date,l=t instanceof Date;if(a!=l)return!1;if(a&&l)return e.getTime()==t.getTime();var c=e instanceof RegExp,d=t instanceof RegExp;if(c!=d)return!1;if(c&&d)return e.toString()==t.toString();var u=mx(e);if(s=u.length,s!==mx(t).length)return!1;for(i=s;i--!==0;)if(!T4.call(t,u[i]))return!1;if(_4&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=u[i],!(o==="_owner"&&e.$$typeof)&&!ah(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var E4=function(t,n){try{return ah(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}};const Pi=_r(E4);var j4=4;function gx(e){return xa(e,j4)}function sS(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var A4="[object Symbol]";function Cg(e){return typeof e=="symbol"||xs(e)&&ys(e)==A4}var R4="Expected a function";function kg(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(R4);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(kg.Cache||Ci),n}kg.Cache=Ci;var P4=500;function O4(e){var t=kg(e,function(r){return n.size===P4&&n.clear(),r}),n=t.cache;return t}var M4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,D4=/\\(\\)?/g,N4=O4(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(M4,function(n,r,i,s){t.push(i?s.replace(D4,"$1"):r||n)}),t}),F4=1/0;function I4(e){if(typeof e=="string"||Cg(e))return e;var t=e+"";return t=="0"&&1/e==-F4?"-0":t}var L4=1/0,vx=vi?vi.prototype:void 0,yx=vx?vx.toString:void 0;function oS(e){if(typeof e=="string")return e;if(gl(e))return sS(e,oS)+"";if(Cg(e))return yx?yx.call(e):"";var t=e+"";return t=="0"&&1/e==-L4?"-0":t}function $4(e){return e==null?"":oS(e)}function aS(e){return gl(e)?sS(e,I4):Cg(e)?[e]:Xk(N4($4(e)))}var lS={exports:{}},je={};/** @license React v16.13.1
|
|
99
99
|
* react-is.production.min.js
|
|
100
100
|
*
|
|
101
101
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
102
102
|
*
|
|
103
103
|
* This source code is licensed under the MIT license found in the
|
|
104
104
|
* LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/var mt=typeof Symbol=="function"&&Symbol.for,Sg=mt?Symbol.for("react.element"):60103,Tg=mt?Symbol.for("react.portal"):60106,Uc=mt?Symbol.for("react.fragment"):60107,Hc=mt?Symbol.for("react.strict_mode"):60108,Wc=mt?Symbol.for("react.profiler"):60114,qc=mt?Symbol.for("react.provider"):60109,Gc=mt?Symbol.for("react.context"):60110,_g=mt?Symbol.for("react.async_mode"):60111,Yc=mt?Symbol.for("react.concurrent_mode"):60111,Qc=mt?Symbol.for("react.forward_ref"):60112,Kc=mt?Symbol.for("react.suspense"):60113,B4=mt?Symbol.for("react.suspense_list"):60120,Xc=mt?Symbol.for("react.memo"):60115,Zc=mt?Symbol.for("react.lazy"):60116,z4=mt?Symbol.for("react.block"):60121,V4=mt?Symbol.for("react.fundamental"):60117,U4=mt?Symbol.for("react.responder"):60118,H4=mt?Symbol.for("react.scope"):60119;function on(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Sg:switch(e=e.type,e){case _g:case Yc:case Uc:case Wc:case Hc:case Kc:return e;default:switch(e=e&&e.$$typeof,e){case Gc:case Qc:case Zc:case Xc:case qc:return e;default:return t}}case Tg:return t}}}function uS(e){return on(e)===Yc}je.AsyncMode=_g;je.ConcurrentMode=Yc;je.ContextConsumer=Gc;je.ContextProvider=qc;je.Element=Sg;je.ForwardRef=Qc;je.Fragment=Uc;je.Lazy=Zc;je.Memo=Xc;je.Portal=Tg;je.Profiler=Wc;je.StrictMode=Hc;je.Suspense=Kc;je.isAsyncMode=function(e){return uS(e)||on(e)===_g};je.isConcurrentMode=uS;je.isContextConsumer=function(e){return on(e)===Gc};je.isContextProvider=function(e){return on(e)===qc};je.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Sg};je.isForwardRef=function(e){return on(e)===Qc};je.isFragment=function(e){return on(e)===Uc};je.isLazy=function(e){return on(e)===Zc};je.isMemo=function(e){return on(e)===Xc};je.isPortal=function(e){return on(e)===Tg};je.isProfiler=function(e){return on(e)===Wc};je.isStrictMode=function(e){return on(e)===Hc};je.isSuspense=function(e){return on(e)===Kc};je.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Uc||e===Yc||e===Wc||e===Hc||e===Kc||e===B4||typeof e=="object"&&e!==null&&(e.$$typeof===Zc||e.$$typeof===Xc||e.$$typeof===qc||e.$$typeof===Gc||e.$$typeof===Qc||e.$$typeof===V4||e.$$typeof===U4||e.$$typeof===H4||e.$$typeof===z4)};je.typeOf=on;lS.exports=je;var W4=lS.exports,cS=W4,q4={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},G4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},dS={};dS[cS.ForwardRef]=q4;dS[cS.Memo]=G4;function ct(){return ct=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ct.apply(this,arguments)}function fS(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Jc=v.createContext(void 0);Jc.displayName="FormikContext";Jc.Provider;Jc.Consumer;function Y4(){var e=v.useContext(Jc);return e}var Tn=function(t){return typeof t=="function"},ed=function(t){return t!==null&&typeof t=="object"},Q4=function(t){return String(Math.floor(Number(t)))===t},af=function(t){return Object.prototype.toString.call(t)==="[object String]"},lf=function(t){return ed(t)&&Tn(t.then)};function Qt(e,t,n,r){r===void 0&&(r=0);for(var i=aS(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Ji(e,t,n){for(var r=gx(e),i=r,s=0,o=aS(t);s<o.length-1;s++){var a=o[s],l=Qt(e,o.slice(0,s+1));if(l&&(ed(l)||Array.isArray(l)))i=i[a]=gx(l);else{var c=o[s+1];i=i[a]=Q4(c)&&Number(c)>=0?[]:{}}}return(s===0?e:i)[o[s]]===n?e:(n===void 0?delete i[o[s]]:i[o[s]]=n,s===0&&n===void 0&&delete r[o[s]],r)}function pS(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i],a=e[o];ed(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},pS(a,t,n,r[o])):r[o]=t}return r}function K4(e,t){switch(t.type){case"SET_VALUES":return ct({},e,{values:t.payload});case"SET_TOUCHED":return ct({},e,{touched:t.payload});case"SET_ERRORS":return Pi(e.errors,t.payload)?e:ct({},e,{errors:t.payload});case"SET_STATUS":return ct({},e,{status:t.payload});case"SET_ISSUBMITTING":return ct({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return ct({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return ct({},e,{values:Ji(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return ct({},e,{touched:Ji(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return ct({},e,{errors:Ji(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return ct({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return ct({},e,{touched:pS(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return ct({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return ct({},e,{isSubmitting:!1});default:return e}}var Ei={},ql={};function X4(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,s=e.validateOnMount,o=s===void 0?!1:s,a=e.isInitialValid,l=e.enableReinitialize,c=l===void 0?!1:l,d=e.onSubmit,u=fS(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=ct({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:d},u),m=v.useRef(f.initialValues),h=v.useRef(f.initialErrors||Ei),g=v.useRef(f.initialTouched||ql),b=v.useRef(f.initialStatus),x=v.useRef(!1),y=v.useRef({});v.useEffect(function(){return x.current=!0,function(){x.current=!1}},[]);var w=v.useState(0),j=w[1],k=v.useRef({values:Wl(f.initialValues),errors:Wl(f.initialErrors)||Ei,touched:Wl(f.initialTouched)||ql,status:Wl(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),T=k.current,A=v.useCallback(function(M){var X=k.current;k.current=K4(X,M),X!==k.current&&j(function(L){return L+1})},[]),S=v.useCallback(function(M,X){return new Promise(function(L,H){var re=f.validate(M,X);re==null?L(Ei):lf(re)?re.then(function(ce){L(ce||Ei)},function(ce){H(ce)}):L(re)})},[f.validate]),F=v.useCallback(function(M,X){var L=f.validationSchema,H=Tn(L)?L(X):L,re=X&&H.validateAt?H.validateAt(X,M):J4(M,H);return new Promise(function(ce,xe){re.then(function(){ce(Ei)},function(it){it.name==="ValidationError"?ce(Z4(it)):xe(it)})})},[f.validationSchema]),N=v.useCallback(function(M,X){return new Promise(function(L){return L(y.current[M].validate(X))})},[]),O=v.useCallback(function(M){var X=Object.keys(y.current).filter(function(H){return Tn(y.current[H].validate)}),L=X.length>0?X.map(function(H){return N(H,Qt(M,H))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(L).then(function(H){return H.reduce(function(re,ce,xe){return ce==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||ce&&(re=Ji(re,X[xe],ce)),re},{})})},[N]),Q=v.useCallback(function(M){return Promise.all([O(M),f.validationSchema?F(M):{},f.validate?S(M):{}]).then(function(X){var L=X[0],H=X[1],re=X[2],ce=nh.all([L,H,re],{arrayMerge:eI});return ce})},[f.validate,f.validationSchema,O,S,F]),J=cn(function(M){return M===void 0&&(M=T.values),A({type:"SET_ISVALIDATING",payload:!0}),Q(M).then(function(X){return x.current&&(A({type:"SET_ISVALIDATING",payload:!1}),A({type:"SET_ERRORS",payload:X})),X})});v.useEffect(function(){o&&x.current===!0&&Pi(m.current,f.initialValues)&&J(m.current)},[o,J]);var U=v.useCallback(function(M){var X=M&&M.values?M.values:m.current,L=M&&M.errors?M.errors:h.current?h.current:f.initialErrors||{},H=M&&M.touched?M.touched:g.current?g.current:f.initialTouched||{},re=M&&M.status?M.status:b.current?b.current:f.initialStatus;m.current=X,h.current=L,g.current=H,b.current=re;var ce=function(){A({type:"RESET_FORM",payload:{isSubmitting:!!M&&!!M.isSubmitting,errors:L,touched:H,status:re,values:X,isValidating:!!M&&!!M.isValidating,submitCount:M&&M.submitCount&&typeof M.submitCount=="number"?M.submitCount:0}})};if(f.onReset){var xe=f.onReset(T.values,Ke);lf(xe)?xe.then(ce):ce()}else ce()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);v.useEffect(function(){x.current===!0&&!Pi(m.current,f.initialValues)&&c&&(m.current=f.initialValues,U(),o&&J(m.current))},[c,f.initialValues,U,o,J]),v.useEffect(function(){c&&x.current===!0&&!Pi(h.current,f.initialErrors)&&(h.current=f.initialErrors||Ei,A({type:"SET_ERRORS",payload:f.initialErrors||Ei}))},[c,f.initialErrors]),v.useEffect(function(){c&&x.current===!0&&!Pi(g.current,f.initialTouched)&&(g.current=f.initialTouched||ql,A({type:"SET_TOUCHED",payload:f.initialTouched||ql}))},[c,f.initialTouched]),v.useEffect(function(){c&&x.current===!0&&!Pi(b.current,f.initialStatus)&&(b.current=f.initialStatus,A({type:"SET_STATUS",payload:f.initialStatus}))},[c,f.initialStatus,f.initialTouched]);var $=cn(function(M){if(y.current[M]&&Tn(y.current[M].validate)){var X=Qt(T.values,M),L=y.current[M].validate(X);return lf(L)?(A({type:"SET_ISVALIDATING",payload:!0}),L.then(function(H){return H}).then(function(H){A({type:"SET_FIELD_ERROR",payload:{field:M,value:H}}),A({type:"SET_ISVALIDATING",payload:!1})})):(A({type:"SET_FIELD_ERROR",payload:{field:M,value:L}}),Promise.resolve(L))}else if(f.validationSchema)return A({type:"SET_ISVALIDATING",payload:!0}),F(T.values,M).then(function(H){return H}).then(function(H){A({type:"SET_FIELD_ERROR",payload:{field:M,value:Qt(H,M)}}),A({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),_=v.useCallback(function(M,X){var L=X.validate;y.current[M]={validate:L}},[]),I=v.useCallback(function(M){delete y.current[M]},[]),R=cn(function(M,X){A({type:"SET_TOUCHED",payload:M});var L=X===void 0?i:X;return L?J(T.values):Promise.resolve()}),P=v.useCallback(function(M){A({type:"SET_ERRORS",payload:M})},[]),D=cn(function(M,X){var L=Tn(M)?M(T.values):M;A({type:"SET_VALUES",payload:L});var H=X===void 0?n:X;return H?J(L):Promise.resolve()}),B=v.useCallback(function(M,X){A({type:"SET_FIELD_ERROR",payload:{field:M,value:X}})},[]),V=cn(function(M,X,L){A({type:"SET_FIELD_VALUE",payload:{field:M,value:X}});var H=L===void 0?n:L;return H?J(Ji(T.values,M,X)):Promise.resolve()}),Y=v.useCallback(function(M,X){var L=X,H=M,re;if(!af(M)){M.persist&&M.persist();var ce=M.target?M.target:M.currentTarget,xe=ce.type,it=ce.name,gt=ce.id,Bn=ce.value,an=ce.checked,ks=ce.outerHTML,ur=ce.options,Pr=ce.multiple;L=X||it||gt,H=/number|range/.test(xe)?(re=parseFloat(Bn),isNaN(re)?"":re):/checkbox/.test(xe)?nI(Qt(T.values,L),an,Bn):ur&&Pr?tI(ur):Bn}L&&V(L,H)},[V,T.values]),z=cn(function(M){if(af(M))return function(X){return Y(X,M)};Y(M)}),Z=cn(function(M,X,L){X===void 0&&(X=!0),A({type:"SET_FIELD_TOUCHED",payload:{field:M,value:X}});var H=L===void 0?i:L;return H?J(T.values):Promise.resolve()}),K=v.useCallback(function(M,X){M.persist&&M.persist();var L=M.target,H=L.name,re=L.id,ce=L.outerHTML,xe=X||H||re;Z(xe,!0)},[Z]),ae=cn(function(M){if(af(M))return function(X){return K(X,M)};K(M)}),G=v.useCallback(function(M){Tn(M)?A({type:"SET_FORMIK_STATE",payload:M}):A({type:"SET_FORMIK_STATE",payload:function(){return M}})},[]),se=v.useCallback(function(M){A({type:"SET_STATUS",payload:M})},[]),pe=v.useCallback(function(M){A({type:"SET_ISSUBMITTING",payload:M})},[]),Te=cn(function(){return A({type:"SUBMIT_ATTEMPT"}),J().then(function(M){var X=M instanceof Error,L=!X&&Object.keys(M).length===0;if(L){var H;try{if(H=Xe(),H===void 0)return}catch(re){throw re}return Promise.resolve(H).then(function(re){return x.current&&A({type:"SUBMIT_SUCCESS"}),re}).catch(function(re){if(x.current)throw A({type:"SUBMIT_FAILURE"}),re})}else if(x.current&&(A({type:"SUBMIT_FAILURE"}),X))throw M})}),le=cn(function(M){M&&M.preventDefault&&Tn(M.preventDefault)&&M.preventDefault(),M&&M.stopPropagation&&Tn(M.stopPropagation)&&M.stopPropagation(),Te().catch(function(X){console.warn("Warning: An unhandled error was caught from submitForm()",X)})}),Ke={resetForm:U,validateForm:J,validateField:$,setErrors:P,setFieldError:B,setFieldTouched:Z,setFieldValue:V,setStatus:se,setSubmitting:pe,setTouched:R,setValues:D,setFormikState:G,submitForm:Te},Xe=cn(function(){return d(T.values,Ke)}),qe=cn(function(M){M&&M.preventDefault&&Tn(M.preventDefault)&&M.preventDefault(),M&&M.stopPropagation&&Tn(M.stopPropagation)&&M.stopPropagation(),U()}),oe=v.useCallback(function(M){return{value:Qt(T.values,M),error:Qt(T.errors,M),touched:!!Qt(T.touched,M),initialValue:Qt(m.current,M),initialTouched:!!Qt(g.current,M),initialError:Qt(h.current,M)}},[T.errors,T.touched,T.values]),fe=v.useCallback(function(M){return{setValue:function(L,H){return V(M,L,H)},setTouched:function(L,H){return Z(M,L,H)},setError:function(L){return B(M,L)}}},[V,Z,B]),Ae=v.useCallback(function(M){var X=ed(M),L=X?M.name:M,H=Qt(T.values,L),re={name:L,value:H,onChange:z,onBlur:ae};if(X){var ce=M.type,xe=M.value,it=M.as,gt=M.multiple;ce==="checkbox"?xe===void 0?re.checked=!!H:(re.checked=!!(Array.isArray(H)&&~H.indexOf(xe)),re.value=xe):ce==="radio"?(re.checked=H===xe,re.value=xe):it==="select"&>&&(re.value=re.value||[],re.multiple=!0)}return re},[ae,z,T.values]),$e=v.useMemo(function(){return!Pi(m.current,T.values)},[m.current,T.values]),Gt=v.useMemo(function(){return typeof a<"u"?$e?T.errors&&Object.keys(T.errors).length===0:a!==!1&&Tn(a)?a(f):a:T.errors&&Object.keys(T.errors).length===0},[a,$e,T.errors,f]),ki=ct({},T,{initialValues:m.current,initialErrors:h.current,initialTouched:g.current,initialStatus:b.current,handleBlur:ae,handleChange:z,handleReset:qe,handleSubmit:le,resetForm:U,setErrors:P,setFormikState:G,setFieldTouched:Z,setFieldValue:V,setFieldError:B,setStatus:se,setSubmitting:pe,setTouched:R,setValues:D,submitForm:Te,validateForm:J,validateField:$,isValid:Gt,dirty:$e,unregisterField:I,registerField:_,getFieldProps:Ae,getFieldMeta:oe,getFieldHelpers:fe,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return ki}function Z4(e){var t={};if(e.inner){if(e.inner.length===0)return Ji(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var s;if(n){if(r>=i.length)break;s=i[r++]}else{if(r=i.next(),r.done)break;s=r.value}var o=s;Qt(t,o.path)||(t=Ji(t,o.path,o.message))}}return t}function J4(e,t,n,r){n===void 0&&(n=!1);var i=lh(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function lh(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(i){return Array.isArray(i)===!0||q0(i)?lh(i):i!==""?i:void 0}):q0(e[r])?t[r]=lh(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function eI(e,t,n){var r=e.slice();return t.forEach(function(s,o){if(typeof r[o]>"u"){var a=n.clone!==!1,l=a&&n.isMergeableObject(s);r[o]=l?nh(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=nh(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function tI(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function nI(e,t,n){if(typeof e=="boolean")return!!t;var r=[],i=!1,s=-1;if(Array.isArray(e))r=e,s=e.indexOf(n),i=s>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!i?r.concat(n):i?r.slice(0,s).concat(r.slice(s+1)):r}var rI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function cn(e){var t=v.useRef(e);return rI(function(){t.current=e}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}var iI=v.forwardRef(function(e,t){var n=e.action,r=fS(e,["action"]),i=n??"#",s=Y4(),o=s.handleReset,a=s.handleSubmit;return v.createElement("form",ct({onSubmit:a,ref:t,onReset:o,action:i},r))});iI.displayName="Form";const Eg=({init:e,schema:t,action:n})=>X4({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function hS(e,t,n){let r=n;r||(r=Object.keys(e));for(let i of r){if(Array.isArray(e[i])&&Array.isArray(t[i])){if(e[i].length!==t[i].length)return!1;for(let s=0;s<e[i].length;s++)if(e[i][s]!==t[i][s])return!1;continue}if(e[i]!==t[i])return!1}return!0}function jg({id:e,text:t,className:n,required:r}){const i=Se();return t?p.jsxs("label",{htmlFor:e,className:Ie("mb-1 block text-sm font-medium",n),style:{color:i.getColor(C.InputText)},children:[t,r&&p.jsx("span",{className:"ml-1",style:{color:i.getColor(C.ErrorText)},children:"*"})]}):null}const uf={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function mS({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:c,className:d,ariaInvalid:u,ariaLabel:f,autoFocus:m,...h}){const g=Se();return p.jsxs("div",{className:Ie({"mb-2":!o},d),children:[p.jsx(jg,{id:e,text:t,required:a}),p.jsxs("div",{className:"flex items-center",children:[r&&p.jsx("span",{className:Ie("inline-block border border-solid border-r-0 rounded-l-md",uf[i]),style:{borderColor:l?g.getColor(C.ErrorBorder):g.getColor(C.InputBorder),backgroundColor:g.getColor(C.InputBackground),borderRadius:g.getRadius()},children:r}),p.jsx("input",{id:e,className:Ie("border border-solid block text-base py-2 px-3 w-full focus:outline-hidden",uf[i],{"rounded-l-none":!!r,"rounded-r-none":!!n}),type:s,required:a,"aria-describedby":c,"aria-invalid":u,"aria-label":f,style:{fontSize:"16px",color:l?g.getColor(C.ErrorText):g.getColor(C.InputText),backgroundColor:g.getColor(C.InputBackground),borderColor:l?g.getColor(C.ErrorBorder):g.getColor(C.InputBorder),borderRadius:g.getRadius()},...h}),n&&p.jsx("span",{className:Ie("inline-block border border-solid border-l-0 rounded-r-md",uf[i]),style:{borderColor:l?g.getColor(C.ErrorBorder):g.getColor(C.InputBorder),backgroundColor:g.getColor(C.InputBackground),borderRadius:g.getRadius()},children:n})]}),!!l&&p.jsx("p",{className:"mt-1 text-xs",style:{color:g.getColor(C.ErrorText)},children:l})]})}const gS=(e,t)=>{const n=new Date;n.setFullYear(n.getFullYear()+1),document.cookie=`${e}=${t};expires=${n.toUTCString()};path=/`},vS=v.createContext({}),sI=()=>`${window.location.pathname}_$$_${document.title}`,oI=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},aI=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function lI({children:e}){const[t,n]=v.useState("/"),[r,i]=v.useState(aI());function s(){i([]),localStorage.removeItem("p-history")}const o=a=>{n(a),i(l=>[...new Set([...l,a])]),localStorage.setItem("page",a),localStorage.setItem("p-history",JSON.stringify(r))};return p.jsx(vS.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function td(){return v.useContext(vS)}const xa=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null};function yS({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return p.jsxs("div",{className:r||"",children:[e&&p.jsx(jg,{id:t,required:o,text:e}),p.jsx("select",{id:t,"aria-placeholder":i,value:n,"aria-label":e,className:"light forelect transition-colors duration-200 border border-solid text-gray-900 text-sm rounded-md focus:ring-emerald-500 focus-visible:ring-0 focus-visible:shadow-none outline focus-visible:outline-none focus-visible:ber-emerald-500 focus:border-emerald-500 block w-full px-2 py-2 placeholder-fuchsia-600 caret-emer-500",onChange:l.onChange,required:o,...l,children:s}),!!a&&p.jsx("p",{className:"1 texm text-r500",children:a})]})}const xx={ring:{label:"",input:"relative before:content[''] before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:bg-blue-gray-500 before:opacity-0 before:transition-opacity hover:before:opacity-10"},hover:{label:"hover:bg-secondary transition-colors duration-200 px-2 py-1 rounded-md",input:""}},uI={blue:"checked:border-blue-500 checked:bg-blue-500 checked:before:bg-blue-500",indigo:"checked:border-indigo-500 checked:bg-indigo-500 checked:before:bg-indigo-500",green:"checked:border-green-500 checked:bg-green-500 checked:before:bg-green-500",red:"checked:border-red-500 checked:bg-red-500 checked:before:bg-red-500",orange:"checked:border-orange-500 checked:bg-orange-500 checked:before:bg-orange-500"},cI={sm:"h-4 w-4 lg:h-3 lg:w-3",md:"h-6 w-6 lg:h-5 lg:w-5",lg:"h-8 w-8 lg:h-7 lg:w-7"},dI={sm:"h-3 w-3 lg:h-2.5 lg:w-2.5",md:"h-5 w-5 lg:h-4 lg:w-4",lg:"h-7 w-7 lg:h-6 lg:w-6"};function xS({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:c="md",effect:d="ring",reversed:u=!1,variant:f="blue",error:m,...h}){return p.jsxs("div",{children:[p.jsxs("div",{className:`flex items-center justify-between ${u?"flex-row-reverse":""} ${xx[d].label}`,children:[p.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[p.jsx("input",{id:l,name:t,type:"checkbox",className:`border-gray-200 peer cursor-pointer appearance-none rounded-md border border-solid bg-white transition-all ${uI[f]} ${cI[c]} ${xx[d].input}`,required:n,checked:i,value:r,onChange:g=>s==null?void 0:s(g.target.checked),onBlur:g=>o==null?void 0:o(g.target.checked),...h}),p.jsx("div",{className:"pointer-events-none absolute left-2/4 top-2/4 translate-x-2/4 translate-y-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",children:p.jsx(ie.Check,{className:dI[c]})})]}),p.jsx("label",{className:"disable-highlight mt-px flex grow cursor-pointer select-none items-center justify-between font-light text-gray-800",htmlFor:l,children:e})]}),a&&p.jsx("small",{className:"text-xs text-red-500",children:a}),m&&p.jsx("small",{className:"text-xs text-red-500",children:m})]})}function fI({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return p.jsxs("label",{htmlFor:e,className:Ie("relative flex cursor-pointer items-center rounded-md focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[p.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,defaultChecked:t,onChange:a=>{r&&r(a.target.checked)},className:"peer h-4 w-4 cursor-pointer appearance-none rounded-full border-2 border-slate-300 transition-all checked:border-[5px] checked:border-indigo-600 focus:ring-0 focus:ring-offset-0",disabled:s}),p.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function pI({id:e,label:t,children:n,required:r,className:i,error:s}){return p.jsxs("fieldset",{id:e,className:i,children:[t&&p.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&p.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),p.jsx("div",{className:"flex flex-col gap-1.5 mt-0.5",children:n}),s&&p.jsx("p",{className:"text-red-500 text-sm",children:s})]})}const oc=Object.assign(fI,{Group:pI});function gl({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:c,ariaInvalid:d,inputRef:u,autoFocus:f=!0,style:m,...h}){const g=Se();return p.jsxs("div",{className:Ie({"mb-2":!s},i),children:[t&&p.jsx(jg,{id:e,text:t,required:l}),p.jsx("textarea",{className:Ie("resize-none max-h-36 w-full py-2 px-3 border border-solid block focus:outline-hidden"),id:e,rows:o,"aria-invalid":d,...h,ref:u,autoFocus:f,style:{...m,fontSize:"16px",color:c?g.getColor(C.ErrorText):g.getColor(C.InputText),backgroundColor:g.getColor(C.InputBackground),borderColor:c?g.getColor(C.ErrorBorder):g.getColor(C.InputBorder),borderRadius:g.getRadius()}}),!!c&&p.jsx("p",{className:"mt-1 text-xs",style:{color:g.getColor(C.ErrorText)},children:c})]})}function hI({onOk:e,clientId:t,widgetId:n,appearance:r,aiAgentMode:i=!1,onAIAgentStart:s}){var T,A,S,F,N,O,Q,J,U,$;const o=Se(),{defaultValues:a,widget:l,setIsHaveChat:c}=he(),[d,u]=v.useState(!1),f=td(),m=ug(),h=!!a&&"username"in a,g=(A=(T=r==null?void 0:r.body)==null?void 0:T.inputs)==null?void 0:A.reduce((_,I)=>{let R=I.remember?xa(I.name):a==null?void 0:a[I.name];return I.options&&R&&!I.options.includes(R)&&(R=void 0),I.name==="username"&&h&&(R=a.username),_[I.name]=R||"",_},{}),b=(F=(S=r==null?void 0:r.body)==null?void 0:S.inputs)==null?void 0:F.reduce((_,I)=>(_[I.name]="",_),{}),x=$c((O=(N=r==null?void 0:r.body)==null?void 0:N.inputs)==null?void 0:O.reduce((_,I)=>(_[I.name]=I.required?So().required(`${I.label} alanı zorunludur`):So(),_),{})),y=Eg({init:{...g},schema:x,action:async _=>{var I;if(!d){u(!0);try{h&&(_.username=a.username),a!=null&&a.secret_data&&(_.secret_data=a.secret_data);for(const D in _)typeof _[D]=="string"&&(_[D]=_[D].trim());const[R,P]=await m.mutateAsync({inputs:_,history:f.history,client_id:t,widget_id:n,device_id:gi((l==null?void 0:l.link_id)||""),is_agent_mode:i});if(Ln(P)){Zp(R)&&(Dn(ft.CustomerToken,R.customer_token,(l==null?void 0:l.link_id)||""),Dn(ft.CustomerRefreshToken,R.customer_refresh_token,(l==null?void 0:l.link_id)||""),Dn(ft.DeviceId,R.device_id,(l==null?void 0:l.link_id)||"")),f.clearHistory();for(const D of((I=r==null?void 0:r.body)==null?void 0:I.inputs)||[])D.remember&&gS(D.name,_[D.name]);c(!0),i?s==null||s():e==null||e();return}wo(R,{form:y})}catch(R){console.error("Chat creation error:",R)}finally{u(!1)}}}}),j=(((J=(Q=r==null?void 0:r.body)==null?void 0:Q.inputs)==null?void 0:J.length)||0)>0?!hS(b||{},(y==null?void 0:y.values)||{}):!0,k=o.getColor(C.GreeterBackground);return p.jsx("section",{className:"h-full overflow-y-auto px-4 py-3",style:{backgroundColor:k},children:p.jsxs("form",{autoComplete:"off",className:"grid grid-cols-1 gap-2",onSubmit:_=>{_.preventDefault(),y.handleSubmit()},children:[($=(U=r==null?void 0:r.body)==null?void 0:U.inputs)==null?void 0:$.map(_=>{var I,R;if(["text","email","phone"].includes(_.type))return p.jsx(mS,{id:_.name,name:_.name,type:_.type,label:_.label,value:y.values[_.name],onChange:y.handleChange,onBlur:y.handleBlur,disabled:_.name==="username"&&h,readOnly:_.name==="username"&&h,autoComplete:"off",placeholder:_.placeholder,error:y.errors[_.name],ariaInvalid:y.errors.name?!0:void 0,required:_.required,noMargin:!0},_.name);if(_.type==="select")return p.jsx(yS,{id:_.name,name:_.name,value:y.values[_.name],onChange:y.handleChange,label:_.label,error:y.errors[_.name],required:_.required,children:(I=_.options)==null?void 0:I.map(P=>p.jsx("option",{value:P,children:P},P))},_.name);if(_.type==="checkbox")return p.jsx(xS,{id:_.name,name:_.name,value:y.values[_.name],checked:y.values[_.name]==="true",onChange:y.handleChange,required:_.required,error:y.errors[_.name],children:_.label},_.name);if(_.type==="radio")return p.jsx(oc.Group,{id:_.name,label:_.label,required:_.required,error:y.errors[_.name],children:(R=_.options)==null?void 0:R.map(P=>p.jsx(oc,{onChange:D=>{D?y.setFieldValue(_.name,P):y.setFieldValue(_.name,"")},id:P,name:_.name,value:P===y.values[_.name],children:P},P))},_.name);if(_.type==="textarea")return p.jsx(gl,{id:_.name,name:_.name,value:y.values[_.name],onChange:y.handleChange,placeholder:_.placeholder,error:y.errors[_.name],required:_.required,label:_.label},_.name)}),p.jsx(pt,{textKey:C.GreeterButtonText,bgKey:C.GreeterButtonBackground,type:"submit",disabled:!j||d,className:"mt-2 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:d?p.jsxs("div",{className:"flex items-center justify-center",children:[p.jsx("span",{className:"mr-2",children:"Yükleniyor"}),p.jsx("span",{className:"animate-pulse",children:"..."})]}):"Sohbet Oluştur"})]})})}var Nn=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e.Agent="agent",e))(Nn||{}),jn=(e=>(e.AdminJoin="admin_join",e.AdminLeave="admin_leave",e.ChatCreated="chat_created",e.AdminToggleUpload="admin_toggle_upload",e))(jn||{}),ye=(e=>(e.Customer="customer",e.User="user",e.Agent="agent",e.System="system",e.Activity="activity",e))(ye||{});const No=e=>{const t=Bb(),n=(r,i)=>{var o;const s=((o=AB.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,c])=>a.replace(`:${l}`,c),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}};var mI={exports:{}},cf={exports:{}},wx;function wS(){return wx||(wx=1,function(e,t){(function(n,r){e.exports=r()})(Th,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",l="hour",c="day",d="week",u="month",f="quarter",m="year",h="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(U){var $=["th","st","nd","rd"],_=U%100;return"["+U+($[(_-20)%10]||$[_]||$[0])+"]"}},w=function(U,$,_){var I=String(U);return!I||I.length>=$?U:""+Array($+1-I.length).join(_)+U},j={s:w,z:function(U){var $=-U.utcOffset(),_=Math.abs($),I=Math.floor(_/60),R=_%60;return($<=0?"+":"-")+w(I,2,"0")+":"+w(R,2,"0")},m:function U($,_){if($.date()<_.date())return-U(_,$);var I=12*(_.year()-$.year())+(_.month()-$.month()),R=$.clone().add(I,u),P=_-R<0,D=$.clone().add(I+(P?-1:1),u);return+(-(I+(_-R)/(P?R-D:D-R))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:u,y:m,w:d,d:c,D:h,h:l,m:a,s:o,ms:s,Q:f}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},k="en",T={};T[k]=y;var A="$isDayjsObject",S=function(U){return U instanceof Q||!(!U||!U[A])},F=function U($,_,I){var R;if(!$)return k;if(typeof $=="string"){var P=$.toLowerCase();T[P]&&(R=P),_&&(T[P]=_,R=P);var D=$.split("-");if(!R&&D.length>1)return U(D[0])}else{var B=$.name;T[B]=$,R=B}return!I&&R&&(k=R),R||!I&&k},N=function(U,$){if(S(U))return U.clone();var _=typeof $=="object"?$:{};return _.date=U,_.args=arguments,new Q(_)},O=j;O.l=F,O.i=S,O.w=function(U,$){return N(U,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var Q=function(){function U(_){this.$L=F(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[A]=!0}var $=U.prototype;return $.parse=function(_){this.$d=function(I){var R=I.date,P=I.utc;if(R===null)return new Date(NaN);if(O.u(R))return new Date;if(R instanceof Date)return new Date(R);if(typeof R=="string"&&!/Z$/i.test(R)){var D=R.match(b);if(D){var B=D[2]-1||0,V=(D[7]||"0").substring(0,3);return P?new Date(Date.UTC(D[1],B,D[3]||1,D[4]||0,D[5]||0,D[6]||0,V)):new Date(D[1],B,D[3]||1,D[4]||0,D[5]||0,D[6]||0,V)}}return new Date(R)}(_),this.init()},$.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},$.$utils=function(){return O},$.isValid=function(){return this.$d.toString()!==g},$.isSame=function(_,I){var R=N(_);return this.startOf(I)<=R&&R<=this.endOf(I)},$.isAfter=function(_,I){return N(_)<this.startOf(I)},$.isBefore=function(_,I){return this.endOf(I)<N(_)},$.$g=function(_,I,R){return O.u(_)?this[I]:this.set(R,_)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(_,I){var R=this,P=!!O.u(I)||I,D=O.p(_),B=function(se,pe){var Te=O.w(R.$u?Date.UTC(R.$y,pe,se):new Date(R.$y,pe,se),R);return P?Te:Te.endOf(c)},V=function(se,pe){return O.w(R.toDate()[se].apply(R.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(pe)),R)},Y=this.$W,z=this.$M,Z=this.$D,K="set"+(this.$u?"UTC":"");switch(D){case m:return P?B(1,0):B(31,11);case u:return P?B(1,z):B(0,z+1);case d:var ae=this.$locale().weekStart||0,G=(Y<ae?Y+7:Y)-ae;return B(P?Z-G:Z+(6-G),z);case c:case h:return V(K+"Hours",0);case l:return V(K+"Minutes",1);case a:return V(K+"Seconds",2);case o:return V(K+"Milliseconds",3);default:return this.clone()}},$.endOf=function(_){return this.startOf(_,!1)},$.$set=function(_,I){var R,P=O.p(_),D="set"+(this.$u?"UTC":""),B=(R={},R[c]=D+"Date",R[h]=D+"Date",R[u]=D+"Month",R[m]=D+"FullYear",R[l]=D+"Hours",R[a]=D+"Minutes",R[o]=D+"Seconds",R[s]=D+"Milliseconds",R)[P],V=P===c?this.$D+(I-this.$W):I;if(P===u||P===m){var Y=this.clone().set(h,1);Y.$d[B](V),Y.init(),this.$d=Y.set(h,Math.min(this.$D,Y.daysInMonth())).$d}else B&&this.$d[B](V);return this.init(),this},$.set=function(_,I){return this.clone().$set(_,I)},$.get=function(_){return this[O.p(_)]()},$.add=function(_,I){var R,P=this;_=Number(_);var D=O.p(I),B=function(z){var Z=N(P);return O.w(Z.date(Z.date()+Math.round(z*_)),P)};if(D===u)return this.set(u,this.$M+_);if(D===m)return this.set(m,this.$y+_);if(D===c)return B(1);if(D===d)return B(7);var V=(R={},R[a]=r,R[l]=i,R[o]=n,R)[D]||1,Y=this.$d.getTime()+_*V;return O.w(Y,this)},$.subtract=function(_,I){return this.add(-1*_,I)},$.format=function(_){var I=this,R=this.$locale();if(!this.isValid())return R.invalidDate||g;var P=_||"YYYY-MM-DDTHH:mm:ssZ",D=O.z(this),B=this.$H,V=this.$m,Y=this.$M,z=R.weekdays,Z=R.months,K=R.meridiem,ae=function(pe,Te,le,Ke){return pe&&(pe[Te]||pe(I,P))||le[Te].slice(0,Ke)},G=function(pe){return O.s(B%12||12,pe,"0")},se=K||function(pe,Te,le){var Ke=pe<12?"AM":"PM";return le?Ke.toLowerCase():Ke};return P.replace(x,function(pe,Te){return Te||function(le){switch(le){case"YY":return String(I.$y).slice(-2);case"YYYY":return O.s(I.$y,4,"0");case"M":return Y+1;case"MM":return O.s(Y+1,2,"0");case"MMM":return ae(R.monthsShort,Y,Z,3);case"MMMM":return ae(Z,Y);case"D":return I.$D;case"DD":return O.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return ae(R.weekdaysMin,I.$W,z,2);case"ddd":return ae(R.weekdaysShort,I.$W,z,3);case"dddd":return z[I.$W];case"H":return String(B);case"HH":return O.s(B,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return se(B,V,!0);case"A":return se(B,V,!1);case"m":return String(V);case"mm":return O.s(V,2,"0");case"s":return String(I.$s);case"ss":return O.s(I.$s,2,"0");case"SSS":return O.s(I.$ms,3,"0");case"Z":return D}return null}(pe)||D.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(_,I,R){var P,D=this,B=O.p(I),V=N(_),Y=(V.utcOffset()-this.utcOffset())*r,z=this-V,Z=function(){return O.m(D,V)};switch(B){case m:P=Z()/12;break;case u:P=Z();break;case f:P=Z()/3;break;case d:P=(z-Y)/6048e5;break;case c:P=(z-Y)/864e5;break;case l:P=z/i;break;case a:P=z/r;break;case o:P=z/n;break;default:P=z}return R?P:O.a(P)},$.daysInMonth=function(){return this.endOf(u).$D},$.$locale=function(){return T[this.$L]},$.locale=function(_,I){if(!_)return this.$L;var R=this.clone(),P=F(_,I,!0);return P&&(R.$L=P),R},$.clone=function(){return O.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},U}(),J=Q.prototype;return N.prototype=J,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",c],["$M",u],["$y",m],["$D",h]].forEach(function(U){J[U[1]]=function($){return this.$g($,U[0],U[1])}}),N.extend=function(U,$){return U.$i||(U($,Q,N),U.$i=!0),N},N.locale=F,N.isDayjs=S,N.unix=function(U){return N(1e3*U)},N.en=T[k],N.Ls=T,N.p={},N})}(cf)),cf.exports}(function(e,t){(function(n,r){e.exports=r(wS())})(Th,function(n){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var i=r(n),s={name:"tr",weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekStart:1,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(o){return o+"."}};return i.default.locale(s,null,!0),s})})(mI);var bS={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Th,function(){return function(n,r,i){n=n||{};var s=r.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(c,d,u,f){return s.fromToBase(c,d,u,f)}i.en.relativeTime=o,s.fromToBase=function(c,d,u,f,m){for(var h,g,b,x=u.$locale().relativeTime||o,y=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],w=y.length,j=0;j<w;j+=1){var k=y[j];k.d&&(h=f?i(c).diff(u,k.d,!0):u.diff(c,k.d,!0));var T=(n.rounding||Math.round)(Math.abs(h));if(b=h>0,T<=k.r||!k.r){T<=1&&j>0&&(k=y[j-1]);var A=x[k.l];m&&(T=m(""+T)),g=typeof A=="string"?A.replace("%d",T):A(T,d,k.l,b);break}}if(d)return g;var S=b?x.future:x.past;return typeof S=="function"?S(g):S.replace("%s",g)},s.to=function(c,d){return a(c,d,this,!0)},s.from=function(c,d){return a(c,d,this)};var l=function(c){return c.$u?i.utc():i()};s.toNow=function(c){return this.to(l(this),c)},s.fromNow=function(c){return this.from(l(this),c)}}})})(bS);var gI=bS.exports;const vI=_r(gI);var yI=wS();const df=_r(yI),xI=(e="tr")=>(df.extend(vI),df.locale(e),df);function wI({onShowForm:e,onHasHistory:t}){const{widget:n,setHistoryChat:r,setHistoryMessages:i}=he(),s=Se(),o=No(),a=xI(),l=n!=null&&n.link_id?gi(n.link_id):null,{data:c,isLoading:d}=BM((n==null?void 0:n.link_id)||"",l||"");if(v.useEffect(()=>{if(!d&&c){const[g,b]=c,x=Ln(b)&&Array.isArray(g)&&g.length>0;t&&t(x),x||e&&e()}},[d,c,e,t]),!(n!=null&&n.link_id))return null;if(d)return p.jsx("div",{className:"p-4 text-center text-sm opacity-50",children:"Yükleniyor..."});if(!c)return null;const[u,f]=c;if(!Ln(f)||!Array.isArray(u)||u.length===0)return null;const m=g=>a(g).fromNow(),h=g=>g.who_joined_details&&Array.isArray(g.who_joined_details)&&g.who_joined_details.length>0&&g.who_joined_details[0].name||"Sohbet";return p.jsxs("div",{className:"flex flex-col h-full",children:[p.jsx("h3",{className:"text-xs font-semibold uppercase mb-3 px-1 flex-shrink-0",style:{color:s.getColor(C.GreeterText)},children:"GEÇMİŞ SOHBETLER"}),p.jsx("div",{className:"flex-1 overflow-y-auto space-y-3 pr-1 min-h-0",children:u.map(g=>p.jsxs("div",{className:"p-4 rounded-lg cursor-pointer transition-all hover:shadow-md",style:{backgroundColor:s.getColor(C.InputBackground),borderColor:s.getColor(C.InputBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:s.getRadius(),boxShadow:`0 1px 3px 0 ${s.getColor(C.ShadowColor)}`},onClick:()=>{r(g),i(null),o.push("chat")},children:[p.jsxs("div",{className:"flex justify-between items-start mb-2",children:[p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:"font-semibold text-base mb-1 truncate",style:{color:s.getColor(C.InputText)},children:h(g)}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:g.status===Nn.Open?s.getColor(C.SuccessText)||"#10b981":s.getColor(C.FooterText)||"#6b7280"}}),p.jsx("span",{className:"text-xs",style:{color:s.getColor(C.FooterText)},children:g.status===Nn.Open?"Açık":"Sonlandı"})]})]}),p.jsx("div",{className:"text-xs ml-2 flex-shrink-0",style:{color:s.getColor(C.FooterText)},children:m(g.created_at)})]}),p.jsxs("div",{className:"flex items-center gap-2 mt-3 pt-3 border-t",style:{borderTopColor:s.getColor(C.DividerColor)},children:[p.jsx(ie.Eye,{className:"w-4 h-4",style:{color:s.getColor(C.FooterText)}}),p.jsx("span",{className:"text-xs",style:{color:s.getColor(C.FooterText)},children:"İncele"})]})]},g._id))})]})}const ar=Object.create(null);ar.open="0";ar.close="1";ar.ping="2";ar.pong="3";ar.message="4";ar.upgrade="5";ar.noop="6";const vu=Object.create(null);Object.keys(ar).forEach(e=>{vu[ar[e]]=e});const uh={type:"error",data:"parser error"},CS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",kS=typeof ArrayBuffer=="function",SS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ag=({type:e,data:t},n,r)=>CS&&t instanceof Blob?n?r(t):bx(t,r):kS&&(t instanceof ArrayBuffer||SS(t))?n?r(t):bx(new Blob([t]),r):r(ar[e]+(t||"")),bx=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Cx(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ff;function bI(e,t){if(CS&&e.data instanceof Blob)return e.data.arrayBuffer().then(Cx).then(t);if(kS&&(e.data instanceof ArrayBuffer||SS(e.data)))return t(Cx(e.data));Ag(e,!1,n=>{ff||(ff=new TextEncoder),t(ff.encode(n))})}const kx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ra=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<kx.length;e++)ra[kx.charCodeAt(e)]=e;const CI=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),d=new Uint8Array(c);for(r=0;r<n;r+=4)s=ra[e.charCodeAt(r)],o=ra[e.charCodeAt(r+1)],a=ra[e.charCodeAt(r+2)],l=ra[e.charCodeAt(r+3)],d[i++]=s<<2|o>>4,d[i++]=(o&15)<<4|a>>2,d[i++]=(a&3)<<6|l&63;return c},kI=typeof ArrayBuffer=="function",Rg=(e,t)=>{if(typeof e!="string")return{type:"message",data:TS(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:SI(e.substring(1),t)}:vu[n]?e.length>1?{type:vu[n],data:e.substring(1)}:{type:vu[n]}:uh},SI=(e,t)=>{if(kI){const n=CI(e);return TS(n,t)}else return{base64:!0,data:e}},TS=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},_S="",TI=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{Ag(s,!1,a=>{r[o]=a,++i===n&&t(r.join(_S))})})},_I=(e,t)=>{const n=e.split(_S),r=[];for(let i=0;i<n.length;i++){const s=Rg(n[i],t);if(r.push(s),s.type==="error")break}return r};function EI(){return new TransformStream({transform(e,t){bI(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let pf;function Gl(e){return e.reduce((t,n)=>t+n.length,0)}function Yl(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function jI(e,t){pf||(pf=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(Gl(n)<1)break;const l=Yl(n,1);s=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Gl(n)<2)break;const l=Yl(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Gl(n)<8)break;const l=Yl(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(uh);break}i=d*Math.pow(2,32)+c.getUint32(4),r=3}else{if(Gl(n)<i)break;const l=Yl(n,i);a.enqueue(Rg(s?l:pf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(uh);break}}}})}const ES=4;function rt(e){if(e)return AI(e)}function AI(e){for(var t in rt.prototype)e[t]=rt.prototype[t];return e}rt.prototype.on=rt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};rt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};rt.prototype.off=rt.prototype.removeListener=rt.prototype.removeAllListeners=rt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};rt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};rt.prototype.emitReserved=rt.prototype.emit;rt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};rt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const nd=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),gn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),RI="arraybuffer";function jS(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const PI=gn.setTimeout,OI=gn.clearTimeout;function rd(e,t){t.useNativeTimers?(e.setTimeoutFn=PI.bind(gn),e.clearTimeoutFn=OI.bind(gn)):(e.setTimeoutFn=gn.setTimeout.bind(gn),e.clearTimeoutFn=gn.clearTimeout.bind(gn))}const MI=1.33;function DI(e){return typeof e=="string"?NI(e):Math.ceil((e.byteLength||e.size)*MI)}function NI(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function AS(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function FI(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function II(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class LI extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Pg extends rt{constructor(t){super(),this.writable=!1,rd(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new LI(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Rg(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=FI(t);return n.length?"?"+n:""}}class $I extends Pg{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};_I(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,TI(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=AS()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let RS=!1;try{RS=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const BI=RS;function zI(){}class VI extends $I{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class sr extends rt{constructor(t,n,r){super(),this.createRequest=t,rd(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=jS(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=sr.requestsCount++,sr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=zI,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete sr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}sr.requestsCount=0;sr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Sx);else if(typeof addEventListener=="function"){const e="onpagehide"in gn?"pagehide":"unload";addEventListener(e,Sx,!1)}}function Sx(){for(let e in sr.requests)sr.requests.hasOwnProperty(e)&&sr.requests[e].abort()}const UI=function(){const e=PS({xdomain:!1});return e&&e.responseType!==null}();class HI extends VI{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=UI&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new sr(PS,this.uri(),t)}}function PS(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||BI))return new XMLHttpRequest}catch{}if(!t)try{return new gn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const OS=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class WI extends Pg{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=OS?{}:jS(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;Ag(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&nd(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=AS()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const hf=gn.WebSocket||gn.MozWebSocket;class qI extends WI{createSocket(t,n,r){return OS?new hf(t,n,r):n?new hf(t,n):new hf(t)}doWrite(t,n){this.ws.send(n)}}class GI extends Pg{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=jI(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=EI();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&nd(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const YI={websocket:qI,webtransport:GI,polling:HI},QI=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,KI=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ch(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=QI.exec(e||""),s={},o=14;for(;o--;)s[KI[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=XI(s,s.path),s.queryKey=ZI(s,s.query),s}function XI(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function ZI(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const dh=typeof addEventListener=="function"&&typeof removeEventListener=="function",yu=[];dh&&addEventListener("offline",()=>{yu.forEach(e=>e())},!1);class ui extends rt{constructor(t,n){if(super(),this.binaryType=RI,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=ch(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=ch(n.host).host);rd(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=II(this.opts.query)),dh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},yu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=ES,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&ui.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",ui.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=DI(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,nd(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(ui.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),dh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=yu.indexOf(this._offlineEventListener);r!==-1&&yu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ui.protocol=ES;class JI extends ui{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;ui.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ui.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function s(){r||(r=!0,d(),n.close(),n=null)}const o=u=>{const f=new Error("probe error: "+u);f.transport=n.name,s(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function c(u){n&&u.name!==n.name&&s()}const d=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let eL=class extends JI{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>YI[i]).filter(i=>!!i)),super(t,r)}};function tL(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=ch(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const nL=typeof ArrayBuffer=="function",rL=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,MS=Object.prototype.toString,iL=typeof Blob=="function"||typeof Blob<"u"&&MS.call(Blob)==="[object BlobConstructor]",sL=typeof File=="function"||typeof File<"u"&&MS.call(File)==="[object FileConstructor]";function Og(e){return nL&&(e instanceof ArrayBuffer||rL(e))||iL&&e instanceof Blob||sL&&e instanceof File}function xu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(xu(e[n]))return!0;return!1}if(Og(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return xu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&xu(e[n]))return!0;return!1}function oL(e){const t=[],n=e.data,r=e;return r.data=fh(n,t),r.attachments=t.length,{packet:r,buffers:t}}function fh(e,t){if(!e)return e;if(Og(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=fh(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=fh(e[r],t));return n}return e}function aL(e,t){return e.data=ph(e.data,t),delete e.attachments,e}function ph(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=ph(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ph(e[n],t));return e}const lL=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],uL=5;var be;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(be||(be={}));class cL{constructor(t){this.replacer=t}encode(t){return(t.type===be.EVENT||t.type===be.ACK)&&xu(t)?this.encodeAsBinary({type:t.type===be.EVENT?be.BINARY_EVENT:be.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===be.BINARY_EVENT||t.type===be.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=oL(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Tx(e){return Object.prototype.toString.call(e)==="[object Object]"}class Mg extends rt{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===be.BINARY_EVENT;r||n.type===be.BINARY_ACK?(n.type=r?be.EVENT:be.ACK,this.reconstructor=new dL(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Og(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(be[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===be.BINARY_EVENT||r.type===be.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(Mg.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case be.CONNECT:return Tx(n);case be.DISCONNECT:return n===void 0;case be.CONNECT_ERROR:return typeof n=="string"||Tx(n);case be.EVENT:case be.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&lL.indexOf(n[0])===-1);case be.ACK:case be.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class dL{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=aL(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const fL=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Mg,Encoder:cL,get PacketType(){return be},protocol:uL},Symbol.toStringTag,{value:"Module"}));function Pn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const pL=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class DS extends rt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Pn(t,"open",this.onopen.bind(this)),Pn(t,"packet",this.onpacket.bind(this)),Pn(t,"error",this.onerror.bind(this)),Pn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(pL.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:be.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,u=n.pop();this._registerAckCallback(d,u),o.id=d}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:be.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case be.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case be.EVENT:case be.BINARY_EVENT:this.onevent(t);break;case be.ACK:case be.BINARY_ACK:this.onack(t);break;case be.DISCONNECT:this.ondisconnect();break;case be.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:be.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:be.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Fo(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Fo.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Fo.prototype.reset=function(){this.attempts=0};Fo.prototype.setMin=function(e){this.ms=e};Fo.prototype.setMax=function(e){this.max=e};Fo.prototype.setJitter=function(e){this.jitter=e};class hh extends rt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,rd(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Fo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||fL;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new eL(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Pn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=Pn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Pn(t,"ping",this.onping.bind(this)),Pn(t,"data",this.ondata.bind(this)),Pn(t,"error",this.onerror.bind(this)),Pn(t,"close",this.onclose.bind(this)),Pn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){nd(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new DS(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Qo={};function wu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=tL(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=Qo[i]&&s in Qo[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new hh(r,t):(Qo[i]||(Qo[i]=new hh(r,t)),l=Qo[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(wu,{Manager:hh,Socket:DS,io:wu,connect:wu});const NS=v.createContext(null),Rr=()=>{const e=v.useContext(NS);if(!e)throw new Error("useWebsocket must be used within a WebSocketProvider");return e},hL=({children:e})=>{const{widget:t,isHaveChat:n,isAIAgentMode:r}=he(),i=v.useRef(null),s=v.useRef(!1),o=v.useRef(!1),a=v.useRef(null),[l,c]=v.useState(!1),[d,u]=v.useState(!1),f=v.useCallback(k=>{i.current&&(console.log("WS: Cleaning up existing socket.",k||""),i.current.removeAllListeners(),i.current.disconnect(),i.current=null),c(!1),u(!1),o.current=!1,s.current=!1,a.current=null},[]),m=v.useCallback((k,T,A)=>{if(a.current===k&&(o.current||i.current&&i.current.connected)){console.log("WS: Connect called but already connecting or connected for same linkId.");return}if(!T&&!A){console.log("WS: Connect skipped - no active chat or AI agent mode");return}const S=pu(ft.CustomerToken,k)||xa("customer_token"),F=pu(ft.CustomerRefreshToken,k)||xa("customer_refresh_token");if(!S||!F){console.log("WS: Connect skipped - missing required tokens");return}if(i.current&&!i.current.connected&&(console.log("WS: Cleaning up disconnected socket before new connection"),i.current.removeAllListeners(),i.current.disconnect(),i.current=null),i.current&&i.current.connected){console.log("WS: Already connected, skipping new connection");return}console.log("WS: Attempting to connect...",k),o.current=!0,a.current=k;const N=wu(nE,{transports:["websocket"],forceNew:!0,timeout:1e4,auth:{customer_token:S,device_id:pu(ft.DeviceId,k)||xa("device_id"),customer_refresh_token:F}});i.current=N,N.on("error",O=>{console.error("WS: Websocket error",O),o.current=!1}),N.on("connect_error",O=>{console.error("WS: Connect error",O),o.current=!1,c(!1),i.current===N&&(i.current=null,a.current=null)}),N.on("disconnect",O=>{var J;console.log("WS: Disconnected",O),c(!1),u(!1),o.current=!1,s.current=!1,i.current===N&&(i.current=null,a.current=null);const Q=he.getState();O==="io server disconnect"&&((J=Q.widget)!=null&&J.link_id)&&(Q.isHaveChat||Q.isAIAgentMode)&&(console.log("WS: Server disconnect, attempting reconnect..."),setTimeout(()=>{m(Q.widget.link_id,Q.isHaveChat,Q.isAIAgentMode)},500))}),N.on("connect",()=>{console.log("WS: Connected successfully"),c(!0),o.current=!1}),N.on("connection:ready",()=>{console.log("WS: Connection ready received"),s.current=!0,u(!0)})},[]);v.useEffect(()=>{const k=t==null?void 0:t.link_id;return k&&(n||r)?(console.log("WS: Auto-connecting due to linkId and isHaveChat/isAIAgentMode",{isHaveChat:n,isAIAgentMode:r}),m(k,n,r)):!n&&!r&&(console.log("WS: Auto-disconnect due to no isHaveChat and no isAIAgentMode"),f("no active chat flags")),()=>{}},[t==null?void 0:t.link_id,n,r,m,f]),v.useEffect(()=>()=>{console.log("WS: Provider unmounting, cleaning up"),f("provider unmount")},[f]);const h=v.useCallback(()=>{const k=t==null?void 0:t.link_id;k?m(k,n,r):console.warn("WS: Manual connect failed, no link_id available.")},[t==null?void 0:t.link_id,n,r,m]),g=v.useCallback(()=>{console.log("WS: Reconnecting..."),f("manual reconnect");const k=t==null?void 0:t.link_id;k&&setTimeout(()=>{m(k,n,r)},100)},[t==null?void 0:t.link_id,n,r,m,f]),b=v.useCallback(()=>{console.log("WS: Manual disconnect"),f("manual disconnect")},[f]),x=v.useCallback((k,T)=>{var A;(A=i.current)==null||A.on(k,T)},[]),y=v.useCallback((k,T)=>{var A;(A=i.current)==null||A.off(k,T)},[]),w=v.useCallback((k,T,A)=>{i.current&&i.current.connected?i.current.emit(k,T,A):console.warn(`WS: Cannot emit event '${k}', socket not connected.`)},[]),j=v.useMemo(()=>({connectionReady:d,connected:l,connect:h,reconnect:g,disconnect:b,on:x,off:y,emit:w}),[l,d,h,g,b,x,y,w]);return p.jsx(NS.Provider,{value:j,children:e})},ac=(e,t,n)=>{const r=typeof window<"u"?window:void 0;v.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},Io=()=>{let e=!1,t=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true",t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent)),e||t},id=()=>{let e=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true"),e};var tt=(e=>(e.ChatView="chat:user:view",e.ChatClose="chat:user:close",e.MessageList="message:list",e.MessageCreate="message:create",e.MessageTyping="message:typing",e.WidgetOpen="widget:open",e.WidgetClose="widget:close",e.PageChange="page-change",e.MessageRead="message:read",e.AgentRequestHuman="agent:request:human",e.AgentMessageCreate="agent:message:create",e.ChatUpdateInputs="chat:update:inputs",e))(tt||{}),Ce=(e=>(e.Connect="connect",e.Disconnect="disconnect",e.ConnectionReady="connection:ready",e.MessageAgentCreate="message:agent:create",e.MessageUserCreate="message:user:create",e.MessageCustomerCreate="message:customer:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e.ChatToggleUpload="chat:user:upload:toggle",e.ChatUserShowButton="chat:user:show-button",e.ChatUserLeave="chat:user:leave",e.ChatUserJoin="chat:user:join",e))(Ce||{});function mL(){const e=td(),t=v.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return ac("popstate",t),null}function gL(){const e=Rr(),t=td(),n=v.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(tt.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return ac("popstate",n),v.useEffect(()=>{if(!e)return;const r=oI(),i=sI();r!==i&&(e.emit(tt.PageChange,{page:i}),t.setPage(i))},[e]),null}function vL(){return mL(),null}const _x=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function yL(){var J,U,$,_;const e=Se(),{widget:t,setOpen:n,setAIAgent:r,setIsAIAgentMode:i,setIsHaveChat:s}=he(),[o,a]=v.useState(!1),[l,c]=v.useState(!1),d=No(),u=Io(),f=id(),[m,h]=v.useState(!0),[g,b]=v.useState(!1),x=td(),y=ug(),[w,j]=v.useState(null),k=v.useRef(!1),T=pl();if(!t)return null;const A=()=>{n(!1)};v.useEffect(()=>{if(!t||k.current)return;k.current=!0;const I=ef(t.link_id);if(I.isAgentMode&&I.agent&&(T!=null&&T.accessToken)){r(I.agent),i(!0),I.sessionId&&he.getState().setAIAgentSessionId(I.sessionId),j(I.agent),d.push("chat");return}(async()=>{try{const[P,D]=await VM(t.link_id);D===200&&P&&"is_active"in P&&P.is_active&&j(P)}catch(P){console.error("Failed to check AI agent:",P)}})()},[t,T,d,r,i]),v.useEffect(()=>{if(o||!T||!T.accessToken)return;const I=ef(t.link_id);I.isAgentMode&&I.agent||DM(t.client_id,Xi(T)).then(([R,P])=>{if(Ln(P))d.push("chat");else if(P===403){const D=ef(t.link_id);D.isAgentMode&&D.agent?(r(D.agent),i(!0),D.sessionId&&he.getState().setAIAgentSessionId(D.sessionId),d.push("chat")):(Zs(t.link_id||""),a(!0))}else Zs(t.link_id||""),a(!0)}).catch(()=>{Zs(t.link_id||""),a(!0)})},[o,d,r,i]);const S=_x(((U=(J=t.appearance)==null?void 0:J.head)==null?void 0:U.elements)||[],"text"),F=_x(((_=($=t.appearance)==null?void 0:$.head)==null?void 0:_.elements)||[],"title"),N=async()=>{var R,P,D;he.getState().setHistoryChat(null),he.getState().setHistoryMessages(null),he.getState().clearAIAgentState();const I=(((D=(P=(R=t.appearance)==null?void 0:R.body)==null?void 0:P.inputs)==null?void 0:D.length)||0)>0;if(w){if(l)return;c(!0);try{const[B,V]=await y.mutateAsync({inputs:{username:"Ziyaretçi",email:`visitor_${Date.now()}@temp.local`},history:x.history,client_id:t.client_id,widget_id:t.link_id,device_id:gi(t.link_id),is_agent_mode:!0});Ln(V)&&Zp(B)?(Dn(ft.CustomerToken,B.customer_token,t.link_id),Dn(ft.CustomerRefreshToken,B.customer_refresh_token,t.link_id),Dn(ft.DeviceId,B.device_id,t.link_id),x.clearHistory(),s(!0),r(w),i(!0),d.push("chat")):(wo(B),I&&h(!1))}catch(B){console.error("Error creating chat for AI agent:",B),I&&h(!1)}finally{c(!1)}return}if(!I){if(l)return;c(!0);try{const[B,V]=await y.mutateAsync({inputs:{},history:x.history,client_id:t.client_id,widget_id:t.link_id,device_id:gi(t.link_id)});Ln(V)&&Zp(B)?(Dn(ft.CustomerToken,B.customer_token,t.link_id),Dn(ft.CustomerRefreshToken,B.customer_refresh_token,t.link_id),Dn(ft.DeviceId,B.device_id,t.link_id),x.clearHistory(),s(!0),d.push("chat")):wo(B)}catch(B){console.error("Error creating chat:",B)}finally{c(!1)}return}h(!1)},O=()=>{h(!0)},Q=()=>{w&&(r(w),i(!0),he.getState().setHistoryChat(null),he.getState().setHistoryMessages(null),d.push("chat"))};return p.jsxs("div",{className:"h-full w-full flex flex-col relative overflow-hidden",children:[p.jsxs("header",{className:"relative flex items-center justify-between px-4 py-4 flex-shrink-0",style:{backgroundColor:e.getColor(C.HeaderBackground),color:e.getColor(C.HeaderText),borderBottom:`1px solid ${e.getColor(C.HeaderBorder)}`,borderTopLeftRadius:u?"":e.getRadius(),borderTopRightRadius:u?"":e.getRadius()},children:[p.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[!m&&g&&p.jsx("button",{type:"button",onClick:O,className:"flex-shrink-0 p-1 hover:opacity-80 transition-opacity",style:{color:e.getColor(C.HeaderText)},children:p.jsx(ie.ArrowLeft,{className:"w-5 h-5"})}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:"text-lg font-bold truncate",style:{color:e.getColor(C.HeaderText)},children:F||"Müşteri Hizmetleri"}),S&&p.jsx("div",{className:"text-sm opacity-90 truncate",style:{color:e.getColor(C.HeaderText)},children:S})]})]}),!f&&p.jsx("button",{type:"button",onClick:A,className:"flex-shrink-0 p-1 hover:opacity-80 transition-opacity ml-2",style:{color:e.getColor(C.HeaderText)},children:p.jsx(ie.X,{className:"w-5 h-5"})})]}),p.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-h-0",style:{backgroundColor:e.getColor(C.Background)},children:m?p.jsx("div",{className:"px-4 pt-4 pb-2 flex-1 overflow-hidden flex flex-col min-h-0",children:p.jsx(wI,{onShowForm:()=>h(!1),onHasHistory:I=>b(I)})}):p.jsx("div",{className:"flex-1 overflow-y-auto",children:p.jsx(hI,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,aiAgentMode:!!w,onAIAgentStart:Q,onOk:()=>{he.getState().setHistoryChat(null),he.getState().setHistoryMessages(null),d.push("chat")}})})}),m&&g&&p.jsx("div",{className:"px-4 py-3 border-t flex-shrink-0",style:{borderTopColor:e.getColor(C.DividerColor),backgroundColor:e.getColor(C.Background)},children:p.jsxs(pt,{onClick:N,className:"w-full py-3 rounded-lg font-medium flex items-center justify-center gap-2 transition-all",style:{backgroundColor:e.getColor(C.ButtonBackground),color:e.getColor(C.ButtonText),borderRadius:e.getRadius()},children:[p.jsx(ie.Plus,{className:"w-5 h-5"}),p.jsx("span",{children:"Yeni Sohbet Başlat"})]})})]})}function xL(){return p.jsxs(p.Fragment,{children:[p.jsx(yL,{}),p.jsx(vL,{})]})}const wL=[{path:"/",component:xL,name:"registration"}];function Je({className:e="",style:t}){const n=Se();return p.jsx("div",{className:`animate-pulse rounded ${e}`,style:{backgroundColor:n.getColor(C.MessageAdminBackground),opacity:.6,...t}})}function bL(){const e=Se();return p.jsxs("section",{className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[p.jsx("div",{className:"flex w-full items-center justify-start",children:p.jsx(Je,{className:"h-12 w-3/5",style:{borderRadius:e.getRadius()}})}),p.jsx("div",{className:"flex w-full items-center justify-end",children:p.jsx(Je,{className:"h-10 w-2/5",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(C.MessageVisitorBackground),opacity:.4}})}),p.jsx("div",{className:"flex w-full items-center justify-start",children:p.jsx(Je,{className:"h-16 w-4/5",style:{borderRadius:e.getRadius()}})}),p.jsx("div",{className:"flex w-full items-center justify-end",children:p.jsx(Je,{className:"h-8 w-1/3",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(C.MessageVisitorBackground),opacity:.4}})}),p.jsx("div",{className:"flex w-full items-center justify-start",children:p.jsx(Je,{className:"h-10 w-1/2",style:{borderRadius:e.getRadius()}})})]})}function CL(){const e=Se();return p.jsxs("div",{className:"p-3 flex items-center gap-3",style:{backgroundColor:e.getColor(C.FooterBackground),borderRadius:e.getRadius()},children:[p.jsx("div",{className:"grow",children:p.jsx(Je,{className:"h-12 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(C.InputBackground)}})}),p.jsx(Je,{className:"h-12 w-12 rounded-full"})]})}function kL(){const e=Se();return p.jsxs("header",{className:"p-4 flex justify-between items-center z-10",style:{backgroundColor:e.getColor(C.HeaderBackground),borderBottom:`1px solid ${e.getColor(C.HeaderBorder)}`},children:[p.jsx(Je,{className:"h-5 w-36"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Je,{className:"h-5 w-5 rounded"}),p.jsx(Je,{className:"h-5 w-5 rounded"})]})]})}function SL(){const e=Se();return p.jsx("section",{className:"h-full overflow-y-auto px-4 py-3",style:{backgroundColor:e.getColor(C.GreeterBackground)},children:p.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[p.jsxs("div",{children:[p.jsx(Je,{className:"h-4 w-20 mb-1"}),p.jsx(Je,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(C.InputBackground)}})]}),p.jsxs("div",{children:[p.jsx(Je,{className:"h-4 w-24 mb-1"}),p.jsx(Je,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(C.InputBackground)}})]}),p.jsxs("div",{children:[p.jsx(Je,{className:"h-4 w-16 mb-1"}),p.jsx(Je,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(C.InputBackground)}})]}),p.jsx(Je,{className:"h-11 w-full mt-2",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(C.GreeterButtonBackground),opacity:.5}})]})})}function TL(){const e=Se();return p.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",style:{backgroundColor:e.getColor(C.GreeterTopBackground)},children:[p.jsx(Je,{className:"h-7 w-40"}),p.jsx(Je,{className:"h-4 w-56"})]})}function FS(){const e=Se();return p.jsxs("div",{className:"h-full w-full flex flex-col overflow-hidden",style:{backgroundColor:e.getColor(C.Background)},children:[p.jsx(kL,{}),p.jsx(bL,{}),p.jsx(CL,{}),p.jsxs("div",{className:"py-1.5 px-3 flex items-center justify-center gap-1",style:{borderTop:`1px solid ${e.getColor(C.FooterBorder)}`,backgroundColor:e.getColor(C.FooterBackground)},children:[p.jsx(Je,{className:"h-3 w-20"}),p.jsx(Je,{className:"h-3.5 w-3.5 rounded"})]})]})}function mh(){const e=Se(),t=typeof window<"u"&&window.innerWidth<768;return p.jsxs("div",{className:`h-full w-full relative overflow-hidden ${t?"":"rounded-xl"}`,style:{backgroundColor:e.getColor(C.GreeterBackground)},children:[p.jsx(TL,{}),p.jsx("div",{style:{height:t?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:p.jsx(SL,{})})]})}var _L=Object.defineProperty,EL=(e,t,n)=>t in e?_L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mf=(e,t,n)=>(EL(e,typeof t!="symbol"?t+"":t,n),n);let jL=class{constructor(){mf(this,"current",this.detect()),mf(this,"handoffState","pending"),mf(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},bu=new jL;function AL(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function sd(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return AL(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=sd();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function IS(){let[e]=v.useState(sd);return v.useEffect(()=>()=>e.dispose(),[e]),e}let ci=(e,t)=>{bu.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function LS(e){let t=v.useRef(e);return ci(()=>{t.current=e},[e]),t}let yr=function(e){let t=LS(e);return W.useCallback((...n)=>t.current(...n),[t])};function gh(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function od(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,od),r}var $S=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))($S||{}),Zr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Zr||{});function BS(){let e=PL();return v.useCallback(t=>RL({mergeRefs:e,...t}),[e])}function RL({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??OL;let l=zS(t,e);if(s)return Ql(l,n,r,o,a);let c=i??0;if(c&2){let{static:d=!1,...u}=l;if(d)return Ql(u,n,r,o,a)}if(c&1){let{unmount:d=!0,...u}=l;return od(d?0:1,{0(){return null},1(){return Ql({...u,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return Ql(l,n,r,o,a)}function Ql(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=gf(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},d=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let u={};if(t){let f=!1,m=[];for(let[h,g]of Object.entries(t))typeof g=="boolean"&&(f=!0),g===!0&&m.push(h.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(f){u["data-headlessui-state"]=m.join(" ");for(let h of m)u[`data-${h}`]=""}}if(s===v.Fragment&&(Object.keys(Oi(l)).length>0||Object.keys(Oi(u)).length>0))if(!v.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(Oi(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Oi(l)).concat(Object.keys(Oi(u))).map(f=>` - ${f}`).join(`
|
|
105
|
+
*/var mt=typeof Symbol=="function"&&Symbol.for,Sg=mt?Symbol.for("react.element"):60103,Tg=mt?Symbol.for("react.portal"):60106,Uc=mt?Symbol.for("react.fragment"):60107,Hc=mt?Symbol.for("react.strict_mode"):60108,Wc=mt?Symbol.for("react.profiler"):60114,qc=mt?Symbol.for("react.provider"):60109,Gc=mt?Symbol.for("react.context"):60110,_g=mt?Symbol.for("react.async_mode"):60111,Yc=mt?Symbol.for("react.concurrent_mode"):60111,Qc=mt?Symbol.for("react.forward_ref"):60112,Kc=mt?Symbol.for("react.suspense"):60113,B4=mt?Symbol.for("react.suspense_list"):60120,Xc=mt?Symbol.for("react.memo"):60115,Zc=mt?Symbol.for("react.lazy"):60116,z4=mt?Symbol.for("react.block"):60121,V4=mt?Symbol.for("react.fundamental"):60117,U4=mt?Symbol.for("react.responder"):60118,H4=mt?Symbol.for("react.scope"):60119;function on(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Sg:switch(e=e.type,e){case _g:case Yc:case Uc:case Wc:case Hc:case Kc:return e;default:switch(e=e&&e.$$typeof,e){case Gc:case Qc:case Zc:case Xc:case qc:return e;default:return t}}case Tg:return t}}}function uS(e){return on(e)===Yc}je.AsyncMode=_g;je.ConcurrentMode=Yc;je.ContextConsumer=Gc;je.ContextProvider=qc;je.Element=Sg;je.ForwardRef=Qc;je.Fragment=Uc;je.Lazy=Zc;je.Memo=Xc;je.Portal=Tg;je.Profiler=Wc;je.StrictMode=Hc;je.Suspense=Kc;je.isAsyncMode=function(e){return uS(e)||on(e)===_g};je.isConcurrentMode=uS;je.isContextConsumer=function(e){return on(e)===Gc};je.isContextProvider=function(e){return on(e)===qc};je.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Sg};je.isForwardRef=function(e){return on(e)===Qc};je.isFragment=function(e){return on(e)===Uc};je.isLazy=function(e){return on(e)===Zc};je.isMemo=function(e){return on(e)===Xc};je.isPortal=function(e){return on(e)===Tg};je.isProfiler=function(e){return on(e)===Wc};je.isStrictMode=function(e){return on(e)===Hc};je.isSuspense=function(e){return on(e)===Kc};je.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Uc||e===Yc||e===Wc||e===Hc||e===Kc||e===B4||typeof e=="object"&&e!==null&&(e.$$typeof===Zc||e.$$typeof===Xc||e.$$typeof===qc||e.$$typeof===Gc||e.$$typeof===Qc||e.$$typeof===V4||e.$$typeof===U4||e.$$typeof===H4||e.$$typeof===z4)};je.typeOf=on;lS.exports=je;var W4=lS.exports,cS=W4,q4={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},G4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},dS={};dS[cS.ForwardRef]=q4;dS[cS.Memo]=G4;function dt(){return dt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dt.apply(this,arguments)}function fS(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Jc=v.createContext(void 0);Jc.displayName="FormikContext";Jc.Provider;Jc.Consumer;function Y4(){var e=v.useContext(Jc);return e}var Tn=function(t){return typeof t=="function"},ed=function(t){return t!==null&&typeof t=="object"},Q4=function(t){return String(Math.floor(Number(t)))===t},af=function(t){return Object.prototype.toString.call(t)==="[object String]"},lf=function(t){return ed(t)&&Tn(t.then)};function Qt(e,t,n,r){r===void 0&&(r=0);for(var i=aS(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Ji(e,t,n){for(var r=gx(e),i=r,s=0,o=aS(t);s<o.length-1;s++){var a=o[s],l=Qt(e,o.slice(0,s+1));if(l&&(ed(l)||Array.isArray(l)))i=i[a]=gx(l);else{var c=o[s+1];i=i[a]=Q4(c)&&Number(c)>=0?[]:{}}}return(s===0?e:i)[o[s]]===n?e:(n===void 0?delete i[o[s]]:i[o[s]]=n,s===0&&n===void 0&&delete r[o[s]],r)}function pS(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i],a=e[o];ed(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},pS(a,t,n,r[o])):r[o]=t}return r}function K4(e,t){switch(t.type){case"SET_VALUES":return dt({},e,{values:t.payload});case"SET_TOUCHED":return dt({},e,{touched:t.payload});case"SET_ERRORS":return Pi(e.errors,t.payload)?e:dt({},e,{errors:t.payload});case"SET_STATUS":return dt({},e,{status:t.payload});case"SET_ISSUBMITTING":return dt({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return dt({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return dt({},e,{values:Ji(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return dt({},e,{touched:Ji(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return dt({},e,{errors:Ji(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return dt({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return dt({},e,{touched:pS(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return dt({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return dt({},e,{isSubmitting:!1});default:return e}}var Ei={},Gl={};function X4(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,s=e.validateOnMount,o=s===void 0?!1:s,a=e.isInitialValid,l=e.enableReinitialize,c=l===void 0?!1:l,d=e.onSubmit,u=fS(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=dt({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:d},u),m=v.useRef(f.initialValues),h=v.useRef(f.initialErrors||Ei),g=v.useRef(f.initialTouched||Gl),b=v.useRef(f.initialStatus),x=v.useRef(!1),y=v.useRef({});v.useEffect(function(){return x.current=!0,function(){x.current=!1}},[]);var w=v.useState(0),j=w[1],k=v.useRef({values:ql(f.initialValues),errors:ql(f.initialErrors)||Ei,touched:ql(f.initialTouched)||Gl,status:ql(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),T=k.current,A=v.useCallback(function(M){var X=k.current;k.current=K4(X,M),X!==k.current&&j(function(L){return L+1})},[]),S=v.useCallback(function(M,X){return new Promise(function(L,H){var re=f.validate(M,X);re==null?L(Ei):lf(re)?re.then(function(ce){L(ce||Ei)},function(ce){H(ce)}):L(re)})},[f.validate]),F=v.useCallback(function(M,X){var L=f.validationSchema,H=Tn(L)?L(X):L,re=X&&H.validateAt?H.validateAt(X,M):J4(M,H);return new Promise(function(ce,xe){re.then(function(){ce(Ei)},function(it){it.name==="ValidationError"?ce(Z4(it)):xe(it)})})},[f.validationSchema]),N=v.useCallback(function(M,X){return new Promise(function(L){return L(y.current[M].validate(X))})},[]),O=v.useCallback(function(M){var X=Object.keys(y.current).filter(function(H){return Tn(y.current[H].validate)}),L=X.length>0?X.map(function(H){return N(H,Qt(M,H))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(L).then(function(H){return H.reduce(function(re,ce,xe){return ce==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||ce&&(re=Ji(re,X[xe],ce)),re},{})})},[N]),Q=v.useCallback(function(M){return Promise.all([O(M),f.validationSchema?F(M):{},f.validate?S(M):{}]).then(function(X){var L=X[0],H=X[1],re=X[2],ce=nh.all([L,H,re],{arrayMerge:eI});return ce})},[f.validate,f.validationSchema,O,S,F]),J=cn(function(M){return M===void 0&&(M=T.values),A({type:"SET_ISVALIDATING",payload:!0}),Q(M).then(function(X){return x.current&&(A({type:"SET_ISVALIDATING",payload:!1}),A({type:"SET_ERRORS",payload:X})),X})});v.useEffect(function(){o&&x.current===!0&&Pi(m.current,f.initialValues)&&J(m.current)},[o,J]);var U=v.useCallback(function(M){var X=M&&M.values?M.values:m.current,L=M&&M.errors?M.errors:h.current?h.current:f.initialErrors||{},H=M&&M.touched?M.touched:g.current?g.current:f.initialTouched||{},re=M&&M.status?M.status:b.current?b.current:f.initialStatus;m.current=X,h.current=L,g.current=H,b.current=re;var ce=function(){A({type:"RESET_FORM",payload:{isSubmitting:!!M&&!!M.isSubmitting,errors:L,touched:H,status:re,values:X,isValidating:!!M&&!!M.isValidating,submitCount:M&&M.submitCount&&typeof M.submitCount=="number"?M.submitCount:0}})};if(f.onReset){var xe=f.onReset(T.values,Ke);lf(xe)?xe.then(ce):ce()}else ce()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);v.useEffect(function(){x.current===!0&&!Pi(m.current,f.initialValues)&&c&&(m.current=f.initialValues,U(),o&&J(m.current))},[c,f.initialValues,U,o,J]),v.useEffect(function(){c&&x.current===!0&&!Pi(h.current,f.initialErrors)&&(h.current=f.initialErrors||Ei,A({type:"SET_ERRORS",payload:f.initialErrors||Ei}))},[c,f.initialErrors]),v.useEffect(function(){c&&x.current===!0&&!Pi(g.current,f.initialTouched)&&(g.current=f.initialTouched||Gl,A({type:"SET_TOUCHED",payload:f.initialTouched||Gl}))},[c,f.initialTouched]),v.useEffect(function(){c&&x.current===!0&&!Pi(b.current,f.initialStatus)&&(b.current=f.initialStatus,A({type:"SET_STATUS",payload:f.initialStatus}))},[c,f.initialStatus,f.initialTouched]);var $=cn(function(M){if(y.current[M]&&Tn(y.current[M].validate)){var X=Qt(T.values,M),L=y.current[M].validate(X);return lf(L)?(A({type:"SET_ISVALIDATING",payload:!0}),L.then(function(H){return H}).then(function(H){A({type:"SET_FIELD_ERROR",payload:{field:M,value:H}}),A({type:"SET_ISVALIDATING",payload:!1})})):(A({type:"SET_FIELD_ERROR",payload:{field:M,value:L}}),Promise.resolve(L))}else if(f.validationSchema)return A({type:"SET_ISVALIDATING",payload:!0}),F(T.values,M).then(function(H){return H}).then(function(H){A({type:"SET_FIELD_ERROR",payload:{field:M,value:Qt(H,M)}}),A({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),_=v.useCallback(function(M,X){var L=X.validate;y.current[M]={validate:L}},[]),I=v.useCallback(function(M){delete y.current[M]},[]),R=cn(function(M,X){A({type:"SET_TOUCHED",payload:M});var L=X===void 0?i:X;return L?J(T.values):Promise.resolve()}),P=v.useCallback(function(M){A({type:"SET_ERRORS",payload:M})},[]),D=cn(function(M,X){var L=Tn(M)?M(T.values):M;A({type:"SET_VALUES",payload:L});var H=X===void 0?n:X;return H?J(L):Promise.resolve()}),B=v.useCallback(function(M,X){A({type:"SET_FIELD_ERROR",payload:{field:M,value:X}})},[]),V=cn(function(M,X,L){A({type:"SET_FIELD_VALUE",payload:{field:M,value:X}});var H=L===void 0?n:L;return H?J(Ji(T.values,M,X)):Promise.resolve()}),Y=v.useCallback(function(M,X){var L=X,H=M,re;if(!af(M)){M.persist&&M.persist();var ce=M.target?M.target:M.currentTarget,xe=ce.type,it=ce.name,gt=ce.id,Bn=ce.value,an=ce.checked,Ss=ce.outerHTML,ur=ce.options,Pr=ce.multiple;L=X||it||gt,H=/number|range/.test(xe)?(re=parseFloat(Bn),isNaN(re)?"":re):/checkbox/.test(xe)?nI(Qt(T.values,L),an,Bn):ur&&Pr?tI(ur):Bn}L&&V(L,H)},[V,T.values]),z=cn(function(M){if(af(M))return function(X){return Y(X,M)};Y(M)}),Z=cn(function(M,X,L){X===void 0&&(X=!0),A({type:"SET_FIELD_TOUCHED",payload:{field:M,value:X}});var H=L===void 0?i:L;return H?J(T.values):Promise.resolve()}),K=v.useCallback(function(M,X){M.persist&&M.persist();var L=M.target,H=L.name,re=L.id,ce=L.outerHTML,xe=X||H||re;Z(xe,!0)},[Z]),ae=cn(function(M){if(af(M))return function(X){return K(X,M)};K(M)}),q=v.useCallback(function(M){Tn(M)?A({type:"SET_FORMIK_STATE",payload:M}):A({type:"SET_FORMIK_STATE",payload:function(){return M}})},[]),se=v.useCallback(function(M){A({type:"SET_STATUS",payload:M})},[]),pe=v.useCallback(function(M){A({type:"SET_ISSUBMITTING",payload:M})},[]),Te=cn(function(){return A({type:"SUBMIT_ATTEMPT"}),J().then(function(M){var X=M instanceof Error,L=!X&&Object.keys(M).length===0;if(L){var H;try{if(H=Xe(),H===void 0)return}catch(re){throw re}return Promise.resolve(H).then(function(re){return x.current&&A({type:"SUBMIT_SUCCESS"}),re}).catch(function(re){if(x.current)throw A({type:"SUBMIT_FAILURE"}),re})}else if(x.current&&(A({type:"SUBMIT_FAILURE"}),X))throw M})}),le=cn(function(M){M&&M.preventDefault&&Tn(M.preventDefault)&&M.preventDefault(),M&&M.stopPropagation&&Tn(M.stopPropagation)&&M.stopPropagation(),Te().catch(function(X){console.warn("Warning: An unhandled error was caught from submitForm()",X)})}),Ke={resetForm:U,validateForm:J,validateField:$,setErrors:P,setFieldError:B,setFieldTouched:Z,setFieldValue:V,setStatus:se,setSubmitting:pe,setTouched:R,setValues:D,setFormikState:q,submitForm:Te},Xe=cn(function(){return d(T.values,Ke)}),qe=cn(function(M){M&&M.preventDefault&&Tn(M.preventDefault)&&M.preventDefault(),M&&M.stopPropagation&&Tn(M.stopPropagation)&&M.stopPropagation(),U()}),oe=v.useCallback(function(M){return{value:Qt(T.values,M),error:Qt(T.errors,M),touched:!!Qt(T.touched,M),initialValue:Qt(m.current,M),initialTouched:!!Qt(g.current,M),initialError:Qt(h.current,M)}},[T.errors,T.touched,T.values]),fe=v.useCallback(function(M){return{setValue:function(L,H){return V(M,L,H)},setTouched:function(L,H){return Z(M,L,H)},setError:function(L){return B(M,L)}}},[V,Z,B]),Ae=v.useCallback(function(M){var X=ed(M),L=X?M.name:M,H=Qt(T.values,L),re={name:L,value:H,onChange:z,onBlur:ae};if(X){var ce=M.type,xe=M.value,it=M.as,gt=M.multiple;ce==="checkbox"?xe===void 0?re.checked=!!H:(re.checked=!!(Array.isArray(H)&&~H.indexOf(xe)),re.value=xe):ce==="radio"?(re.checked=H===xe,re.value=xe):it==="select"&>&&(re.value=re.value||[],re.multiple=!0)}return re},[ae,z,T.values]),$e=v.useMemo(function(){return!Pi(m.current,T.values)},[m.current,T.values]),Gt=v.useMemo(function(){return typeof a<"u"?$e?T.errors&&Object.keys(T.errors).length===0:a!==!1&&Tn(a)?a(f):a:T.errors&&Object.keys(T.errors).length===0},[a,$e,T.errors,f]),ki=dt({},T,{initialValues:m.current,initialErrors:h.current,initialTouched:g.current,initialStatus:b.current,handleBlur:ae,handleChange:z,handleReset:qe,handleSubmit:le,resetForm:U,setErrors:P,setFormikState:q,setFieldTouched:Z,setFieldValue:V,setFieldError:B,setStatus:se,setSubmitting:pe,setTouched:R,setValues:D,submitForm:Te,validateForm:J,validateField:$,isValid:Gt,dirty:$e,unregisterField:I,registerField:_,getFieldProps:Ae,getFieldMeta:oe,getFieldHelpers:fe,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return ki}function Z4(e){var t={};if(e.inner){if(e.inner.length===0)return Ji(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var s;if(n){if(r>=i.length)break;s=i[r++]}else{if(r=i.next(),r.done)break;s=r.value}var o=s;Qt(t,o.path)||(t=Ji(t,o.path,o.message))}}return t}function J4(e,t,n,r){n===void 0&&(n=!1);var i=lh(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function lh(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(i){return Array.isArray(i)===!0||q0(i)?lh(i):i!==""?i:void 0}):q0(e[r])?t[r]=lh(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function eI(e,t,n){var r=e.slice();return t.forEach(function(s,o){if(typeof r[o]>"u"){var a=n.clone!==!1,l=a&&n.isMergeableObject(s);r[o]=l?nh(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=nh(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function tI(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function nI(e,t,n){if(typeof e=="boolean")return!!t;var r=[],i=!1,s=-1;if(Array.isArray(e))r=e,s=e.indexOf(n),i=s>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!i?r.concat(n):i?r.slice(0,s).concat(r.slice(s+1)):r}var rI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function cn(e){var t=v.useRef(e);return rI(function(){t.current=e}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}var iI=v.forwardRef(function(e,t){var n=e.action,r=fS(e,["action"]),i=n??"#",s=Y4(),o=s.handleReset,a=s.handleSubmit;return v.createElement("form",dt({onSubmit:a,ref:t,onReset:o,action:i},r))});iI.displayName="Form";const Eg=({init:e,schema:t,action:n})=>X4({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function hS(e,t,n){let r=n;r||(r=Object.keys(e));for(let i of r){if(Array.isArray(e[i])&&Array.isArray(t[i])){if(e[i].length!==t[i].length)return!1;for(let s=0;s<e[i].length;s++)if(e[i][s]!==t[i][s])return!1;continue}if(e[i]!==t[i])return!1}return!0}function jg({id:e,text:t,className:n,required:r}){const i=Se();return t?p.jsxs("label",{htmlFor:e,className:Ie("mb-1 block text-sm font-medium",n),style:{color:i.getColor(C.InputText)},children:[t,r&&p.jsx("span",{className:"ml-1",style:{color:i.getColor(C.ErrorText)},children:"*"})]}):null}const uf={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function mS({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:c,className:d,ariaInvalid:u,ariaLabel:f,autoFocus:m,...h}){const g=Se();return p.jsxs("div",{className:Ie({"mb-2":!o},d),children:[p.jsx(jg,{id:e,text:t,required:a}),p.jsxs("div",{className:"flex items-center",children:[r&&p.jsx("span",{className:Ie("inline-block border border-solid border-r-0 rounded-l-md",uf[i]),style:{borderColor:l?g.getColor(C.ErrorBorder):g.getColor(C.InputBorder),backgroundColor:g.getColor(C.InputBackground),borderRadius:g.getRadius()},children:r}),p.jsx("input",{id:e,className:Ie("border border-solid block text-base py-2 px-3 w-full focus:outline-hidden",uf[i],{"rounded-l-none":!!r,"rounded-r-none":!!n}),type:s,required:a,"aria-describedby":c,"aria-invalid":u,"aria-label":f,style:{fontSize:"16px",color:l?g.getColor(C.ErrorText):g.getColor(C.InputText),backgroundColor:g.getColor(C.InputBackground),borderColor:l?g.getColor(C.ErrorBorder):g.getColor(C.InputBorder),borderRadius:g.getRadius()},...h}),n&&p.jsx("span",{className:Ie("inline-block border border-solid border-l-0 rounded-r-md",uf[i]),style:{borderColor:l?g.getColor(C.ErrorBorder):g.getColor(C.InputBorder),backgroundColor:g.getColor(C.InputBackground),borderRadius:g.getRadius()},children:n})]}),!!l&&p.jsx("p",{className:"mt-1 text-xs",style:{color:g.getColor(C.ErrorText)},children:l})]})}const gS=(e,t)=>{const n=new Date;n.setFullYear(n.getFullYear()+1),document.cookie=`${e}=${t};expires=${n.toUTCString()};path=/`},vS=v.createContext({}),sI=()=>`${window.location.pathname}_$$_${document.title}`,oI=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},aI=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function lI({children:e}){const[t,n]=v.useState("/"),[r,i]=v.useState(aI());function s(){i([]),localStorage.removeItem("p-history")}const o=a=>{n(a),i(l=>[...new Set([...l,a])]),localStorage.setItem("page",a),localStorage.setItem("p-history",JSON.stringify(r))};return p.jsx(vS.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function td(){return v.useContext(vS)}const wa=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null};function yS({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return p.jsxs("div",{className:r||"",children:[e&&p.jsx(jg,{id:t,required:o,text:e}),p.jsx("select",{id:t,"aria-placeholder":i,value:n,"aria-label":e,className:"light forelect transition-colors duration-200 border border-solid text-gray-900 text-sm rounded-md focus:ring-emerald-500 focus-visible:ring-0 focus-visible:shadow-none outline focus-visible:outline-none focus-visible:ber-emerald-500 focus:border-emerald-500 block w-full px-2 py-2 placeholder-fuchsia-600 caret-emer-500",onChange:l.onChange,required:o,...l,children:s}),!!a&&p.jsx("p",{className:"1 texm text-r500",children:a})]})}const xx={ring:{label:"",input:"relative before:content[''] before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:bg-blue-gray-500 before:opacity-0 before:transition-opacity hover:before:opacity-10"},hover:{label:"hover:bg-secondary transition-colors duration-200 px-2 py-1 rounded-md",input:""}},uI={blue:"checked:border-blue-500 checked:bg-blue-500 checked:before:bg-blue-500",indigo:"checked:border-indigo-500 checked:bg-indigo-500 checked:before:bg-indigo-500",green:"checked:border-green-500 checked:bg-green-500 checked:before:bg-green-500",red:"checked:border-red-500 checked:bg-red-500 checked:before:bg-red-500",orange:"checked:border-orange-500 checked:bg-orange-500 checked:before:bg-orange-500"},cI={sm:"h-4 w-4 lg:h-3 lg:w-3",md:"h-6 w-6 lg:h-5 lg:w-5",lg:"h-8 w-8 lg:h-7 lg:w-7"},dI={sm:"h-3 w-3 lg:h-2.5 lg:w-2.5",md:"h-5 w-5 lg:h-4 lg:w-4",lg:"h-7 w-7 lg:h-6 lg:w-6"};function xS({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:c="md",effect:d="ring",reversed:u=!1,variant:f="blue",error:m,...h}){return p.jsxs("div",{children:[p.jsxs("div",{className:`flex items-center justify-between ${u?"flex-row-reverse":""} ${xx[d].label}`,children:[p.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[p.jsx("input",{id:l,name:t,type:"checkbox",className:`border-gray-200 peer cursor-pointer appearance-none rounded-md border border-solid bg-white transition-all ${uI[f]} ${cI[c]} ${xx[d].input}`,required:n,checked:i,value:r,onChange:g=>s==null?void 0:s(g.target.checked),onBlur:g=>o==null?void 0:o(g.target.checked),...h}),p.jsx("div",{className:"pointer-events-none absolute left-2/4 top-2/4 translate-x-2/4 translate-y-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",children:p.jsx(ie.Check,{className:dI[c]})})]}),p.jsx("label",{className:"disable-highlight mt-px flex grow cursor-pointer select-none items-center justify-between font-light text-gray-800",htmlFor:l,children:e})]}),a&&p.jsx("small",{className:"text-xs text-red-500",children:a}),m&&p.jsx("small",{className:"text-xs text-red-500",children:m})]})}function fI({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return p.jsxs("label",{htmlFor:e,className:Ie("relative flex cursor-pointer items-center rounded-md focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[p.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,defaultChecked:t,onChange:a=>{r&&r(a.target.checked)},className:"peer h-4 w-4 cursor-pointer appearance-none rounded-full border-2 border-slate-300 transition-all checked:border-[5px] checked:border-indigo-600 focus:ring-0 focus:ring-offset-0",disabled:s}),p.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function pI({id:e,label:t,children:n,required:r,className:i,error:s}){return p.jsxs("fieldset",{id:e,className:i,children:[t&&p.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&p.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),p.jsx("div",{className:"flex flex-col gap-1.5 mt-0.5",children:n}),s&&p.jsx("p",{className:"text-red-500 text-sm",children:s})]})}const oc=Object.assign(fI,{Group:pI});function vl({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:c,ariaInvalid:d,inputRef:u,autoFocus:f=!0,style:m,...h}){const g=Se();return p.jsxs("div",{className:Ie({"mb-2":!s},i),children:[t&&p.jsx(jg,{id:e,text:t,required:l}),p.jsx("textarea",{className:Ie("resize-none max-h-36 w-full py-2 px-3 border border-solid block focus:outline-hidden"),id:e,rows:o,"aria-invalid":d,...h,ref:u,autoFocus:f,style:{...m,fontSize:"16px",color:c?g.getColor(C.ErrorText):g.getColor(C.InputText),backgroundColor:g.getColor(C.InputBackground),borderColor:c?g.getColor(C.ErrorBorder):g.getColor(C.InputBorder),borderRadius:g.getRadius()}}),!!c&&p.jsx("p",{className:"mt-1 text-xs",style:{color:g.getColor(C.ErrorText)},children:c})]})}function hI({onOk:e,clientId:t,widgetId:n,appearance:r,aiAgentMode:i=!1,onAIAgentStart:s}){var T,A,S,F,N,O,Q,J,U,$;const o=Se(),{defaultValues:a,widget:l,setIsHaveChat:c}=he(),[d,u]=v.useState(!1),f=td(),m=ug(),h=!!a&&"username"in a,g=(A=(T=r==null?void 0:r.body)==null?void 0:T.inputs)==null?void 0:A.reduce((_,I)=>{let R=I.remember?wa(I.name):a==null?void 0:a[I.name];return I.options&&R&&!I.options.includes(R)&&(R=void 0),I.name==="username"&&h&&(R=a.username),_[I.name]=R||"",_},{}),b=(F=(S=r==null?void 0:r.body)==null?void 0:S.inputs)==null?void 0:F.reduce((_,I)=>(_[I.name]="",_),{}),x=$c((O=(N=r==null?void 0:r.body)==null?void 0:N.inputs)==null?void 0:O.reduce((_,I)=>(_[I.name]=I.required?To().required(`${I.label} alanı zorunludur`):To(),_),{})),y=Eg({init:{...g},schema:x,action:async _=>{var I;if(!d){u(!0);try{h&&(_.username=a.username),a!=null&&a.secret_data&&(_.secret_data=a.secret_data);for(const D in _)typeof _[D]=="string"&&(_[D]=_[D].trim());const[R,P]=await m.mutateAsync({inputs:_,history:f.history,client_id:t,widget_id:n,device_id:gi((l==null?void 0:l.link_id)||""),is_agent_mode:i});if(Ln(P)){Zp(R)&&(Dn(at.CustomerToken,R.customer_token,(l==null?void 0:l.link_id)||""),Dn(at.CustomerRefreshToken,R.customer_refresh_token,(l==null?void 0:l.link_id)||""),Dn(at.DeviceId,R.device_id,(l==null?void 0:l.link_id)||"")),f.clearHistory();for(const D of((I=r==null?void 0:r.body)==null?void 0:I.inputs)||[])D.remember&&gS(D.name,_[D.name]);c(!0),i?s==null||s():e==null||e();return}bo(R,{form:y})}catch(R){console.error("Chat creation error:",R)}finally{u(!1)}}}}),j=(((J=(Q=r==null?void 0:r.body)==null?void 0:Q.inputs)==null?void 0:J.length)||0)>0?!hS(b||{},(y==null?void 0:y.values)||{}):!0,k=o.getColor(C.GreeterBackground);return p.jsx("section",{className:"h-full overflow-y-auto px-4 py-3",style:{backgroundColor:k},children:p.jsxs("form",{autoComplete:"off",className:"grid grid-cols-1 gap-2",onSubmit:_=>{_.preventDefault(),y.handleSubmit()},children:[($=(U=r==null?void 0:r.body)==null?void 0:U.inputs)==null?void 0:$.map(_=>{var I,R;if(["text","email","phone"].includes(_.type))return p.jsx(mS,{id:_.name,name:_.name,type:_.type,label:_.label,value:y.values[_.name],onChange:y.handleChange,onBlur:y.handleBlur,disabled:_.name==="username"&&h,readOnly:_.name==="username"&&h,autoComplete:"off",placeholder:_.placeholder,error:y.errors[_.name],ariaInvalid:y.errors.name?!0:void 0,required:_.required,noMargin:!0},_.name);if(_.type==="select")return p.jsx(yS,{id:_.name,name:_.name,value:y.values[_.name],onChange:y.handleChange,label:_.label,error:y.errors[_.name],required:_.required,children:(I=_.options)==null?void 0:I.map(P=>p.jsx("option",{value:P,children:P},P))},_.name);if(_.type==="checkbox")return p.jsx(xS,{id:_.name,name:_.name,value:y.values[_.name],checked:y.values[_.name]==="true",onChange:y.handleChange,required:_.required,error:y.errors[_.name],children:_.label},_.name);if(_.type==="radio")return p.jsx(oc.Group,{id:_.name,label:_.label,required:_.required,error:y.errors[_.name],children:(R=_.options)==null?void 0:R.map(P=>p.jsx(oc,{onChange:D=>{D?y.setFieldValue(_.name,P):y.setFieldValue(_.name,"")},id:P,name:_.name,value:P===y.values[_.name],children:P},P))},_.name);if(_.type==="textarea")return p.jsx(vl,{id:_.name,name:_.name,value:y.values[_.name],onChange:y.handleChange,placeholder:_.placeholder,error:y.errors[_.name],required:_.required,label:_.label},_.name)}),p.jsx(pt,{textKey:C.GreeterButtonText,bgKey:C.GreeterButtonBackground,type:"submit",disabled:!j||d,className:"mt-2 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:d?p.jsxs("div",{className:"flex items-center justify-center",children:[p.jsx("span",{className:"mr-2",children:"Yükleniyor"}),p.jsx("span",{className:"animate-pulse",children:"..."})]}):"Sohbet Oluştur"})]})})}var Nn=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e.Agent="agent",e))(Nn||{}),jn=(e=>(e.AdminJoin="admin_join",e.AdminLeave="admin_leave",e.ChatCreated="chat_created",e.AdminToggleUpload="admin_toggle_upload",e))(jn||{}),ye=(e=>(e.Customer="customer",e.User="user",e.Agent="agent",e.System="system",e.Activity="activity",e))(ye||{});const Fo=e=>{const t=Bb(),n=(r,i)=>{var o;const s=((o=AB.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,c])=>a.replace(`:${l}`,c),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}};var mI={exports:{}},cf={exports:{}},wx;function wS(){return wx||(wx=1,function(e,t){(function(n,r){e.exports=r()})(Th,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",l="hour",c="day",d="week",u="month",f="quarter",m="year",h="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(U){var $=["th","st","nd","rd"],_=U%100;return"["+U+($[(_-20)%10]||$[_]||$[0])+"]"}},w=function(U,$,_){var I=String(U);return!I||I.length>=$?U:""+Array($+1-I.length).join(_)+U},j={s:w,z:function(U){var $=-U.utcOffset(),_=Math.abs($),I=Math.floor(_/60),R=_%60;return($<=0?"+":"-")+w(I,2,"0")+":"+w(R,2,"0")},m:function U($,_){if($.date()<_.date())return-U(_,$);var I=12*(_.year()-$.year())+(_.month()-$.month()),R=$.clone().add(I,u),P=_-R<0,D=$.clone().add(I+(P?-1:1),u);return+(-(I+(_-R)/(P?R-D:D-R))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:u,y:m,w:d,d:c,D:h,h:l,m:a,s:o,ms:s,Q:f}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},k="en",T={};T[k]=y;var A="$isDayjsObject",S=function(U){return U instanceof Q||!(!U||!U[A])},F=function U($,_,I){var R;if(!$)return k;if(typeof $=="string"){var P=$.toLowerCase();T[P]&&(R=P),_&&(T[P]=_,R=P);var D=$.split("-");if(!R&&D.length>1)return U(D[0])}else{var B=$.name;T[B]=$,R=B}return!I&&R&&(k=R),R||!I&&k},N=function(U,$){if(S(U))return U.clone();var _=typeof $=="object"?$:{};return _.date=U,_.args=arguments,new Q(_)},O=j;O.l=F,O.i=S,O.w=function(U,$){return N(U,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var Q=function(){function U(_){this.$L=F(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[A]=!0}var $=U.prototype;return $.parse=function(_){this.$d=function(I){var R=I.date,P=I.utc;if(R===null)return new Date(NaN);if(O.u(R))return new Date;if(R instanceof Date)return new Date(R);if(typeof R=="string"&&!/Z$/i.test(R)){var D=R.match(b);if(D){var B=D[2]-1||0,V=(D[7]||"0").substring(0,3);return P?new Date(Date.UTC(D[1],B,D[3]||1,D[4]||0,D[5]||0,D[6]||0,V)):new Date(D[1],B,D[3]||1,D[4]||0,D[5]||0,D[6]||0,V)}}return new Date(R)}(_),this.init()},$.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},$.$utils=function(){return O},$.isValid=function(){return this.$d.toString()!==g},$.isSame=function(_,I){var R=N(_);return this.startOf(I)<=R&&R<=this.endOf(I)},$.isAfter=function(_,I){return N(_)<this.startOf(I)},$.isBefore=function(_,I){return this.endOf(I)<N(_)},$.$g=function(_,I,R){return O.u(_)?this[I]:this.set(R,_)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(_,I){var R=this,P=!!O.u(I)||I,D=O.p(_),B=function(se,pe){var Te=O.w(R.$u?Date.UTC(R.$y,pe,se):new Date(R.$y,pe,se),R);return P?Te:Te.endOf(c)},V=function(se,pe){return O.w(R.toDate()[se].apply(R.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(pe)),R)},Y=this.$W,z=this.$M,Z=this.$D,K="set"+(this.$u?"UTC":"");switch(D){case m:return P?B(1,0):B(31,11);case u:return P?B(1,z):B(0,z+1);case d:var ae=this.$locale().weekStart||0,q=(Y<ae?Y+7:Y)-ae;return B(P?Z-q:Z+(6-q),z);case c:case h:return V(K+"Hours",0);case l:return V(K+"Minutes",1);case a:return V(K+"Seconds",2);case o:return V(K+"Milliseconds",3);default:return this.clone()}},$.endOf=function(_){return this.startOf(_,!1)},$.$set=function(_,I){var R,P=O.p(_),D="set"+(this.$u?"UTC":""),B=(R={},R[c]=D+"Date",R[h]=D+"Date",R[u]=D+"Month",R[m]=D+"FullYear",R[l]=D+"Hours",R[a]=D+"Minutes",R[o]=D+"Seconds",R[s]=D+"Milliseconds",R)[P],V=P===c?this.$D+(I-this.$W):I;if(P===u||P===m){var Y=this.clone().set(h,1);Y.$d[B](V),Y.init(),this.$d=Y.set(h,Math.min(this.$D,Y.daysInMonth())).$d}else B&&this.$d[B](V);return this.init(),this},$.set=function(_,I){return this.clone().$set(_,I)},$.get=function(_){return this[O.p(_)]()},$.add=function(_,I){var R,P=this;_=Number(_);var D=O.p(I),B=function(z){var Z=N(P);return O.w(Z.date(Z.date()+Math.round(z*_)),P)};if(D===u)return this.set(u,this.$M+_);if(D===m)return this.set(m,this.$y+_);if(D===c)return B(1);if(D===d)return B(7);var V=(R={},R[a]=r,R[l]=i,R[o]=n,R)[D]||1,Y=this.$d.getTime()+_*V;return O.w(Y,this)},$.subtract=function(_,I){return this.add(-1*_,I)},$.format=function(_){var I=this,R=this.$locale();if(!this.isValid())return R.invalidDate||g;var P=_||"YYYY-MM-DDTHH:mm:ssZ",D=O.z(this),B=this.$H,V=this.$m,Y=this.$M,z=R.weekdays,Z=R.months,K=R.meridiem,ae=function(pe,Te,le,Ke){return pe&&(pe[Te]||pe(I,P))||le[Te].slice(0,Ke)},q=function(pe){return O.s(B%12||12,pe,"0")},se=K||function(pe,Te,le){var Ke=pe<12?"AM":"PM";return le?Ke.toLowerCase():Ke};return P.replace(x,function(pe,Te){return Te||function(le){switch(le){case"YY":return String(I.$y).slice(-2);case"YYYY":return O.s(I.$y,4,"0");case"M":return Y+1;case"MM":return O.s(Y+1,2,"0");case"MMM":return ae(R.monthsShort,Y,Z,3);case"MMMM":return ae(Z,Y);case"D":return I.$D;case"DD":return O.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return ae(R.weekdaysMin,I.$W,z,2);case"ddd":return ae(R.weekdaysShort,I.$W,z,3);case"dddd":return z[I.$W];case"H":return String(B);case"HH":return O.s(B,2,"0");case"h":return q(1);case"hh":return q(2);case"a":return se(B,V,!0);case"A":return se(B,V,!1);case"m":return String(V);case"mm":return O.s(V,2,"0");case"s":return String(I.$s);case"ss":return O.s(I.$s,2,"0");case"SSS":return O.s(I.$ms,3,"0");case"Z":return D}return null}(pe)||D.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(_,I,R){var P,D=this,B=O.p(I),V=N(_),Y=(V.utcOffset()-this.utcOffset())*r,z=this-V,Z=function(){return O.m(D,V)};switch(B){case m:P=Z()/12;break;case u:P=Z();break;case f:P=Z()/3;break;case d:P=(z-Y)/6048e5;break;case c:P=(z-Y)/864e5;break;case l:P=z/i;break;case a:P=z/r;break;case o:P=z/n;break;default:P=z}return R?P:O.a(P)},$.daysInMonth=function(){return this.endOf(u).$D},$.$locale=function(){return T[this.$L]},$.locale=function(_,I){if(!_)return this.$L;var R=this.clone(),P=F(_,I,!0);return P&&(R.$L=P),R},$.clone=function(){return O.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},U}(),J=Q.prototype;return N.prototype=J,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",c],["$M",u],["$y",m],["$D",h]].forEach(function(U){J[U[1]]=function($){return this.$g($,U[0],U[1])}}),N.extend=function(U,$){return U.$i||(U($,Q,N),U.$i=!0),N},N.locale=F,N.isDayjs=S,N.unix=function(U){return N(1e3*U)},N.en=T[k],N.Ls=T,N.p={},N})}(cf)),cf.exports}(function(e,t){(function(n,r){e.exports=r(wS())})(Th,function(n){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var i=r(n),s={name:"tr",weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekStart:1,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(o){return o+"."}};return i.default.locale(s,null,!0),s})})(mI);var bS={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Th,function(){return function(n,r,i){n=n||{};var s=r.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(c,d,u,f){return s.fromToBase(c,d,u,f)}i.en.relativeTime=o,s.fromToBase=function(c,d,u,f,m){for(var h,g,b,x=u.$locale().relativeTime||o,y=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],w=y.length,j=0;j<w;j+=1){var k=y[j];k.d&&(h=f?i(c).diff(u,k.d,!0):u.diff(c,k.d,!0));var T=(n.rounding||Math.round)(Math.abs(h));if(b=h>0,T<=k.r||!k.r){T<=1&&j>0&&(k=y[j-1]);var A=x[k.l];m&&(T=m(""+T)),g=typeof A=="string"?A.replace("%d",T):A(T,d,k.l,b);break}}if(d)return g;var S=b?x.future:x.past;return typeof S=="function"?S(g):S.replace("%s",g)},s.to=function(c,d){return a(c,d,this,!0)},s.from=function(c,d){return a(c,d,this)};var l=function(c){return c.$u?i.utc():i()};s.toNow=function(c){return this.to(l(this),c)},s.fromNow=function(c){return this.from(l(this),c)}}})})(bS);var gI=bS.exports;const vI=_r(gI);var yI=wS();const df=_r(yI),xI=(e="tr")=>(df.extend(vI),df.locale(e),df);function wI({onShowForm:e,onHasHistory:t}){const{widget:n,setHistoryChat:r,setHistoryMessages:i}=he(),s=Se(),o=Fo(),a=xI(),l=n!=null&&n.link_id?gi(n.link_id):null,{data:c,isLoading:d}=BM((n==null?void 0:n.link_id)||"",l||"");if(v.useEffect(()=>{if(!d&&c){const[g,b]=c,x=Ln(b)&&Array.isArray(g)&&g.length>0;t&&t(x),x||e&&e()}},[d,c,e,t]),!(n!=null&&n.link_id))return null;if(d)return p.jsx("div",{className:"p-4 text-center text-sm opacity-50",children:"Yükleniyor..."});if(!c)return null;const[u,f]=c;if(!Ln(f)||!Array.isArray(u)||u.length===0)return null;const m=g=>a(g).fromNow(),h=g=>g.who_joined_details&&Array.isArray(g.who_joined_details)&&g.who_joined_details.length>0&&g.who_joined_details[0].name||"Sohbet";return p.jsxs("div",{className:"flex flex-col h-full",children:[p.jsx("h3",{className:"text-xs font-semibold uppercase mb-3 px-1 flex-shrink-0",style:{color:s.getColor(C.GreeterText)},children:"GEÇMİŞ SOHBETLER"}),p.jsx("div",{className:"flex-1 overflow-y-auto space-y-3 pr-1 min-h-0",children:u.map(g=>p.jsxs("div",{className:"p-4 rounded-lg cursor-pointer transition-all hover:shadow-md",style:{backgroundColor:s.getColor(C.InputBackground),borderColor:s.getColor(C.InputBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:s.getRadius(),boxShadow:`0 1px 3px 0 ${s.getColor(C.ShadowColor)}`},onClick:()=>{r(g),i(null),o.push("chat")},children:[p.jsxs("div",{className:"flex justify-between items-start mb-2",children:[p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:"font-semibold text-base mb-1 truncate",style:{color:s.getColor(C.InputText)},children:h(g)}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:g.status===Nn.Open?s.getColor(C.SuccessText)||"#10b981":s.getColor(C.FooterText)||"#6b7280"}}),p.jsx("span",{className:"text-xs",style:{color:s.getColor(C.FooterText)},children:g.status===Nn.Open?"Açık":"Sonlandı"})]})]}),p.jsx("div",{className:"text-xs ml-2 flex-shrink-0",style:{color:s.getColor(C.FooterText)},children:m(g.created_at)})]}),p.jsxs("div",{className:"flex items-center gap-2 mt-3 pt-3 border-t",style:{borderTopColor:s.getColor(C.DividerColor)},children:[p.jsx(ie.Eye,{className:"w-4 h-4",style:{color:s.getColor(C.FooterText)}}),p.jsx("span",{className:"text-xs",style:{color:s.getColor(C.FooterText)},children:"İncele"})]})]},g._id))})]})}const ar=Object.create(null);ar.open="0";ar.close="1";ar.ping="2";ar.pong="3";ar.message="4";ar.upgrade="5";ar.noop="6";const vu=Object.create(null);Object.keys(ar).forEach(e=>{vu[ar[e]]=e});const uh={type:"error",data:"parser error"},CS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",kS=typeof ArrayBuffer=="function",SS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ag=({type:e,data:t},n,r)=>CS&&t instanceof Blob?n?r(t):bx(t,r):kS&&(t instanceof ArrayBuffer||SS(t))?n?r(t):bx(new Blob([t]),r):r(ar[e]+(t||"")),bx=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Cx(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ff;function bI(e,t){if(CS&&e.data instanceof Blob)return e.data.arrayBuffer().then(Cx).then(t);if(kS&&(e.data instanceof ArrayBuffer||SS(e.data)))return t(Cx(e.data));Ag(e,!1,n=>{ff||(ff=new TextEncoder),t(ff.encode(n))})}const kx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ia=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<kx.length;e++)ia[kx.charCodeAt(e)]=e;const CI=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),d=new Uint8Array(c);for(r=0;r<n;r+=4)s=ia[e.charCodeAt(r)],o=ia[e.charCodeAt(r+1)],a=ia[e.charCodeAt(r+2)],l=ia[e.charCodeAt(r+3)],d[i++]=s<<2|o>>4,d[i++]=(o&15)<<4|a>>2,d[i++]=(a&3)<<6|l&63;return c},kI=typeof ArrayBuffer=="function",Rg=(e,t)=>{if(typeof e!="string")return{type:"message",data:TS(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:SI(e.substring(1),t)}:vu[n]?e.length>1?{type:vu[n],data:e.substring(1)}:{type:vu[n]}:uh},SI=(e,t)=>{if(kI){const n=CI(e);return TS(n,t)}else return{base64:!0,data:e}},TS=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},_S="",TI=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{Ag(s,!1,a=>{r[o]=a,++i===n&&t(r.join(_S))})})},_I=(e,t)=>{const n=e.split(_S),r=[];for(let i=0;i<n.length;i++){const s=Rg(n[i],t);if(r.push(s),s.type==="error")break}return r};function EI(){return new TransformStream({transform(e,t){bI(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let pf;function Yl(e){return e.reduce((t,n)=>t+n.length,0)}function Ql(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function jI(e,t){pf||(pf=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(Yl(n)<1)break;const l=Ql(n,1);s=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Yl(n)<2)break;const l=Ql(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Yl(n)<8)break;const l=Ql(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(uh);break}i=d*Math.pow(2,32)+c.getUint32(4),r=3}else{if(Yl(n)<i)break;const l=Ql(n,i);a.enqueue(Rg(s?l:pf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(uh);break}}}})}const ES=4;function rt(e){if(e)return AI(e)}function AI(e){for(var t in rt.prototype)e[t]=rt.prototype[t];return e}rt.prototype.on=rt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};rt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};rt.prototype.off=rt.prototype.removeListener=rt.prototype.removeAllListeners=rt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};rt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};rt.prototype.emitReserved=rt.prototype.emit;rt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};rt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const nd=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),gn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),RI="arraybuffer";function jS(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const PI=gn.setTimeout,OI=gn.clearTimeout;function rd(e,t){t.useNativeTimers?(e.setTimeoutFn=PI.bind(gn),e.clearTimeoutFn=OI.bind(gn)):(e.setTimeoutFn=gn.setTimeout.bind(gn),e.clearTimeoutFn=gn.clearTimeout.bind(gn))}const MI=1.33;function DI(e){return typeof e=="string"?NI(e):Math.ceil((e.byteLength||e.size)*MI)}function NI(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function AS(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function FI(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function II(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class LI extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Pg extends rt{constructor(t){super(),this.writable=!1,rd(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new LI(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Rg(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=FI(t);return n.length?"?"+n:""}}class $I extends Pg{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};_I(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,TI(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=AS()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let RS=!1;try{RS=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const BI=RS;function zI(){}class VI extends $I{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class sr extends rt{constructor(t,n,r){super(),this.createRequest=t,rd(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=jS(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=sr.requestsCount++,sr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=zI,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete sr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}sr.requestsCount=0;sr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Sx);else if(typeof addEventListener=="function"){const e="onpagehide"in gn?"pagehide":"unload";addEventListener(e,Sx,!1)}}function Sx(){for(let e in sr.requests)sr.requests.hasOwnProperty(e)&&sr.requests[e].abort()}const UI=function(){const e=PS({xdomain:!1});return e&&e.responseType!==null}();class HI extends VI{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=UI&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new sr(PS,this.uri(),t)}}function PS(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||BI))return new XMLHttpRequest}catch{}if(!t)try{return new gn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const OS=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class WI extends Pg{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=OS?{}:jS(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;Ag(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&nd(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=AS()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const hf=gn.WebSocket||gn.MozWebSocket;class qI extends WI{createSocket(t,n,r){return OS?new hf(t,n,r):n?new hf(t,n):new hf(t)}doWrite(t,n){this.ws.send(n)}}class GI extends Pg{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=jI(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=EI();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&nd(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const YI={websocket:qI,webtransport:GI,polling:HI},QI=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,KI=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ch(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=QI.exec(e||""),s={},o=14;for(;o--;)s[KI[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=XI(s,s.path),s.queryKey=ZI(s,s.query),s}function XI(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function ZI(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const dh=typeof addEventListener=="function"&&typeof removeEventListener=="function",yu=[];dh&&addEventListener("offline",()=>{yu.forEach(e=>e())},!1);class ui extends rt{constructor(t,n){if(super(),this.binaryType=RI,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=ch(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=ch(n.host).host);rd(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=II(this.opts.query)),dh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},yu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=ES,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&ui.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",ui.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=DI(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,nd(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(ui.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),dh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=yu.indexOf(this._offlineEventListener);r!==-1&&yu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ui.protocol=ES;class JI extends ui{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;ui.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ui.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function s(){r||(r=!0,d(),n.close(),n=null)}const o=u=>{const f=new Error("probe error: "+u);f.transport=n.name,s(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function c(u){n&&u.name!==n.name&&s()}const d=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let eL=class extends JI{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>YI[i]).filter(i=>!!i)),super(t,r)}};function tL(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=ch(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const nL=typeof ArrayBuffer=="function",rL=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,MS=Object.prototype.toString,iL=typeof Blob=="function"||typeof Blob<"u"&&MS.call(Blob)==="[object BlobConstructor]",sL=typeof File=="function"||typeof File<"u"&&MS.call(File)==="[object FileConstructor]";function Og(e){return nL&&(e instanceof ArrayBuffer||rL(e))||iL&&e instanceof Blob||sL&&e instanceof File}function xu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(xu(e[n]))return!0;return!1}if(Og(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return xu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&xu(e[n]))return!0;return!1}function oL(e){const t=[],n=e.data,r=e;return r.data=fh(n,t),r.attachments=t.length,{packet:r,buffers:t}}function fh(e,t){if(!e)return e;if(Og(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=fh(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=fh(e[r],t));return n}return e}function aL(e,t){return e.data=ph(e.data,t),delete e.attachments,e}function ph(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=ph(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ph(e[n],t));return e}const lL=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],uL=5;var be;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(be||(be={}));class cL{constructor(t){this.replacer=t}encode(t){return(t.type===be.EVENT||t.type===be.ACK)&&xu(t)?this.encodeAsBinary({type:t.type===be.EVENT?be.BINARY_EVENT:be.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===be.BINARY_EVENT||t.type===be.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=oL(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Tx(e){return Object.prototype.toString.call(e)==="[object Object]"}class Mg extends rt{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===be.BINARY_EVENT;r||n.type===be.BINARY_ACK?(n.type=r?be.EVENT:be.ACK,this.reconstructor=new dL(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Og(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(be[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===be.BINARY_EVENT||r.type===be.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(Mg.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case be.CONNECT:return Tx(n);case be.DISCONNECT:return n===void 0;case be.CONNECT_ERROR:return typeof n=="string"||Tx(n);case be.EVENT:case be.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&lL.indexOf(n[0])===-1);case be.ACK:case be.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class dL{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=aL(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const fL=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Mg,Encoder:cL,get PacketType(){return be},protocol:uL},Symbol.toStringTag,{value:"Module"}));function Pn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const pL=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class DS extends rt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Pn(t,"open",this.onopen.bind(this)),Pn(t,"packet",this.onpacket.bind(this)),Pn(t,"error",this.onerror.bind(this)),Pn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(pL.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:be.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,u=n.pop();this._registerAckCallback(d,u),o.id=d}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:be.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case be.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case be.EVENT:case be.BINARY_EVENT:this.onevent(t);break;case be.ACK:case be.BINARY_ACK:this.onack(t);break;case be.DISCONNECT:this.ondisconnect();break;case be.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:be.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:be.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Io(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Io.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Io.prototype.reset=function(){this.attempts=0};Io.prototype.setMin=function(e){this.ms=e};Io.prototype.setMax=function(e){this.max=e};Io.prototype.setJitter=function(e){this.jitter=e};class hh extends rt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,rd(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Io({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||fL;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new eL(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Pn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=Pn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Pn(t,"ping",this.onping.bind(this)),Pn(t,"data",this.ondata.bind(this)),Pn(t,"error",this.onerror.bind(this)),Pn(t,"close",this.onclose.bind(this)),Pn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){nd(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new DS(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Qo={};function wu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=tL(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=Qo[i]&&s in Qo[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new hh(r,t):(Qo[i]||(Qo[i]=new hh(r,t)),l=Qo[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(wu,{Manager:hh,Socket:DS,io:wu,connect:wu});const NS=v.createContext(null),Rr=()=>{const e=v.useContext(NS);if(!e)throw new Error("useWebsocket must be used within a WebSocketProvider");return e},hL=({children:e})=>{const{widget:t,isHaveChat:n,isAIAgentMode:r}=he(),i=v.useRef(null),s=v.useRef(!1),o=v.useRef(!1),a=v.useRef(null),[l,c]=v.useState(!1),[d,u]=v.useState(!1),f=v.useCallback(k=>{var T;console.log("WS: cleanupSocket called",{reason:k,hasSocket:!!i.current,isConnected:(T=i.current)==null?void 0:T.connected,currentLinkId:a.current}),i.current&&(console.log("WS: Cleaning up existing socket.",k||""),i.current.removeAllListeners(),i.current.disconnect(),i.current=null),c(!1),u(!1),o.current=!1,s.current=!1,a.current=null},[]),m=v.useCallback((k,T,A)=>{if(a.current===k&&(o.current||i.current&&i.current.connected)){console.log("WS: Connect called but already connecting or connected for same linkId.");return}if(!T&&!A){console.log("WS: Connect skipped - no active chat or AI agent mode");return}const S=ra(at.CustomerToken,k)||wa("customer_token"),F=ra(at.CustomerRefreshToken,k)||wa("customer_refresh_token");if(!S||!F){if(console.log("WS: Connect skipped - missing required tokens"),T){console.log("WS: Clearing stale isHaveChat flag due to missing tokens"),localStorage.removeItem("lc:widget:isHaveChat");try{he.getState().setIsHaveChat(!1)}catch{}}return}if(i.current&&!i.current.connected&&(console.log("WS: Cleaning up disconnected socket before new connection"),i.current.removeAllListeners(),i.current.disconnect(),i.current=null),i.current&&i.current.connected){console.log("WS: Already connected, skipping new connection");return}console.log("WS: Attempting to connect...",{linkId:k,tokenPrefix:`${S==null?void 0:S.substring(0,20)}...`,refreshTokenPrefix:`${F==null?void 0:F.substring(0,20)}...`,deviceId:ra(at.DeviceId,k)}),o.current=!0,a.current=k;const N=wu(n2,{transports:["websocket"],forceNew:!0,timeout:1e4,auth:{customer_token:S,device_id:ra(at.DeviceId,k)||wa("device_id"),customer_refresh_token:F}});i.current=N,N.on("error",O=>{console.error("WS: Websocket error",O),o.current=!1}),N.on("connect_error",O=>{console.error("WS: Connect error",O),o.current=!1,c(!1),i.current===N&&(i.current=null,a.current=null)}),N.on("disconnect",O=>{var J;console.log("WS: Disconnected",O),c(!1),u(!1),o.current=!1,s.current=!1,i.current===N&&(i.current=null,a.current=null);const Q=he.getState();O==="io server disconnect"&&((J=Q.widget)!=null&&J.link_id)&&(Q.isHaveChat||Q.isAIAgentMode)&&(console.log("WS: Server disconnect, attempting reconnect..."),setTimeout(()=>{m(Q.widget.link_id,Q.isHaveChat,Q.isAIAgentMode)},500))}),N.on("connect",()=>{console.log("WS: Connected successfully"),c(!0),o.current=!1}),N.on("connection:ready",()=>{console.log("WS: Connection ready received"),s.current=!0,u(!0)})},[]);v.useEffect(()=>{const k=t==null?void 0:t.link_id;return k&&(n||r)?(console.log("WS: Auto-connecting due to linkId and isHaveChat/isAIAgentMode",{isHaveChat:n,isAIAgentMode:r}),m(k,n,r)):!n&&!r&&(console.log("WS: Auto-disconnect due to no isHaveChat and no isAIAgentMode"),f("no active chat flags")),()=>{}},[t==null?void 0:t.link_id,n,r,m,f]),v.useEffect(()=>()=>{console.log("WS: Provider unmounting, cleaning up"),f("provider unmount")},[f]),v.useEffect(()=>{const k=()=>{console.log("WS: Page unloading, disconnecting socket"),i.current&&(i.current.disconnect(),i.current=null)},T=()=>{console.log("WS: Page hidden (pagehide), disconnecting socket"),i.current&&(i.current.disconnect(),i.current=null)};return window.addEventListener("beforeunload",k),window.addEventListener("pagehide",T),()=>{window.removeEventListener("beforeunload",k),window.removeEventListener("pagehide",T)}},[]);const h=v.useCallback(()=>{const k=t==null?void 0:t.link_id;k?m(k,n,r):console.warn("WS: Manual connect failed, no link_id available.")},[t==null?void 0:t.link_id,n,r,m]),g=v.useCallback(()=>{console.log("WS: Reconnecting..."),f("manual reconnect");const k=t==null?void 0:t.link_id;k&&setTimeout(()=>{m(k,n,r)},100)},[t==null?void 0:t.link_id,n,r,m,f]),b=v.useCallback(()=>{console.log("WS: Manual disconnect"),f("manual disconnect")},[f]),x=v.useCallback((k,T)=>{var A;(A=i.current)==null||A.on(k,T)},[]),y=v.useCallback((k,T)=>{var A;(A=i.current)==null||A.off(k,T)},[]),w=v.useCallback((k,T,A)=>{i.current&&i.current.connected?i.current.emit(k,T,A):console.warn(`WS: Cannot emit event '${k}', socket not connected.`)},[]),j=v.useMemo(()=>({connectionReady:d,connected:l,connect:h,reconnect:g,disconnect:b,on:x,off:y,emit:w}),[l,d,h,g,b,x,y,w]);return p.jsx(NS.Provider,{value:j,children:e})},ac=(e,t,n)=>{const r=typeof window<"u"?window:void 0;v.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},Cs=()=>{let e=!1,t=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true",t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent)),e||t},id=()=>{let e=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true"),e};var tt=(e=>(e.ChatView="chat:user:view",e.ChatClose="chat:user:close",e.MessageList="message:list",e.MessageCreate="message:create",e.MessageTyping="message:typing",e.WidgetOpen="widget:open",e.WidgetClose="widget:close",e.PageChange="page-change",e.MessageRead="message:read",e.AgentRequestHuman="agent:request:human",e.AgentMessageCreate="agent:message:create",e.ChatUpdateInputs="chat:update:inputs",e))(tt||{}),Ce=(e=>(e.Connect="connect",e.Disconnect="disconnect",e.ConnectionReady="connection:ready",e.MessageAgentCreate="message:agent:create",e.MessageUserCreate="message:user:create",e.MessageCustomerCreate="message:customer:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e.ChatToggleUpload="chat:user:upload:toggle",e.ChatUserShowButton="chat:user:show-button",e.ChatUserLeave="chat:user:leave",e.ChatUserJoin="chat:user:join",e))(Ce||{});function mL(){const e=td(),t=v.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return ac("popstate",t),null}function gL(){const e=Rr(),t=td(),n=v.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(tt.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return ac("popstate",n),v.useEffect(()=>{if(!e)return;const r=oI(),i=sI();r!==i&&(e.emit(tt.PageChange,{page:i}),t.setPage(i))},[e]),null}function vL(){return mL(),null}const _x=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function yL(){var J,U,$,_;const e=Se(),{widget:t,setOpen:n,setAIAgent:r,setIsAIAgentMode:i,setIsHaveChat:s}=he(),[o,a]=v.useState(!1),[l,c]=v.useState(!1),d=Fo(),u=Cs(),f=id(),[m,h]=v.useState(!0),[g,b]=v.useState(!1),x=td(),y=ug(),[w,j]=v.useState(null),k=v.useRef(!1),T=hl();if(!t)return null;const A=()=>{n(!1)};v.useEffect(()=>{if(!t||k.current)return;k.current=!0;const I=ef(t.link_id);if(I.isAgentMode&&I.agent&&(T!=null&&T.accessToken)){r(I.agent),i(!0),I.sessionId&&he.getState().setAIAgentSessionId(I.sessionId),j(I.agent),d.push("chat");return}(async()=>{try{const[P,D]=await VM(t.link_id);D===200&&P&&"is_active"in P&&P.is_active&&j(P)}catch(P){console.error("Failed to check AI agent:",P)}})()},[t,T,d,r,i]),v.useEffect(()=>{if(o||!T||!T.accessToken)return;const I=ef(t.link_id);I.isAgentMode&&I.agent||DM(t.client_id,Xi(T)).then(([R,P])=>{if(Ln(P))d.push("chat");else if(P===403){const D=ef(t.link_id);D.isAgentMode&&D.agent?(r(D.agent),i(!0),D.sessionId&&he.getState().setAIAgentSessionId(D.sessionId),d.push("chat")):(Js(t.link_id||""),a(!0))}else Js(t.link_id||""),a(!0)}).catch(()=>{Js(t.link_id||""),a(!0)})},[o,d,r,i]);const S=_x(((U=(J=t.appearance)==null?void 0:J.head)==null?void 0:U.elements)||[],"text"),F=_x(((_=($=t.appearance)==null?void 0:$.head)==null?void 0:_.elements)||[],"title"),N=async()=>{var R,P,D;he.getState().setHistoryChat(null),he.getState().setHistoryMessages(null),he.getState().clearAIAgentState();const I=(((D=(P=(R=t.appearance)==null?void 0:R.body)==null?void 0:P.inputs)==null?void 0:D.length)||0)>0;if(w){if(l)return;c(!0);try{const[B,V]=await y.mutateAsync({inputs:{username:"Ziyaretçi",email:`visitor_${Date.now()}@temp.local`},history:x.history,client_id:t.client_id,widget_id:t.link_id,device_id:gi(t.link_id),is_agent_mode:!0});Ln(V)&&Zp(B)?(Dn(at.CustomerToken,B.customer_token,t.link_id),Dn(at.CustomerRefreshToken,B.customer_refresh_token,t.link_id),Dn(at.DeviceId,B.device_id,t.link_id),x.clearHistory(),s(!0),r(w),i(!0),d.push("chat")):(bo(B),I&&h(!1))}catch(B){console.error("Error creating chat for AI agent:",B),I&&h(!1)}finally{c(!1)}return}if(!I){if(l)return;c(!0);try{const[B,V]=await y.mutateAsync({inputs:{},history:x.history,client_id:t.client_id,widget_id:t.link_id,device_id:gi(t.link_id)});Ln(V)&&Zp(B)?(Dn(at.CustomerToken,B.customer_token,t.link_id),Dn(at.CustomerRefreshToken,B.customer_refresh_token,t.link_id),Dn(at.DeviceId,B.device_id,t.link_id),x.clearHistory(),s(!0),d.push("chat")):bo(B)}catch(B){console.error("Error creating chat:",B)}finally{c(!1)}return}h(!1)},O=()=>{h(!0)},Q=()=>{w&&(r(w),i(!0),he.getState().setHistoryChat(null),he.getState().setHistoryMessages(null),d.push("chat"))};return p.jsxs("div",{className:"h-full w-full flex flex-col relative overflow-hidden",children:[p.jsxs("header",{className:"relative flex items-center justify-between px-4 py-4 flex-shrink-0",style:{backgroundColor:e.getColor(C.HeaderBackground),color:e.getColor(C.HeaderText),borderBottom:`1px solid ${e.getColor(C.HeaderBorder)}`,borderTopLeftRadius:u?"":e.getRadius(),borderTopRightRadius:u?"":e.getRadius()},children:[p.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[!m&&g&&p.jsx("button",{type:"button",onClick:O,className:"flex-shrink-0 p-1 hover:opacity-80 transition-opacity",style:{color:e.getColor(C.HeaderText)},children:p.jsx(ie.ArrowLeft,{className:"w-5 h-5"})}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:"text-lg font-bold truncate",style:{color:e.getColor(C.HeaderText)},children:F||"Müşteri Hizmetleri"}),S&&p.jsx("div",{className:"text-sm opacity-90 truncate",style:{color:e.getColor(C.HeaderText)},children:S})]})]}),!f&&p.jsx("button",{type:"button",onClick:A,className:"flex-shrink-0 p-1 hover:opacity-80 transition-opacity ml-2",style:{color:e.getColor(C.HeaderText)},children:p.jsx(ie.X,{className:"w-5 h-5"})})]}),p.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-h-0",style:{backgroundColor:e.getColor(C.Background)},children:m?p.jsx("div",{className:"px-4 pt-4 pb-2 flex-1 overflow-hidden flex flex-col min-h-0",children:p.jsx(wI,{onShowForm:()=>h(!1),onHasHistory:I=>b(I)})}):p.jsx("div",{className:"flex-1 overflow-y-auto",children:p.jsx(hI,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,aiAgentMode:!!w,onAIAgentStart:Q,onOk:()=>{he.getState().setHistoryChat(null),he.getState().setHistoryMessages(null),d.push("chat")}})})}),m&&g&&p.jsx("div",{className:"px-4 py-3 border-t flex-shrink-0",style:{borderTopColor:e.getColor(C.DividerColor),backgroundColor:e.getColor(C.Background)},children:p.jsxs(pt,{onClick:N,className:"w-full py-3 rounded-lg font-medium flex items-center justify-center gap-2 transition-all",style:{backgroundColor:e.getColor(C.ButtonBackground),color:e.getColor(C.ButtonText),borderRadius:e.getRadius()},children:[p.jsx(ie.Plus,{className:"w-5 h-5"}),p.jsx("span",{children:"Yeni Sohbet Başlat"})]})})]})}function xL(){return p.jsxs(p.Fragment,{children:[p.jsx(yL,{}),p.jsx(vL,{})]})}const wL=[{path:"/",component:xL,name:"registration"}];function Je({className:e="",style:t}){const n=Se();return p.jsx("div",{className:`animate-pulse rounded ${e}`,style:{backgroundColor:n.getColor(C.MessageAdminBackground),opacity:.6,...t}})}function bL(){const e=Se();return p.jsxs("section",{className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[p.jsx("div",{className:"flex w-full items-center justify-start",children:p.jsx(Je,{className:"h-12 w-3/5",style:{borderRadius:e.getRadius()}})}),p.jsx("div",{className:"flex w-full items-center justify-end",children:p.jsx(Je,{className:"h-10 w-2/5",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(C.MessageVisitorBackground),opacity:.4}})}),p.jsx("div",{className:"flex w-full items-center justify-start",children:p.jsx(Je,{className:"h-16 w-4/5",style:{borderRadius:e.getRadius()}})}),p.jsx("div",{className:"flex w-full items-center justify-end",children:p.jsx(Je,{className:"h-8 w-1/3",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(C.MessageVisitorBackground),opacity:.4}})}),p.jsx("div",{className:"flex w-full items-center justify-start",children:p.jsx(Je,{className:"h-10 w-1/2",style:{borderRadius:e.getRadius()}})})]})}function CL(){const e=Se();return p.jsxs("div",{className:"p-3 flex items-center gap-3",style:{backgroundColor:e.getColor(C.FooterBackground),borderRadius:e.getRadius()},children:[p.jsx("div",{className:"grow",children:p.jsx(Je,{className:"h-12 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(C.InputBackground)}})}),p.jsx(Je,{className:"h-12 w-12 rounded-full"})]})}function kL(){const e=Se();return p.jsxs("header",{className:"p-4 flex justify-between items-center z-10",style:{backgroundColor:e.getColor(C.HeaderBackground),borderBottom:`1px solid ${e.getColor(C.HeaderBorder)}`},children:[p.jsx(Je,{className:"h-5 w-36"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Je,{className:"h-5 w-5 rounded"}),p.jsx(Je,{className:"h-5 w-5 rounded"})]})]})}function SL(){const e=Se();return p.jsx("section",{className:"h-full overflow-y-auto px-4 py-3",style:{backgroundColor:e.getColor(C.GreeterBackground)},children:p.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[p.jsxs("div",{children:[p.jsx(Je,{className:"h-4 w-20 mb-1"}),p.jsx(Je,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(C.InputBackground)}})]}),p.jsxs("div",{children:[p.jsx(Je,{className:"h-4 w-24 mb-1"}),p.jsx(Je,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(C.InputBackground)}})]}),p.jsxs("div",{children:[p.jsx(Je,{className:"h-4 w-16 mb-1"}),p.jsx(Je,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(C.InputBackground)}})]}),p.jsx(Je,{className:"h-11 w-full mt-2",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(C.GreeterButtonBackground),opacity:.5}})]})})}function TL(){const e=Se();return p.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",style:{backgroundColor:e.getColor(C.GreeterTopBackground)},children:[p.jsx(Je,{className:"h-7 w-40"}),p.jsx(Je,{className:"h-4 w-56"})]})}function FS(){const e=Se();return p.jsxs("div",{className:"h-full w-full flex flex-col overflow-hidden",style:{backgroundColor:e.getColor(C.Background)},children:[p.jsx(kL,{}),p.jsx(bL,{}),p.jsx(CL,{}),p.jsxs("div",{className:"py-1.5 px-3 flex items-center justify-center gap-1",style:{borderTop:`1px solid ${e.getColor(C.FooterBorder)}`,backgroundColor:e.getColor(C.FooterBackground)},children:[p.jsx(Je,{className:"h-3 w-20"}),p.jsx(Je,{className:"h-3.5 w-3.5 rounded"})]})]})}function mh(){const e=Se(),t=typeof window<"u"&&window.innerWidth<768;return p.jsxs("div",{className:`h-full w-full relative overflow-hidden ${t?"":"rounded-xl"}`,style:{backgroundColor:e.getColor(C.GreeterBackground)},children:[p.jsx(TL,{}),p.jsx("div",{style:{height:t?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:p.jsx(SL,{})})]})}var _L=Object.defineProperty,EL=(e,t,n)=>t in e?_L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mf=(e,t,n)=>(EL(e,typeof t!="symbol"?t+"":t,n),n);let jL=class{constructor(){mf(this,"current",this.detect()),mf(this,"handoffState","pending"),mf(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},bu=new jL;function AL(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function sd(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return AL(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=sd();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function IS(){let[e]=v.useState(sd);return v.useEffect(()=>()=>e.dispose(),[e]),e}let ci=(e,t)=>{bu.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function LS(e){let t=v.useRef(e);return ci(()=>{t.current=e},[e]),t}let yr=function(e){let t=LS(e);return W.useCallback((...n)=>t.current(...n),[t])};function gh(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function od(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,od),r}var $S=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))($S||{}),Zr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Zr||{});function BS(){let e=PL();return v.useCallback(t=>RL({mergeRefs:e,...t}),[e])}function RL({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??OL;let l=zS(t,e);if(s)return Kl(l,n,r,o,a);let c=i??0;if(c&2){let{static:d=!1,...u}=l;if(d)return Kl(u,n,r,o,a)}if(c&1){let{unmount:d=!0,...u}=l;return od(d?0:1,{0(){return null},1(){return Kl({...u,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return Kl(l,n,r,o,a)}function Kl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=gf(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},d=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let u={};if(t){let f=!1,m=[];for(let[h,g]of Object.entries(t))typeof g=="boolean"&&(f=!0),g===!0&&m.push(h.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(f){u["data-headlessui-state"]=m.join(" ");for(let h of m)u[`data-${h}`]=""}}if(s===v.Fragment&&(Object.keys(Oi(l)).length>0||Object.keys(Oi(u)).length>0))if(!v.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(Oi(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Oi(l)).concat(Object.keys(Oi(u))).map(f=>` - ${f}`).join(`
|
|
106
106
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>` - ${f}`).join(`
|
|
107
107
|
`)].join(`
|
|
108
108
|
`))}else{let f=d.props,m=f==null?void 0:f.className,h=typeof m=="function"?(...x)=>gh(m(...x),l.className):gh(m,l.className),g=h?{className:h}:{},b=zS(d.props,Oi(gf(l,["ref"])));for(let x in u)x in b&&delete u[x];return v.cloneElement(d,Object.assign({},b,u,c,{ref:i(ML(d),c.ref)},g))}return v.createElement(s,Object.assign({},gf(l,["ref"]),s!==v.Fragment&&c,s!==v.Fragment&&u),d)}function PL(){let e=v.useRef([]),t=v.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function OL(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function zS(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var s;return(s=i==null?void 0:i.preventDefault)==null?void 0:s.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...s){let o=n[r];for(let a of o){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...s)}}});return t}function Dg(e){var t;return Object.assign(v.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Oi(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function gf(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function ML(e){return W.version.split(".")[0]>="19"?e.props.ref:e.ref}let DL=Symbol();function VS(...e){let t=v.useRef(e);v.useEffect(()=>{t.current=e},[e]);let n=yr(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[DL]))?void 0:n}function NL(e=0){let[t,n]=v.useState(e),r=v.useCallback(l=>n(l),[t]),i=v.useCallback(l=>n(c=>c|l),[t]),s=v.useCallback(l=>(t&l)===l,[t]),o=v.useCallback(l=>n(c=>c&~l),[n]),a=v.useCallback(l=>n(c=>c^l),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var FL={},Ex,jx;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Ex=process==null?void 0:FL)==null?void 0:Ex.NODE_ENV)==="test"&&typeof((jx=Element==null?void 0:Element.prototype)==null?void 0:jx.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
109
|
-
`)),[]});var IL=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(IL||{});function LL(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function $L(e,t,n,r){let[i,s]=v.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=NL(e&&i?3:0),c=v.useRef(!1),d=v.useRef(!1),u=IS();return ci(()=>{var f;if(e){if(n&&s(!0),!t){n&&a(3);return}return(f=r==null?void 0:r.start)==null||f.call(r,n),BL(t,{inFlight:c,prepare(){d.current?d.current=!1:d.current=c.current,c.current=!0,!d.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){d.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var m;d.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(c.current=!1,l(7),n||s(!1),(m=r==null?void 0:r.end)==null||m.call(r,n))}})}},[e,n,t,u]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function BL(e,{prepare:t,run:n,done:r,inFlight:i}){let s=sd();return VL(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(zL(e,r))})}),s.dispose}function zL(e,t){var n,r;let i=sd();if(!e)return i.dispose;let s=!1;i.add(()=>{s=!0});let o=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return o.length===0?(t(),i.dispose):(Promise.allSettled(o.map(a=>a.finished)).then(()=>{s||t()}),i.dispose)}function VL(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}let Ng=v.createContext(null);Ng.displayName="OpenClosedContext";var Bi=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Bi||{});function US(){return v.useContext(Ng)}function UL({value:e,children:t}){return W.createElement(Ng.Provider,{value:e},t)}function HL(){let e=typeof document>"u";return"useSyncExternalStore"in xf?(t=>t.useSyncExternalStore)(xf)(()=>()=>{},()=>!1,()=>!e):!1}function HS(){let e=HL(),[t,n]=v.useState(bu.isHandoffComplete);return t&&bu.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>bu.handoff(),[]),e?!1:t}function WL(){let e=v.useRef(!1);return ci(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function WS(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:GS)!==v.Fragment||W.Children.count(e.children)===1}let ad=v.createContext(null);ad.displayName="TransitionContext";var qL=(e=>(e.Visible="visible",e.Hidden="hidden",e))(qL||{});function GL(){let e=v.useContext(ad);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function YL(){let e=v.useContext(ld);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let ld=v.createContext(null);ld.displayName="NestingContext";function ud(e){return"children"in e?ud(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function qS(e,t){let n=LS(e),r=v.useRef([]),i=WL(),s=IS(),o=yr((m,h=Zr.Hidden)=>{let g=r.current.findIndex(({el:b})=>b===m);g!==-1&&(od(h,{[Zr.Unmount](){r.current.splice(g,1)},[Zr.Hidden](){r.current[g].state="hidden"}}),s.microTask(()=>{var b;!ud(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),a=yr(m=>{let h=r.current.find(({el:g})=>g===m);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:m,state:"visible"}),()=>o(m,Zr.Unmount)}),l=v.useRef([]),c=v.useRef(Promise.resolve()),d=v.useRef({enter:[],leave:[]}),u=yr((m,h,g)=>{l.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([b])=>b!==m)),t==null||t.chains.current[h].push([m,new Promise(b=>{l.current.push(b)})]),t==null||t.chains.current[h].push([m,new Promise(b=>{Promise.all(d.current[h].map(([x,y])=>y)).then(()=>b())})]),h==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(h)):g(h)}),f=yr((m,h,g)=>{Promise.all(d.current[h].splice(0).map(([b,x])=>x)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>g(h))});return v.useMemo(()=>({children:r,register:a,unregister:o,onStart:u,onStop:f,wait:c,chains:d}),[a,o,r,u,f,d,c])}let GS=v.Fragment,YS=$S.RenderStrategy;function QL(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:c,enterFrom:d,enterTo:u,entered:f,leave:m,leaveFrom:h,leaveTo:g,...b}=e,[x,y]=v.useState(null),w=v.useRef(null),j=WS(e),k=VS(...j?[w,t,y]:t===null?[]:[t]),T=(n=b.unmount)==null||n?Zr.Unmount:Zr.Hidden,{show:A,appear:S,initial:F}=GL(),[N,O]=v.useState(A?"visible":"hidden"),Q=YL(),{register:J,unregister:U}=Q;ci(()=>J(w),[J,w]),ci(()=>{if(T===Zr.Hidden&&w.current){if(A&&N!=="visible"){O("visible");return}return od(N,{hidden:()=>U(w),visible:()=>J(w)})}},[N,w,J,U,A,T]);let $=HS();ci(()=>{if(j&&$&&N==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,N,$,j]);let _=F&&!S,I=S&&A&&F,R=v.useRef(!1),P=qS(()=>{R.current||(O("hidden"),U(w))},Q),D=yr(ae=>{R.current=!0;let G=ae?"enter":"leave";P.onStart(w,G,se=>{se==="enter"?s==null||s():se==="leave"&&(a==null||a())})}),B=yr(ae=>{let G=ae?"enter":"leave";R.current=!1,P.onStop(w,G,se=>{se==="enter"?o==null||o():se==="leave"&&(l==null||l())}),G==="leave"&&!ud(P)&&(O("hidden"),U(w))});v.useEffect(()=>{j&&i||(D(A),B(A))},[A,j,i]);let V=!(!i||!j||!$||_),[,Y]=$L(V,x,A,{start:D,end:B}),z=Oi({ref:k,className:((r=gh(b.className,I&&c,I&&d,Y.enter&&c,Y.enter&&Y.closed&&d,Y.enter&&!Y.closed&&u,Y.leave&&m,Y.leave&&!Y.closed&&h,Y.leave&&Y.closed&&g,!Y.transition&&A&&f))==null?void 0:r.trim())||void 0,...LL(Y)}),Z=0;N==="visible"&&(Z|=Bi.Open),N==="hidden"&&(Z|=Bi.Closed),A&&N==="hidden"&&(Z|=Bi.Opening),!A&&N==="visible"&&(Z|=Bi.Closing);let K=BS();return W.createElement(ld.Provider,{value:P},W.createElement(UL,{value:Z},K({ourProps:z,theirProps:b,defaultTag:GS,features:YS,visible:N==="visible",name:"Transition.Child"})))}function KL(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=v.useRef(null),a=WS(e),l=VS(...a?[o,t]:t===null?[]:[t]);HS();let c=US();if(n===void 0&&c!==null&&(n=(c&Bi.Open)===Bi.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,u]=v.useState(n?"visible":"hidden"),f=qS(()=>{n||u("hidden")}),[m,h]=v.useState(!0),g=v.useRef([n]);ci(()=>{m!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),h(!1))},[g,n]);let b=v.useMemo(()=>({show:n,appear:r,initial:m}),[n,r,m]);ci(()=>{n?u("visible"):!ud(f)&&o.current!==null&&u("hidden")},[n,f]);let x={unmount:i},y=yr(()=>{var k;m&&h(!1),(k=e.beforeEnter)==null||k.call(e)}),w=yr(()=>{var k;m&&h(!1),(k=e.beforeLeave)==null||k.call(e)}),j=BS();return W.createElement(ld.Provider,{value:f},W.createElement(ad.Provider,{value:b},j({ourProps:{...x,as:v.Fragment,children:W.createElement(QS,{ref:l,...x,...s,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:v.Fragment,features:YS,visible:d==="visible",name:"Transition"})))}function XL(e,t){let n=v.useContext(ad)!==null,r=US()!==null;return W.createElement(W.Fragment,null,!n&&r?W.createElement(vh,{ref:t,...e}):W.createElement(QS,{ref:t,...e}))}let vh=Dg(KL),QS=Dg(QL),ZL=Dg(XL),JL=Object.assign(vh,{Child:ZL,Root:vh});const Fg=v.createContext(void 0),di=({as:e="div",children:t,className:n})=>{const[r,i]=v.useState(!1),s=v.useCallback(()=>{i(a=>!a)},[]),o=v.useRef(null);return v.useEffect(()=>{const a=l=>{o.current&&!o.current.contains(l.target)&&r&&s&&s()};return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[r,s]),p.jsx(Fg.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:p.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},e$=({type:e,children:t,className:n,style:r,id:i,title:s})=>{const{open:o,toggleOpen:a,setOpen:l}=v.useContext(Fg),c=Se(),d=n||"font-bold py-2 px-4 rounded-sm",u=n||"transition-all duration-200 ease-linear border-dashed dropdown-toggle btn";return p.jsx("div",{children:e==="a"?p.jsx(Bj,{id:i,to:"/#",onClick:f=>{f.preventDefault(),a()},className:u+(o?" show":""),children:t}):p.jsx("button",{id:i,onClick:f=>{f.stopPropagation(),f.preventDefault(),l(!o)},type:"button",className:d,style:{backgroundColor:c.getColor(C.ButtonBackground),color:c.getColor(C.ButtonText),borderRadius:c.getRadius(),...r},title:s,children:t})})},t$=({as:e="div",className:t,style:n,children:r,placement:i})=>{const{open:s,setOpen:o}=v.useContext(Fg),a=Se(),l=t||"absolute z-50 py-2 mt-1 text-left list-none rounded-md shadow-md dropdown-menu min-w-max",[c,d]=v.useState("right-end");v.useEffect(()=>{i&&d(i)},[i]);const u=v.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),m=()=>{if(s&&c==="right-end"&&u.current){const h=u.current;h.style.position="absolute",f==="rtl"?h.style.inset="0px auto auto 0px":h.style.inset="0px 0px auto auto",h.style.margin="0px",h.style.transform="translate(0px, 54px)"}if(s&&c==="start-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px auto auto 0px",h.style.margin="0px",h.style.transform="translate(0px, 20px)"}if(s&&c==="top-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="auto 0px 0px auto",h.style.margin="0px",h.style.transform="translate(-58px, -30px)"}if(s&&c==="bottom-start"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px 0px auto auto",h.style.margin="0px",h.style.transform="translate(0px, 54px)"}if(s&&c==="bottom-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px 0px auto auto",h.style.margin="0px",h.style.transform="translate(0px, 39px)"}if(s&&c==="top-start"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="auto auto 0px 0px",h.style.margin="0px",h.style.transform="translate(0px, -95px)"}if(s&&c==="left-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px auto auto 0px",h.style.margin="0px",h.style.right="0px",h.style.transform="translate(0px, -20px)"}return{}};return p.jsx(JL,{as:W.Fragment,show:s,children:h=>p.jsx(e,{ref:u,onClick:()=>o(!1),className:`${l} ${h==="entered"?"transition-all":""}`,style:{...m(),backgroundColor:a.getColor(C.Background),borderRadius:a.getRadius(),boxShadow:`0 10px 25px -5px ${a.getColor(C.ShadowColor)}, 0 8px 10px -6px ${a.getColor(C.ShadowColor)}`,...n},children:r})})};di.Trigger=e$;di.Content=t$;function n$({onChatClose:e}){const[t,n]=v.useState(!1),r=Se(),i=ms(),s=Rr(),o=()=>{s==null||s.emit(tt.ChatClose,{}),localStorage.setItem("showActionButtons","false"),e()};return p.jsxs(p.Fragment,{children:[p.jsx(as,{children:t&&p.jsx(He.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-50 flex items-center justify-center p-4",style:{backgroundColor:r.getColor(C.ModalOverlayColor)},children:p.jsxs(He.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"p-5 rounded-xl shadow-lg max-w-xs w-full",style:{backgroundColor:r.getColor(C.Background),borderRadius:r.getRadius()},children:[p.jsx("div",{className:"text-lg font-semibold mb-2",style:{color:r.getColor(C.ChatCloseConfirmText)},children:i(ne.ChatCloseConfirm)}),p.jsx("div",{className:"text-sm mb-4",style:{color:r.getColor(C.FooterText)},children:i(ne.ChatCloseWarning)}),p.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[p.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(C.GreeterBackground),color:r.getColor(C.GreeterText),borderRadius:r.getRadius()},onClick:()=>n(!1),children:i(ne.CancelAction)}),p.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(C.ErrorBackground),color:r.getColor(C.ErrorText),borderRadius:r.getRadius()},onClick:o,children:i(ne.CloseAction)})]})]})})}),p.jsxs(di,{className:"relative flex items-center h-full",children:[p.jsx(di.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 transition-colors",style:{borderRadius:r.getRadius()},id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:i(ne.ChatSettings),children:p.jsx(ie.Menu,{className:"size-5",style:{color:r.getColor(C.HeaderText)}})}),p.jsx(as,{children:!t&&p.jsx(He.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute z-[9999] right-0 top-5 min-w-[14rem]",children:p.jsxs(di.Content,{placement:"left-end",className:"text-left rounded-lg shadow-xl dropdown-menu w-full",style:{backgroundColor:r.getColor(C.Background),borderRadius:r.getRadius()},"aria-labelledby":"dropdownMenuButton",children:[p.jsx("h5",{className:"text-sm font-semibold px-3 py-2 border-b",style:{color:r.getColor(C.FooterText),borderBottomColor:r.getColor(C.DividerColor)},children:i(ne.ChatSettings)}),p.jsx("ul",{className:"py-2 px-2",children:p.jsx("li",{children:p.jsxs("button",{className:"p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",style:{color:r.getColor(C.ErrorText),borderRadius:r.getRadius()},onClick:a=>{a.stopPropagation(),a.preventDefault(),n(!0)},children:[p.jsx(ie.X,{className:"w-4 h-4"}),p.jsx("span",{children:i(ne.ChatEndConversation)})]})})})]})})})]})]})}function r$({text:e}){const n=Se().getColor(C.LinkColor),i=(s=>{const o=/(https?:\/\/(?:[-\w.])+(?:\:[0-9]+)?(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?|(?:www\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?)/gi,a=s.split(/(<[^>]*>)/g);let l="",c=!1;for(let d=0;d<a.length;d++){const u=a[d];if(u.startsWith("<")&&u.endsWith(">"))if(u.match(/^<a\s/i)){if(u.includes("style="))l+=u;else{const f=u.replace(/^(<a\s[^>]*)(>)$/i,`$1 style="color: ${n}; text-decoration: underline;"$2`);l+=f}c=!0}else u.match(/^<\/a>/i)?(l+=u,c=!1):l+=u;else if(!c&&u.trim()){const f=u.replace(o,m=>{const h=m.replace(/[">]+$/,"");return`<a href="${/^https?:\/\//i.test(h)?h:`https://${h}`}" target="_blank" rel="noopener noreferrer" style="color: ${n}; text-decoration: underline;">${h}</a>`});l+=f}else l+=u}return l})(e);return p.jsx("span",{className:"linkified",dangerouslySetInnerHTML:{__html:i}})}const Ax="opacity-0 group-hover/item:opacity-100 transition-opacity duration-200";function KS({files:e,className:t,onDelete:n,hideName:r}){const i=Io(),[s,o]=v.useState(new Map);v.useEffect(()=>{const h=new Map;for(let g=0;g<e.length;g++){const b=e[g];if(b instanceof File){const x=URL.createObjectURL(b);h.set(g,x)}}return o(h),()=>{for(const g of h.values())URL.revokeObjectURL(g)}},[e]);const a=h=>{var b;return((b=(h instanceof File?h.name:h).split(".").pop())==null?void 0:b.toLowerCase())||""},l=h=>h instanceof File?h.name:h.split("/").pop()||h,c=h=>{const[g,b]=h.split(".");return g.length>10?`${g.slice(0,10)}...${b}`:h},d=h=>{const g=["jpg","jpeg","png","gif","bmp","webp","svg"],b=a(h);return g.includes(b)},u=(h,g)=>{if(h instanceof File){const b=s.get(g);b&&window.open(b,"_blank")}else window.open(h,"_blank")},f=(h,g)=>{h.stopPropagation(),n==null||n(g)},m=(h,g)=>h instanceof File?s.get(g)||"":h;return p.jsx("div",{className:Ie("flex gap-2 w-full overflow-x-auto",t),children:e.map((h,g)=>{const b=l(h),x=a(h),y=d(h),w=m(h,g);return p.jsxs("div",{onClick:()=>u(h,g),className:"min-w-28 max-w-28 cursor-pointer group/item border border-gray-200 rounded-lg p-2 hover:shadow-md transition-all duration-200 hover:border-gray-300 bg-white relative",children:[n&&p.jsx("button",{onClick:j=>f(j,g),className:Ie("absolute top-1 right-1 w-5 h-5 bg-red-500 hover:bg-red-600 text-white rounded-full flex items-center justify-center transition-opacity duration-200 z-10",{"opacity-0 group-hover/item:opacity-100":!i}),children:p.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),y?p.jsx("div",{className:"aspect-square w-fit mb-1 overflow-hidden rounded",children:p.jsx("img",{src:w,alt:b,className:"w-24 h-24 min-h-24 min-w-24 object-cover group-hover/item:scale-105 transition-transform duration-200"})}):p.jsx("div",{className:"min-w-24 aspect-square w-full mb-1 flex items-center justify-center bg-gray-50 rounded group-hover/item:bg-gray-100 transition-colors duration-200",children:p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"w-8 h-8 mx-auto mb-1 bg-blue-100 rounded flex items-center justify-center",children:p.jsx("svg",{className:"w-4 h-4 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}),p.jsx("div",{className:Ie("text-[10px] font-medium text-gray-600 uppercase",{[Ax]:r}),children:x||"file"})]})}),p.jsx("div",{className:Ie("max-w-24 text-xs text-gray-700 font-medium truncate text-ellipsis overflow-hidden",{[Ax]:r}),title:b,children:c(b)})]},g)})})}const i$={hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},s$={hidden:{opacity:0,y:8,scale:.95},visible:{opacity:1,y:0,scale:1}};function o$({buttons:e,className:t=""}){const n=Se();if(!e||e.length===0)return null;const r=s=>{s.startsWith("http://")||s.startsWith("https://")?window.open(s,"_blank","noopener,noreferrer"):s.startsWith("tel:")||s.startsWith("mailto:")?window.location.href=s:console.log("Custom action:",s)},i=s=>s.startsWith("http://")||s.startsWith("https://")?p.jsx(ie.ExternalLink,{className:"size-4"}):s.startsWith("tel:")?p.jsx(ie.Phone,{className:"size-4"}):s.startsWith("mailto:")?p.jsx(ie.Mail,{className:"size-4"}):null;return p.jsx(He.div,{className:Ie(t,"mt-2"),initial:"hidden",animate:"visible",variants:i$,transition:{duration:.3,ease:"easeOut",staggerChildren:.08},children:p.jsx("div",{className:"rounded-lg ",style:{backgroundColor:`${n.getColor(C.Background)}f0`},children:p.jsx("div",{className:"flex flex-wrap gap-2",children:e.map((s,o)=>p.jsxs(He.button,{variants:s$,transition:{duration:.25,ease:"easeOut"},whileHover:{scale:1.02,y:-1,transition:{duration:.15}},whileTap:{scale:.98,transition:{duration:.1}},onClick:()=>r(s.url),className:"group inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 relative overflow-hidden cursor-pointer",style:{backgroundColor:n.getColor(C.GreeterBackground),color:n.getColor(C.GreeterText),borderRadius:n.getRadius(),border:`1px solid ${n.getColor(C.DividerColor)}`,boxShadow:`0 1px 3px ${n.getColor(C.ShadowColor)}30`},onMouseEnter:a=>{a.currentTarget.style.backgroundColor=n.getColor(C.ButtonBackground),a.currentTarget.style.color=n.getColor(C.ButtonText),a.currentTarget.style.borderColor=n.getColor(C.ButtonBackground),a.currentTarget.style.boxShadow=`0 4px 12px ${n.getColor(C.ShadowColor)}40`},onMouseLeave:a=>{a.currentTarget.style.backgroundColor=n.getColor(C.GreeterBackground),a.currentTarget.style.color=n.getColor(C.GreeterText),a.currentTarget.style.borderColor=n.getColor(C.DividerColor),a.currentTarget.style.boxShadow=`0 1px 3px ${n.getColor(C.ShadowColor)}30`},children:[p.jsxs("span",{className:"flex items-center gap-2",children:[i(s.url),p.jsx("span",{className:"font-medium",children:s.label})]}),p.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`linear-gradient(45deg, transparent 30%, ${n.getColor(C.ButtonText)}10 50%, transparent 70%)`,borderRadius:n.getRadius()}})]},`${s.label}-${o}`))})})})}const a$={hidden:{opacity:0,y:8},visible:()=>({opacity:1,y:0})},Rx=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function XS({messages:e,isTyping:t}){var d,u,f,m;const n=v.useRef(null),r=v.useRef(null),[i,s]=v.useState(!0),{widget:o}=he(),a=Se(),l=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},c=()=>{if(r.current){const{scrollTop:h,scrollHeight:g,clientHeight:b}=r.current,x=g-h<=b+10;s(x)}};return v.useEffect(()=>{(i||t)&&l()},[e,i,t]),p.jsxs("section",{onScroll:c,ref:r,className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[((u=(d=o==null?void 0:o.appearance)==null?void 0:d.design)==null?void 0:u.greeting_message)&&p.jsx("div",{className:"flex w-full items-center justify-start",children:p.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 px-3 py-2 shadow-sm",style:{backgroundColor:a.getColor(C.MessageAdminBackground),color:a.getColor(C.MessageAdminText),borderRadius:a.getRadius()},children:(m=(f=o==null?void 0:o.appearance)==null?void 0:f.design)==null?void 0:m.greeting_message})}),p.jsx(as,{children:Array.isArray(e)&&e.filter(h=>{var g;return(!!h.content||((g=h.files)==null?void 0:g.length)>0)&&h.content!==`
|
|
109
|
+
`)),[]});var IL=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(IL||{});function LL(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function $L(e,t,n,r){let[i,s]=v.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=NL(e&&i?3:0),c=v.useRef(!1),d=v.useRef(!1),u=IS();return ci(()=>{var f;if(e){if(n&&s(!0),!t){n&&a(3);return}return(f=r==null?void 0:r.start)==null||f.call(r,n),BL(t,{inFlight:c,prepare(){d.current?d.current=!1:d.current=c.current,c.current=!0,!d.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){d.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var m;d.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(c.current=!1,l(7),n||s(!1),(m=r==null?void 0:r.end)==null||m.call(r,n))}})}},[e,n,t,u]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function BL(e,{prepare:t,run:n,done:r,inFlight:i}){let s=sd();return VL(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(zL(e,r))})}),s.dispose}function zL(e,t){var n,r;let i=sd();if(!e)return i.dispose;let s=!1;i.add(()=>{s=!0});let o=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return o.length===0?(t(),i.dispose):(Promise.allSettled(o.map(a=>a.finished)).then(()=>{s||t()}),i.dispose)}function VL(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}let Ng=v.createContext(null);Ng.displayName="OpenClosedContext";var Bi=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Bi||{});function US(){return v.useContext(Ng)}function UL({value:e,children:t}){return W.createElement(Ng.Provider,{value:e},t)}function HL(){let e=typeof document>"u";return"useSyncExternalStore"in xf?(t=>t.useSyncExternalStore)(xf)(()=>()=>{},()=>!1,()=>!e):!1}function HS(){let e=HL(),[t,n]=v.useState(bu.isHandoffComplete);return t&&bu.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>bu.handoff(),[]),e?!1:t}function WL(){let e=v.useRef(!1);return ci(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function WS(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:GS)!==v.Fragment||W.Children.count(e.children)===1}let ad=v.createContext(null);ad.displayName="TransitionContext";var qL=(e=>(e.Visible="visible",e.Hidden="hidden",e))(qL||{});function GL(){let e=v.useContext(ad);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function YL(){let e=v.useContext(ld);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let ld=v.createContext(null);ld.displayName="NestingContext";function ud(e){return"children"in e?ud(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function qS(e,t){let n=LS(e),r=v.useRef([]),i=WL(),s=IS(),o=yr((m,h=Zr.Hidden)=>{let g=r.current.findIndex(({el:b})=>b===m);g!==-1&&(od(h,{[Zr.Unmount](){r.current.splice(g,1)},[Zr.Hidden](){r.current[g].state="hidden"}}),s.microTask(()=>{var b;!ud(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),a=yr(m=>{let h=r.current.find(({el:g})=>g===m);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:m,state:"visible"}),()=>o(m,Zr.Unmount)}),l=v.useRef([]),c=v.useRef(Promise.resolve()),d=v.useRef({enter:[],leave:[]}),u=yr((m,h,g)=>{l.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([b])=>b!==m)),t==null||t.chains.current[h].push([m,new Promise(b=>{l.current.push(b)})]),t==null||t.chains.current[h].push([m,new Promise(b=>{Promise.all(d.current[h].map(([x,y])=>y)).then(()=>b())})]),h==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(h)):g(h)}),f=yr((m,h,g)=>{Promise.all(d.current[h].splice(0).map(([b,x])=>x)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>g(h))});return v.useMemo(()=>({children:r,register:a,unregister:o,onStart:u,onStop:f,wait:c,chains:d}),[a,o,r,u,f,d,c])}let GS=v.Fragment,YS=$S.RenderStrategy;function QL(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:c,enterFrom:d,enterTo:u,entered:f,leave:m,leaveFrom:h,leaveTo:g,...b}=e,[x,y]=v.useState(null),w=v.useRef(null),j=WS(e),k=VS(...j?[w,t,y]:t===null?[]:[t]),T=(n=b.unmount)==null||n?Zr.Unmount:Zr.Hidden,{show:A,appear:S,initial:F}=GL(),[N,O]=v.useState(A?"visible":"hidden"),Q=YL(),{register:J,unregister:U}=Q;ci(()=>J(w),[J,w]),ci(()=>{if(T===Zr.Hidden&&w.current){if(A&&N!=="visible"){O("visible");return}return od(N,{hidden:()=>U(w),visible:()=>J(w)})}},[N,w,J,U,A,T]);let $=HS();ci(()=>{if(j&&$&&N==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,N,$,j]);let _=F&&!S,I=S&&A&&F,R=v.useRef(!1),P=qS(()=>{R.current||(O("hidden"),U(w))},Q),D=yr(ae=>{R.current=!0;let q=ae?"enter":"leave";P.onStart(w,q,se=>{se==="enter"?s==null||s():se==="leave"&&(a==null||a())})}),B=yr(ae=>{let q=ae?"enter":"leave";R.current=!1,P.onStop(w,q,se=>{se==="enter"?o==null||o():se==="leave"&&(l==null||l())}),q==="leave"&&!ud(P)&&(O("hidden"),U(w))});v.useEffect(()=>{j&&i||(D(A),B(A))},[A,j,i]);let V=!(!i||!j||!$||_),[,Y]=$L(V,x,A,{start:D,end:B}),z=Oi({ref:k,className:((r=gh(b.className,I&&c,I&&d,Y.enter&&c,Y.enter&&Y.closed&&d,Y.enter&&!Y.closed&&u,Y.leave&&m,Y.leave&&!Y.closed&&h,Y.leave&&Y.closed&&g,!Y.transition&&A&&f))==null?void 0:r.trim())||void 0,...LL(Y)}),Z=0;N==="visible"&&(Z|=Bi.Open),N==="hidden"&&(Z|=Bi.Closed),A&&N==="hidden"&&(Z|=Bi.Opening),!A&&N==="visible"&&(Z|=Bi.Closing);let K=BS();return W.createElement(ld.Provider,{value:P},W.createElement(UL,{value:Z},K({ourProps:z,theirProps:b,defaultTag:GS,features:YS,visible:N==="visible",name:"Transition.Child"})))}function KL(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=v.useRef(null),a=WS(e),l=VS(...a?[o,t]:t===null?[]:[t]);HS();let c=US();if(n===void 0&&c!==null&&(n=(c&Bi.Open)===Bi.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,u]=v.useState(n?"visible":"hidden"),f=qS(()=>{n||u("hidden")}),[m,h]=v.useState(!0),g=v.useRef([n]);ci(()=>{m!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),h(!1))},[g,n]);let b=v.useMemo(()=>({show:n,appear:r,initial:m}),[n,r,m]);ci(()=>{n?u("visible"):!ud(f)&&o.current!==null&&u("hidden")},[n,f]);let x={unmount:i},y=yr(()=>{var k;m&&h(!1),(k=e.beforeEnter)==null||k.call(e)}),w=yr(()=>{var k;m&&h(!1),(k=e.beforeLeave)==null||k.call(e)}),j=BS();return W.createElement(ld.Provider,{value:f},W.createElement(ad.Provider,{value:b},j({ourProps:{...x,as:v.Fragment,children:W.createElement(QS,{ref:l,...x,...s,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:v.Fragment,features:YS,visible:d==="visible",name:"Transition"})))}function XL(e,t){let n=v.useContext(ad)!==null,r=US()!==null;return W.createElement(W.Fragment,null,!n&&r?W.createElement(vh,{ref:t,...e}):W.createElement(QS,{ref:t,...e}))}let vh=Dg(KL),QS=Dg(QL),ZL=Dg(XL),JL=Object.assign(vh,{Child:ZL,Root:vh});const Fg=v.createContext(void 0),di=({as:e="div",children:t,className:n})=>{const[r,i]=v.useState(!1),s=v.useCallback(()=>{i(a=>!a)},[]),o=v.useRef(null);return v.useEffect(()=>{const a=l=>{o.current&&!o.current.contains(l.target)&&r&&s&&s()};return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[r,s]),p.jsx(Fg.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:p.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},e$=({type:e,children:t,className:n,style:r,id:i,title:s})=>{const{open:o,toggleOpen:a,setOpen:l}=v.useContext(Fg),c=Se(),d=n||"font-bold py-2 px-4 rounded-sm",u=n||"transition-all duration-200 ease-linear border-dashed dropdown-toggle btn";return p.jsx("div",{children:e==="a"?p.jsx(Bj,{id:i,to:"/#",onClick:f=>{f.preventDefault(),a()},className:u+(o?" show":""),children:t}):p.jsx("button",{id:i,onClick:f=>{f.stopPropagation(),f.preventDefault(),l(!o)},type:"button",className:d,style:{backgroundColor:c.getColor(C.ButtonBackground),color:c.getColor(C.ButtonText),borderRadius:c.getRadius(),...r},title:s,children:t})})},t$=({as:e="div",className:t,style:n,children:r,placement:i})=>{const{open:s,setOpen:o}=v.useContext(Fg),a=Se(),l=t||"absolute z-50 py-2 mt-1 text-left list-none rounded-md shadow-md dropdown-menu min-w-max",[c,d]=v.useState("right-end");v.useEffect(()=>{i&&d(i)},[i]);const u=v.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),m=()=>{if(s&&c==="right-end"&&u.current){const h=u.current;h.style.position="absolute",f==="rtl"?h.style.inset="0px auto auto 0px":h.style.inset="0px 0px auto auto",h.style.margin="0px",h.style.transform="translate(0px, 54px)"}if(s&&c==="start-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px auto auto 0px",h.style.margin="0px",h.style.transform="translate(0px, 20px)"}if(s&&c==="top-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="auto 0px 0px auto",h.style.margin="0px",h.style.transform="translate(-58px, -30px)"}if(s&&c==="bottom-start"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px 0px auto auto",h.style.margin="0px",h.style.transform="translate(0px, 54px)"}if(s&&c==="bottom-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px 0px auto auto",h.style.margin="0px",h.style.transform="translate(0px, 39px)"}if(s&&c==="top-start"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="auto auto 0px 0px",h.style.margin="0px",h.style.transform="translate(0px, -95px)"}if(s&&c==="left-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px auto auto 0px",h.style.margin="0px",h.style.right="0px",h.style.transform="translate(0px, -20px)"}return{}};return p.jsx(JL,{as:W.Fragment,show:s,children:h=>p.jsx(e,{ref:u,onClick:()=>o(!1),className:`${l} ${h==="entered"?"transition-all":""}`,style:{...m(),backgroundColor:a.getColor(C.Background),borderRadius:a.getRadius(),boxShadow:`0 10px 25px -5px ${a.getColor(C.ShadowColor)}, 0 8px 10px -6px ${a.getColor(C.ShadowColor)}`,...n},children:r})})};di.Trigger=e$;di.Content=t$;function n$({onChatClose:e}){const[t,n]=v.useState(!1),r=Se(),i=ms(),s=Rr(),o=()=>{s==null||s.emit(tt.ChatClose,{}),localStorage.setItem("showActionButtons","false"),e()};return p.jsxs(p.Fragment,{children:[p.jsx(as,{children:t&&p.jsx(He.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-50 flex items-center justify-center p-4",style:{backgroundColor:r.getColor(C.ModalOverlayColor)},children:p.jsxs(He.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"p-5 rounded-xl shadow-lg max-w-xs w-full",style:{backgroundColor:r.getColor(C.Background),borderRadius:r.getRadius()},children:[p.jsx("div",{className:"text-lg font-semibold mb-2",style:{color:r.getColor(C.ChatCloseConfirmText)},children:i(ne.ChatCloseConfirm)}),p.jsx("div",{className:"text-sm mb-4",style:{color:r.getColor(C.FooterText)},children:i(ne.ChatCloseWarning)}),p.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[p.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(C.GreeterBackground),color:r.getColor(C.GreeterText),borderRadius:r.getRadius()},onClick:()=>n(!1),children:i(ne.CancelAction)}),p.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(C.ErrorBackground),color:r.getColor(C.ErrorText),borderRadius:r.getRadius()},onClick:o,children:i(ne.CloseAction)})]})]})})}),p.jsxs(di,{className:"relative flex items-center h-full",children:[p.jsx(di.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 transition-colors",style:{borderRadius:r.getRadius()},id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:i(ne.ChatSettings),children:p.jsx(ie.Menu,{className:"size-5",style:{color:r.getColor(C.HeaderText)}})}),p.jsx(as,{children:!t&&p.jsx(He.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute z-[9999] right-0 top-5 min-w-[14rem]",children:p.jsxs(di.Content,{placement:"left-end",className:"text-left rounded-lg shadow-xl dropdown-menu w-full",style:{backgroundColor:r.getColor(C.Background),borderRadius:r.getRadius()},"aria-labelledby":"dropdownMenuButton",children:[p.jsx("h5",{className:"text-sm font-semibold px-3 py-2 border-b",style:{color:r.getColor(C.FooterText),borderBottomColor:r.getColor(C.DividerColor)},children:i(ne.ChatSettings)}),p.jsx("ul",{className:"py-2 px-2",children:p.jsx("li",{children:p.jsxs("button",{className:"p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",style:{color:r.getColor(C.ErrorText),borderRadius:r.getRadius()},onClick:a=>{a.stopPropagation(),a.preventDefault(),n(!0)},children:[p.jsx(ie.X,{className:"w-4 h-4"}),p.jsx("span",{children:i(ne.ChatEndConversation)})]})})})]})})})]})]})}function r$({text:e}){const n=Se().getColor(C.LinkColor),i=(s=>{const o=/(https?:\/\/(?:[-\w.])+(?:\:[0-9]+)?(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?|(?:www\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?)/gi,a=s.split(/(<[^>]*>)/g);let l="",c=!1;for(let d=0;d<a.length;d++){const u=a[d];if(u.startsWith("<")&&u.endsWith(">"))if(u.match(/^<a\s/i)){if(u.includes("style="))l+=u;else{const f=u.replace(/^(<a\s[^>]*)(>)$/i,`$1 style="color: ${n}; text-decoration: underline;"$2`);l+=f}c=!0}else u.match(/^<\/a>/i)?(l+=u,c=!1):l+=u;else if(!c&&u.trim()){const f=u.replace(o,m=>{const h=m.replace(/[">]+$/,"");return`<a href="${/^https?:\/\//i.test(h)?h:`https://${h}`}" target="_blank" rel="noopener noreferrer" style="color: ${n}; text-decoration: underline;">${h}</a>`});l+=f}else l+=u}return l})(e);return p.jsx("span",{className:"linkified",dangerouslySetInnerHTML:{__html:i}})}const Ax="opacity-0 group-hover/item:opacity-100 transition-opacity duration-200";function KS({files:e,className:t,onDelete:n,hideName:r}){const i=Cs(),[s,o]=v.useState(new Map);v.useEffect(()=>{const h=new Map;for(let g=0;g<e.length;g++){const b=e[g];if(b instanceof File){const x=URL.createObjectURL(b);h.set(g,x)}}return o(h),()=>{for(const g of h.values())URL.revokeObjectURL(g)}},[e]);const a=h=>{var b;return((b=(h instanceof File?h.name:h).split(".").pop())==null?void 0:b.toLowerCase())||""},l=h=>h instanceof File?h.name:h.split("/").pop()||h,c=h=>{const[g,b]=h.split(".");return g.length>10?`${g.slice(0,10)}...${b}`:h},d=h=>{const g=["jpg","jpeg","png","gif","bmp","webp","svg"],b=a(h);return g.includes(b)},u=(h,g)=>{if(h instanceof File){const b=s.get(g);b&&window.open(b,"_blank")}else window.open(h,"_blank")},f=(h,g)=>{h.stopPropagation(),n==null||n(g)},m=(h,g)=>h instanceof File?s.get(g)||"":h;return p.jsx("div",{className:Ie("flex gap-2 w-full overflow-x-auto",t),children:e.map((h,g)=>{const b=l(h),x=a(h),y=d(h),w=m(h,g);return p.jsxs("div",{onClick:()=>u(h,g),className:"min-w-28 max-w-28 cursor-pointer group/item border border-gray-200 rounded-lg p-2 hover:shadow-md transition-all duration-200 hover:border-gray-300 bg-white relative",children:[n&&p.jsx("button",{onClick:j=>f(j,g),className:Ie("absolute top-1 right-1 w-5 h-5 bg-red-500 hover:bg-red-600 text-white rounded-full flex items-center justify-center transition-opacity duration-200 z-10",{"opacity-0 group-hover/item:opacity-100":!i}),children:p.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),y?p.jsx("div",{className:"aspect-square w-fit mb-1 overflow-hidden rounded",children:p.jsx("img",{src:w,alt:b,className:"w-24 h-24 min-h-24 min-w-24 object-cover group-hover/item:scale-105 transition-transform duration-200"})}):p.jsx("div",{className:"min-w-24 aspect-square w-full mb-1 flex items-center justify-center bg-gray-50 rounded group-hover/item:bg-gray-100 transition-colors duration-200",children:p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"w-8 h-8 mx-auto mb-1 bg-blue-100 rounded flex items-center justify-center",children:p.jsx("svg",{className:"w-4 h-4 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}),p.jsx("div",{className:Ie("text-[10px] font-medium text-gray-600 uppercase",{[Ax]:r}),children:x||"file"})]})}),p.jsx("div",{className:Ie("max-w-24 text-xs text-gray-700 font-medium truncate text-ellipsis overflow-hidden",{[Ax]:r}),title:b,children:c(b)})]},g)})})}const i$={hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},s$={hidden:{opacity:0,y:8,scale:.95},visible:{opacity:1,y:0,scale:1}};function o$({buttons:e,className:t=""}){const n=Se();if(!e||e.length===0)return null;const r=s=>{s.startsWith("http://")||s.startsWith("https://")?window.open(s,"_blank","noopener,noreferrer"):s.startsWith("tel:")||s.startsWith("mailto:")?window.location.href=s:console.log("Custom action:",s)},i=s=>s.startsWith("http://")||s.startsWith("https://")?p.jsx(ie.ExternalLink,{className:"size-4"}):s.startsWith("tel:")?p.jsx(ie.Phone,{className:"size-4"}):s.startsWith("mailto:")?p.jsx(ie.Mail,{className:"size-4"}):null;return p.jsx(He.div,{className:Ie(t,"mt-2"),initial:"hidden",animate:"visible",variants:i$,transition:{duration:.3,ease:"easeOut",staggerChildren:.08},children:p.jsx("div",{className:"rounded-lg ",style:{backgroundColor:`${n.getColor(C.Background)}f0`},children:p.jsx("div",{className:"flex flex-wrap gap-2",children:e.map((s,o)=>p.jsxs(He.button,{variants:s$,transition:{duration:.25,ease:"easeOut"},whileHover:{scale:1.02,y:-1,transition:{duration:.15}},whileTap:{scale:.98,transition:{duration:.1}},onClick:()=>r(s.url),className:"group inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 relative overflow-hidden cursor-pointer",style:{backgroundColor:n.getColor(C.GreeterBackground),color:n.getColor(C.GreeterText),borderRadius:n.getRadius(),border:`1px solid ${n.getColor(C.DividerColor)}`,boxShadow:`0 1px 3px ${n.getColor(C.ShadowColor)}30`},onMouseEnter:a=>{a.currentTarget.style.backgroundColor=n.getColor(C.ButtonBackground),a.currentTarget.style.color=n.getColor(C.ButtonText),a.currentTarget.style.borderColor=n.getColor(C.ButtonBackground),a.currentTarget.style.boxShadow=`0 4px 12px ${n.getColor(C.ShadowColor)}40`},onMouseLeave:a=>{a.currentTarget.style.backgroundColor=n.getColor(C.GreeterBackground),a.currentTarget.style.color=n.getColor(C.GreeterText),a.currentTarget.style.borderColor=n.getColor(C.DividerColor),a.currentTarget.style.boxShadow=`0 1px 3px ${n.getColor(C.ShadowColor)}30`},children:[p.jsxs("span",{className:"flex items-center gap-2",children:[i(s.url),p.jsx("span",{className:"font-medium",children:s.label})]}),p.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`linear-gradient(45deg, transparent 30%, ${n.getColor(C.ButtonText)}10 50%, transparent 70%)`,borderRadius:n.getRadius()}})]},`${s.label}-${o}`))})})})}const a$={hidden:{opacity:0,y:8},visible:()=>({opacity:1,y:0})},Rx=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function XS({messages:e,isTyping:t}){var d,u,f,m;const n=v.useRef(null),r=v.useRef(null),[i,s]=v.useState(!0),{widget:o}=he(),a=Se(),l=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},c=()=>{if(r.current){const{scrollTop:h,scrollHeight:g,clientHeight:b}=r.current,x=g-h<=b+10;s(x)}};return v.useEffect(()=>{(i||t)&&l()},[e,i,t]),p.jsxs("section",{onScroll:c,ref:r,className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[((u=(d=o==null?void 0:o.appearance)==null?void 0:d.design)==null?void 0:u.greeting_message)&&p.jsx("div",{className:"flex w-full items-center justify-start",children:p.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 px-3 py-2 shadow-sm",style:{backgroundColor:a.getColor(C.MessageAdminBackground),color:a.getColor(C.MessageAdminText),borderRadius:a.getRadius()},children:(m=(f=o==null?void 0:o.appearance)==null?void 0:f.design)==null?void 0:m.greeting_message})}),p.jsx(as,{children:Array.isArray(e)&&e.filter(h=>{var g;return(!!h.content||((g=h.files)==null?void 0:g.length)>0)&&h.content!==`
|
|
110
110
|
`}).map((h,g)=>p.jsxs(He.div,{custom:g,initial:"hidden",animate:"visible",variants:a$,transition:{delay:g*.03,duration:.15,ease:"easeOut"},className:Ie("flex flex-col w-full justify-center break-words",{"items-end":h.sender_type===ye.Customer||h.activity_type===jn.ChatCreated,"items-start":h.sender_type===ye.User||h.sender_type===ye.Agent,"items-center":h.sender_type===ye.System||h.sender_type===ye.Activity}),children:[h.sender_type===ye.System&&p.jsx("div",{className:"whitespace-pre-wrap px-3 py-1.5 text-sm shadow-sm",style:{backgroundColor:a.getColor(C.MessageAdminBackground),color:a.getColor(C.MessageAdminText),borderRadius:a.getRadius()},children:h.content}),([ye.Customer,ye.User,ye.Agent].includes(h.sender_type)||h.activity_type===jn.ChatCreated)&&p.jsxs(He.div,{initial:{scale:.95},animate:{scale:1},transition:{duration:.2},className:"max-w-[85%] whitespace-pre-wrap border-0 px-3 py-2 shadow-sm",style:{backgroundColor:h.sender_type===ye.User?a.getColor(C.MessageAdminBackground):h.sender_type===ye.Agent?a.getColor(C.MessageAgentBackground)||a.getColor(C.MessageAdminBackground):a.getColor(C.MessageVisitorBackground),color:h.sender_type===ye.User?a.getColor(C.MessageAdminText):h.sender_type===ye.Agent?a.getColor(C.MessageAgentText)||a.getColor(C.MessageAdminText):a.getColor(C.MessageVisitorText),borderRadius:a.getRadius()},children:[h.files&&h.files.length>0&&p.jsx(KS,{files:h.files,className:"mb-1",hideName:!0}),h.sender_type===ye.User||h.sender_type===ye.Agent?p.jsx(r$,{text:h.content}):h.content,h.created_at&&p.jsx("div",{className:"text-[0.5rem] text-right opacity-70",style:{color:h.sender_type===ye.User?a.getColor(C.MessageAdminText):h.sender_type===ye.Agent?a.getColor(C.MessageAgentText)||a.getColor(C.MessageAdminText):a.getColor(C.MessageVisitorText)},children:Rx(h.created_at)})]}),([ye.Customer,ye.User,ye.Agent].includes(h.sender_type)||h.activity_type===jn.ChatCreated)&&h.buttons&&h.buttons.length>0&&p.jsx("div",{className:Ie("w-full",{"flex justify-end":h.sender_type===ye.Customer||h.activity_type===jn.ChatCreated,"flex justify-start":h.sender_type===ye.User||h.sender_type===ye.Agent}),children:p.jsx("div",{className:"max-w-[85%]",children:p.jsx(o$,{buttons:h.buttons})})}),h.sender_type===ye.Activity&&h.activity_type!==jn.ChatCreated&&p.jsx("div",{className:"whitespace-pre-wrap border-0 rounded-full px-3 py-1 text-xs shadow-none",style:{backgroundColor:a.getColor(C.MessageAdminBackground),color:a.getColor(C.MessageAdminText)},children:h.activity_type===jn.AdminLeave?`${h.content.split("_")[2]} odadan ayrıldı`:h.activity_type===jn.AdminJoin?`${h.content.split("_")[2]} odaya katıldı`:h.activity_type===jn.AdminToggleUpload?h.content.includes("is_customer_uploadable:true")?"Dosya gönderim izni açıldı":"Dosya gönderim izni kapatıldı":h.content}),ye.System===h.sender_type&&p.jsx("div",{className:"text-xs",style:{color:a.getColor(C.MessageAdminText)},children:h.created_at&&Rx(h.created_at)})]},h.id||g))}),t&&p.jsx("div",{className:"flex w-full items-center justify-start mt-1",children:p.jsx("div",{className:"flex items-center rounded-full px-3 py-1.5 shadow-none",style:{backgroundColor:a.getColor(C.MessageAdminBackground)},children:p.jsxs("div",{className:"flex space-x-1",children:[p.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(C.MessageAdminText),animationDelay:"0ms"}}),p.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(C.MessageAdminText),animationDelay:"150ms"}}),p.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(C.MessageAdminText),animationDelay:"300ms"}})]})})}),!i&&p.jsx("div",{className:"absolute bottom-10 right-4",children:p.jsx(pt,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md z-10",onClick:()=>{var h,g;(g=r.current)==null||g.scrollTo({top:(h=r.current)==null?void 0:h.scrollHeight,behavior:"smooth"})},children:p.jsx(ie.ArrowDown,{className:"size-4"})})}),p.jsx("div",{ref:n})]})}/**
|
|
111
111
|
* @license lucide-react v0.511.0 - ISC
|
|
112
112
|
*
|
|
@@ -132,8 +132,8 @@ attempted value: ${o}
|
|
|
132
132
|
*
|
|
133
133
|
* This source code is licensed under the ISC license.
|
|
134
134
|
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const h$=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],JS=p$("cloud-upload",h$);var eT={exports:{}},m$="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",g$=m$,v$=g$;function tT(){}function nT(){}nT.resetWarningCache=tT;var y$=function(){function e(r,i,s,o,a,l){if(l!==v$){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:nT,resetWarningCache:tT};return n.PropTypes=n,n};eT.exports=y$();var x$=eT.exports;const Re=_r(x$);function Cs(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(d){try{c(r.next(d))}catch(u){o(u)}}function l(d){try{c(r.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):i(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}const w$=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function _o(e,t,n){const r=b$(e),{webkitRelativePath:i}=e,s=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&Ox(r,"path",s),Ox(r,"relativePath",s),r}function b$(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=w$.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function Ox(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const C$=[".DS_Store","Thumbs.db"];function k$(e){return Cs(this,void 0,void 0,function*(){return lc(e)&&S$(e.dataTransfer)?j$(e.dataTransfer,e.type):T$(e)?_$(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?E$(e):[]})}function S$(e){return lc(e)}function T$(e){return lc(e)&&lc(e.target)}function lc(e){return typeof e=="object"&&e!==null}function _$(e){return yh(e.target.files).map(t=>_o(t))}function E$(e){return Cs(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>_o(n))})}function j$(e,t){return Cs(this,void 0,void 0,function*(){if(e.items){const n=yh(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(A$));return Mx(rT(r))}return Mx(yh(e.files).map(n=>_o(n)))})}function Mx(e){return e.filter(t=>C$.indexOf(t.name)===-1)}function yh(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function A$(e){if(typeof e.webkitGetAsEntry!="function")return Dx(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?iT(t):Dx(e,t)}function rT(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?rT(n):[n]],[])}function Dx(e,t){return Cs(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const s=yield e.getAsFileSystemHandle();if(s===null)throw new Error(`${e} is not a File`);if(s!==void 0){const o=yield s.getFile();return o.handle=s,_o(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return _o(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function R$(e){return Cs(this,void 0,void 0,function*(){return e.isDirectory?iT(e):P$(e)})}function iT(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function s(){t.readEntries(o=>Cs(this,void 0,void 0,function*(){if(o.length){const a=Promise.all(o.map(R$));i.push(a),s()}else try{const a=yield Promise.all(i);n(a)}catch(a){r(a)}}),o=>{r(o)})}s()})}function P$(e){return Cs(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=_o(r,e.fullPath);t(i)},r=>{n(r)})})})}var vf=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),s=i.replace(/\/.*$/,"");return n.some(function(o){var a=o.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):i===a})}return!0};function Nx(e){return D$(e)||M$(e)||oT(e)||O$()}function O$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
136
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function D$(e){if(Array.isArray(e))return xh(e)}function Fx(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 Ix(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fx(Object(n),!0).forEach(function(r){sT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function
|
|
137
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oT(e,t){if(e){if(typeof e=="string")return xh(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 xh(e,t)}}function xh(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 F$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function I$(e){if(Array.isArray(e))return e}var L$=typeof vf=="function"?vf:vf.default,$$="file-invalid-type",B$="file-too-large",z$="file-too-small",V$="too-many-files",U$=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:$$,message:"File type must be ".concat(r)}},Lx=function(t){return{code:B$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},$x=function(t){return{code:z$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},H$={code:V$,message:"Too many files"};function aT(e,t){var n=e.type==="application/x-moz-file"||L$(e,t);return[n,n?null:U$(t)]}function lT(e,t,n){if(Mi(e.size))if(Mi(t)&&Mi(n)){if(e.size>n)return[!1,Lx(n)];if(e.size<t)return[!1,$x(t)]}else{if(Mi(t)&&e.size<t)return[!1,$x(t)];if(Mi(n)&&e.size>n)return[!1,Lx(n)]}return[!0,null]}function Mi(e){return e!=null}function W$(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,s=e.multiple,o=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&o>=1&&t.length>o?!1:t.every(function(l){var c=aT(l,n),d=
|
|
135
|
+
*/const h$=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],JS=p$("cloud-upload",h$);var eT={exports:{}},m$="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",g$=m$,v$=g$;function tT(){}function nT(){}nT.resetWarningCache=tT;var y$=function(){function e(r,i,s,o,a,l){if(l!==v$){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:nT,resetWarningCache:tT};return n.PropTypes=n,n};eT.exports=y$();var x$=eT.exports;const Re=_r(x$);function ks(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(d){try{c(r.next(d))}catch(u){o(u)}}function l(d){try{c(r.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):i(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}const w$=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Eo(e,t,n){const r=b$(e),{webkitRelativePath:i}=e,s=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&Ox(r,"path",s),Ox(r,"relativePath",s),r}function b$(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=w$.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function Ox(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const C$=[".DS_Store","Thumbs.db"];function k$(e){return ks(this,void 0,void 0,function*(){return lc(e)&&S$(e.dataTransfer)?j$(e.dataTransfer,e.type):T$(e)?_$(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?E$(e):[]})}function S$(e){return lc(e)}function T$(e){return lc(e)&&lc(e.target)}function lc(e){return typeof e=="object"&&e!==null}function _$(e){return yh(e.target.files).map(t=>Eo(t))}function E$(e){return ks(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Eo(n))})}function j$(e,t){return ks(this,void 0,void 0,function*(){if(e.items){const n=yh(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(A$));return Mx(rT(r))}return Mx(yh(e.files).map(n=>Eo(n)))})}function Mx(e){return e.filter(t=>C$.indexOf(t.name)===-1)}function yh(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function A$(e){if(typeof e.webkitGetAsEntry!="function")return Dx(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?iT(t):Dx(e,t)}function rT(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?rT(n):[n]],[])}function Dx(e,t){return ks(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const s=yield e.getAsFileSystemHandle();if(s===null)throw new Error(`${e} is not a File`);if(s!==void 0){const o=yield s.getFile();return o.handle=s,Eo(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Eo(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function R$(e){return ks(this,void 0,void 0,function*(){return e.isDirectory?iT(e):P$(e)})}function iT(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function s(){t.readEntries(o=>ks(this,void 0,void 0,function*(){if(o.length){const a=Promise.all(o.map(R$));i.push(a),s()}else try{const a=yield Promise.all(i);n(a)}catch(a){r(a)}}),o=>{r(o)})}s()})}function P$(e){return ks(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=Eo(r,e.fullPath);t(i)},r=>{n(r)})})})}var vf=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),s=i.replace(/\/.*$/,"");return n.some(function(o){var a=o.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):i===a})}return!0};function Nx(e){return D$(e)||M$(e)||oT(e)||O$()}function O$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
136
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function D$(e){if(Array.isArray(e))return xh(e)}function Fx(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 Ix(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fx(Object(n),!0).forEach(function(r){sT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Za(e,t){return I$(e)||F$(e,t)||oT(e,t)||N$()}function N$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
137
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oT(e,t){if(e){if(typeof e=="string")return xh(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 xh(e,t)}}function xh(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 F$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function I$(e){if(Array.isArray(e))return e}var L$=typeof vf=="function"?vf:vf.default,$$="file-invalid-type",B$="file-too-large",z$="file-too-small",V$="too-many-files",U$=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:$$,message:"File type must be ".concat(r)}},Lx=function(t){return{code:B$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},$x=function(t){return{code:z$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},H$={code:V$,message:"Too many files"};function aT(e,t){var n=e.type==="application/x-moz-file"||L$(e,t);return[n,n?null:U$(t)]}function lT(e,t,n){if(Mi(e.size))if(Mi(t)&&Mi(n)){if(e.size>n)return[!1,Lx(n)];if(e.size<t)return[!1,$x(t)]}else{if(Mi(t)&&e.size<t)return[!1,$x(t)];if(Mi(n)&&e.size>n)return[!1,Lx(n)]}return[!0,null]}function Mi(e){return e!=null}function W$(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,s=e.multiple,o=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&o>=1&&t.length>o?!1:t.every(function(l){var c=aT(l,n),d=Za(c,1),u=d[0],f=lT(l,r,i),m=Za(f,1),h=m[0],g=a?a(l):null;return u&&h&&!g})}function uc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Xl(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 Bx(e){e.preventDefault()}function q$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function G$(e){return e.indexOf("Edge/")!==-1}function Y$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return q$(e)||G$(e)}function Hn(){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,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return t.some(function(a){return!uc(r)&&a&&a.apply(void 0,[r].concat(s)),uc(r)})}}function Q$(){return"showOpenFilePicker"in window}function K$(e){if(Mi(e)){var t=Object.entries(e).filter(function(n){var r=Za(n,2),i=r[0],s=r[1],o=!0;return uT(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.')),o=!1),(!Array.isArray(s)||!s.every(cT))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=Za(r,2),s=i[0],o=i[1];return Ix(Ix({},n),{},sT({},s,o))},{});return[{description:"Files",accept:t}]}return e}function X$(e){if(Mi(e))return Object.entries(e).reduce(function(t,n){var r=Za(n,2),i=r[0],s=r[1];return[].concat(Nx(t),[i],Nx(s))},[]).filter(function(t){return uT(t)||cT(t)}).join(",")}function Z$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function J$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function uT(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function cT(e){return/^.*\.[\w]+$/.test(e)}var eB=["children"],tB=["open"],nB=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],rB=["refKey","onChange","onClick"];function iB(e){return aB(e)||oB(e)||dT(e)||sB()}function sB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
138
138
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aB(e){if(Array.isArray(e))return wh(e)}function yf(e,t){return cB(e)||uB(e,t)||dT(e,t)||lB()}function lB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
139
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dT(e,t){if(e){if(typeof e=="string")return wh(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 wh(e,t)}}function wh(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 uB(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function cB(e){if(Array.isArray(e))return e}function zx(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 Be(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zx(Object(n),!0).forEach(function(r){bh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cc(e,t){if(e==null)return{};var n=dB(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dB(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var vl=v.forwardRef(function(e,t){var n=e.children,r=cc(e,eB),i=fB(r),s=i.open,o=cc(i,tB);return v.useImperativeHandle(t,function(){return{open:s}},[s]),W.createElement(v.Fragment,null,n(Be(Be({},o),{},{open:s})))});vl.displayName="Dropzone";var fT={disabled:!1,getFilesFromEvent:k$,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};vl.defaultProps=fT;vl.propTypes={children:Re.func,accept:Re.objectOf(Re.arrayOf(Re.string)),multiple:Re.bool,preventDropOnDocument:Re.bool,noClick:Re.bool,noKeyboard:Re.bool,noDrag:Re.bool,noDragEventsBubbling:Re.bool,minSize:Re.number,maxSize:Re.number,maxFiles:Re.number,disabled:Re.bool,getFilesFromEvent:Re.func,onFileDialogCancel:Re.func,onFileDialogOpen:Re.func,useFsAccessApi:Re.bool,autoFocus:Re.bool,onDragEnter:Re.func,onDragLeave:Re.func,onDragOver:Re.func,onDrop:Re.func,onDropAccepted:Re.func,onDropRejected:Re.func,onError:Re.func,validator:Re.func};var Ch={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function fB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Be(Be({},fT),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,o=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,u=t.onDragOver,f=t.onDrop,m=t.onDropAccepted,h=t.onDropRejected,g=t.onFileDialogCancel,b=t.onFileDialogOpen,x=t.useFsAccessApi,y=t.autoFocus,w=t.preventDropOnDocument,j=t.noClick,k=t.noKeyboard,T=t.noDrag,A=t.noDragEventsBubbling,S=t.onError,F=t.validator,N=v.useMemo(function(){return X$(n)},[n]),O=v.useMemo(function(){return K$(n)},[n]),Q=v.useMemo(function(){return typeof b=="function"?b:Vx},[b]),J=v.useMemo(function(){return typeof g=="function"?g:Vx},[g]),U=v.useRef(null),$=v.useRef(null),_=v.useReducer(pB,Ch),I=yf(_,2),R=I[0],P=I[1],D=R.isFocused,B=R.isFileDialogActive,V=v.useRef(typeof window<"u"&&window.isSecureContext&&x&&Q$()),Y=function(){!V.current&&B&&setTimeout(function(){if($.current){var H=$.current.files;H.length||(P({type:"closeDialog"}),J())}},300)};v.useEffect(function(){return window.addEventListener("focus",Y,!1),function(){window.removeEventListener("focus",Y,!1)}},[$,B,J,V]);var z=v.useRef([]),Z=function(H){U.current&&U.current.contains(H.target)||(H.preventDefault(),z.current=[])};v.useEffect(function(){return w&&(document.addEventListener("dragover",Bx,!1),document.addEventListener("drop",Z,!1)),function(){w&&(document.removeEventListener("dragover",Bx),document.removeEventListener("drop",Z))}},[U,w]),v.useEffect(function(){return!r&&y&&U.current&&U.current.focus(),function(){}},[U,y,r]);var K=v.useCallback(function(L){S?S(L):console.error(L)},[S]),ae=v.useCallback(function(L){L.preventDefault(),L.persist(),Gt(L),z.current=[].concat(iB(z.current),[L.target]),Kl(L)&&Promise.resolve(i(L)).then(function(H){if(!(uc(L)&&!A)){var re=H.length,ce=re>0&&W$({files:H,accept:N,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:F}),xe=re>0&&!ce;P({isDragAccept:ce,isDragReject:xe,isDragActive:!0,type:"setDraggedFiles"}),c&&c(L)}}).catch(function(H){return K(H)})},[i,c,K,A,N,o,s,a,l,F]),G=v.useCallback(function(L){L.preventDefault(),L.persist(),Gt(L);var H=Kl(L);if(H&&L.dataTransfer)try{L.dataTransfer.dropEffect="copy"}catch{}return H&&u&&u(L),!1},[u,A]),se=v.useCallback(function(L){L.preventDefault(),L.persist(),Gt(L);var H=z.current.filter(function(ce){return U.current&&U.current.contains(ce)}),re=H.indexOf(L.target);re!==-1&&H.splice(re,1),z.current=H,!(H.length>0)&&(P({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Kl(L)&&d&&d(L))},[U,d,A]),pe=v.useCallback(function(L,H){var re=[],ce=[];L.forEach(function(xe){var it=aT(xe,N),gt=yf(it,2),Bn=gt[0],an=gt[1],ks=lT(xe,o,s),ur=yf(ks,2),Pr=ur[0],Ss=ur[1],Lo=F?F(xe):null;if(Bn&&Pr&&!Lo)re.push(xe);else{var Si=[an,Ss];Lo&&(Si=Si.concat(Lo)),ce.push({file:xe,errors:Si.filter(function(zn){return zn})})}}),(!a&&re.length>1||a&&l>=1&&re.length>l)&&(re.forEach(function(xe){ce.push({file:xe,errors:[H$]})}),re.splice(0)),P({acceptedFiles:re,fileRejections:ce,isDragReject:ce.length>0,type:"setFiles"}),f&&f(re,ce,H),ce.length>0&&h&&h(ce,H),re.length>0&&m&&m(re,H)},[P,a,N,o,s,l,f,m,h,F]),Te=v.useCallback(function(L){L.preventDefault(),L.persist(),Gt(L),z.current=[],Kl(L)&&Promise.resolve(i(L)).then(function(H){uc(L)&&!A||pe(H,L)}).catch(function(H){return K(H)}),P({type:"reset"})},[i,pe,K,A]),le=v.useCallback(function(){if(V.current){P({type:"openDialog"}),Q();var L={multiple:a,types:O};window.showOpenFilePicker(L).then(function(H){return i(H)}).then(function(H){pe(H,null),P({type:"closeDialog"})}).catch(function(H){Z$(H)?(J(H),P({type:"closeDialog"})):J$(H)?(V.current=!1,$.current?($.current.value=null,$.current.click()):K(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."))):K(H)});return}$.current&&(P({type:"openDialog"}),Q(),$.current.value=null,$.current.click())},[P,Q,J,x,pe,K,O,a]),Ke=v.useCallback(function(L){!U.current||!U.current.isEqualNode(L.target)||(L.key===" "||L.key==="Enter"||L.keyCode===32||L.keyCode===13)&&(L.preventDefault(),le())},[U,le]),Xe=v.useCallback(function(){P({type:"focus"})},[]),qe=v.useCallback(function(){P({type:"blur"})},[]),oe=v.useCallback(function(){j||(Y$()?setTimeout(le,0):le())},[j,le]),fe=function(H){return r?null:H},Ae=function(H){return k?null:fe(H)},$e=function(H){return T?null:fe(H)},Gt=function(H){A&&H.stopPropagation()},ki=v.useMemo(function(){return function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=L.refKey,re=H===void 0?"ref":H,ce=L.role,xe=L.onKeyDown,it=L.onFocus,gt=L.onBlur,Bn=L.onClick,an=L.onDragEnter,ks=L.onDragOver,ur=L.onDragLeave,Pr=L.onDrop,Ss=cc(L,nB);return Be(Be(bh({onKeyDown:Ae(Hn(xe,Ke)),onFocus:Ae(Hn(it,Xe)),onBlur:Ae(Hn(gt,qe)),onClick:fe(Hn(Bn,oe)),onDragEnter:$e(Hn(an,ae)),onDragOver:$e(Hn(ks,G)),onDragLeave:$e(Hn(ur,se)),onDrop:$e(Hn(Pr,Te)),role:typeof ce=="string"&&ce!==""?ce:"presentation"},re,U),!r&&!k?{tabIndex:0}:{}),Ss)}},[U,Ke,Xe,qe,oe,ae,G,se,Te,k,T,r]),M=v.useCallback(function(L){L.stopPropagation()},[]),X=v.useMemo(function(){return function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=L.refKey,re=H===void 0?"ref":H,ce=L.onChange,xe=L.onClick,it=cc(L,rB),gt=bh({accept:N,multiple:a,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:fe(Hn(ce,Te)),onClick:fe(Hn(xe,M)),tabIndex:-1},re,$);return Be(Be({},gt),it)}},[$,n,a,Te,r]);return Be(Be({},R),{},{isFocused:D&&!r,getRootProps:ki,getInputProps:X,rootRef:U,inputRef:$,open:fe(le)})}function pB(e,t){switch(t.type){case"focus":return Be(Be({},e),{},{isFocused:!0});case"blur":return Be(Be({},e),{},{isFocused:!1});case"openDialog":return Be(Be({},Ch),{},{isFileDialogActive:!0});case"closeDialog":return Be(Be({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Be(Be({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Be(Be({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Be({},Ch);default:return e}}function Vx(){}const pT=5*1024*1024,Eo={"text/plain":[".txt"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"],"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/gif":[".gif"],"image/webp":[".webp"],"image/svg+xml":[".svg"]},Ux=Object.values(Eo).flat();function hB(e){var r;if(e.size>pT)return{isValid:!1,error:`Dosya boyutu 5MB'dan büyük olamaz. Seçilen dosya: ${(e.size/1024/1024).toFixed(2)}MB`};const t=`.${(r=e.name.split(".").pop())==null?void 0:r.toLowerCase()}`;return Object.keys(Eo).includes(e.type)||Ux.includes(t)?{isValid:!0,error:""}:{isValid:!1,error:`Desteklenmeyen dosya tipi. Kabul edilen tipler: ${Ux.join(", ")}`}}function dc(e){for(const t of e){const n=hB(t);if(!n.isValid)return n}return{isValid:!0,error:""}}function hT({onDrop:e}){const t=n=>{const r=dc(n);if(!r.isValid){alert(r.error);return}e(n)};return p.jsx("div",{className:"flex items-center justify-center border rounded-md cursor-pointer bg-slate-100 dropzone border-slate-200 dz-clickable",children:p.jsx(vl,{onDrop:t,accept:Object.keys(Eo).reduce((n,r)=>(n[r]=Eo[r],n),{}),maxSize:pT,children:({getRootProps:n,getInputProps:r})=>p.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...n(),children:[p.jsx("input",{...r()}),p.jsx("div",{className:"mb-3",children:p.jsx(JS,{className:"block size-12 mx-auto text-slate-500 fill-slate-200"})}),p.jsxs("h5",{className:"mb-0 font-normal text-slate-500 text-15",children:["Yüklemek istediğiniz görseli buraya sürükleyin veya"," ",p.jsx("span",{className:"text-custom-500",children:"seçmek için tıklayın"})]})]})})})}hT.Button=({onDrop:e})=>{const t=n=>{const r=dc(n);if(!r.isValid){Zn({description:r.error,variant:"error"});return}e(n)};return p.jsx(vl,{onDrop:t,accept:Object.keys(Eo).reduce((n,r)=>(n[r]=Eo[r],n),{}),children:({getRootProps:n,getInputProps:r})=>p.jsxs("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center hover:bg-slate-100 text-center dz-message needsclick cursor-pointer",...n(),children:[p.jsx("input",{...r()}),p.jsx(JS,{className:"size-6 text-slate-500 fill-slate-200"})]})})};function mB({onNewMessage:e,client_id:t,is_uploadable:n,messages:r,onEvaluateChat:i,onNewChat:s,onSendMessage:o,isHistoryMode:a=!1,historyChat:l}){const c=v.useRef(null),d=Rr(),u=IM(t),f=Se(),m=ms(),{setIsInputFocused:h}=he(),[g,b]=v.useState(""),[x,y]=v.useState("3rem"),[w,j]=v.useState(!1),[k,T]=v.useState([]),[A,S]=v.useState(0),[F,N]=v.useState(!1),[O,Q]=v.useState(0),[J,U]=v.useState(null),[$,_]=v.useState(()=>localStorage.getItem("showActionButtons")==="true"),I=()=>{if(!a||!l||l.status!==Nn.Closed||!l.closed_at)return!1;const z=new Date(l.closed_at);return(new Date().getTime()-z.getTime())/(1e3*60*60)>2},R=a&&(l==null?void 0:l.status)===Nn.Closed&&I();v.useEffect(()=>{if(r.length>0){const z=r[r.length-1];z.id!==J&&(U(z.id),z.sender_type===ye.User&&(S(0),N(!1)))}},[r,J]),v.useEffect(()=>{let z;return F&&O>0&&(z=window.setTimeout(()=>{Q(Z=>Z<=1?(N(!1),S(0),0):Z-1)},1e3)),()=>clearTimeout(z)},[F,O]),v.useEffect(()=>{const z=c.current;if(z){const Z=()=>h(!0),K=()=>h(!1);return z.addEventListener("focus",Z),z.addEventListener("blur",K),()=>{z.removeEventListener("focus",Z),z.removeEventListener("blur",K)}}},[h]),v.useEffect(()=>{const z=()=>{_(!0),localStorage.setItem("showActionButtons","true")},Z=()=>{_(!1),localStorage.setItem("showActionButtons","false")};return d==null||d.on(Ce.ChatUserShowButton,z),d==null||d.on(Ce.MessageUserCreate,Z),()=>{d==null||d.off(Ce.ChatUserShowButton,z),d==null||d.off(Ce.MessageUserCreate,Z)}},[d]),v.useEffect(()=>{r.length>0&&r[r.length-1].activity_type==="admin_join"&&(_(!1),localStorage.setItem("showActionButtons","false"))},[r]),ac("lc:rate-limit",z=>{const Z=z.detail&&z.detail.seconds||3;N(!0),Q(Z),S(0)}),ac("paste",z=>{const Z=z.clipboardData.items,K=[];for(const ae of Z){const G=ae.getAsFile();G&&K.push(G)}if(K.length>0&&!n){Zn({description:m(ne.FileUploadDisabled),variant:"error"});return}if(K.length>0){const ae=dc(K);if(!ae.isValid){Zn({description:ae.error,variant:"error"});return}T([...k,...K])}});const P=async()=>{if(!g.trim()&&(!n||k.length===0))return;if(A>5&&!F){N(!0),Q(3);return}if(F||w)return;const z=g,Z=[...k];b(""),T([]),c.current&&(c.current.style.height="3rem",y("3rem")),j(!0);let K;if(n&&Z.length>0){const[ae,G]=await u.mutateAsync(Z);if(!Ln(G)){wA(ae,G),j(!1),b(z),T(Z);return}LM(ae)&&(K=ae.file_urls)}if(o){o(z,K),j(!1);return}d==null||d.emit(tt.MessageCreate,{content:z,files:K},ae=>{e(ae),j(!1),S(G=>G+1),_(!1),localStorage.setItem("showActionButtons","false")})},D=z=>{d==null||d.emit(tt.MessageTyping,{content:z})},B=()=>{d==null||d.emit(tt.ChatClose,{}),_(!1),localStorage.setItem("showActionButtons","false"),i==null||i()},V=()=>{d==null||d.emit(tt.ChatClose,{}),_(!1),localStorage.setItem("showActionButtons","false"),s==null||s()},Y=a&&(l==null?void 0:l.status)===Nn.Closed;return R?null:p.jsxs(p.Fragment,{children:[Y&&p.jsxs("div",{className:"p-3 flex flex-col gap-3",children:[p.jsxs("div",{className:"p-3 rounded-lg flex items-center gap-2",style:{backgroundColor:f.getColor(C.InputBackground),borderColor:f.getColor(C.InputBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:f.getRadius()},children:[p.jsx(ie.Lock,{className:"w-5 h-5 flex-shrink-0",style:{color:f.getColor(C.FooterText)}}),p.jsx("span",{className:"text-sm",style:{color:f.getColor(C.FooterText)},children:"Bu sohbet kapatılmıştır."})]}),p.jsxs(pt,{onClick:()=>{s==null||s()},className:"w-full py-3 rounded-lg font-medium flex items-center justify-center gap-2 transition-all",style:{backgroundColor:f.getColor(C.ButtonBackground),color:f.getColor(C.ButtonText),borderRadius:f.getRadius()},children:[p.jsx(ie.Plus,{className:"w-5 h-5"}),p.jsx("span",{children:"Yeni Bir Sohbet Başlat"})]})]}),F&&p.jsxs(He.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 rounded-lg z-[100] p-2 flex items-center justify-center",style:{backgroundColor:f.getColor(C.ErrorBackground),borderColor:f.getColor(C.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:f.getRadius()},children:[p.jsx(ie.XCircle,{className:"size-4 mr-2",style:{color:f.getColor(C.ErrorText)}}),p.jsx("span",{className:"text-sm font-medium",style:{color:f.getColor(C.ErrorText)},children:m(ne.RateLimitMessage).replace("{seconds}",O.toString())})]}),$&&p.jsxs(He.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 flex flex-col gap-2",children:[p.jsxs(pt,{className:"w-full py-3 rounded-lg shadow-sm flex items-center justify-center gap-2",onClick:B,style:{backgroundColor:f.getColor(C.ButtonBackground),color:f.getColor(C.ButtonText)},children:[p.jsx(ie.Star,{className:"size-5"}),p.jsx("span",{className:"font-medium",children:"Sohbeti Değerlendir"})]}),p.jsxs(pt,{className:"w-full py-3 rounded-lg shadow-sm flex items-center justify-center gap-2",onClick:V,style:{backgroundColor:f.getColor(C.ButtonBackground),color:f.getColor(C.ButtonText)},children:[p.jsx(ie.Plus,{className:"size-5"}),p.jsx("span",{className:"font-medium",children:"Yeni Sohbet Oluştur"})]})]}),!a&&!Y&&p.jsxs("form",{className:"p-3 flex items-start gap-3 rounded-b-xl relative",style:{backgroundColor:f.getColor(C.FooterBackground),borderRadius:f.getRadius()},onSubmit:z=>{z.preventDefault(),P()},children:[n&&k&&k.length>0&&p.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:p.jsx(KS,{files:k,onDelete:z=>{T(k.filter((Z,K)=>K!==z))}})}),p.jsxs("div",{className:"grow relative",children:[p.jsx(gl,{id:"message",inputRef:c,className:"grow shadow-none",noMargin:!0,autoComplete:"off",disabled:F,style:{height:x,maxHeight:"6rem",opacity:F?.5:1,cursor:F?"not-allowed":"text"},placeholder:F?m(ne.RateLimitMessage).replace("{seconds}",O.toString()):m(ne.MessagePlaceholder),value:g,maxLength:2e3,onChange:z=>{if(F)return;const Z=z.target.value;if(Z.length<=2e3&&(b(Z),D(Z)),Z.length>0&&z.currentTarget.scrollHeight>z.currentTarget.clientHeight){const K=`${z.currentTarget.scrollHeight}px`;z.currentTarget.style.height=K,y(K)}else z.currentTarget.style.height="3rem",y("3rem")},onKeyDown:z=>{if(F){z.preventDefault();return}z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),P())}}),g.length>=500&&p.jsx("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:g.length>=2e3?f.getColor(C.ErrorText):f.getColor(C.FooterText),fontWeight:g.length>=2e3?"600":"normal"},children:2e3-g.length})]}),p.jsxs(He.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&p.jsx(hT.Button,{onDrop:z=>{if(z.length){const Z=dc(z);if(!Z.isValid){console.log("val",Z),Zn({description:Z.error,variant:"error"});return}T([...k,...z])}}}),p.jsx(pt,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:w||!g.trim()&&k.length===0||F,children:w?p.jsx(ie.Spin,{className:"size-6 animate-spin"}):F?p.jsx("span",{className:"text-xs font-bold",children:O}):p.jsx(ie.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function kh({name:e,avatar:t,className:n="text-neutral-500",textColor:r,subtitle:i}){return p.jsxs(He.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[p.jsx("div",{className:"min-w-max",children:p.jsxs("span",{children:[t&&p.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&p.jsx("div",{className:"size-10 rounded-full flex items-center justify-center font-medium",style:{backgroundColor:"rgba(255, 255, 255, 0.2)",color:r||"white"},children:e.charAt(0).toUpperCase()})]})}),p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:Ie("line-clamp-1 font-medium",n),style:r?{color:r}:void 0,children:e}),i&&p.jsx("span",{className:"text-xs opacity-75 line-clamp-1",style:r?{color:r}:void 0,children:i})]})]})}function gB({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s,onEvaluateChat:o,onNewChat:a,onSendMessage:l,isHistoryMode:c=!1}){const{widget:d,setOpen:u,open:f,isHaveChat:m,isInputFocused:h}=he(),g=he(O=>O.historyChat),b=Se(),x=Io(),y=id(),w=Rr(),j=No(),k=v.useRef(new Set),T=v.useRef(!1),A=()=>{u(!1)},S=v.useCallback(()=>{if(!w||!f||!m||!Array.isArray(r))return;const O=r.filter(Q=>Q.sender_type===ye.User&&!k.current.has(Q.id)).map(Q=>Q.id);O.length!==0&&w.emit(tt.MessageRead,{message_ids:O},Q=>{if(Q&&Q.success===!0)for(const J of O)k.current.add(J)})},[w,r,f,m]);v.useEffect(()=>{f&&(T.current=!0),f&&m&&(h||T.current)&&(S(),T.current=!1)},[f,m,h,S]);const F=()=>{var Q,J,U,$;return(($=(U=(J=(Q=d==null?void 0:d.appearance)==null?void 0:Q.head)==null?void 0:J.elements)==null?void 0:U.find(_=>_.type==="title"))==null?void 0:$.content)||"Müşteri Hizmetleri"},N=()=>{var J,U,$,_,I,R;if(c&&g)return"Geçmiş sohbet";if(e!=null&&e.agent_name)return e.agent_name;const O=(U=(J=d==null?void 0:d.appearance)==null?void 0:J.design)==null?void 0:U.greeting_header;return O||((R=(I=(_=($=d==null?void 0:d.appearance)==null?void 0:$.head)==null?void 0:_.elements)==null?void 0:I.find(P=>P.type==="text"))==null?void 0:R.content)||"Bizimle Sohbet Edin"};return p.jsxs(p.Fragment,{children:[p.jsxs("header",{style:{backgroundColor:b.getColor(C.HeaderBackground),color:b.getColor(C.HeaderText),borderBottom:`1px solid ${b.getColor(C.HeaderBorder)}`,borderTopLeftRadius:x?"":b.getRadius(),borderTopRightRadius:x?"":b.getRadius()},className:"p-4 flex items-center justify-between z-10",children:[p.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[c&&p.jsx("button",{type:"button",onClick:()=>{he.getState().setHistoryChat(null),he.getState().setHistoryMessages(null),he.getState().setShowHistoryOnRegistration(!0),j.push("registration")},className:"flex-shrink-0 p-1 hover:opacity-80 transition-opacity",style:{color:b.getColor(C.HeaderText)},children:p.jsx(ie.ArrowLeft,{className:"w-5 h-5"})}),(()=>{if(c&&(g!=null&&g.who_joined_details)&&g.who_joined_details.length>0){const O=g.who_joined_details[0];return p.jsx(kh,{name:O.name,avatar:O.avatar||void 0,textColor:b.getColor(C.HeaderText)})}return!c&&(e!=null&&e.agent_name)?p.jsx(kh,{name:e.agent_name,avatar:e.agent_avatar,textColor:b.getColor(C.HeaderText)}):p.jsx("div",{className:"flex-1 min-w-0",children:c?p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"font-medium truncate",style:{color:b.getColor(C.HeaderText)},children:F()}),p.jsx("div",{className:"text-sm opacity-90 truncate",style:{color:b.getColor(C.HeaderText)},children:N()})]}):p.jsx("div",{className:"font-medium truncate",style:{color:b.getColor(C.HeaderText)},children:N()})})})()]}),p.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[!c&&p.jsx(n$,{onChatClose:s}),!y&&!x&&p.jsx("button",{type:"button",onClick:A,className:"p-1 hover:opacity-80 transition-opacity",style:{color:b.getColor(C.HeaderText)},children:p.jsx(ie.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),p.jsx(XS,{messages:r,isTyping:t||n.length>0}),p.jsx(mB,{client_id:(d==null?void 0:d.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:O=>{i(O)},onEvaluateChat:o,onNewChat:a,onSendMessage:l,isHistoryMode:c,historyChat:c?he.getState().historyChat:void 0}),p.jsxs("a",{href:"https://www.chatier.app",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:b.getColor(C.FooterText),borderTop:`1px solid ${b.getColor(C.FooterBorder)}`,backgroundColor:b.getColor(C.FooterBackground)},children:[p.jsx("span",{children:"Powered by"}),p.jsx("span",{className:"font-medium",children:"Chatier"})]})]})}function vB({rating:e,onChange:t}){const n=Se();return p.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(r=>{const i=r<=e,s=!i&&r-.5<=e;return p.jsxs("div",{className:"relative w-10 h-10",children:[p.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(C.StarInactiveColor),fill:n.getColor(C.StarInactiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),s&&p.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:p.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(C.StarActiveColor),fill:n.getColor(C.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})}),i&&p.jsx("svg",{className:"w-10 h-10 absolute top-0 left-0",style:{color:n.getColor(C.StarActiveColor),fill:n.getColor(C.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),p.jsxs("div",{className:"absolute inset-0 flex",children:[p.jsx("button",{type:"button",onClick:()=>t(r-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r-.5} stars`}),p.jsx("button",{type:"button",onClick:()=>t(r),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r} stars`})]})]},r)})})}function yB({onOk:e}){const t=Se(),n=ms(),[r,i]=v.useState(0),[s,o]=v.useState(!1),[a,l]=v.useState(10),c=FM(),[d,u]=v.useState(!1);v.useEffect(()=>{if(s){const g=setInterval(()=>{l(b=>b<=1?(clearInterval(g),e(!0),0):b-1)},1e3);return()=>clearInterval(g)}},[s]);const f=$c({comment:So()}),m=Eg({init:{comment:""},schema:f,action:async g=>{const[b,x]=await c.mutateAsync({rating:r,comment:g.comment});if(Ln(x)){o(!0);return}wo(b,{form:m})}}),h=()=>{e(!0)};return p.jsxs("div",{className:"flex flex-col h-full",children:[p.jsxs("header",{style:{backgroundColor:s?t.getColor(C.RatingSuccessBackground):t.getColor(C.RatingHeaderBackground),color:s?t.getColor(C.RatingSuccessText):t.getColor(C.RatingHeaderText),borderBottom:`1px solid ${t.getColor(C.HeaderBorder)}`},className:"p-4 flex justify-between items-center z-10",children:[p.jsx("div",{className:"font-medium",children:n(s?ne.RatingHeaderThanks:ne.RatingHeaderEvaluate)}),p.jsx(pt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"sm",rounded:!0,onClick:()=>e(!1),className:"text-inherit cursor-pointer",children:p.jsx(ie.X,{className:"size-4"})})]}),p.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:s?p.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[p.jsx("div",{className:"mb-4",style:{color:t.getColor(C.SuccessText)},children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),p.jsx("h2",{className:"text-xl font-semibold mb-2",style:{color:t.getColor(C.HeaderText)},children:n(ne.RatingThankYouTitle)}),p.jsx("p",{className:"mb-8",style:{color:t.getColor(C.FooterText)},children:n(ne.RatingThankYouDescription)}),p.jsx("p",{className:"mb-4",style:{color:t.getColor(C.FooterText)},children:n(ne.RatingCountdown).replace("{seconds}",a.toString())}),p.jsx(pt,{onClick:h,className:"w-full max-w-xs rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.ButtonBackground),color:t.getColor(C.ButtonText),borderRadius:t.getRadius()},children:n(ne.RatingNewConversation)})]}):p.jsxs("div",{className:"flex flex-col",children:[p.jsx("div",{className:"text-center mb-6",children:p.jsx("p",{className:"text-base",style:{color:t.getColor(C.FooterText)},children:n(ne.RatingDescription)})}),p.jsxs("div",{className:"mb-6",children:[p.jsx("h3",{className:"text-center font-medium mb-2 text-lg",style:{color:t.getColor(C.RatingRateConversationText)},children:n(ne.RatingRateConversation)}),p.jsx(vB,{rating:r,onChange:g=>{i(g),g>=1&&u(!1)}}),r>0&&p.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(C.FooterText)},children:n(ne.RatingYourScore).replace("{score}",Number.isInteger(r)?r.toString():r.toFixed(1))}),r>0&&r<1||d?p.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(C.ErrorText)},children:n(ne.RatingMinimumError)}):null]}),p.jsxs("form",{onSubmit:m.handleSubmit,className:"space-y-5",children:[p.jsxs("div",{children:[p.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium mb-1",style:{color:t.getColor(C.InputText)},children:n(ne.RatingComment)}),p.jsx(gl,{id:"comment",onChange:m.handleChange,onBlur:m.handleBlur,value:m.values.comment,placeholder:n(ne.RatingCommentPlaceholder),className:"rounded-lg shadow-sm",style:{borderColor:t.getColor(C.InputBorder),backgroundColor:t.getColor(C.InputBackground),color:t.getColor(C.InputText),borderRadius:t.getRadius()},error:m.errors.comment})]}),p.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[p.jsx(pt,{type:"submit",onClick:g=>{r<1&&(g.preventDefault(),g.stopPropagation(),u(!0))},className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.ButtonBackground),color:t.getColor(C.ButtonText),borderRadius:t.getRadius()},children:n(ne.RatingSubmit)}),p.jsx(pt,{onClick:h,className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.GreeterBackground),color:t.getColor(C.GreeterText),borderRadius:t.getRadius()},children:n(ne.RatingNewConversation)})]})]})]})}),p.jsxs("a",{href:"https://www.chatier.app",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:t.getColor(C.FooterText),borderTop:`1px solid ${t.getColor(C.FooterBorder)}`,backgroundColor:t.getColor(C.FooterBackground)},children:[p.jsx("span",{children:n(ne.PoweredBy)}),p.jsx("span",{className:"font-medium",children:"Chatier"})]})]})}function xB({onSendMessage:e,disabled:t}){const n=v.useRef(null),r=Se(),i=ms(),{setIsInputFocused:s}=he(),[o,a]=v.useState(""),[l,c]=v.useState("3rem"),d=v.useRef(t);v.useEffect(()=>{d.current&&!t&&setTimeout(()=>{var f;(f=n.current)==null||f.focus()},100),d.current=t},[t]);const u=()=>{if(!o.trim()||t)return;const f=o;a(""),n.current&&(n.current.style.height="3rem",c("3rem")),e(f)};return p.jsxs("form",{className:"p-3 flex items-start gap-3 rounded-b-xl relative",style:{backgroundColor:r.getColor(C.FooterBackground),borderRadius:r.getRadius()},onSubmit:f=>{f.preventDefault(),u()},children:[p.jsxs("div",{className:"grow relative",children:[p.jsx(gl,{id:"ai-message",inputRef:n,className:"grow shadow-none",noMargin:!0,autoComplete:"off",disabled:t,style:{height:l,maxHeight:"6rem",opacity:t?.5:1,cursor:t?"not-allowed":"text"},placeholder:i(ne.MessagePlaceholder),value:o,maxLength:2e3,onFocus:()=>s(!0),onBlur:()=>s(!1),onChange:f=>{if(t)return;const m=f.target.value;if(m.length<=2e3&&a(m),m.length>0&&f.currentTarget.scrollHeight>f.currentTarget.clientHeight){const h=`${f.currentTarget.scrollHeight}px`;f.currentTarget.style.height=h,c(h)}else f.currentTarget.style.height="3rem",c("3rem")},onKeyDown:f=>{if(t){f.preventDefault();return}f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),u())}}),o.length>=500&&p.jsx("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:o.length>=2e3?r.getColor(C.ErrorText):r.getColor(C.FooterText),fontWeight:o.length>=2e3?"600":"normal"},children:2e3-o.length})]}),p.jsx(He.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:p.jsx(pt,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:t||!o.trim(),children:t?p.jsx(ie.Spin,{className:"size-6 animate-spin"}):p.jsx(ie.PaperAirplane,{className:"size-6 -rotate-12"})})})]})}function wB({onChatClose:e}){const[t,n]=v.useState(!1),r=Se(),i=ms(),s=()=>{e()};return p.jsxs(p.Fragment,{children:[p.jsx(as,{children:t&&p.jsx(He.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-50 flex items-center justify-center p-4",style:{backgroundColor:r.getColor(C.ModalOverlayColor)},children:p.jsxs(He.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"p-5 rounded-xl shadow-lg max-w-xs w-full",style:{backgroundColor:r.getColor(C.Background),borderRadius:r.getRadius()},children:[p.jsx("div",{className:"text-lg font-semibold mb-2",style:{color:r.getColor(C.ChatCloseConfirmText)},children:"Sohbeti Sonlandır"}),p.jsx("div",{className:"text-sm mb-4",style:{color:r.getColor(C.FooterText)},children:"AI asistan ile sohbetinizi sonlandırmak istediğinize emin misiniz?"}),p.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[p.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(C.GreeterBackground),color:r.getColor(C.GreeterText),borderRadius:r.getRadius()},onClick:()=>n(!1),children:i(ne.CancelAction)}),p.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(C.ErrorBackground),color:r.getColor(C.ErrorText),borderRadius:r.getRadius()},onClick:s,children:"Sonlandır"})]})]})})}),p.jsxs(di,{className:"relative flex items-center h-full",children:[p.jsx(di.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 transition-colors",style:{borderRadius:r.getRadius()},id:"aiAgentDropdownMenuButton","data-bs-toggle":"dropdown",title:i(ne.ChatSettings),children:p.jsx(ie.Menu,{className:"size-5",style:{color:r.getColor(C.HeaderText)}})}),p.jsx(as,{children:!t&&p.jsx(He.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute z-[9999] right-0 top-5 min-w-[14rem]",children:p.jsxs(di.Content,{placement:"left-end",className:"text-left rounded-lg shadow-xl dropdown-menu w-full",style:{backgroundColor:r.getColor(C.Background),borderRadius:r.getRadius()},"aria-labelledby":"aiAgentDropdownMenuButton",children:[p.jsx("h5",{className:"text-sm font-semibold px-3 py-2 border-b",style:{color:r.getColor(C.FooterText),borderBottomColor:r.getColor(C.DividerColor)},children:i(ne.ChatSettings)}),p.jsx("ul",{className:"py-2 px-2",children:p.jsx("li",{children:p.jsxs("button",{className:"p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",style:{color:r.getColor(C.ErrorText),borderRadius:r.getRadius()},onClick:o=>{o.stopPropagation(),o.preventDefault(),n(!0)},children:[p.jsx(ie.X,{className:"w-4 h-4"}),p.jsx("span",{children:"Sohbeti Sonlandır"})]})})})]})})})]})]})}function bB({onSubmit:e,onClose:t,isLoading:n=!1}){var h,g,b,x,y,w,j,k,T,A;const r=Se(),{defaultValues:i,widget:s}=he(),o=s==null?void 0:s.appearance,a=!!i&&"username"in i,l=(g=(h=o==null?void 0:o.body)==null?void 0:h.inputs)==null?void 0:g.reduce((S,F)=>{let N=F.remember?xa(F.name):i==null?void 0:i[F.name];return F.options&&N&&!F.options.includes(N)&&(N=void 0),F.name==="username"&&a&&(N=i.username),S[F.name]=N||"",S},{}),c=(x=(b=o==null?void 0:o.body)==null?void 0:b.inputs)==null?void 0:x.reduce((S,F)=>(S[F.name]="",S),{}),d=$c((w=(y=o==null?void 0:o.body)==null?void 0:y.inputs)==null?void 0:w.reduce((S,F)=>(S[F.name]=F.required?So().required(`${F.label} alanı zorunludur`):So(),S),{})),u=Eg({init:{...l},schema:d,action:async S=>{var F;if(!n){a&&(S.username=i.username),i!=null&&i.secret_data&&(S.secret_data=i.secret_data);for(const N in S)typeof S[N]=="string"&&(S[N]=S[N].trim());for(const N of((F=o==null?void 0:o.body)==null?void 0:F.inputs)||[])N.remember&&gS(N.name,S[N.name]);e(S)}}}),m=(((k=(j=o==null?void 0:o.body)==null?void 0:j.inputs)==null?void 0:k.length)||0)>0?!hS(c||{},(u==null?void 0:u.values)||{}):!0;return p.jsxs(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},className:"absolute inset-0 z-20 flex flex-col",style:{backgroundColor:r.getColor(C.Background)},children:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b",style:{borderBottomColor:r.getColor(C.DividerColor),backgroundColor:r.getColor(C.HeaderBackground)},children:[p.jsx("h3",{className:"font-semibold",style:{color:r.getColor(C.HeaderText)},children:"Operatöre Bağlan"}),p.jsx("button",{type:"button",onClick:t,className:"p-1 hover:opacity-80 transition-opacity",style:{color:r.getColor(C.HeaderText)},children:p.jsx(ie.X,{className:"w-5 h-5"})})]}),p.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-4",style:{backgroundColor:r.getColor(C.GreeterBackground)},children:[p.jsx("p",{className:"text-sm mb-4",style:{color:r.getColor(C.GreeterText)},children:"Operatöre bağlanmak için lütfen aşağıdaki bilgileri doldurun."}),p.jsxs("form",{autoComplete:"off",className:"grid grid-cols-1 gap-2",onSubmit:S=>{S.preventDefault(),u.handleSubmit()},children:[(A=(T=o==null?void 0:o.body)==null?void 0:T.inputs)==null?void 0:A.map(S=>{var F,N;if(["text","email","phone"].includes(S.type))return p.jsx(mS,{id:S.name,name:S.name,type:S.type,label:S.label,value:u.values[S.name],onChange:u.handleChange,onBlur:u.handleBlur,disabled:S.name==="username"&&a,readOnly:S.name==="username"&&a,autoComplete:"off",placeholder:S.placeholder,error:u.errors[S.name],ariaInvalid:u.errors.name?!0:void 0,required:S.required,noMargin:!0},S.name);if(S.type==="select")return p.jsx(yS,{id:S.name,name:S.name,value:u.values[S.name],onChange:u.handleChange,label:S.label,error:u.errors[S.name],required:S.required,children:(F=S.options)==null?void 0:F.map(O=>p.jsx("option",{value:O,children:O},O))},S.name);if(S.type==="checkbox")return p.jsx(xS,{id:S.name,name:S.name,value:u.values[S.name],checked:u.values[S.name]==="true",onChange:u.handleChange,required:S.required,error:u.errors[S.name],children:S.label},S.name);if(S.type==="radio")return p.jsx(oc.Group,{id:S.name,label:S.label,required:S.required,error:u.errors[S.name],children:(N=S.options)==null?void 0:N.map(O=>p.jsx(oc,{onChange:Q=>{Q?u.setFieldValue(S.name,O):u.setFieldValue(S.name,"")},id:O,name:S.name,value:O===u.values[S.name],children:O},O))},S.name);if(S.type==="textarea")return p.jsx(gl,{id:S.name,name:S.name,value:u.values[S.name],onChange:u.handleChange,placeholder:S.placeholder,error:u.errors[S.name],required:S.required,label:S.label},S.name)}),p.jsx(pt,{textKey:C.GreeterButtonText,bgKey:C.GreeterButtonBackground,type:"submit",disabled:!m||n,className:"mt-2 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:n?p.jsxs("div",{className:"flex items-center justify-center",children:[p.jsx("span",{className:"mr-2",children:"Bağlanıyor"}),p.jsx("span",{className:"animate-pulse",children:"..."})]}):p.jsxs("div",{className:"flex items-center justify-center gap-2",children:[p.jsx(ie.User,{className:"w-4 h-4"}),p.jsx("span",{children:"Operatöre Bağlan"})]})})]})]})]})}function CB({onOperatorConnected:e,onChatClose:t}){var I,R,P;const{widget:n,setOpen:r,aiAgent:i,aiAgentMessages:s,addAIAgentMessage:o,setAIAgentMessages:a,aiAgentSessionId:l,setAIAgentSessionId:c,humanNeedRequested:d,setHumanNeedRequested:u,showOperatorForm:f,setShowOperatorForm:m,setIsAIAgentMode:h}=he(),g=Se(),b=Io(),x=id(),y=Rr(),[w,j]=v.useState(!1),[k,T]=v.useState(!1),[A,S]=v.useState(!1),F=()=>{r(!1)},N=(((P=(R=(I=n==null?void 0:n.appearance)==null?void 0:I.body)==null?void 0:R.inputs)==null?void 0:P.length)||0)>0,O=v.useRef(!1);v.useEffect(()=>{if(!i||O.current)return;if(s.length>0){O.current=!0;return}if(!y||!y.connected){const V=setInterval(()=>{y&&y.connected&&(clearInterval(V),D())},100),Y=setTimeout(()=>{clearInterval(V),O.current||B()},3e3);return()=>{clearInterval(V),clearTimeout(Y)}}D();function D(){O.current||!y||(O.current=!0,y.emit(tt.MessageList,{},V=>{Array.isArray(V)&&V.length>0?a(V):B()}))}function B(){if(!i)return;const V={id:Xp(),content:`Merhaba! Ben ${i.name}. Size nasıl yardımcı olabilirim?`,created_at:new Date,files:[],sender_type:ye.User};o(V)}},[y,i,s.length,a,o]);const Q=v.useCallback(D=>{if(!n||!i||k||!y)return;const B=`temp-${Date.now()}`,V={id:B,content:D,created_at:new Date,files:[],sender_type:ye.Customer};o(V),j(!0),T(!0);const Y=l||gi(n.link_id);y.emit(tt.AgentMessageCreate,{question:D,agent_id:i.id,session_id:Y},z=>{if(j(!1),T(!1),!z){const Z={id:Xp(),content:"Üzgünüm, bir hata oluştu. Lütfen tekrar deneyin veya operatöre bağlanın.",created_at:new Date,files:[],sender_type:ye.System};a(K=>K.filter(ae=>ae.id!==B).concat([Z])),u(!0);return}z.session_id&&c(z.session_id),a(Z=>{const K=Z.filter(G=>G.id!==B),ae=[];if(z.message){const G=z.message;ae.push({id:G._id||G.id,content:G.content,created_at:G.created_at,files:G.files||[],sender_type:ye.Customer,answers:G.answers,buttons:G.buttons})}if(z.agent_message){const G=z.agent_message;ae.push({id:G._id||G.id,content:G.content,created_at:G.created_at,files:G.files||[],sender_type:ye.User,answers:G.answers,buttons:G.buttons})}return[...K,...ae]}),z.human_need&&u(!0)})},[n,i,k,y,l,o,a,c,u]),J=v.useCallback(D=>{if(!y||A)return;S(!0);const B=()=>{y.emit(tt.AgentRequestHuman,{},V=>{S(!1),V!=null&&V.success?(console.log("AIAgentChatScreen: Human request successful, transitioning to pending chat"),he.getState().setIsHaveChat(!0),h(!1),u(!1),m(!1),e()):console.error("Failed to request human operator")})};D&&Object.keys(D).length>0?y.emit(tt.ChatUpdateInputs,{inputs:D},V=>{V!=null&&V.success?B():(console.error("Failed to update chat inputs"),S(!1))}):B()},[y,A,h,u,m,e]),U=()=>{N?m(!0):J()},$=D=>{J(D)},_=()=>{m(!1)};return i?p.jsxs(p.Fragment,{children:[p.jsxs("header",{style:{backgroundColor:g.getColor(C.HeaderBackground),color:g.getColor(C.HeaderText),borderBottom:`1px solid ${g.getColor(C.HeaderBorder)}`,borderTopLeftRadius:b?"":g.getRadius(),borderTopRightRadius:b?"":g.getRadius()},className:"p-4 flex items-center justify-between z-10",children:[p.jsx("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:p.jsx(kh,{name:i.name,avatar:i.avatar,textColor:g.getColor(C.HeaderText),subtitle:"AI Asistan"})}),p.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[p.jsx(wB,{onChatClose:t}),!x&&!b&&p.jsx("button",{type:"button",onClick:F,className:"p-1 hover:opacity-80 transition-opacity",style:{color:g.getColor(C.HeaderText)},children:p.jsx(ie.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),p.jsx(XS,{messages:s,isTyping:w}),p.jsx(as,{children:d&&!f&&p.jsx(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},className:"px-4 py-3 border-t",style:{borderTopColor:g.getColor(C.DividerColor),backgroundColor:g.getColor(C.Background)},children:p.jsx(pt,{onClick:U,disabled:A,className:"w-full py-3 rounded-lg font-medium flex items-center justify-center gap-2 transition-all",style:{backgroundColor:g.getColor(C.ButtonBackground),color:g.getColor(C.ButtonText),borderRadius:g.getRadius()},children:A?p.jsx(p.Fragment,{children:p.jsx("span",{className:"animate-pulse",children:"Bağlanıyor..."})}):p.jsxs(p.Fragment,{children:[p.jsx(ie.User,{className:"w-5 h-5"}),p.jsx("span",{children:"Operatöre Bağlan"})]})})})}),p.jsx(as,{children:f&&p.jsx(bB,{onSubmit:$,onClose:_,isLoading:A})}),p.jsx(xB,{onSendMessage:Q,disabled:k}),p.jsxs("a",{href:"https://www.chatier.app",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:g.getColor(C.FooterText),borderTop:`1px solid ${g.getColor(C.FooterBorder)}`,backgroundColor:g.getColor(C.FooterBackground)},children:[p.jsx("span",{children:"Powered by"}),p.jsx("span",{className:"font-medium",children:"Chatier"})]})]}):null}function kB({children:e}){const{widget:t}=he();return t?p.jsx("section",{className:"h-full w-full relative",children:e}):null}function SB({children:e}){const t=Rr(),n=No(),{historyChat:r,isAIAgentMode:i,aiAgent:s}=he(),[o,a]=v.useState(!0),[l,c]=v.useState(!1),d=v.useRef(!1);return v.useEffect(()=>{if(r){a(!1);return}if(!t){a(!1);return}const u=()=>{a(!1),c(!1),d.current=!0},f=()=>{i&&s||(c(!0),n.push("registration"))};return t.on(Ce.Connect,u),t.on(Ce.Disconnect,f),t.connected?(a(!1),d.current=!0):t.connect(),()=>{t.off(Ce.Connect,u),t.off(Ce.Disconnect,f)}},[t,r,i,s,n]),i&&s||r?e:!t||l?(t||n.push("registration"),p.jsx(mh,{})):d.current&&!t.connected?p.jsx(mh,{}):o||!t.connected?p.jsx(FS,{}):e}function TB(){const{widget:e,setOpen:t,setIsHaveChat:n,anyAdmin:r,historyChat:i,setHistoryChat:s,historyMessages:o,setHistoryMessages:a,aiAgent:l,isAIAgentMode:c,clearAIAgentState:d}=he(),u=Se(),f=Rr(),{connected:m,connectionReady:h}=f,g=pl(),b=No(),x=Io(),[y,w]=v.useState(null),[j,k]=v.useState([]),[T,A]=v.useState(!1),[S,F]=v.useState([]),[N,O]=v.useState([]),[Q,J]=v.useState(!1),U=ug(),$=v.useRef(!1),_=v.useRef(null),I=v.useRef(!1);v.useEffect(()=>{if(!i||!e)return;if(w({status:i.status,is_customer_uploadable:!1}),o){k(o);return}const G=gi(e.link_id);zM(i._id,e.link_id,G).then(([se,pe])=>{if(Ln(pe)&&Array.isArray(se)){const Te=se.map(le=>({id:le._id,content:le.content,created_at:le.created_at,files:le.files,sender_type:le.sender_type,activity_type:le.activity_type,answers:le.answers,reply_id:le.reply_id,buttons:le.buttons}));k(Te),a(Te)}}).catch(se=>{console.error("Failed to load history messages",se)})},[i,e,o,a]);const R=async(G,se)=>{if(!e)return;if(!i){const le=`temp-${Date.now()}`,Ke={id:le,content:G,created_at:new Date,files:se||[],sender_type:ye.Customer,answers:[],reply_id:void 0,buttons:[]};k(Xe=>[...Xe,Ke]),f==null||f.emit(tt.MessageCreate,{content:G,files:se},Xe=>{const qe=Array.isArray(Xe)?Xe[0]:Xe;if(qe&&qe.isError){k(fe=>fe.filter(Ae=>Ae.id!==le));const oe=(qe==null?void 0:qe.error)||(qe==null?void 0:qe.message);(!oe||!/too\s+many/i.test(oe))&&wo(qe),typeof window<"u"&&window.dispatchEvent(new CustomEvent("lc:rate-limit",{detail:{seconds:3}}));return}k(oe=>oe.map(fe=>fe.id===le?qe:fe))});return}const[pe,Te]=await U.mutateAsync({inputs:{message:G},history:[],client_id:e.client_id,widget_id:e.link_id,device_id:gi(e.link_id)});if(Ln(Te)){s(null),n(!0),pe&&typeof pe=="object"&&"customer_token"in pe&&(Dn(ft.CustomerToken,pe.customer_token,e.link_id),Dn(ft.CustomerRefreshToken,pe.customer_refresh_token,e.link_id));let le=0;const Ke=20,Xe=`temp-${Date.now()}`,qe={id:Xe,content:G,created_at:new Date,files:se||[],sender_type:ye.Customer,answers:[],reply_id:void 0,buttons:[]};k(fe=>[...fe,qe]);const oe=setInterval(()=>{le+=1,f!=null&&f.connected?(f.emit(tt.MessageCreate,{content:G,files:se},fe=>{const Ae=Array.isArray(fe)?fe[0]:fe;if(Ae&&Ae.isError){k(Gt=>Gt.filter(ki=>ki.id!==Xe));const $e=(Ae==null?void 0:Ae.error)||(Ae==null?void 0:Ae.message);(!$e||!/too\s+many/i.test($e))&&wo(Ae),typeof window<"u"&&window.dispatchEvent(new CustomEvent("lc:rate-limit",{detail:{seconds:3}}));return}k($e=>$e.map(Gt=>Gt.id===Xe?Ae:Gt))}),clearInterval(oe)):le>=Ke&&clearInterval(oe)},200)}},P=G=>{G||t(!1),J(!0),Zs((e==null?void 0:e.link_id)||""),n(!1),w(null),k([]),F([]),s(null),he.getState().setHistoryMessages(null),he.getState().setShowHistoryOnRegistration(!1),d(),hu(e.client_id,Xi(g)).then(()=>{f==null||f.disconnect(),b.push("registration")})},D=()=>{if(y){localStorage.setItem("showActionButtons","false"),w({...y,status:Nn.Closed}),r||P(!1);return}P()};v.useEffect(()=>{if(f&&!(c&&l)){if(i){$.current=!1,I.current=!1;return}if(!(!m||!h)&&(I.current=!0,!(!e||$.current)))return $.current=!0,f.emit(tt.ChatView,{},G=>{if(he.getState().historyChat){$.current=!1;return}if(G===null){t(!1),n(!1),hu(e.client_id,Xi(g)),k([]),F([]),s(null),he.getState().setHistoryMessages(null),d(),Zs((e==null?void 0:e.link_id)||""),b.push("registration"),$.current=!1;return}w(G),n(!0)}),()=>{m||(I.current=!1,$.current=!1)}}},[i,f,e,m,h,g,b,t,n,s,c,l,d]);const B=()=>{D()},V=()=>{P(!0)},[Y,z]=v.useState(!1),Z=v.useCallback(()=>{console.log("handleOperatorConnected: Starting operator connection flow"),$.current=!1,_.current=null,I.current=!1;const G=he.getState().aiAgentMessages;G.length>0&&k(G),z(!0)},[]);v.useEffect(()=>{if(Y){if(!f||!m||!h){console.log("handleOperatorConnected: Waiting for socket connection...",{connected:m,connectionReady:h});return}if(console.log("handleOperatorConnected: Socket ready, fetching chat view"),$.current){z(!1);return}$.current=!0,f.emit(tt.ChatView,{},G=>{console.log("handleOperatorConnected: ChatView result",G),G&&(w(G),n(!0),f.emit(tt.MessageList,{},se=>{console.log("handleOperatorConnected: MessageList result",se),Array.isArray(se)&&k(se)})),z(!1)})}},[Y,f,m,h,n]);const K=()=>{d(),t(!1),J(!0),Zs((e==null?void 0:e.link_id)||""),n(!1),w(null),k([]),F([]),s(null),he.getState().setHistoryMessages(null),he.getState().setShowHistoryOnRegistration(!1),hu(e.client_id,Xi(g)).then(()=>{f==null||f.disconnect(),b.push("registration")})},ae=v.useCallback(G=>{y&&![Nn.Closed,Nn.Deleted].includes(y.status)&&k(se=>[...se.filter(Te=>{var le;return!((le=Te.id)!=null&&le.startsWith("temp-")&&Te.content===G.content)}),G])},[y]);return v.useEffect(()=>{if(!f)return;const G=oe=>{const fe={content:oe.content,created_at:oe.created_at,files:oe.files,id:oe._id,sender_type:oe.sender_type,answers:oe.answers,reply_id:oe.reply_id,buttons:oe.buttons};if(S.length>0){F(Ae=>[...Ae,fe]);return}oe.is_shortcut?F([fe]):ae(fe),A(!1)},se=oe=>{const fe={content:oe.content,created_at:oe.created_at,files:oe.files,id:oe._id,sender_type:oe.sender_type,activity_type:oe.activity_type,answers:oe.answers,reply_id:oe.reply_id,buttons:oe.buttons};ae(fe)},pe=oe=>{!oe||!oe.name?w(fe=>fe?{...fe,agent_name:void 0,agent_avatar:void 0}:null):((!(y!=null&&y.agent_name)||!(y!=null&&y.agent_avatar)||y.agent_name===oe.name)&&w({...y,agent_name:oe.name,agent_avatar:oe.avatar,is_customer_uploadable:(y==null?void 0:y.is_customer_uploadable)??!1,status:(y==null?void 0:y.status)??Nn.Open}),O(fe=>fe.includes(oe.name)?fe:[...fe,oe.name]))},Te=()=>{A(!0)},le=()=>{D()},Ke=({is_customer_uploadable:oe})=>{w(y?{...y,is_customer_uploadable:oe}:null)},Xe=oe=>{if(O(fe=>fe.filter(Ae=>Ae!==oe.name)),!oe.hasOtherAdmins)w(y?{...y,agent_name:void 0,agent_avatar:void 0}:null);else{const fe=N.filter(Ae=>Ae!==oe.name);fe.length>0&&w(y?{...y,agent_name:fe[0],agent_avatar:void 0}:null)}},qe=oe=>{O(fe=>fe.includes(oe.name)?fe:[...fe,oe.name]),y!=null&&y.agent_name||w(y?{...y,agent_name:oe.name,agent_avatar:void 0}:null)};return f.on(Ce.MessageAgentCreate,G),f.on(Ce.MessageUserCreate,se),f.on(Ce.MessageCustomerCreate,se),f.on(Ce.ChatUserAssignee,pe),f.on(Ce.MessageAgentTyping,Te),f.on(Ce.ChatUserClose,le),f.on(Ce.ChatToggleUpload,Ke),f.on(Ce.ChatUserLeave,Xe),f.on(Ce.ChatUserJoin,qe),()=>{f.off(Ce.MessageAgentCreate,G),f.off(Ce.MessageUserCreate,se),f.off(Ce.MessageCustomerCreate,se),f.off(Ce.ChatUserAssignee,pe),f.off(Ce.MessageAgentTyping,Te),f.off(Ce.ChatUserClose,le),f.off(Ce.ChatToggleUpload,Ke),f.off(Ce.ChatUserLeave,Xe),f.off(Ce.ChatUserJoin,qe)}},[ae,N]),v.useEffect(()=>{if(!f||!y||i){_.current=null;return}const G=`${y.status}-${y.agent_name||"no-agent"}`;_.current!==G&&(_.current=G,f.emit(tt.MessageList,{},se=>{if(!Array.isArray(se)){console.warn("MessageList response is not an array:",se),_.current=null;return}k(se);const pe=new Map;for(const le of se)le.sender_type===ye.Activity&&(le.activity_type===jn.AdminJoin&&le.sender_name?pe.set(le.sender_name,!0):le.activity_type===jn.AdminLeave&&le.sender_name&&pe.set(le.sender_name,!1));const Te=Array.from(pe.entries()).filter(([le,Ke])=>Ke).map(([le])=>le);O(Te)}))},[f,y,i]),v.useEffect(()=>{const G=setTimeout(()=>{A(!1)},2e3);return()=>clearTimeout(G)},[T]),v.useEffect(()=>{if(!e||S.length===0)return;let G=0;e.writing_timeout&&(G=[...S[0].content].length/e.writing_timeout,G<0&&(G=0));const se=setTimeout(()=>{ae(S[0]),F(S.slice(1))},G*1e3);return()=>clearTimeout(se)},[S,e]),Q?p.jsx(mh,{}):c&&l&&!i?p.jsxs(p.Fragment,{children:[p.jsx("div",{id:"chat-alert-portal"}),p.jsx("div",{className:`h-full w-full ${x?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:x?"100%":"",minHeight:x?"var(--app-height, 100dvh)":"",maxHeight:x?"var(--app-height, 100dvh)":"",backgroundColor:u.getColor(C.Background)},children:p.jsx(CB,{onOperatorConnected:Z,onChatClose:K})})]}):p.jsxs(p.Fragment,{children:[p.jsx("div",{id:"chat-alert-portal"}),p.jsx("div",{className:`h-full w-full ${x?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:x?"100%":"",minHeight:x?"var(--app-height, 100dvh)":"",maxHeight:x?"var(--app-height, 100dvh)":"",backgroundColor:u.getColor(C.Background)},children:y?y.status===Nn.Closed&&!i?p.jsx(yB,{onOk:P}):p.jsx(gB,{chat:y,isTyping:T,messages:j,shortcutMessages:S,onNewMessage:ae,onChatClose:D,onEvaluateChat:B,onNewChat:V,onSendMessage:R,isHistoryMode:!!i}):p.jsx(FS,{})})]})}function _B(){return gL(),null}function EB(){return p.jsxs(SB,{children:[p.jsx(kB,{children:p.jsx(TB,{})}),p.jsx(_B,{})]})}const jB=[{path:"/chat",component:EB,name:"chat"}],mT=[...jB],gT=[...wL],AB=[...mT,...gT];function Sh({text:e}){var c,d,u,f;const{widget:t,isHaveChat:n,isTooltipVisible:r,setIsTooltipVisible:i,onTooltipClose:s}=he(),o=Se(),a=ms(),l=()=>{i(!1),s&&s()};return r?p.jsxs(He.div,{initial:{opacity:0,scale:.8,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:10},transition:{type:"spring",damping:20,stiffness:300},className:Ie("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:o.getRadius(),backgroundColor:o.getColor(C.TooltipBackground),color:o.getColor(C.TooltipText)},children:[p.jsx("button",{onClick:l,className:"absolute top-2 right-2 p-1 rounded-full hover:bg-black/10 transition-colors","aria-label":a(ne.CloseButtonAria),children:p.jsx(ie.X,{className:"size-3"})}),p.jsx(He.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium pr-5",style:{color:o.getColor(C.TooltipText)},children:e||(n?(d=(c=t==null?void 0:t.appearance)==null?void 0:c.design)==null?void 0:d.tooltip_message_active:(f=(u=t==null?void 0:t.appearance)==null?void 0:u.design)==null?void 0:f.tooltip_message)||a(n?ne.TooltipActive:ne.TooltipDefault)}),p.jsx("div",{className:Ie("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]},"widget-tooltip"):null}const RB="/notify.mp3",PB=async e=>{await new Audio(e||RB).play()};function Hx({fallback:e,fallbackOpen:t}){const[n]=v.useState(window.document.title),r=Rr(),{isHaveChat:i,open:s,soundPath:o}=he(),[a,l]=v.useState(!0),[c,d]=v.useState(0),[u,f]=v.useState(null),m=ms(),h=()=>{PB(o)},g=(b,x)=>{if(u&&clearInterval(u),b||!i||x===0||Number.isNaN(x)){window.document.title=n,f(null);return}const y=setInterval(()=>{if(b||!i||x===0||Number.isNaN(x)){window.document.title=n,clearInterval(y),f(null);return}const w=`${x} ${m(ne.NewMessagesNotification)} - ${n}`;window.document.title!==w?window.document.title=w:window.document.title=n},1e3);return f(y),()=>{clearInterval(y),f(null)}};return v.useEffect(()=>g(s&&a,c),[c,s,a]),v.useEffect(()=>{const b=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",b,!1),()=>{document.removeEventListener("visibilitychange",b)}},[]),v.useEffect(()=>{if(i&&s&&a&&d(0),!r||!i||s&&a)return;const b=()=>{!i||s&&a||(d(x=>x+1),h())};return r.on(Ce.MessageAgentCreate,b),r.on(Ce.ChatUserAssignee,h),()=>{r.off(Ce.MessageAgentCreate,b),r.off(Ce.ChatUserAssignee,h)}},[r,i,s,a]),s?null:!i||c===0?t?e:null:p.jsx(Sh,{text:m(ne.NewMessagesNotification)})}function OB({children:e,border:t}){var $,_,I,R;const n=Rr(),{open:r,setOpen:i,setIsHaveChat:s,isHaveChat:o,widget:a,onOpen:l,onClose:c}=he(),[d]=v.useState(!0),u=No(),f=pl(),m=ll(),h=Se(),g=Io(),b=id(),[x,y]=v.useState({x:0,y:0}),w=J3(),j=v.useRef(null),k=v.useRef(null),[T,A]=v.useState(!1),[S,F]=v.useState(!1);v.useEffect(()=>((()=>{A("ontouchstart"in window||navigator.maxTouchPoints>0)})(),window.addEventListener("touchstart",()=>{A(!0)},{once:!0}),()=>{window.removeEventListener("touchstart",()=>{A(!0)})}),[]),v.useEffect(()=>{o&&m.pathname==="/"&&f&&f.accessToken&&u.push("chat")},[o]),v.useEffect(()=>{r?requestAnimationFrame(()=>{F(!0)}):F(!1)},[r]);const N=P=>{if(!j.current||!k.current)return P;const D=j.current.getBoundingClientRect(),B={width:window.innerWidth,height:window.innerHeight},V={top:20,right:20,bottom:40,left:20};let Y=P.x,z=P.y;return D.right+Y-x.x>B.width-V.right&&(Y=B.width-V.right-D.width-(D.left-x.x)),D.left+Y-x.x<V.left&&(Y=V.left-(D.left-x.x)),D.bottom+z-x.y>B.height-V.bottom&&(z=B.height-V.bottom-D.height-(D.top-x.y)),D.top+z-x.y<V.top&&(z=V.top-(D.top-x.y)),{x:Y,y:z}},O=()=>{i(!0),n&&(n.emit(tt.WidgetOpen,{}),l&&l())},Q=()=>{i(!1),n&&(n.emit(tt.WidgetClose,{}),c&&c())},J=()=>{i(!1),s(!1),hu(a.client_id,Xi(f)),u.push("registration")};v.useEffect(()=>{if(g&&(o||b)&&O(),!(!n||!a))return n.on(Ce.Banned,J),()=>{n.off(Ce.Banned,J)}},[]);function U(P){T&&w.start(P)}return p.jsxs("section",{className:"relative w-full h-full",ref:k,children:[r&&p.jsx("div",{className:Ie("fixed z-300 overflow-hidden transition-all duration-300 ease-out",{"border border-solid dark:border-zink-500":t,"bottom-12 right-12 rounded-xl":!g,"!bottom-0 !right-0":g,"opacity-100 scale-100 translate-y-0":S,"opacity-0 scale-95 translate-y-2":!S}),style:{width:g?"100%":((_=($=a==null?void 0:a.appearance)==null?void 0:$.design)==null?void 0:_.width)||"21rem",height:g?"var(--app-height, 100dvh)":((R=(I=a==null?void 0:a.appearance)==null?void 0:I.design)==null?void 0:R.height)||"30rem",left:g?"0":"",right:g?"0px !important":"",maxHeight:g?"var(--app-height, 100dvh)":"",boxShadow:g?"":`0 10px 25px -5px ${h.getColor(C.ShadowColor)}, 0 8px 10px -6px ${h.getColor(C.ShadowColor)}`,backgroundColor:h.getColor(C.Background)},children:e}),!T&&p.jsxs("div",{className:"fixed bottom-[40px] right-[20px] z-400",children:[p.jsx(Hx,{fallback:p.jsx(Sh,{}),fallbackOpen:d}),!r&&p.jsxs(pt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:O,children:[p.jsx(He.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:Ie("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:h.getColor(C.ButtonBackground)}}),p.jsx(ie.Chat,{className:"size-7"})]},"desktop-open-button"),r&&!g&&p.jsx(pt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:Q,children:p.jsx(ie.X,{className:"size-7"})},"desktop-close-button")]}),T&&p.jsxs(He.div,{ref:j,className:"fixed z-400 bottom-24 right-5",initial:{bottom:"96px",right:"20px"},animate:{x:x.x,y:x.y},drag:T,dragControls:w,dragMomentum:!1,dragElastic:0,onDragEnd:(P,D)=>{const B={x:x.x+D.offset.x,y:x.y+D.offset.y},V=N(B);y(V)},children:[p.jsx(Hx,{fallback:p.jsx(Sh,{}),fallbackOpen:d}),!r&&p.jsx("div",{className:"cursor-move",onPointerDown:U,children:p.jsxs(pt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:O,children:[p.jsx(He.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:Ie("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:h.getColor(C.ButtonBackground)}}),p.jsx(ie.Chat,{className:"size-7"})]})},"chat-button"),r&&!g&&p.jsx(pt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:Q,children:p.jsx(ie.X,{className:"size-7"})},"desktop-close-button")]})]})}function MB(e){const{widget:t}=he();return p.jsx(sM,{widget:t,children:p.jsx(OB,{...e})})}function DB(){return p.jsx(Rj,{future:{v7_startTransition:!0},children:p.jsx(MB,{border:!0,children:p.jsxs(Oj,{children:[mT.map((e,t)=>p.jsx(Ep,{path:e.path,element:p.jsx(e.component,{})},t)),gT.map((e,t)=>p.jsx(Ep,{path:e.path,element:p.jsx(e.component,{})},t))]})})})}const NB=v.forwardRef((e,t)=>{const n=localStorage.getItem("lc:device:id"),{data:r,isLoading:i,error:s}=LE(e.link_id,n||void 0),{widget:o,setWidget:a,setSoundPath:l,setDefaultValues:c,setOpen:d,setOnTooltipClose:u,setIsTooltipVisible:f,setOnOpen:m,setOnClose:h,onOpen:g,onClose:b}=he();return v.useImperativeHandle(t,()=>({open:()=>{d(!0),g&&g()},close:()=>{d(!1),b&&b()}})),v.useEffect(()=>{r&&BE(r)&&a(r),e.soundPath&&l(e.soundPath),e.defaultValues&&c(e.defaultValues),e.onTooltipClose&&u(e.onTooltipClose),e.showTooltip===!1&&f(!1),e.onOpen&&m(e.onOpen),e.onClose&&h(e.onClose)},[r,e.soundPath,e.defaultValues,e.onTooltipClose,e.showTooltip,e.onOpen,e.onClose]),i?p.jsx("div",{children:"Loading..."}):s||!r||!o?null:p.jsx(lI,{children:p.jsx(hL,{children:p.jsx(DB,{})})})}),FB=new bE;let Wx=null;function IB(e){if(!e.container)return;const t=W.createRef();return Wx=mb(e.container),Wx.render(p.jsxs(_E,{client:FB,children:[p.jsx(NB,{...e,ref:t}),p.jsx(mA,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]})),{open:()=>{var n;return(n=t.current)==null?void 0:n.open()},close:()=>{var n;return(n=t.current)==null?void 0:n.close()},identify:n=>{if(!e.link_id)return;const r=gi(e.link_id);$M({widget_id:e.link_id,device_id:r,decrypted_data:n})}}}window.widget=IB});export default LB();
|
|
139
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dT(e,t){if(e){if(typeof e=="string")return wh(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 wh(e,t)}}function wh(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 uB(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function cB(e){if(Array.isArray(e))return e}function zx(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 Be(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zx(Object(n),!0).forEach(function(r){bh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cc(e,t){if(e==null)return{};var n=dB(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dB(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var yl=v.forwardRef(function(e,t){var n=e.children,r=cc(e,eB),i=fB(r),s=i.open,o=cc(i,tB);return v.useImperativeHandle(t,function(){return{open:s}},[s]),W.createElement(v.Fragment,null,n(Be(Be({},o),{},{open:s})))});yl.displayName="Dropzone";var fT={disabled:!1,getFilesFromEvent:k$,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};yl.defaultProps=fT;yl.propTypes={children:Re.func,accept:Re.objectOf(Re.arrayOf(Re.string)),multiple:Re.bool,preventDropOnDocument:Re.bool,noClick:Re.bool,noKeyboard:Re.bool,noDrag:Re.bool,noDragEventsBubbling:Re.bool,minSize:Re.number,maxSize:Re.number,maxFiles:Re.number,disabled:Re.bool,getFilesFromEvent:Re.func,onFileDialogCancel:Re.func,onFileDialogOpen:Re.func,useFsAccessApi:Re.bool,autoFocus:Re.bool,onDragEnter:Re.func,onDragLeave:Re.func,onDragOver:Re.func,onDrop:Re.func,onDropAccepted:Re.func,onDropRejected:Re.func,onError:Re.func,validator:Re.func};var Ch={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function fB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Be(Be({},fT),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,o=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,u=t.onDragOver,f=t.onDrop,m=t.onDropAccepted,h=t.onDropRejected,g=t.onFileDialogCancel,b=t.onFileDialogOpen,x=t.useFsAccessApi,y=t.autoFocus,w=t.preventDropOnDocument,j=t.noClick,k=t.noKeyboard,T=t.noDrag,A=t.noDragEventsBubbling,S=t.onError,F=t.validator,N=v.useMemo(function(){return X$(n)},[n]),O=v.useMemo(function(){return K$(n)},[n]),Q=v.useMemo(function(){return typeof b=="function"?b:Vx},[b]),J=v.useMemo(function(){return typeof g=="function"?g:Vx},[g]),U=v.useRef(null),$=v.useRef(null),_=v.useReducer(pB,Ch),I=yf(_,2),R=I[0],P=I[1],D=R.isFocused,B=R.isFileDialogActive,V=v.useRef(typeof window<"u"&&window.isSecureContext&&x&&Q$()),Y=function(){!V.current&&B&&setTimeout(function(){if($.current){var H=$.current.files;H.length||(P({type:"closeDialog"}),J())}},300)};v.useEffect(function(){return window.addEventListener("focus",Y,!1),function(){window.removeEventListener("focus",Y,!1)}},[$,B,J,V]);var z=v.useRef([]),Z=function(H){U.current&&U.current.contains(H.target)||(H.preventDefault(),z.current=[])};v.useEffect(function(){return w&&(document.addEventListener("dragover",Bx,!1),document.addEventListener("drop",Z,!1)),function(){w&&(document.removeEventListener("dragover",Bx),document.removeEventListener("drop",Z))}},[U,w]),v.useEffect(function(){return!r&&y&&U.current&&U.current.focus(),function(){}},[U,y,r]);var K=v.useCallback(function(L){S?S(L):console.error(L)},[S]),ae=v.useCallback(function(L){L.preventDefault(),L.persist(),Gt(L),z.current=[].concat(iB(z.current),[L.target]),Xl(L)&&Promise.resolve(i(L)).then(function(H){if(!(uc(L)&&!A)){var re=H.length,ce=re>0&&W$({files:H,accept:N,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:F}),xe=re>0&&!ce;P({isDragAccept:ce,isDragReject:xe,isDragActive:!0,type:"setDraggedFiles"}),c&&c(L)}}).catch(function(H){return K(H)})},[i,c,K,A,N,o,s,a,l,F]),q=v.useCallback(function(L){L.preventDefault(),L.persist(),Gt(L);var H=Xl(L);if(H&&L.dataTransfer)try{L.dataTransfer.dropEffect="copy"}catch{}return H&&u&&u(L),!1},[u,A]),se=v.useCallback(function(L){L.preventDefault(),L.persist(),Gt(L);var H=z.current.filter(function(ce){return U.current&&U.current.contains(ce)}),re=H.indexOf(L.target);re!==-1&&H.splice(re,1),z.current=H,!(H.length>0)&&(P({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Xl(L)&&d&&d(L))},[U,d,A]),pe=v.useCallback(function(L,H){var re=[],ce=[];L.forEach(function(xe){var it=aT(xe,N),gt=yf(it,2),Bn=gt[0],an=gt[1],Ss=lT(xe,o,s),ur=yf(Ss,2),Pr=ur[0],Ts=ur[1],Lo=F?F(xe):null;if(Bn&&Pr&&!Lo)re.push(xe);else{var Si=[an,Ts];Lo&&(Si=Si.concat(Lo)),ce.push({file:xe,errors:Si.filter(function(zn){return zn})})}}),(!a&&re.length>1||a&&l>=1&&re.length>l)&&(re.forEach(function(xe){ce.push({file:xe,errors:[H$]})}),re.splice(0)),P({acceptedFiles:re,fileRejections:ce,isDragReject:ce.length>0,type:"setFiles"}),f&&f(re,ce,H),ce.length>0&&h&&h(ce,H),re.length>0&&m&&m(re,H)},[P,a,N,o,s,l,f,m,h,F]),Te=v.useCallback(function(L){L.preventDefault(),L.persist(),Gt(L),z.current=[],Xl(L)&&Promise.resolve(i(L)).then(function(H){uc(L)&&!A||pe(H,L)}).catch(function(H){return K(H)}),P({type:"reset"})},[i,pe,K,A]),le=v.useCallback(function(){if(V.current){P({type:"openDialog"}),Q();var L={multiple:a,types:O};window.showOpenFilePicker(L).then(function(H){return i(H)}).then(function(H){pe(H,null),P({type:"closeDialog"})}).catch(function(H){Z$(H)?(J(H),P({type:"closeDialog"})):J$(H)?(V.current=!1,$.current?($.current.value=null,$.current.click()):K(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."))):K(H)});return}$.current&&(P({type:"openDialog"}),Q(),$.current.value=null,$.current.click())},[P,Q,J,x,pe,K,O,a]),Ke=v.useCallback(function(L){!U.current||!U.current.isEqualNode(L.target)||(L.key===" "||L.key==="Enter"||L.keyCode===32||L.keyCode===13)&&(L.preventDefault(),le())},[U,le]),Xe=v.useCallback(function(){P({type:"focus"})},[]),qe=v.useCallback(function(){P({type:"blur"})},[]),oe=v.useCallback(function(){j||(Y$()?setTimeout(le,0):le())},[j,le]),fe=function(H){return r?null:H},Ae=function(H){return k?null:fe(H)},$e=function(H){return T?null:fe(H)},Gt=function(H){A&&H.stopPropagation()},ki=v.useMemo(function(){return function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=L.refKey,re=H===void 0?"ref":H,ce=L.role,xe=L.onKeyDown,it=L.onFocus,gt=L.onBlur,Bn=L.onClick,an=L.onDragEnter,Ss=L.onDragOver,ur=L.onDragLeave,Pr=L.onDrop,Ts=cc(L,nB);return Be(Be(bh({onKeyDown:Ae(Hn(xe,Ke)),onFocus:Ae(Hn(it,Xe)),onBlur:Ae(Hn(gt,qe)),onClick:fe(Hn(Bn,oe)),onDragEnter:$e(Hn(an,ae)),onDragOver:$e(Hn(Ss,q)),onDragLeave:$e(Hn(ur,se)),onDrop:$e(Hn(Pr,Te)),role:typeof ce=="string"&&ce!==""?ce:"presentation"},re,U),!r&&!k?{tabIndex:0}:{}),Ts)}},[U,Ke,Xe,qe,oe,ae,q,se,Te,k,T,r]),M=v.useCallback(function(L){L.stopPropagation()},[]),X=v.useMemo(function(){return function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=L.refKey,re=H===void 0?"ref":H,ce=L.onChange,xe=L.onClick,it=cc(L,rB),gt=bh({accept:N,multiple:a,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:fe(Hn(ce,Te)),onClick:fe(Hn(xe,M)),tabIndex:-1},re,$);return Be(Be({},gt),it)}},[$,n,a,Te,r]);return Be(Be({},R),{},{isFocused:D&&!r,getRootProps:ki,getInputProps:X,rootRef:U,inputRef:$,open:fe(le)})}function pB(e,t){switch(t.type){case"focus":return Be(Be({},e),{},{isFocused:!0});case"blur":return Be(Be({},e),{},{isFocused:!1});case"openDialog":return Be(Be({},Ch),{},{isFileDialogActive:!0});case"closeDialog":return Be(Be({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Be(Be({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Be(Be({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Be({},Ch);default:return e}}function Vx(){}const pT=5*1024*1024,jo={"text/plain":[".txt"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"],"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/gif":[".gif"],"image/webp":[".webp"],"image/svg+xml":[".svg"]},Ux=Object.values(jo).flat();function hB(e){var r;if(e.size>pT)return{isValid:!1,error:`Dosya boyutu 5MB'dan büyük olamaz. Seçilen dosya: ${(e.size/1024/1024).toFixed(2)}MB`};const t=`.${(r=e.name.split(".").pop())==null?void 0:r.toLowerCase()}`;return Object.keys(jo).includes(e.type)||Ux.includes(t)?{isValid:!0,error:""}:{isValid:!1,error:`Desteklenmeyen dosya tipi. Kabul edilen tipler: ${Ux.join(", ")}`}}function dc(e){for(const t of e){const n=hB(t);if(!n.isValid)return n}return{isValid:!0,error:""}}function hT({onDrop:e}){const t=n=>{const r=dc(n);if(!r.isValid){alert(r.error);return}e(n)};return p.jsx("div",{className:"flex items-center justify-center border rounded-md cursor-pointer bg-slate-100 dropzone border-slate-200 dz-clickable",children:p.jsx(yl,{onDrop:t,accept:Object.keys(jo).reduce((n,r)=>(n[r]=jo[r],n),{}),maxSize:pT,children:({getRootProps:n,getInputProps:r})=>p.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...n(),children:[p.jsx("input",{...r()}),p.jsx("div",{className:"mb-3",children:p.jsx(JS,{className:"block size-12 mx-auto text-slate-500 fill-slate-200"})}),p.jsxs("h5",{className:"mb-0 font-normal text-slate-500 text-15",children:["Yüklemek istediğiniz görseli buraya sürükleyin veya"," ",p.jsx("span",{className:"text-custom-500",children:"seçmek için tıklayın"})]})]})})})}hT.Button=({onDrop:e})=>{const t=n=>{const r=dc(n);if(!r.isValid){Zn({description:r.error,variant:"error"});return}e(n)};return p.jsx(yl,{onDrop:t,accept:Object.keys(jo).reduce((n,r)=>(n[r]=jo[r],n),{}),children:({getRootProps:n,getInputProps:r})=>p.jsxs("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center hover:bg-slate-100 text-center dz-message needsclick cursor-pointer",...n(),children:[p.jsx("input",{...r()}),p.jsx(JS,{className:"size-6 text-slate-500 fill-slate-200"})]})})};function mB({onNewMessage:e,client_id:t,is_uploadable:n,messages:r,onEvaluateChat:i,onNewChat:s,onSendMessage:o,isHistoryMode:a=!1,historyChat:l}){const c=v.useRef(null),d=Rr(),u=IM(t),f=Se(),m=ms(),{setIsInputFocused:h}=he(),[g,b]=v.useState(""),[x,y]=v.useState("3rem"),[w,j]=v.useState(!1),[k,T]=v.useState([]),[A,S]=v.useState(0),[F,N]=v.useState(!1),[O,Q]=v.useState(0),[J,U]=v.useState(null),[$,_]=v.useState(()=>localStorage.getItem("showActionButtons")==="true"),I=()=>{if(!a||!l||l.status!==Nn.Closed||!l.closed_at)return!1;const z=new Date(l.closed_at);return(new Date().getTime()-z.getTime())/(1e3*60*60)>2},R=a&&(l==null?void 0:l.status)===Nn.Closed&&I();v.useEffect(()=>{if(r.length>0){const z=r[r.length-1];z.id!==J&&(U(z.id),z.sender_type===ye.User&&(S(0),N(!1)))}},[r,J]),v.useEffect(()=>{let z;return F&&O>0&&(z=window.setTimeout(()=>{Q(Z=>Z<=1?(N(!1),S(0),0):Z-1)},1e3)),()=>clearTimeout(z)},[F,O]),v.useEffect(()=>{const z=c.current;if(z){const Z=()=>h(!0),K=()=>h(!1);return z.addEventListener("focus",Z),z.addEventListener("blur",K),()=>{z.removeEventListener("focus",Z),z.removeEventListener("blur",K)}}},[h]),v.useEffect(()=>{const z=()=>{_(!0),localStorage.setItem("showActionButtons","true")},Z=()=>{_(!1),localStorage.setItem("showActionButtons","false")};return d==null||d.on(Ce.ChatUserShowButton,z),d==null||d.on(Ce.MessageUserCreate,Z),()=>{d==null||d.off(Ce.ChatUserShowButton,z),d==null||d.off(Ce.MessageUserCreate,Z)}},[d]),v.useEffect(()=>{r.length>0&&r[r.length-1].activity_type==="admin_join"&&(_(!1),localStorage.setItem("showActionButtons","false"))},[r]),ac("lc:rate-limit",z=>{const Z=z.detail&&z.detail.seconds||3;N(!0),Q(Z),S(0)}),ac("paste",z=>{const Z=z.clipboardData.items,K=[];for(const ae of Z){const q=ae.getAsFile();q&&K.push(q)}if(K.length>0&&!n){Zn({description:m(ne.FileUploadDisabled),variant:"error"});return}if(K.length>0){const ae=dc(K);if(!ae.isValid){Zn({description:ae.error,variant:"error"});return}T([...k,...K])}});const P=async()=>{if(!g.trim()&&(!n||k.length===0))return;if(A>5&&!F){N(!0),Q(3);return}if(F||w)return;const z=g,Z=[...k];b(""),T([]),c.current&&(c.current.style.height="3rem",y("3rem")),j(!0);let K;if(n&&Z.length>0){const[ae,q]=await u.mutateAsync(Z);if(!Ln(q)){wA(ae,q),j(!1),b(z),T(Z);return}LM(ae)&&(K=ae.file_urls)}if(o){o(z,K),j(!1);return}d==null||d.emit(tt.MessageCreate,{content:z,files:K},ae=>{e(ae),j(!1),S(q=>q+1),_(!1),localStorage.setItem("showActionButtons","false")})},D=z=>{d==null||d.emit(tt.MessageTyping,{content:z})},B=()=>{d==null||d.emit(tt.ChatClose,{}),_(!1),localStorage.setItem("showActionButtons","false"),i==null||i()},V=()=>{d==null||d.emit(tt.ChatClose,{}),_(!1),localStorage.setItem("showActionButtons","false"),s==null||s()},Y=a&&(l==null?void 0:l.status)===Nn.Closed;return R?null:p.jsxs(p.Fragment,{children:[Y&&p.jsxs("div",{className:"p-3 flex flex-col gap-3",children:[p.jsxs("div",{className:"p-3 rounded-lg flex items-center gap-2",style:{backgroundColor:f.getColor(C.InputBackground),borderColor:f.getColor(C.InputBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:f.getRadius()},children:[p.jsx(ie.Lock,{className:"w-5 h-5 flex-shrink-0",style:{color:f.getColor(C.FooterText)}}),p.jsx("span",{className:"text-sm",style:{color:f.getColor(C.FooterText)},children:"Bu sohbet kapatılmıştır."})]}),p.jsxs(pt,{onClick:()=>{s==null||s()},className:"w-full py-3 rounded-lg font-medium flex items-center justify-center gap-2 transition-all",style:{backgroundColor:f.getColor(C.ButtonBackground),color:f.getColor(C.ButtonText),borderRadius:f.getRadius()},children:[p.jsx(ie.Plus,{className:"w-5 h-5"}),p.jsx("span",{children:"Yeni Bir Sohbet Başlat"})]})]}),F&&p.jsxs(He.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 rounded-lg z-[100] p-2 flex items-center justify-center",style:{backgroundColor:f.getColor(C.ErrorBackground),borderColor:f.getColor(C.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:f.getRadius()},children:[p.jsx(ie.XCircle,{className:"size-4 mr-2",style:{color:f.getColor(C.ErrorText)}}),p.jsx("span",{className:"text-sm font-medium",style:{color:f.getColor(C.ErrorText)},children:m(ne.RateLimitMessage).replace("{seconds}",O.toString())})]}),$&&p.jsxs(He.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 flex flex-col gap-2",children:[p.jsxs(pt,{className:"w-full py-3 rounded-lg shadow-sm flex items-center justify-center gap-2",onClick:B,style:{backgroundColor:f.getColor(C.ButtonBackground),color:f.getColor(C.ButtonText)},children:[p.jsx(ie.Star,{className:"size-5"}),p.jsx("span",{className:"font-medium",children:"Sohbeti Değerlendir"})]}),p.jsxs(pt,{className:"w-full py-3 rounded-lg shadow-sm flex items-center justify-center gap-2",onClick:V,style:{backgroundColor:f.getColor(C.ButtonBackground),color:f.getColor(C.ButtonText)},children:[p.jsx(ie.Plus,{className:"size-5"}),p.jsx("span",{className:"font-medium",children:"Yeni Sohbet Oluştur"})]})]}),!a&&!Y&&p.jsxs("form",{className:"p-3 flex items-start gap-3 rounded-b-xl relative",style:{backgroundColor:f.getColor(C.FooterBackground),borderRadius:f.getRadius()},onSubmit:z=>{z.preventDefault(),P()},children:[n&&k&&k.length>0&&p.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:p.jsx(KS,{files:k,onDelete:z=>{T(k.filter((Z,K)=>K!==z))}})}),p.jsxs("div",{className:"grow relative",children:[p.jsx(vl,{id:"message",inputRef:c,className:"grow shadow-none",noMargin:!0,autoComplete:"off",disabled:F,style:{height:x,maxHeight:"6rem",opacity:F?.5:1,cursor:F?"not-allowed":"text"},placeholder:F?m(ne.RateLimitMessage).replace("{seconds}",O.toString()):m(ne.MessagePlaceholder),value:g,maxLength:2e3,onChange:z=>{if(F)return;const Z=z.target.value;if(Z.length<=2e3&&(b(Z),D(Z)),Z.length>0&&z.currentTarget.scrollHeight>z.currentTarget.clientHeight){const K=`${z.currentTarget.scrollHeight}px`;z.currentTarget.style.height=K,y(K)}else z.currentTarget.style.height="3rem",y("3rem")},onKeyDown:z=>{if(F){z.preventDefault();return}z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),P())}}),g.length>=500&&p.jsx("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:g.length>=2e3?f.getColor(C.ErrorText):f.getColor(C.FooterText),fontWeight:g.length>=2e3?"600":"normal"},children:2e3-g.length})]}),p.jsxs(He.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&p.jsx(hT.Button,{onDrop:z=>{if(z.length){const Z=dc(z);if(!Z.isValid){console.log("val",Z),Zn({description:Z.error,variant:"error"});return}T([...k,...z])}}}),p.jsx(pt,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:w||!g.trim()&&k.length===0||F,children:w?p.jsx(ie.Spin,{className:"size-6 animate-spin"}):F?p.jsx("span",{className:"text-xs font-bold",children:O}):p.jsx(ie.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function kh({name:e,avatar:t,className:n="text-neutral-500",textColor:r,subtitle:i}){return p.jsxs(He.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[p.jsx("div",{className:"min-w-max",children:p.jsxs("span",{children:[t&&p.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&p.jsx("div",{className:"size-10 rounded-full flex items-center justify-center font-medium",style:{backgroundColor:"rgba(255, 255, 255, 0.2)",color:r||"white"},children:e.charAt(0).toUpperCase()})]})}),p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:Ie("line-clamp-1 font-medium",n),style:r?{color:r}:void 0,children:e}),i&&p.jsx("span",{className:"text-xs opacity-75 line-clamp-1",style:r?{color:r}:void 0,children:i})]})]})}function gB({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s,onEvaluateChat:o,onNewChat:a,onSendMessage:l,isHistoryMode:c=!1}){const{widget:d,setOpen:u,open:f,isHaveChat:m,isInputFocused:h}=he(),g=he(O=>O.historyChat),b=Se(),x=Cs(),y=id(),w=Rr(),j=Fo(),k=v.useRef(new Set),T=v.useRef(!1),A=()=>{u(!1)},S=v.useCallback(()=>{if(!w||!f||!m||!Array.isArray(r))return;const O=r.filter(Q=>Q.sender_type===ye.User&&!k.current.has(Q.id)).map(Q=>Q.id);O.length!==0&&w.emit(tt.MessageRead,{message_ids:O},Q=>{if(Q&&Q.success===!0)for(const J of O)k.current.add(J)})},[w,r,f,m]);v.useEffect(()=>{f&&(T.current=!0),f&&m&&(h||T.current)&&(S(),T.current=!1)},[f,m,h,S]);const F=()=>{var Q,J,U,$;return(($=(U=(J=(Q=d==null?void 0:d.appearance)==null?void 0:Q.head)==null?void 0:J.elements)==null?void 0:U.find(_=>_.type==="title"))==null?void 0:$.content)||"Müşteri Hizmetleri"},N=()=>{var J,U,$,_,I,R;if(c&&g)return"Geçmiş sohbet";if(e!=null&&e.agent_name)return e.agent_name;const O=(U=(J=d==null?void 0:d.appearance)==null?void 0:J.design)==null?void 0:U.greeting_header;return O||((R=(I=(_=($=d==null?void 0:d.appearance)==null?void 0:$.head)==null?void 0:_.elements)==null?void 0:I.find(P=>P.type==="text"))==null?void 0:R.content)||"Bizimle Sohbet Edin"};return p.jsxs(p.Fragment,{children:[p.jsxs("header",{style:{backgroundColor:b.getColor(C.HeaderBackground),color:b.getColor(C.HeaderText),borderBottom:`1px solid ${b.getColor(C.HeaderBorder)}`,borderTopLeftRadius:x?"":b.getRadius(),borderTopRightRadius:x?"":b.getRadius()},className:"p-4 flex items-center justify-between z-10",children:[p.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[c&&p.jsx("button",{type:"button",onClick:()=>{he.getState().setHistoryChat(null),he.getState().setHistoryMessages(null),he.getState().setShowHistoryOnRegistration(!0),j.push("registration")},className:"flex-shrink-0 p-1 hover:opacity-80 transition-opacity",style:{color:b.getColor(C.HeaderText)},children:p.jsx(ie.ArrowLeft,{className:"w-5 h-5"})}),(()=>{if(c&&(g!=null&&g.who_joined_details)&&g.who_joined_details.length>0){const O=g.who_joined_details[0];return p.jsx(kh,{name:O.name,avatar:O.avatar||void 0,textColor:b.getColor(C.HeaderText)})}return!c&&(e!=null&&e.agent_name)?p.jsx(kh,{name:e.agent_name,avatar:e.agent_avatar,textColor:b.getColor(C.HeaderText)}):p.jsx("div",{className:"flex-1 min-w-0",children:c?p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"font-medium truncate",style:{color:b.getColor(C.HeaderText)},children:F()}),p.jsx("div",{className:"text-sm opacity-90 truncate",style:{color:b.getColor(C.HeaderText)},children:N()})]}):p.jsx("div",{className:"font-medium truncate",style:{color:b.getColor(C.HeaderText)},children:N()})})})()]}),p.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[!c&&p.jsx(n$,{onChatClose:s}),!y&&!x&&p.jsx("button",{type:"button",onClick:A,className:"p-1 hover:opacity-80 transition-opacity",style:{color:b.getColor(C.HeaderText)},children:p.jsx(ie.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),p.jsx(XS,{messages:r,isTyping:t||n.length>0}),p.jsx(mB,{client_id:(d==null?void 0:d.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:O=>{i(O)},onEvaluateChat:o,onNewChat:a,onSendMessage:l,isHistoryMode:c,historyChat:c?he.getState().historyChat:void 0}),p.jsxs("a",{href:"https://www.chatier.app",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:b.getColor(C.FooterText),borderTop:`1px solid ${b.getColor(C.FooterBorder)}`,backgroundColor:b.getColor(C.FooterBackground)},children:[p.jsx("span",{children:"Powered by"}),p.jsx("span",{className:"font-medium",children:"Chatier"})]})]})}function vB({rating:e,onChange:t}){const n=Se();return p.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(r=>{const i=r<=e,s=!i&&r-.5<=e;return p.jsxs("div",{className:"relative w-10 h-10",children:[p.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(C.StarInactiveColor),fill:n.getColor(C.StarInactiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),s&&p.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:p.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(C.StarActiveColor),fill:n.getColor(C.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})}),i&&p.jsx("svg",{className:"w-10 h-10 absolute top-0 left-0",style:{color:n.getColor(C.StarActiveColor),fill:n.getColor(C.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),p.jsxs("div",{className:"absolute inset-0 flex",children:[p.jsx("button",{type:"button",onClick:()=>t(r-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r-.5} stars`}),p.jsx("button",{type:"button",onClick:()=>t(r),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r} stars`})]})]},r)})})}function yB({onOk:e}){const t=Se(),n=ms(),r=Cs(),[i,s]=v.useState(0),[o,a]=v.useState(!1),[l,c]=v.useState(10),d=FM(),[u,f]=v.useState(!1);v.useEffect(()=>{if(o){const b=setInterval(()=>{c(x=>x<=1?(clearInterval(b),e(!0),0):x-1)},1e3);return()=>clearInterval(b)}},[o]);const m=$c({comment:To()}),h=Eg({init:{comment:""},schema:m,action:async b=>{const[x,y]=await d.mutateAsync({rating:i,comment:b.comment});if(Ln(y)){a(!0);return}bo(x,{form:h})}}),g=()=>{e(!0)};return p.jsxs("div",{className:"flex flex-col h-full",children:[p.jsxs("header",{style:{backgroundColor:o?t.getColor(C.RatingSuccessBackground):t.getColor(C.RatingHeaderBackground),color:o?t.getColor(C.RatingSuccessText):t.getColor(C.RatingHeaderText),borderBottom:`1px solid ${t.getColor(C.HeaderBorder)}`},className:"p-4 flex justify-between items-center z-10",children:[p.jsx("div",{className:"font-medium",children:n(o?ne.RatingHeaderThanks:ne.RatingHeaderEvaluate)}),!r&&p.jsx(pt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"sm",rounded:!0,onClick:()=>e(!1),className:"text-inherit cursor-pointer",children:p.jsx(ie.X,{className:"size-4"})})]}),p.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:o?p.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[p.jsx("div",{className:"mb-4",style:{color:t.getColor(C.SuccessText)},children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),p.jsx("h2",{className:"text-xl font-semibold mb-2",style:{color:t.getColor(C.HeaderText)},children:n(ne.RatingThankYouTitle)}),p.jsx("p",{className:"mb-8",style:{color:t.getColor(C.FooterText)},children:n(ne.RatingThankYouDescription)}),p.jsx("p",{className:"mb-4",style:{color:t.getColor(C.FooterText)},children:n(ne.RatingCountdown).replace("{seconds}",l.toString())}),p.jsx(pt,{onClick:g,className:"w-full max-w-xs rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.ButtonBackground),color:t.getColor(C.ButtonText),borderRadius:t.getRadius()},children:n(ne.RatingNewConversation)})]}):p.jsxs("div",{className:"flex flex-col",children:[p.jsx("div",{className:"text-center mb-6",children:p.jsx("p",{className:"text-base",style:{color:t.getColor(C.FooterText)},children:n(ne.RatingDescription)})}),p.jsxs("div",{className:"mb-6",children:[p.jsx("h3",{className:"text-center font-medium mb-2 text-lg",style:{color:t.getColor(C.RatingRateConversationText)},children:n(ne.RatingRateConversation)}),p.jsx(vB,{rating:i,onChange:b=>{s(b),b>=1&&f(!1)}}),i>0&&p.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(C.FooterText)},children:n(ne.RatingYourScore).replace("{score}",Number.isInteger(i)?i.toString():i.toFixed(1))}),i>0&&i<1||u?p.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(C.ErrorText)},children:n(ne.RatingMinimumError)}):null]}),p.jsxs("form",{onSubmit:h.handleSubmit,className:"space-y-5",children:[p.jsxs("div",{children:[p.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium mb-1",style:{color:t.getColor(C.InputText)},children:n(ne.RatingComment)}),p.jsx(vl,{id:"comment",onChange:h.handleChange,onBlur:h.handleBlur,value:h.values.comment,placeholder:n(ne.RatingCommentPlaceholder),className:"rounded-lg shadow-sm",style:{borderColor:t.getColor(C.InputBorder),backgroundColor:t.getColor(C.InputBackground),color:t.getColor(C.InputText),borderRadius:t.getRadius()},error:h.errors.comment})]}),p.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[p.jsx(pt,{type:"submit",onClick:b=>{i<1&&(b.preventDefault(),b.stopPropagation(),f(!0))},className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.ButtonBackground),color:t.getColor(C.ButtonText),borderRadius:t.getRadius()},children:n(ne.RatingSubmit)}),p.jsx(pt,{onClick:g,className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.GreeterBackground),color:t.getColor(C.GreeterText),borderRadius:t.getRadius()},children:n(ne.RatingNewConversation)})]})]})]})}),p.jsxs("a",{href:"https://www.chatier.app",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:t.getColor(C.FooterText),borderTop:`1px solid ${t.getColor(C.FooterBorder)}`,backgroundColor:t.getColor(C.FooterBackground)},children:[p.jsx("span",{children:n(ne.PoweredBy)}),p.jsx("span",{className:"font-medium",children:"Chatier"})]})]})}function xB({onSendMessage:e,disabled:t}){const n=v.useRef(null),r=Se(),i=ms(),{setIsInputFocused:s}=he(),[o,a]=v.useState(""),[l,c]=v.useState("3rem"),d=v.useRef(t);v.useEffect(()=>{d.current&&!t&&setTimeout(()=>{var f;(f=n.current)==null||f.focus()},100),d.current=t},[t]);const u=()=>{if(!o.trim()||t)return;const f=o;a(""),n.current&&(n.current.style.height="3rem",c("3rem")),e(f)};return p.jsxs("form",{className:"p-3 flex items-start gap-3 rounded-b-xl relative",style:{backgroundColor:r.getColor(C.FooterBackground),borderRadius:r.getRadius()},onSubmit:f=>{f.preventDefault(),u()},children:[p.jsxs("div",{className:"grow relative",children:[p.jsx(vl,{id:"ai-message",inputRef:n,className:"grow shadow-none",noMargin:!0,autoComplete:"off",disabled:t,style:{height:l,maxHeight:"6rem",opacity:t?.5:1,cursor:t?"not-allowed":"text"},placeholder:i(ne.MessagePlaceholder),value:o,maxLength:2e3,onFocus:()=>s(!0),onBlur:()=>s(!1),onChange:f=>{if(t)return;const m=f.target.value;if(m.length<=2e3&&a(m),m.length>0&&f.currentTarget.scrollHeight>f.currentTarget.clientHeight){const h=`${f.currentTarget.scrollHeight}px`;f.currentTarget.style.height=h,c(h)}else f.currentTarget.style.height="3rem",c("3rem")},onKeyDown:f=>{if(t){f.preventDefault();return}f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),u())}}),o.length>=500&&p.jsx("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:o.length>=2e3?r.getColor(C.ErrorText):r.getColor(C.FooterText),fontWeight:o.length>=2e3?"600":"normal"},children:2e3-o.length})]}),p.jsx(He.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:p.jsx(pt,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:t||!o.trim(),children:t?p.jsx(ie.Spin,{className:"size-6 animate-spin"}):p.jsx(ie.PaperAirplane,{className:"size-6 -rotate-12"})})})]})}function wB({onChatClose:e}){const[t,n]=v.useState(!1),r=Se(),i=ms(),s=()=>{e()};return p.jsxs(p.Fragment,{children:[p.jsx(as,{children:t&&p.jsx(He.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-50 flex items-center justify-center p-4",style:{backgroundColor:r.getColor(C.ModalOverlayColor)},children:p.jsxs(He.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"p-5 rounded-xl shadow-lg max-w-xs w-full",style:{backgroundColor:r.getColor(C.Background),borderRadius:r.getRadius()},children:[p.jsx("div",{className:"text-lg font-semibold mb-2",style:{color:r.getColor(C.ChatCloseConfirmText)},children:"Sohbeti Sonlandır"}),p.jsx("div",{className:"text-sm mb-4",style:{color:r.getColor(C.FooterText)},children:"AI asistan ile sohbetinizi sonlandırmak istediğinize emin misiniz?"}),p.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[p.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(C.GreeterBackground),color:r.getColor(C.GreeterText),borderRadius:r.getRadius()},onClick:()=>n(!1),children:i(ne.CancelAction)}),p.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(C.ErrorBackground),color:r.getColor(C.ErrorText),borderRadius:r.getRadius()},onClick:s,children:"Sonlandır"})]})]})})}),p.jsxs(di,{className:"relative flex items-center h-full",children:[p.jsx(di.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 transition-colors",style:{borderRadius:r.getRadius()},id:"aiAgentDropdownMenuButton","data-bs-toggle":"dropdown",title:i(ne.ChatSettings),children:p.jsx(ie.Menu,{className:"size-5",style:{color:r.getColor(C.HeaderText)}})}),p.jsx(as,{children:!t&&p.jsx(He.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute z-[9999] right-0 top-5 min-w-[14rem]",children:p.jsxs(di.Content,{placement:"left-end",className:"text-left rounded-lg shadow-xl dropdown-menu w-full",style:{backgroundColor:r.getColor(C.Background),borderRadius:r.getRadius()},"aria-labelledby":"aiAgentDropdownMenuButton",children:[p.jsx("h5",{className:"text-sm font-semibold px-3 py-2 border-b",style:{color:r.getColor(C.FooterText),borderBottomColor:r.getColor(C.DividerColor)},children:i(ne.ChatSettings)}),p.jsx("ul",{className:"py-2 px-2",children:p.jsx("li",{children:p.jsxs("button",{className:"p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",style:{color:r.getColor(C.ErrorText),borderRadius:r.getRadius()},onClick:o=>{o.stopPropagation(),o.preventDefault(),n(!0)},children:[p.jsx(ie.X,{className:"w-4 h-4"}),p.jsx("span",{children:"Sohbeti Sonlandır"})]})})})]})})})]})]})}function bB({onSubmit:e,onClose:t,isLoading:n=!1}){var h,g,b,x,y,w,j,k,T,A;const r=Se(),{defaultValues:i,widget:s}=he(),o=s==null?void 0:s.appearance,a=!!i&&"username"in i,l=(g=(h=o==null?void 0:o.body)==null?void 0:h.inputs)==null?void 0:g.reduce((S,F)=>{let N=F.remember?wa(F.name):i==null?void 0:i[F.name];return F.options&&N&&!F.options.includes(N)&&(N=void 0),F.name==="username"&&a&&(N=i.username),S[F.name]=N||"",S},{}),c=(x=(b=o==null?void 0:o.body)==null?void 0:b.inputs)==null?void 0:x.reduce((S,F)=>(S[F.name]="",S),{}),d=$c((w=(y=o==null?void 0:o.body)==null?void 0:y.inputs)==null?void 0:w.reduce((S,F)=>(S[F.name]=F.required?To().required(`${F.label} alanı zorunludur`):To(),S),{})),u=Eg({init:{...l},schema:d,action:async S=>{var F;if(!n){a&&(S.username=i.username),i!=null&&i.secret_data&&(S.secret_data=i.secret_data);for(const N in S)typeof S[N]=="string"&&(S[N]=S[N].trim());for(const N of((F=o==null?void 0:o.body)==null?void 0:F.inputs)||[])N.remember&&gS(N.name,S[N.name]);e(S)}}}),m=(((k=(j=o==null?void 0:o.body)==null?void 0:j.inputs)==null?void 0:k.length)||0)>0?!hS(c||{},(u==null?void 0:u.values)||{}):!0;return p.jsxs(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},className:"absolute inset-0 z-20 flex flex-col",style:{backgroundColor:r.getColor(C.Background)},children:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b",style:{borderBottomColor:r.getColor(C.DividerColor),backgroundColor:r.getColor(C.HeaderBackground)},children:[p.jsx("h3",{className:"font-semibold",style:{color:r.getColor(C.HeaderText)},children:"Operatöre Bağlan"}),p.jsx("button",{type:"button",onClick:t,className:"p-1 hover:opacity-80 transition-opacity",style:{color:r.getColor(C.HeaderText)},children:p.jsx(ie.X,{className:"w-5 h-5"})})]}),p.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-4",style:{backgroundColor:r.getColor(C.GreeterBackground)},children:[p.jsx("p",{className:"text-sm mb-4",style:{color:r.getColor(C.GreeterText)},children:"Operatöre bağlanmak için lütfen aşağıdaki bilgileri doldurun."}),p.jsxs("form",{autoComplete:"off",className:"grid grid-cols-1 gap-2",onSubmit:S=>{S.preventDefault(),u.handleSubmit()},children:[(A=(T=o==null?void 0:o.body)==null?void 0:T.inputs)==null?void 0:A.map(S=>{var F,N;if(["text","email","phone"].includes(S.type))return p.jsx(mS,{id:S.name,name:S.name,type:S.type,label:S.label,value:u.values[S.name],onChange:u.handleChange,onBlur:u.handleBlur,disabled:S.name==="username"&&a,readOnly:S.name==="username"&&a,autoComplete:"off",placeholder:S.placeholder,error:u.errors[S.name],ariaInvalid:u.errors.name?!0:void 0,required:S.required,noMargin:!0},S.name);if(S.type==="select")return p.jsx(yS,{id:S.name,name:S.name,value:u.values[S.name],onChange:u.handleChange,label:S.label,error:u.errors[S.name],required:S.required,children:(F=S.options)==null?void 0:F.map(O=>p.jsx("option",{value:O,children:O},O))},S.name);if(S.type==="checkbox")return p.jsx(xS,{id:S.name,name:S.name,value:u.values[S.name],checked:u.values[S.name]==="true",onChange:u.handleChange,required:S.required,error:u.errors[S.name],children:S.label},S.name);if(S.type==="radio")return p.jsx(oc.Group,{id:S.name,label:S.label,required:S.required,error:u.errors[S.name],children:(N=S.options)==null?void 0:N.map(O=>p.jsx(oc,{onChange:Q=>{Q?u.setFieldValue(S.name,O):u.setFieldValue(S.name,"")},id:O,name:S.name,value:O===u.values[S.name],children:O},O))},S.name);if(S.type==="textarea")return p.jsx(vl,{id:S.name,name:S.name,value:u.values[S.name],onChange:u.handleChange,placeholder:S.placeholder,error:u.errors[S.name],required:S.required,label:S.label},S.name)}),p.jsx(pt,{textKey:C.GreeterButtonText,bgKey:C.GreeterButtonBackground,type:"submit",disabled:!m||n,className:"mt-2 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:n?p.jsxs("div",{className:"flex items-center justify-center",children:[p.jsx("span",{className:"mr-2",children:"Bağlanıyor"}),p.jsx("span",{className:"animate-pulse",children:"..."})]}):p.jsxs("div",{className:"flex items-center justify-center gap-2",children:[p.jsx(ie.User,{className:"w-4 h-4"}),p.jsx("span",{children:"Operatöre Bağlan"})]})})]})]})]})}function CB({onOperatorConnected:e,onChatClose:t}){var I,R,P;const{widget:n,setOpen:r,aiAgent:i,aiAgentMessages:s,addAIAgentMessage:o,setAIAgentMessages:a,aiAgentSessionId:l,setAIAgentSessionId:c,humanNeedRequested:d,setHumanNeedRequested:u,showOperatorForm:f,setShowOperatorForm:m,setIsAIAgentMode:h}=he(),g=Se(),b=Cs(),x=id(),y=Rr(),[w,j]=v.useState(!1),[k,T]=v.useState(!1),[A,S]=v.useState(!1),F=()=>{r(!1)},N=(((P=(R=(I=n==null?void 0:n.appearance)==null?void 0:I.body)==null?void 0:R.inputs)==null?void 0:P.length)||0)>0,O=v.useRef(!1);v.useEffect(()=>{if(!i||O.current)return;if(s.length>0){O.current=!0;return}if(!y||!y.connected){const V=setInterval(()=>{y&&y.connected&&(clearInterval(V),D())},100),Y=setTimeout(()=>{clearInterval(V),O.current||B()},3e3);return()=>{clearInterval(V),clearTimeout(Y)}}D();function D(){O.current||!y||(O.current=!0,y.emit(tt.MessageList,{},V=>{Array.isArray(V)&&V.length>0?a(V):B()}))}function B(){if(!i)return;const V={id:Xp(),content:`Merhaba! Ben ${i.name}. Size nasıl yardımcı olabilirim?`,created_at:new Date,files:[],sender_type:ye.User};o(V)}},[y,i,s.length,a,o]);const Q=v.useCallback(D=>{if(!n||!i||k||!y)return;const B=`temp-${Date.now()}`,V={id:B,content:D,created_at:new Date,files:[],sender_type:ye.Customer};o(V),j(!0),T(!0);const Y=l||gi(n.link_id);y.emit(tt.AgentMessageCreate,{question:D,agent_id:i.id,session_id:Y},z=>{if(j(!1),T(!1),!z){const Z={id:Xp(),content:"Üzgünüm, bir hata oluştu. Lütfen tekrar deneyin veya operatöre bağlanın.",created_at:new Date,files:[],sender_type:ye.System};a(K=>K.filter(ae=>ae.id!==B).concat([Z])),u(!0);return}z.session_id&&c(z.session_id),a(Z=>{const K=Z.filter(q=>q.id!==B),ae=[];if(z.message){const q=z.message;ae.push({id:q._id||q.id,content:q.content,created_at:q.created_at,files:q.files||[],sender_type:ye.Customer,answers:q.answers,buttons:q.buttons})}if(z.agent_message){const q=z.agent_message;ae.push({id:q._id||q.id,content:q.content,created_at:q.created_at,files:q.files||[],sender_type:ye.User,answers:q.answers,buttons:q.buttons})}return[...K,...ae]}),z.human_need&&u(!0)})},[n,i,k,y,l,o,a,c,u]),J=v.useCallback(D=>{if(!y||A)return;S(!0);const B=()=>{y.emit(tt.AgentRequestHuman,{},V=>{S(!1),V!=null&&V.success?(console.log("AIAgentChatScreen: Human request successful, transitioning to pending chat"),he.getState().setIsHaveChat(!0),h(!1),u(!1),m(!1),e()):console.error("Failed to request human operator")})};D&&Object.keys(D).length>0?y.emit(tt.ChatUpdateInputs,{inputs:D},V=>{V!=null&&V.success?B():(console.error("Failed to update chat inputs"),S(!1))}):B()},[y,A,h,u,m,e]),U=()=>{N?m(!0):J()},$=D=>{J(D)},_=()=>{m(!1)};return i?p.jsxs(p.Fragment,{children:[p.jsxs("header",{style:{backgroundColor:g.getColor(C.HeaderBackground),color:g.getColor(C.HeaderText),borderBottom:`1px solid ${g.getColor(C.HeaderBorder)}`,borderTopLeftRadius:b?"":g.getRadius(),borderTopRightRadius:b?"":g.getRadius()},className:"p-4 flex items-center justify-between z-10",children:[p.jsx("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:p.jsx(kh,{name:i.name,avatar:i.avatar,textColor:g.getColor(C.HeaderText),subtitle:"AI Asistan"})}),p.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[p.jsx(wB,{onChatClose:t}),!x&&!b&&p.jsx("button",{type:"button",onClick:F,className:"p-1 hover:opacity-80 transition-opacity",style:{color:g.getColor(C.HeaderText)},children:p.jsx(ie.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),p.jsx(XS,{messages:s,isTyping:w}),p.jsx(as,{children:d&&!f&&p.jsx(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},className:"px-4 py-3 border-t",style:{borderTopColor:g.getColor(C.DividerColor),backgroundColor:g.getColor(C.Background)},children:p.jsx(pt,{onClick:U,disabled:A,className:"w-full py-3 rounded-lg font-medium flex items-center justify-center gap-2 transition-all",style:{backgroundColor:g.getColor(C.ButtonBackground),color:g.getColor(C.ButtonText),borderRadius:g.getRadius()},children:A?p.jsx(p.Fragment,{children:p.jsx("span",{className:"animate-pulse",children:"Bağlanıyor..."})}):p.jsxs(p.Fragment,{children:[p.jsx(ie.User,{className:"w-5 h-5"}),p.jsx("span",{children:"Operatöre Bağlan"})]})})})}),p.jsx(as,{children:f&&p.jsx(bB,{onSubmit:$,onClose:_,isLoading:A})}),p.jsx(xB,{onSendMessage:Q,disabled:k}),p.jsxs("a",{href:"https://www.chatier.app",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:g.getColor(C.FooterText),borderTop:`1px solid ${g.getColor(C.FooterBorder)}`,backgroundColor:g.getColor(C.FooterBackground)},children:[p.jsx("span",{children:"Powered by"}),p.jsx("span",{className:"font-medium",children:"Chatier"})]})]}):null}function kB({children:e}){const{widget:t}=he();return t?p.jsx("section",{className:"h-full w-full relative",children:e}):null}function SB({children:e}){const t=Rr(),n=Fo(),{historyChat:r,isAIAgentMode:i,aiAgent:s}=he(),[o,a]=v.useState(!0),[l,c]=v.useState(!1),d=v.useRef(!1);return v.useEffect(()=>{if(r){a(!1);return}if(!t){a(!1);return}const u=()=>{a(!1),c(!1),d.current=!0},f=()=>{i&&s||(c(!0),n.push("registration"))};return t.on(Ce.Connect,u),t.on(Ce.Disconnect,f),t.connected?(a(!1),d.current=!0):t.connect(),()=>{t.off(Ce.Connect,u),t.off(Ce.Disconnect,f)}},[t,r,i,s,n]),i&&s||r?e:!t||l?(t||n.push("registration"),p.jsx(mh,{})):d.current&&!t.connected?p.jsx(mh,{}):o||!t.connected?p.jsx(FS,{}):e}function TB(){const{widget:e,setOpen:t,setIsHaveChat:n,anyAdmin:r,historyChat:i,setHistoryChat:s,historyMessages:o,setHistoryMessages:a,aiAgent:l,isAIAgentMode:c,clearAIAgentState:d}=he(),u=Se(),f=Rr(),{connected:m,connectionReady:h}=f,g=hl(),b=Fo(),x=Cs(),[y,w]=v.useState(null),[j,k]=v.useState([]),[T,A]=v.useState(!1),[S,F]=v.useState([]),[N,O]=v.useState([]),[Q,J]=v.useState(!1),U=ug(),$=v.useRef(!1),_=v.useRef(null),I=v.useRef(!1);v.useEffect(()=>{if(!i||!e)return;if(w({status:i.status,is_customer_uploadable:!1}),o){k(o);return}const q=gi(e.link_id);zM(i._id,e.link_id,q).then(([se,pe])=>{if(Ln(pe)&&Array.isArray(se)){const Te=se.map(le=>({id:le._id,content:le.content,created_at:le.created_at,files:le.files,sender_type:le.sender_type,activity_type:le.activity_type,answers:le.answers,reply_id:le.reply_id,buttons:le.buttons}));k(Te),a(Te)}}).catch(se=>{console.error("Failed to load history messages",se)})},[i,e,o,a]);const R=async(q,se)=>{if(!e)return;if(!i){const le=`temp-${Date.now()}`,Ke={id:le,content:q,created_at:new Date,files:se||[],sender_type:ye.Customer,answers:[],reply_id:void 0,buttons:[]};k(Xe=>[...Xe,Ke]),f==null||f.emit(tt.MessageCreate,{content:q,files:se},Xe=>{const qe=Array.isArray(Xe)?Xe[0]:Xe;if(qe&&qe.isError){k(fe=>fe.filter(Ae=>Ae.id!==le));const oe=(qe==null?void 0:qe.error)||(qe==null?void 0:qe.message);(!oe||!/too\s+many/i.test(oe))&&bo(qe),typeof window<"u"&&window.dispatchEvent(new CustomEvent("lc:rate-limit",{detail:{seconds:3}}));return}k(oe=>oe.map(fe=>fe.id===le?qe:fe))});return}const[pe,Te]=await U.mutateAsync({inputs:{message:q},history:[],client_id:e.client_id,widget_id:e.link_id,device_id:gi(e.link_id)});if(Ln(Te)){s(null),n(!0),pe&&typeof pe=="object"&&"customer_token"in pe&&(Dn(at.CustomerToken,pe.customer_token,e.link_id),Dn(at.CustomerRefreshToken,pe.customer_refresh_token,e.link_id));let le=0;const Ke=20,Xe=`temp-${Date.now()}`,qe={id:Xe,content:q,created_at:new Date,files:se||[],sender_type:ye.Customer,answers:[],reply_id:void 0,buttons:[]};k(fe=>[...fe,qe]);const oe=setInterval(()=>{le+=1,f!=null&&f.connected?(f.emit(tt.MessageCreate,{content:q,files:se},fe=>{const Ae=Array.isArray(fe)?fe[0]:fe;if(Ae&&Ae.isError){k(Gt=>Gt.filter(ki=>ki.id!==Xe));const $e=(Ae==null?void 0:Ae.error)||(Ae==null?void 0:Ae.message);(!$e||!/too\s+many/i.test($e))&&bo(Ae),typeof window<"u"&&window.dispatchEvent(new CustomEvent("lc:rate-limit",{detail:{seconds:3}}));return}k($e=>$e.map(Gt=>Gt.id===Xe?Ae:Gt))}),clearInterval(oe)):le>=Ke&&clearInterval(oe)},200)}},P=q=>{!q&&!x&&t(!1),J(!0),Js((e==null?void 0:e.link_id)||""),n(!1),w(null),k([]),F([]),s(null),he.getState().setHistoryMessages(null),he.getState().setShowHistoryOnRegistration(!1),d(),hu(e.client_id,Xi(g)).then(()=>{f==null||f.disconnect(),b.push("registration")})},D=()=>{if(y){localStorage.setItem("showActionButtons","false"),w({...y,status:Nn.Closed}),r||P(!1);return}P()};v.useEffect(()=>{if(f&&!(c&&l)){if(i){$.current=!1,I.current=!1;return}if(!m||!h){m||(I.current=!1,$.current=!1,_.current=null);return}I.current=!0,!(!e||$.current)&&($.current=!0,console.log("ChatView: Emitting chat:view request"),f.emit(tt.ChatView,{},q=>{if(console.log("ChatView: Received response",{chatReceived:q!==null,chatStatus:q==null?void 0:q.status,hasAgentName:!!(q!=null&&q.agent_name)}),he.getState().historyChat){$.current=!1;return}if(q===null){console.log("ChatView returned null, cleaning up and redirecting to registration"),t(!1),n(!1),hu(e.client_id,Xi(g)),k([]),F([]),s(null),he.getState().setHistoryMessages(null),d(),Js((e==null?void 0:e.link_id)||""),f.disconnect(),b.push("registration"),$.current=!1;return}console.log("ChatView: Setting chat state",{status:q.status}),w(q),n(!0)}))}},[i,f,e,m,h,g,b,t,n,s,c,l,d]);const B=()=>{D()},V=()=>{P(!0)},[Y,z]=v.useState(!1),Z=v.useCallback(()=>{console.log("handleOperatorConnected: Starting operator connection flow"),$.current=!1,_.current=null,I.current=!1;const q=he.getState().aiAgentMessages;q.length>0&&k(q),z(!0)},[]);v.useEffect(()=>{if(Y){if(!f||!m||!h){console.log("handleOperatorConnected: Waiting for socket connection...",{connected:m,connectionReady:h});return}if(console.log("handleOperatorConnected: Socket ready, fetching chat view"),$.current){z(!1);return}$.current=!0,f.emit(tt.ChatView,{},q=>{console.log("handleOperatorConnected: ChatView result",q),q&&(w(q),n(!0),f.emit(tt.MessageList,{},se=>{console.log("handleOperatorConnected: MessageList result",se),Array.isArray(se)&&k(se)})),z(!1)})}},[Y,f,m,h,n]);const K=()=>{d(),x||t(!1),J(!0),Js((e==null?void 0:e.link_id)||""),n(!1),w(null),k([]),F([]),s(null),he.getState().setHistoryMessages(null),he.getState().setShowHistoryOnRegistration(!1),hu(e.client_id,Xi(g)).then(()=>{f==null||f.disconnect(),b.push("registration")})},ae=v.useCallback(q=>{y&&![Nn.Closed,Nn.Deleted].includes(y.status)&&k(se=>[...se.filter(Te=>{var le;return!((le=Te.id)!=null&&le.startsWith("temp-")&&Te.content===q.content)}),q])},[y]);return v.useEffect(()=>{if(!f)return;const q=oe=>{const fe={content:oe.content,created_at:oe.created_at,files:oe.files,id:oe._id,sender_type:oe.sender_type,answers:oe.answers,reply_id:oe.reply_id,buttons:oe.buttons};if(S.length>0){F(Ae=>[...Ae,fe]);return}oe.is_shortcut?F([fe]):ae(fe),A(!1)},se=oe=>{const fe={content:oe.content,created_at:oe.created_at,files:oe.files,id:oe._id,sender_type:oe.sender_type,activity_type:oe.activity_type,answers:oe.answers,reply_id:oe.reply_id,buttons:oe.buttons};ae(fe)},pe=oe=>{!oe||!oe.name?w(fe=>fe?{...fe,agent_name:void 0,agent_avatar:void 0}:null):((!(y!=null&&y.agent_name)||!(y!=null&&y.agent_avatar)||y.agent_name===oe.name)&&w({...y,agent_name:oe.name,agent_avatar:oe.avatar,is_customer_uploadable:(y==null?void 0:y.is_customer_uploadable)??!1,status:(y==null?void 0:y.status)??Nn.Open}),O(fe=>fe.includes(oe.name)?fe:[...fe,oe.name]))},Te=()=>{A(!0)},le=()=>{D()},Ke=({is_customer_uploadable:oe})=>{w(y?{...y,is_customer_uploadable:oe}:null)},Xe=oe=>{if(O(fe=>fe.filter(Ae=>Ae!==oe.name)),!oe.hasOtherAdmins)w(y?{...y,agent_name:void 0,agent_avatar:void 0}:null);else{const fe=N.filter(Ae=>Ae!==oe.name);fe.length>0&&w(y?{...y,agent_name:fe[0],agent_avatar:void 0}:null)}},qe=oe=>{O(fe=>fe.includes(oe.name)?fe:[...fe,oe.name]),y!=null&&y.agent_name||w(y?{...y,agent_name:oe.name,agent_avatar:void 0}:null)};return f.on(Ce.MessageAgentCreate,q),f.on(Ce.MessageUserCreate,se),f.on(Ce.MessageCustomerCreate,se),f.on(Ce.ChatUserAssignee,pe),f.on(Ce.MessageAgentTyping,Te),f.on(Ce.ChatUserClose,le),f.on(Ce.ChatToggleUpload,Ke),f.on(Ce.ChatUserLeave,Xe),f.on(Ce.ChatUserJoin,qe),()=>{f.off(Ce.MessageAgentCreate,q),f.off(Ce.MessageUserCreate,se),f.off(Ce.MessageCustomerCreate,se),f.off(Ce.ChatUserAssignee,pe),f.off(Ce.MessageAgentTyping,Te),f.off(Ce.ChatUserClose,le),f.off(Ce.ChatToggleUpload,Ke),f.off(Ce.ChatUserLeave,Xe),f.off(Ce.ChatUserJoin,qe)}},[ae,N]),v.useEffect(()=>{if(!f||!y||i){_.current=null;return}const q=`${y.status}-${y.agent_name||"no-agent"}`;_.current!==q&&(_.current=q,f.emit(tt.MessageList,{},se=>{if(!Array.isArray(se)){console.warn("MessageList response is not an array:",se),_.current=null;return}k(se);const pe=new Map;for(const le of se)le.sender_type===ye.Activity&&(le.activity_type===jn.AdminJoin&&le.sender_name?pe.set(le.sender_name,!0):le.activity_type===jn.AdminLeave&&le.sender_name&&pe.set(le.sender_name,!1));const Te=Array.from(pe.entries()).filter(([le,Ke])=>Ke).map(([le])=>le);O(Te)}))},[f,y,i]),v.useEffect(()=>{const q=setTimeout(()=>{A(!1)},2e3);return()=>clearTimeout(q)},[T]),v.useEffect(()=>{if(!e||S.length===0)return;let q=0;e.writing_timeout&&(q=[...S[0].content].length/e.writing_timeout,q<0&&(q=0));const se=setTimeout(()=>{ae(S[0]),F(S.slice(1))},q*1e3);return()=>clearTimeout(se)},[S,e]),Q?p.jsx(mh,{}):c&&l&&!i?p.jsxs(p.Fragment,{children:[p.jsx("div",{id:"chat-alert-portal"}),p.jsx("div",{className:`h-full w-full ${x?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:x?"100%":"",minHeight:x?"var(--app-height, 100dvh)":"",maxHeight:x?"var(--app-height, 100dvh)":"",backgroundColor:u.getColor(C.Background)},children:p.jsx(CB,{onOperatorConnected:Z,onChatClose:K})})]}):p.jsxs(p.Fragment,{children:[p.jsx("div",{id:"chat-alert-portal"}),p.jsx("div",{className:`h-full w-full ${x?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:x?"100%":"",minHeight:x?"var(--app-height, 100dvh)":"",maxHeight:x?"var(--app-height, 100dvh)":"",backgroundColor:u.getColor(C.Background)},children:y?y.status===Nn.Closed&&!i?p.jsx(yB,{onOk:P}):p.jsx(gB,{chat:y,isTyping:T,messages:j,shortcutMessages:S,onNewMessage:ae,onChatClose:D,onEvaluateChat:B,onNewChat:V,onSendMessage:R,isHistoryMode:!!i}):p.jsx(FS,{})})]})}function _B(){return gL(),null}function EB(){return p.jsxs(SB,{children:[p.jsx(kB,{children:p.jsx(TB,{})}),p.jsx(_B,{})]})}const jB=[{path:"/chat",component:EB,name:"chat"}],mT=[...jB],gT=[...wL],AB=[...mT,...gT];function Sh({text:e}){var c,d,u,f;const{widget:t,isHaveChat:n,isTooltipVisible:r,setIsTooltipVisible:i,onTooltipClose:s}=he(),o=Se(),a=ms(),l=()=>{i(!1),s&&s()};return r?p.jsxs(He.div,{initial:{opacity:0,scale:.8,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:10},transition:{type:"spring",damping:20,stiffness:300},className:Ie("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:o.getRadius(),backgroundColor:o.getColor(C.TooltipBackground),color:o.getColor(C.TooltipText)},children:[p.jsx("button",{onClick:l,className:"absolute top-2 right-2 p-1 rounded-full hover:bg-black/10 transition-colors","aria-label":a(ne.CloseButtonAria),children:p.jsx(ie.X,{className:"size-3"})}),p.jsx(He.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium pr-5",style:{color:o.getColor(C.TooltipText)},children:e||(n?(d=(c=t==null?void 0:t.appearance)==null?void 0:c.design)==null?void 0:d.tooltip_message_active:(f=(u=t==null?void 0:t.appearance)==null?void 0:u.design)==null?void 0:f.tooltip_message)||a(n?ne.TooltipActive:ne.TooltipDefault)}),p.jsx("div",{className:Ie("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]},"widget-tooltip"):null}const RB="/notify.mp3",PB=async e=>{await new Audio(e||RB).play()};function Hx({fallback:e,fallbackOpen:t}){const[n]=v.useState(window.document.title),r=Rr(),{isHaveChat:i,open:s,soundPath:o}=he(),[a,l]=v.useState(!0),[c,d]=v.useState(0),[u,f]=v.useState(null),m=ms(),h=()=>{PB(o)},g=(b,x)=>{if(u&&clearInterval(u),b||!i||x===0||Number.isNaN(x)){window.document.title=n,f(null);return}const y=setInterval(()=>{if(b||!i||x===0||Number.isNaN(x)){window.document.title=n,clearInterval(y),f(null);return}const w=`${x} ${m(ne.NewMessagesNotification)} - ${n}`;window.document.title!==w?window.document.title=w:window.document.title=n},1e3);return f(y),()=>{clearInterval(y),f(null)}};return v.useEffect(()=>g(s&&a,c),[c,s,a]),v.useEffect(()=>{const b=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",b,!1),()=>{document.removeEventListener("visibilitychange",b)}},[]),v.useEffect(()=>{if(i&&s&&a&&d(0),!r||!i||s&&a)return;const b=()=>{!i||s&&a||(d(x=>x+1),h())};return r.on(Ce.MessageAgentCreate,b),r.on(Ce.ChatUserAssignee,h),()=>{r.off(Ce.MessageAgentCreate,b),r.off(Ce.ChatUserAssignee,h)}},[r,i,s,a]),s?null:!i||c===0?t?e:null:p.jsx(Sh,{text:m(ne.NewMessagesNotification)})}function OB({children:e,border:t}){var $,_,I,R;const n=Rr(),{open:r,setOpen:i,setIsHaveChat:s,isHaveChat:o,widget:a,onOpen:l,onClose:c}=he(),[d]=v.useState(!0),u=Fo(),f=hl(),m=ul(),h=Se(),g=Cs(),b=id(),[x,y]=v.useState({x:0,y:0}),w=J3(),j=v.useRef(null),k=v.useRef(null),[T,A]=v.useState(!1),[S,F]=v.useState(!1);v.useEffect(()=>((()=>{A("ontouchstart"in window||navigator.maxTouchPoints>0)})(),window.addEventListener("touchstart",()=>{A(!0)},{once:!0}),()=>{window.removeEventListener("touchstart",()=>{A(!0)})}),[]),v.useEffect(()=>{o&&m.pathname==="/"&&f&&f.accessToken&&u.push("chat")},[o]),v.useEffect(()=>{r?requestAnimationFrame(()=>{F(!0)}):F(!1)},[r]);const N=P=>{if(!j.current||!k.current)return P;const D=j.current.getBoundingClientRect(),B={width:window.innerWidth,height:window.innerHeight},V={top:20,right:20,bottom:40,left:20};let Y=P.x,z=P.y;return D.right+Y-x.x>B.width-V.right&&(Y=B.width-V.right-D.width-(D.left-x.x)),D.left+Y-x.x<V.left&&(Y=V.left-(D.left-x.x)),D.bottom+z-x.y>B.height-V.bottom&&(z=B.height-V.bottom-D.height-(D.top-x.y)),D.top+z-x.y<V.top&&(z=V.top-(D.top-x.y)),{x:Y,y:z}},O=()=>{i(!0),n&&(n.emit(tt.WidgetOpen,{}),l&&l())},Q=()=>{i(!1),n&&(n.emit(tt.WidgetClose,{}),c&&c())},J=()=>{i(!1),s(!1),hu(a.client_id,Xi(f)),u.push("registration")};v.useEffect(()=>{if(g&&(o||b)&&O(),!(!n||!a))return n.on(Ce.Banned,J),()=>{n.off(Ce.Banned,J)}},[]);function U(P){T&&w.start(P)}return p.jsxs("section",{className:"relative w-full h-full",ref:k,children:[r&&p.jsx("div",{className:Ie("fixed z-300 overflow-hidden transition-all duration-300 ease-out",{"border border-solid dark:border-zink-500":t,"bottom-12 right-12 rounded-xl":!g,"!bottom-0 !right-0":g,"opacity-100 scale-100 translate-y-0":S,"opacity-0 scale-95 translate-y-2":!S}),style:{width:g?"100%":((_=($=a==null?void 0:a.appearance)==null?void 0:$.design)==null?void 0:_.width)||"21rem",height:g?"var(--app-height, 100dvh)":((R=(I=a==null?void 0:a.appearance)==null?void 0:I.design)==null?void 0:R.height)||"30rem",left:g?"0":"",right:g?"0px !important":"",maxHeight:g?"var(--app-height, 100dvh)":"",boxShadow:g?"":`0 10px 25px -5px ${h.getColor(C.ShadowColor)}, 0 8px 10px -6px ${h.getColor(C.ShadowColor)}`,backgroundColor:h.getColor(C.Background)},children:e}),!T&&p.jsxs("div",{className:"fixed bottom-[40px] right-[20px] z-400",children:[p.jsx(Hx,{fallback:p.jsx(Sh,{}),fallbackOpen:d}),!r&&p.jsxs(pt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:O,children:[p.jsx(He.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:Ie("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:h.getColor(C.ButtonBackground)}}),p.jsx(ie.Chat,{className:"size-7"})]},"desktop-open-button"),r&&!g&&p.jsx(pt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:Q,children:p.jsx(ie.X,{className:"size-7"})},"desktop-close-button")]}),T&&p.jsxs(He.div,{ref:j,className:"fixed z-400 bottom-24 right-5",initial:{bottom:"96px",right:"20px"},animate:{x:x.x,y:x.y},drag:T,dragControls:w,dragMomentum:!1,dragElastic:0,onDragEnd:(P,D)=>{const B={x:x.x+D.offset.x,y:x.y+D.offset.y},V=N(B);y(V)},children:[p.jsx(Hx,{fallback:p.jsx(Sh,{}),fallbackOpen:d}),!r&&p.jsx("div",{className:"cursor-move",onPointerDown:U,children:p.jsxs(pt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:O,children:[p.jsx(He.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:Ie("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:h.getColor(C.ButtonBackground)}}),p.jsx(ie.Chat,{className:"size-7"})]})},"chat-button"),r&&!g&&p.jsx(pt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:Q,children:p.jsx(ie.X,{className:"size-7"})},"desktop-close-button")]})]})}function MB(e){const{widget:t}=he();return p.jsx(sM,{widget:t,children:p.jsx(OB,{...e})})}function DB(){return p.jsx(Rj,{future:{v7_startTransition:!0},children:p.jsx(MB,{border:!0,children:p.jsxs(Oj,{children:[mT.map((e,t)=>p.jsx(Ep,{path:e.path,element:p.jsx(e.component,{})},t)),gT.map((e,t)=>p.jsx(Ep,{path:e.path,element:p.jsx(e.component,{})},t))]})})})}const NB=v.forwardRef((e,t)=>{const n=localStorage.getItem("lc:device:id"),{data:r,isLoading:i,error:s}=L2(e.link_id,n||void 0),{widget:o,setWidget:a,setSoundPath:l,setDefaultValues:c,setOpen:d,setOnTooltipClose:u,setIsTooltipVisible:f,setOnOpen:m,setOnClose:h,onOpen:g,onClose:b}=he();return v.useImperativeHandle(t,()=>({open:()=>{d(!0),g&&g()},close:()=>{d(!1),b&&b()}})),v.useEffect(()=>{r&&B2(r)&&a(r),e.soundPath&&l(e.soundPath),e.defaultValues&&c(e.defaultValues),e.onTooltipClose&&u(e.onTooltipClose),e.showTooltip===!1&&f(!1),e.onOpen&&m(e.onOpen),e.onClose&&h(e.onClose)},[r,e.soundPath,e.defaultValues,e.onTooltipClose,e.showTooltip,e.onOpen,e.onClose]),i?p.jsx("div",{children:"Loading..."}):s||!r||!o?null:p.jsx(lI,{children:p.jsx(hL,{children:p.jsx(DB,{})})})}),FB=new b2;let Wx=null;function IB(e){if(!e.container)return;const t=W.createRef();return Wx=mb(e.container),Wx.render(p.jsxs(_2,{client:FB,children:[p.jsx(NB,{...e,ref:t}),p.jsx(mA,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]})),{open:()=>{var n;return(n=t.current)==null?void 0:n.open()},close:()=>{var n;return(n=t.current)==null?void 0:n.close()},identify:n=>{if(!e.link_id)return;const r=gi(e.link_id);$M({widget_id:e.link_id,device_id:r,decrypted_data:n})}}}window.widget=IB});export default LB();
|